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-04-18 16:36:29 +00:00
|
|
|
#include "planar.h"
|
2021-01-26 15:33:06 +00:00
|
|
|
#include "master.hpp"
|
2021-05-31 19:11:48 +00:00
|
|
|
#include "th02/main/playfld.hpp"
|
2021-06-11 19:19:12 +00:00
|
|
|
#include "th02/main/tile/tile.hpp"
|
2021-04-22 16:43:11 +00:00
|
|
|
#include "th02/formats/mpn.hpp"
|
2015-03-14 22:25:50 +00:00
|
|
|
|
2021-04-22 16:43:11 +00:00
|
|
|
int pascal mpn_load(const char *fn)
|
2015-03-14 22:25:50 +00:00
|
|
|
{
|
2021-04-22 16:43:11 +00:00
|
|
|
extern bool mpn_show_palette_on_load;
|
2021-01-28 18:08:00 +00:00
|
|
|
|
2015-03-14 22:25:50 +00:00
|
|
|
int ret;
|
2021-04-22 16:43:11 +00:00
|
|
|
mpn_show_palette_on_load = false;
|
|
|
|
ret = mpn_load_palette_show(fn);
|
|
|
|
mpn_show_palette_on_load = true;
|
2015-03-14 22:25:50 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2021-04-22 16:43:11 +00:00
|
|
|
void mpn_free(void)
|
2015-03-14 22:25:50 +00:00
|
|
|
{
|
2021-04-18 16:36:29 +00:00
|
|
|
if(mpn_images) {
|
|
|
|
HMem<mpn_image_t>::free(mpn_images);
|
2015-03-14 22:25:50 +00:00
|
|
|
}
|
2021-04-18 16:36:29 +00:00
|
|
|
mpn_images = NULL;
|
2015-03-14 22:25:50 +00:00
|
|
|
}
|
|
|
|
|
2020-06-26 10:19:15 +00:00
|
|
|
}
|