2015-03-14 22:25:50 +00:00
|
|
|
/* ReC98
|
|
|
|
* -----
|
|
|
|
* 1st part of code segment #2 of TH02's MAIN.EXE
|
|
|
|
*/
|
|
|
|
|
2021-03-21 18:35:04 +00:00
|
|
|
#pragma option -zCSHARED -3
|
2020-10-01 14:34:46 +00:00
|
|
|
|
2020-06-26 10:19:15 +00:00
|
|
|
extern "C" {
|
2021-04-16 10:29:57 +00:00
|
|
|
#include <stddef.h>
|
2021-01-28 18:08:00 +00:00
|
|
|
#include "platform.h"
|
|
|
|
#include "pc98.h"
|
2021-01-26 15:33:06 +00:00
|
|
|
#include "master.hpp"
|
2021-01-28 18:08:00 +00:00
|
|
|
#include "th02/formats/mptn.hpp"
|
2015-03-14 22:25:50 +00:00
|
|
|
|
|
|
|
int pascal mptn_load(const char *fn)
|
|
|
|
{
|
2021-01-28 18:08:00 +00:00
|
|
|
extern bool mptn_show_palette_on_load;
|
|
|
|
|
2015-03-14 22:25:50 +00:00
|
|
|
int ret;
|
2021-01-28 18:08:00 +00:00
|
|
|
mptn_show_palette_on_load = false;
|
|
|
|
ret = mptn_load_palette_show(fn);
|
|
|
|
mptn_show_palette_on_load = true;
|
2015-03-14 22:25:50 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2021-01-28 18:08:00 +00:00
|
|
|
void mptn_free(void)
|
2015-03-14 22:25:50 +00:00
|
|
|
{
|
|
|
|
if(mptn_buffer) {
|
2021-04-16 10:29:57 +00:00
|
|
|
HMem<int>::free(mptn_buffer);
|
2015-03-14 22:25:50 +00:00
|
|
|
}
|
|
|
|
mptn_buffer = 0;
|
|
|
|
}
|
|
|
|
|
2020-06-26 10:19:15 +00:00
|
|
|
}
|