mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-11 16:58:11 +03:00
Unify executables
Instead of building multiple executables using #ifdefs, create a single executable (still called "system3") that can run all System1-3 games.
This commit is contained in:
+46
-41
@@ -55,7 +55,12 @@
|
||||
} \
|
||||
}
|
||||
|
||||
void NACT::cmd_calc()
|
||||
NACT_Sys2::NACT_Sys2(uint32 crc32, const char* font_file, const char* playlist)
|
||||
: NACT(2, crc32, font_file, playlist)
|
||||
{
|
||||
}
|
||||
|
||||
void NACT_Sys2::cmd_calc()
|
||||
{
|
||||
int index = getd();
|
||||
if(0x80 <= index && index <= 0xbf) {
|
||||
@@ -72,7 +77,7 @@ void NACT::cmd_calc()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_branch()
|
||||
void NACT_Sys2::cmd_branch()
|
||||
{
|
||||
int condition = cali();
|
||||
int nest = 0;
|
||||
@@ -238,7 +243,7 @@ void NACT::cmd_branch()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_label_jump()
|
||||
void NACT_Sys2::cmd_label_jump()
|
||||
{
|
||||
int next_addr = getw();
|
||||
scenario_addr = next_addr;
|
||||
@@ -250,7 +255,7 @@ void NACT::cmd_label_jump()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_label_call()
|
||||
void NACT_Sys2::cmd_label_call()
|
||||
{
|
||||
int next_addr = getw();
|
||||
|
||||
@@ -273,7 +278,7 @@ void NACT::cmd_label_call()
|
||||
}
|
||||
}
|
||||
|
||||
void NACT::cmd_page_jump()
|
||||
void NACT_Sys2::cmd_page_jump()
|
||||
{
|
||||
int next_page = cali();
|
||||
load_scenario(next_page);
|
||||
@@ -287,7 +292,7 @@ void NACT::cmd_page_jump()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_page_call()
|
||||
void NACT_Sys2::cmd_page_call()
|
||||
{
|
||||
int next_page = cali(), next_addr;
|
||||
|
||||
@@ -315,7 +320,7 @@ void NACT::cmd_page_call()
|
||||
scenario_addr = next_addr;
|
||||
}
|
||||
|
||||
void NACT::cmd_set_menu()
|
||||
void NACT_Sys2::cmd_set_menu()
|
||||
{
|
||||
if(ags->draw_menu) {
|
||||
ags->menu_dest_x = 2;
|
||||
@@ -345,7 +350,7 @@ void NACT::cmd_set_menu()
|
||||
}
|
||||
}
|
||||
|
||||
void NACT::cmd_open_menu()
|
||||
void NACT_Sys2::cmd_open_menu()
|
||||
{
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
char log[128];
|
||||
@@ -452,7 +457,7 @@ void NACT::cmd_open_menu()
|
||||
menu_index = 0;
|
||||
}
|
||||
|
||||
void NACT::cmd_set_verbobj()
|
||||
void NACT_Sys2::cmd_set_verbobj()
|
||||
{
|
||||
int verb = getd();
|
||||
int obj = getd();
|
||||
@@ -470,7 +475,7 @@ void NACT::cmd_set_verbobj()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_set_verbobj2()
|
||||
void NACT_Sys2::cmd_set_verbobj2()
|
||||
{
|
||||
int condition = cali();
|
||||
int verb = getd();
|
||||
@@ -491,7 +496,7 @@ void NACT::cmd_set_verbobj2()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_open_verb()
|
||||
void NACT_Sys2::cmd_open_verb()
|
||||
{
|
||||
// 動詞メニューの表示
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
@@ -623,7 +628,7 @@ void NACT::cmd_open_verb()
|
||||
menu_index = 0;
|
||||
}
|
||||
|
||||
void NACT::cmd_open_obj(int verb)
|
||||
void NACT_Sys2::cmd_open_obj(int verb)
|
||||
{
|
||||
// 目的語メニューの表示
|
||||
verb_obj = false;
|
||||
@@ -766,7 +771,7 @@ void NACT::cmd_open_obj(int verb)
|
||||
}
|
||||
}
|
||||
|
||||
void NACT::cmd_a()
|
||||
void NACT_Sys2::cmd_a()
|
||||
{
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
char log[128];
|
||||
@@ -806,7 +811,7 @@ void NACT::cmd_a()
|
||||
ags->clear_text_window(text_window, true);
|
||||
}
|
||||
|
||||
void NACT::cmd_b()
|
||||
void NACT_Sys2::cmd_b()
|
||||
{
|
||||
int cmd = cali();
|
||||
int index = cali();
|
||||
@@ -873,7 +878,7 @@ void NACT::cmd_b()
|
||||
}
|
||||
}
|
||||
|
||||
void NACT::cmd_d()
|
||||
void NACT_Sys2::cmd_d()
|
||||
{
|
||||
int p1 = cali();
|
||||
int p2 = cali();
|
||||
@@ -891,7 +896,7 @@ void NACT::cmd_d()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_e()
|
||||
void NACT_Sys2::cmd_e()
|
||||
{
|
||||
int p1 = cali();
|
||||
int p2 = cali();
|
||||
@@ -904,7 +909,7 @@ void NACT::cmd_e()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_f()
|
||||
void NACT_Sys2::cmd_f()
|
||||
{
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
char log[128];
|
||||
@@ -915,7 +920,7 @@ void NACT::cmd_f()
|
||||
scenario_addr = 2;
|
||||
}
|
||||
|
||||
void NACT::cmd_g()
|
||||
void NACT_Sys2::cmd_g()
|
||||
{
|
||||
int page = cali();
|
||||
|
||||
@@ -933,7 +938,7 @@ void NACT::cmd_g()
|
||||
ags->load_cg(page, -1);
|
||||
}
|
||||
|
||||
void NACT::cmd_h()
|
||||
void NACT_Sys2::cmd_h()
|
||||
{
|
||||
int length = getd();
|
||||
int val = cali();
|
||||
@@ -978,7 +983,7 @@ void NACT::cmd_h()
|
||||
ags->draw_text(string);
|
||||
}
|
||||
|
||||
void NACT::cmd_i()
|
||||
void NACT_Sys2::cmd_i()
|
||||
{
|
||||
int p1 = cali();
|
||||
int p2 = cali();
|
||||
@@ -991,7 +996,7 @@ void NACT::cmd_i()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_j()
|
||||
void NACT_Sys2::cmd_j()
|
||||
{
|
||||
int p1 = cali();
|
||||
int p2 = cali();
|
||||
@@ -1003,13 +1008,13 @@ void NACT::cmd_j()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_k()
|
||||
void NACT_Sys2::cmd_k()
|
||||
{
|
||||
// 未使用
|
||||
cmd_r();
|
||||
}
|
||||
|
||||
void NACT::cmd_l()
|
||||
void NACT_Sys2::cmd_l()
|
||||
{
|
||||
int index = getd();
|
||||
|
||||
@@ -1115,7 +1120,7 @@ void NACT::cmd_l()
|
||||
}
|
||||
}
|
||||
|
||||
void NACT::cmd_m()
|
||||
void NACT_Sys2::cmd_m()
|
||||
{
|
||||
char string[22];
|
||||
int d, p = 0;
|
||||
@@ -1142,7 +1147,7 @@ void NACT::cmd_m()
|
||||
}
|
||||
}
|
||||
|
||||
void NACT::cmd_n()
|
||||
void NACT_Sys2::cmd_n()
|
||||
{
|
||||
int p1 = cali();
|
||||
int p2 = cali();
|
||||
@@ -1154,7 +1159,7 @@ void NACT::cmd_n()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_o()
|
||||
void NACT_Sys2::cmd_o()
|
||||
{
|
||||
int st = cali();
|
||||
int width = cali();
|
||||
@@ -1172,7 +1177,7 @@ void NACT::cmd_o()
|
||||
ags->draw_mesh(sx, sy, width, height);
|
||||
}
|
||||
|
||||
void NACT::cmd_p()
|
||||
void NACT_Sys2::cmd_p()
|
||||
{
|
||||
int param = getd();
|
||||
|
||||
@@ -1195,7 +1200,7 @@ void NACT::cmd_p()
|
||||
buffer[p++] = (tmp >> 8) & 0xff; \
|
||||
}
|
||||
|
||||
void NACT::cmd_q()
|
||||
void NACT_Sys2::cmd_q()
|
||||
{
|
||||
static char header[112] = {
|
||||
'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 's', 'a', 'v', 'e', ' ', 'd', 'a', 't',
|
||||
@@ -1288,7 +1293,7 @@ void NACT::cmd_q()
|
||||
}
|
||||
}
|
||||
|
||||
void NACT::cmd_r()
|
||||
void NACT_Sys2::cmd_r()
|
||||
{
|
||||
#if defined(_DEBUG_CONSOLE)
|
||||
char log[128];
|
||||
@@ -1302,7 +1307,7 @@ void NACT::cmd_r()
|
||||
}
|
||||
}
|
||||
|
||||
void NACT::cmd_s()
|
||||
void NACT_Sys2::cmd_s()
|
||||
{
|
||||
int page = getd();
|
||||
|
||||
@@ -1319,7 +1324,7 @@ void NACT::cmd_s()
|
||||
}
|
||||
}
|
||||
|
||||
void NACT::cmd_t()
|
||||
void NACT_Sys2::cmd_t()
|
||||
{
|
||||
int p1 = cali();
|
||||
int p2 = cali();
|
||||
@@ -1332,7 +1337,7 @@ void NACT::cmd_t()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_u()
|
||||
void NACT_Sys2::cmd_u()
|
||||
{
|
||||
int page = getd();
|
||||
int transparent = getd();
|
||||
@@ -1346,7 +1351,7 @@ void NACT::cmd_u()
|
||||
ags->load_cg(page, transparent);
|
||||
}
|
||||
|
||||
void NACT::cmd_v()
|
||||
void NACT_Sys2::cmd_v()
|
||||
{
|
||||
int p1 = cali();
|
||||
int p2 = cali();
|
||||
@@ -1358,7 +1363,7 @@ void NACT::cmd_v()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_w()
|
||||
void NACT_Sys2::cmd_w()
|
||||
{
|
||||
int p1 = cali();
|
||||
int p2 = cali();
|
||||
@@ -1372,7 +1377,7 @@ void NACT::cmd_w()
|
||||
#endif
|
||||
}
|
||||
|
||||
void NACT::cmd_x()
|
||||
void NACT_Sys2::cmd_x()
|
||||
{
|
||||
int index = getd();
|
||||
|
||||
@@ -1387,7 +1392,7 @@ void NACT::cmd_x()
|
||||
}
|
||||
}
|
||||
|
||||
void NACT::cmd_y()
|
||||
void NACT_Sys2::cmd_y()
|
||||
{
|
||||
int cmd = cali();
|
||||
int param = cali();
|
||||
@@ -1550,7 +1555,7 @@ void NACT::cmd_y()
|
||||
// Y255
|
||||
}
|
||||
|
||||
void NACT::cmd_z()
|
||||
void NACT_Sys2::cmd_z()
|
||||
{
|
||||
int cmd = cali();
|
||||
int param = cali();
|
||||
@@ -1571,7 +1576,7 @@ void NACT::cmd_z()
|
||||
|
||||
// 下位関数
|
||||
|
||||
uint16 NACT::cali()
|
||||
uint16 NACT_Sys2::cali()
|
||||
{
|
||||
uint32 cali[256];
|
||||
int p = 1;
|
||||
@@ -1639,7 +1644,7 @@ uint16 NACT::cali()
|
||||
return (uint16)(cali[1] & 0xffff);
|
||||
}
|
||||
|
||||
uint16 NACT::cali2()
|
||||
uint16 NACT_Sys2::cali2()
|
||||
{
|
||||
uint16 val = 0;
|
||||
uint16 dat = getd();
|
||||
@@ -1657,12 +1662,12 @@ uint16 NACT::cali2()
|
||||
return val;
|
||||
}
|
||||
|
||||
uint8 NACT::getd()
|
||||
uint8 NACT_Sys2::getd()
|
||||
{
|
||||
return scenario_data[scenario_addr++];
|
||||
}
|
||||
|
||||
uint16 NACT::getw()
|
||||
uint16 NACT_Sys2::getw()
|
||||
{
|
||||
uint16 val = scenario_data[scenario_addr] | (scenario_data[scenario_addr + 1] << 8);
|
||||
scenario_addr += 2;
|
||||
|
||||
Reference in New Issue
Block a user