diff --git a/src/cmd2F.c b/src/cmd2F.c index 0825da7..f8daf07 100644 --- a/src/cmd2F.c +++ b/src/cmd2F.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "portab.h" #include "xsystem35.h" #include "scenario.h" @@ -33,7 +32,6 @@ #include "input.h" #include "msgskip.h" #include "selection.h" -#include "message.h" #include "music.h" #include "utfsjis.h" #include "hankaku.h" @@ -41,8 +39,8 @@ #include "gfx.h" #include "ald_manager.h" #include "LittleEndian.h" -#include "hacks.h" #include "filecheck.h" +#include "cmd_check.h" /* 選択 Window OPEN 時 callback */ static int cb_sel_init_page = 0; @@ -52,11 +50,6 @@ static const char REGREADSTRING_RESULT[] = "*regReadString*"; static SDL_Rect clip_window; -extern INPUTSTRING_PARAM mi_param; - -extern void commandH(); -extern void commandHH(); - typedef struct { int page; int index; @@ -65,72 +58,6 @@ typedef struct { #define FCTBL_MAX 1024 static fncall_table fnctbl[FCTBL_MAX]; -void commands2F00() { - /* テキストカラーをスタックからポップして設定する */ - sl_popState(STACK_TEXTCOLOR); - TRACE("TOC:"); -} - -void commands2F01() { - /* テキストフォントサイズをスタックからポップして設定する */ - sl_popState(STACK_TEXTSIZE); - TRACE("TOS:"); -} - -void commands2F02() { - /* 現在のテキストカラーをスタックにプッシュする */ - int type = getCaliValue(); - switch (type) { - case 0: sl_pushTextColor(type, nact->msg.MsgFontColor); break; - case 1: sl_pushTextColor(type, nact->sel.MsgFontColor); break; - default: WARNING("TPC: unknown type %d", type); break; - } - TRACE("TPC %d", exp); -} - -void commands2F03() { - /* 現在のテキストフォントサイズをスタックにプッシュする */ - int type = getCaliValue(); - switch (type) { - case 0: sl_pushTextSize(type, nact->msg.MsgFontSize); break; - case 1: sl_pushTextSize(type, nact->sel.MsgFontSize); break; - default: WARNING("TPS: unknown type %d", type); break; - } - TRACE("TPS %d", exp); -} - -void commands2F04() { - /* テキスト表示位置をスタックからポップして設定する */ - sl_popState(STACK_TEXTLOC); - TRACE("TOP:"); -} - -void commands2F05() { - /* 現在のテキスト表示位置をスタックにプッシュする */ - SDL_Point loc; - msg_getMessageLocation(&loc); - sl_pushTextLoc(loc.x, loc.y); - TRACE("TPP:"); -} - -void commands2F08() { - /* アンチエイリアシング付きテキスト描画のフラグ設定 */ - int exp = getCaliValue(); - - ags_setAntialiasedStringMode(exp == 1); - - TRACE("TAA %d:", exp); -} - -void commands2F09() { - /* アンチエイリアシング付きテキスト描画のフラグ取得 */ - int *var = getCaliVariable(); - - *var = ags_getAntialiasedStringMode() ? 1 : 0; - - TRACE("TAB %d:", *var); -} - void commands2F0A() { /* Wavデータを読み込む */ int eCh = getCaliValue(); @@ -331,162 +258,6 @@ void commands2F21() { sys_addMsg(str); } -void commands2F23() { - int x = getCaliValue(); - int y = getCaliValue(); - const char *vFileName = sl_getString(0); - - char *fname_utf8 = toUTF8(vFileName); - sysVar[0] = cg_load_with_filename(fname_utf8, x, y); - free(fname_utf8); - - TRACE("LC(new) %d, %d, %s:", x, y, vFileName); -} - -void commands2F24() { - int type = sl_getc(); - const char *file_name = sl_getString(0); - int var, cnt; - struct VarRef vref; - - char *fname_utf8 = toUTF8(file_name); - switch (type) { - case 0: - getCaliArray(&vref); - var = vref.var; - cnt = getCaliValue(); - sysVar[0] = load_vars_from_file(fname_utf8, &vref, cnt); - break; - case 1: - var = getCaliValue(); - cnt = getCaliValue(); - sysVar[0] = load_strs_from_file(fname_utf8, var, cnt); - break; - default: - var = getCaliValue(); - cnt = getCaliValue(); - WARNING("Unknown LE command type %d", type); - break; - } - free(fname_utf8); - - TRACE("LE(new) %d, %s, %d, %d:", type, file_name, var, cnt); -} - -void commands2F25() { - int file_name = getCaliValue(); - const char *title = sl_getString(0); - const char *filter = sl_getString(0); - - TRACE_UNIMPLEMENTED("LXG %d, %s, %s:", file_name, title, filter); -} - -void commands2F26() { - int dst_no = getCaliValue(); - int max_len = getCaliValue(); - const char *title = sl_getString(0); - char *t1, *t2, *t3; - - t1 = toUTF8(title); - t2 = toUTF8(svar_get(dst_no)); - - mi_param.title = t1; - mi_param.oldstring = t2; - mi_param.max = max_len; - - menu_inputstring(&mi_param); - if (mi_param.newstring == NULL) { - svar_set(dst_no, NULL); - free(t1); free(t2); - return; - } - - t3 = fromUTF8(mi_param.newstring); - - svar_set(dst_no, t3); - - free(t1); - free(t2); - free(t3); - - TRACE("MI(new) %d, %d, %s:", dst_no, max_len, title); -} - -void commands2F27() { - int num = getCaliValue(); - const char *string = sl_getString(0); - - svar_set(num, string); - TRACE("MS(new) %d, %s:", num, string); -} - -void commands2F28() { - const char *title = sl_getString(0); - - if (nact->game_title_utf8) - free(nact->game_title_utf8); - nact->game_title_utf8 = toUTF8(title); - - ags_setWindowTitle(nact->game_title_utf8); - - enable_hack_by_title(nact->game_title_utf8); - - TRACE("MT(new) %s:",title); -} - -/* defined in cmdn.c */ -extern INPUTNUM_PARAM ni_param; -void commands2F29() { - const char *title = sl_getString(0); - char *t; - - if (ni_param.title != NULL) { - free(ni_param.title); - } - t = toUTF8(title); - ni_param.title = t; - - TRACE("NT(new) %s:", title); -} - -void commands2F2A() { - int type = sl_getc(); - const char *file_name = sl_getString(0); - int var, cnt; - struct VarRef vref; - - char *fname_utf8 = toUTF8(file_name); - switch(type) { - case 0: - getCaliArray(&vref); - var = vref.var; - cnt = getCaliValue(); - sysVar[0] = save_vars_to_file(fname_utf8, &vref, cnt); - break; - case 1: - var = getCaliValue(); - cnt = getCaliValue(); - sysVar[0] = save_strs_to_file(fname_utf8, var, cnt); - break; - default: - var = getCaliValue(); - cnt = getCaliValue(); - WARNING("Unknown QE command"); - break; - } - free(fname_utf8); - - TRACE("QE(new) %d, %s, %d, %d:", type, file_name, var, cnt); -} - -void commands2F2B() { - int type = sl_getc(); - const char *work_dir = sl_getString(0); - const char *file_name = sl_getString(0); - - TRACE_UNIMPLEMENTED("UP(new) %d, %s, %s:", type, work_dir, file_name); -} - void commands2F2D() { int eCh = getCaliValue(); int eTime = getCaliValue(); @@ -712,17 +483,6 @@ void commands2F43() { TRACE("grDrawFillCircle %d, %d, %d, %d:", eX, eY, eLength, eColor); } -void commands2F44() { - int num1 = getCaliValue(); - int fig = getCaliValue(); - int num2 = getCaliValue(); - char buf[256]; - - svar_set(num1, format_number(num2, fig, buf)); - - TRACE("MHH %d, %d, %d:", num1, fig, num2); -} - void commands2F45() { int fPage = sl_getw(); int fIndex = sl_getaddr(); @@ -790,43 +550,6 @@ void commands2F4C() { eX, eY, eSrcX, eSrcY, eWidth, eHeight); } -void commands2F4D() { - int eNum = getCaliValue(); - const char *sText = sl_getString(0); - - TRACE_UNIMPLEMENTED("LXWT %d, %s:", eNum, sText); -} - -void commands2F4E() { - int eNum = getCaliValue(); - int eTextNum = getCaliValue(); - - TRACE_UNIMPLEMENTED("LXWS %d, %d:", eNum, eTextNum); -} - -void commands2F4F() { - int eNum = getCaliValue(); - int eType = getCaliValue(); - - TRACE_UNIMPLEMENTED("LXWE %d, %d:", eNum, eType); -} - -void commands2F50() { - int eFile = getCaliValue(); - int nFlg = sl_getc(); - int eNum = getCaliValue(); - - TRACE_UNIMPLEMENTED("LXWH %d, %d, %d:", eFile, nFlg, eNum); -} - -void commands2F51() { - int eFile = getCaliValue(); - int nFlg = sl_getc(); - int eNum = getCaliValue(); - - TRACE_UNIMPLEMENTED("LXWHH %d, %d, %d:", eFile, nFlg, eNum); -} - void commands2F52() { int eNum = getCaliValue(); if (eNum <= 0) return; @@ -882,14 +605,6 @@ void commands2F55() { } } -void commands2F56() { - int file_name = getCaliValue(); - const char *title = sl_getString(0); - const char *folder = sl_getString(0); - - TRACE_UNIMPLEMENTED("LXF %d, %s, %s:", file_name, title, folder); -} - void commands2F57() { const char *sTitle = sl_getString(0); int eStrVar = getCaliValue(); diff --git a/src/cmd_check.c b/src/cmd_check.c index 6a7d5ec..9a1d019 100644 --- a/src/cmd_check.c +++ b/src/cmd_check.c @@ -249,25 +249,25 @@ void exec_command(void) { /* 小文字コマンド */ switch(sl_getc()) { case 0x00: - commands2F00(); break; + commandTOC(); break; case 0x01: - commands2F01(); break; + commandTOS(); break; case 0x02: - commands2F02(); break; + commandTPC(); break; case 0x03: - commands2F03(); break; + commandTPS(); break; case 0x04: - commands2F04(); break; + commandTOP(); break; case 0x05: - commands2F05(); break; + commandTPP(); break; case 0x06: commandsINC(); break; case 0x07: commandsDEC(); break; case 0x08: - commands2F08(); break; + commandTAA(); break; case 0x09: - commands2F09(); break; + commandTAB(); break; case 0x0a: commands2F0A(); break; case 0x0b: @@ -335,7 +335,7 @@ void exec_command(void) { case 0x2a: commands2F2A(); break; case 0x2b: - commands2F2B(); break; + commandUP(); break; case 0x2c: commandF(); break; case 0x2d: @@ -385,7 +385,7 @@ void exec_command(void) { case 0x43: commands2F43(); break; case 0x44: - commands2F44(); break; + commandMHH(); break; case 0x45: commands2F45(); break; case 0x46: @@ -403,15 +403,15 @@ void exec_command(void) { case 0x4c: commands2F4C(); break; case 0x4d: - commands2F4D(); break; + commandLXWT(); break; case 0x4e: - commands2F4E(); break; + commandLXWS(); break; case 0x4f: - commands2F4F(); break; + commandLXWE(); break; case 0x50: - commands2F50(); break; + commandLXWH(); break; case 0x51: - commands2F51(); break; + commandLXWHH(); break; case 0x52: commands2F52(); break; case 0x53: @@ -421,7 +421,7 @@ void exec_command(void) { case 0x55: commands2F55(); break; case 0x56: - commands2F56(); break; + commandLXF(); break; case 0x57: commands2F57(); break; case 0x58: diff --git a/src/cmd_check.h b/src/cmd_check.h index 4291786..89b190e 100644 --- a/src/cmd_check.h +++ b/src/cmd_check.h @@ -117,8 +117,10 @@ extern void commandKW(); /* defined by cmdl.c */ extern void commandLC(); +extern void commands2F23(); // new LC extern void commandLD(); extern void commandLE(); +extern void commands2F24(); // new LE extern void commandLHD(); extern void commandLHG(); extern void commandLHM(); @@ -128,6 +130,7 @@ extern void commandLL(); extern void commandLP(); extern void commandLT(); extern void commandLXG(); +extern void commands2F25(); // new LXG extern void commandLXO(); extern void commandLXC(); extern void commandLXL(); @@ -136,6 +139,12 @@ extern void commandLXP(); extern void commandLXR(); extern void commandLXW(); extern void commandLXX(); +extern void commandLXWT(); +extern void commandLXWS(); +extern void commandLXWE(); +extern void commandLXWH(); +extern void commandLXWHH(); +extern void commandLXF(); /* defined by cmdm.c */ extern void commandMA(); @@ -145,14 +154,18 @@ extern void commandME(); extern void commandMF(); extern void commandMG(); extern void commandMH(); +extern void commandMHH(); extern void commandMI(); +extern void commands2F26(); // new MI extern void commandMJ(); extern void commandML(); extern void commandMM(); extern void commandMN(); extern void commandMP(); extern void commandMS(); +extern void commands2F27(); // new MS extern void commandMT(); +extern void commands2F28(); // new MT extern void commandMV(); extern void commandMZ0(); @@ -176,6 +189,7 @@ extern void commandNP(); extern void commandNR(); extern void commandNO(); extern void commandNT(); +extern void commands2F29(); // new NT extern void commandND_ADD(); extern void commandND_SUB(); extern void commandND_MUL(); @@ -206,6 +220,7 @@ extern void commandPW(); extern void commandQC(); extern void commandQD(); extern void commandQE(); +extern void commands2F2A(); // new QE extern void commandQP(); /* defined by cmds.c */ @@ -227,6 +242,14 @@ extern void commandSI(); /* defined by cmdt.c */ extern void commandT(); +extern void commandTOC(); +extern void commandTOS(); +extern void commandTPC(); +extern void commandTPS(); +extern void commandTOP(); +extern void commandTPP(); +extern void commandTAA(); +extern void commandTAB(); /* defined by cmdu.c */ extern void commandUC(); @@ -237,6 +260,7 @@ extern void commandUG(); extern void commandUP0(); extern void commandUP1(); extern void commandUP3(); +extern void commandUP(); /* defined by cmdv.c */ extern void commandVC(); @@ -308,14 +332,6 @@ extern void commandZR(); extern void commandZU(); /* define in cmd2F.c */ -extern void commands2F00(); -extern void commands2F01(); -extern void commands2F02(); -extern void commands2F03(); -extern void commands2F04(); -extern void commands2F05(); -extern void commands2F08(); -extern void commands2F09(); extern void commands2F0A(); extern void commands2F0B(); extern void commands2F0C(); @@ -340,15 +356,6 @@ extern void commands2F1E(); extern void commands2F1F(); extern void commands2F20(); extern void commands2F21(); -extern void commands2F23(); -extern void commands2F24(); -extern void commands2F25(); -extern void commands2F26(); -extern void commands2F27(); -extern void commands2F28(); -extern void commands2F29(); -extern void commands2F2A(); -extern void commands2F2B(); extern void commands2F2D(); extern void commands2F2E(); extern void commands2F2F(); @@ -372,7 +379,6 @@ extern void commands2F40(); extern void commands2F41(); extern void commands2F42(); extern void commands2F43(); -extern void commands2F44(); extern void commands2F45(); extern void commands2F46(); extern void commands2F47(); @@ -381,16 +387,10 @@ extern void commands2F49(); extern void commands2F4A(); extern void commands2F4B(); extern void commands2F4C(); -extern void commands2F4D(); -extern void commands2F4E(); -extern void commands2F4F(); -extern void commands2F50(); -extern void commands2F51(); extern void commands2F52(); extern void commands2F53(); extern void commands2F54(); extern void commands2F55(); -extern void commands2F56(); extern void commands2F57(); extern void commands2F58(); extern void commands2F59(); diff --git a/src/cmdl.c b/src/cmdl.c index 31b4031..130116e 100644 --- a/src/cmdl.c +++ b/src/cmdl.c @@ -136,6 +136,36 @@ void commandLE() { TRACE("LE %d,%s,%d,%d:",type, filename, var, cnt); } +void commands2F24() { + int type = sl_getc(); + const char *file_name = sl_getString(0); + int var, cnt; + struct VarRef vref; + + char *fname_utf8 = toUTF8(file_name); + switch (type) { + case 0: + getCaliArray(&vref); + var = vref.var; + cnt = getCaliValue(); + sysVar[0] = load_vars_from_file(fname_utf8, &vref, cnt); + break; + case 1: + var = getCaliValue(); + cnt = getCaliValue(); + sysVar[0] = load_strs_from_file(fname_utf8, var, cnt); + break; + default: + var = getCaliValue(); + cnt = getCaliValue(); + WARNING("Unknown LE command type %d", type); + break; + } + free(fname_utf8); + + TRACE("LE(new) %d, %s, %d, %d:", type, file_name, var, cnt); +} + void commandLL() { int type = sl_getc(); int link_no = getCaliValue(); @@ -266,6 +296,18 @@ void commandLC() { TRACE("LC %d,%d,%s:", x, y, filename); } +void commands2F23() { + int x = getCaliValue(); + int y = getCaliValue(); + const char *vFileName = sl_getString(0); + + char *fname_utf8 = toUTF8(vFileName); + sysVar[0] = cg_load_with_filename(fname_utf8, x, y); + free(fname_utf8); + + TRACE("LC(new) %d, %d, %s:", x, y, vFileName); +} + void commandLXG() { /* ファイルを選択する */ int file_name = getCaliValue(); @@ -275,6 +317,14 @@ void commandLXG() { TRACE_UNIMPLEMENTED("LXG %d,%s,%s:", file_name, title, filter); } +void commands2F25() { + int file_name = getCaliValue(); + const char *title = sl_getString(0); + const char *filter = sl_getString(0); + + TRACE_UNIMPLEMENTED("LXG %d, %s, %s:", file_name, title, filter); +} + void commandLXO() { /* ファイルを作成またはオープンする */ int num = getCaliValue(); @@ -376,3 +426,48 @@ void commandLXX() { TRACE("LXX %d,%d,%d:", type, num, *var); } + +void commandLXWT() { + int eNum = getCaliValue(); + const char *sText = sl_getString(0); + + TRACE_UNIMPLEMENTED("LXWT %d, %s:", eNum, sText); +} + +void commandLXWS() { + int eNum = getCaliValue(); + int eTextNum = getCaliValue(); + + TRACE_UNIMPLEMENTED("LXWS %d, %d:", eNum, eTextNum); +} + +void commandLXWE() { + int eNum = getCaliValue(); + int eType = getCaliValue(); + + TRACE_UNIMPLEMENTED("LXWE %d, %d:", eNum, eType); +} + +void commandLXWH() { + int eFile = getCaliValue(); + int nFlg = sl_getc(); + int eNum = getCaliValue(); + + TRACE_UNIMPLEMENTED("LXWH %d, %d, %d:", eFile, nFlg, eNum); +} + +void commandLXWHH() { + int eFile = getCaliValue(); + int nFlg = sl_getc(); + int eNum = getCaliValue(); + + TRACE_UNIMPLEMENTED("LXWHH %d, %d, %d:", eFile, nFlg, eNum); +} + +void commandLXF() { + int file_name = getCaliValue(); + const char *title = sl_getString(0); + const char *folder = sl_getString(0); + + TRACE_UNIMPLEMENTED("LXF %d, %s, %s:", file_name, title, folder); +} diff --git a/src/cmdm.c b/src/cmdm.c index 1b76052..33d425b 100644 --- a/src/cmdm.c +++ b/src/cmdm.c @@ -36,7 +36,7 @@ #include "hacks.h" /* MI 用パラメータ */ -INPUTSTRING_PARAM mi_param; +static INPUTSTRING_PARAM mi_param; void commandMS() { /* Xコマンドで表示される文字列領域に文字列を入れる */ @@ -47,6 +47,14 @@ void commandMS() { TRACE("MS %d,%s:",num,str); } +void commands2F27() { + int num = getCaliValue(); + const char *string = sl_getString(0); + + svar_set(num, string); + TRACE("MS(new) %d, %s:", num, string); +} + void commandMP() { /* 指定の文字列を指定文字数だけ表示する(Xコマンドの桁数指定) */ int num1 = getCaliValue(); @@ -121,6 +129,37 @@ void commandMI() { /* T2 */ TRACE("MI %d,%d,%s:",dst_no,max_len, title); } +void commands2F26() { + int dst_no = getCaliValue(); + int max_len = getCaliValue(); + const char *title = sl_getString(0); + char *t1, *t2, *t3; + + t1 = toUTF8(title); + t2 = toUTF8(svar_get(dst_no)); + + mi_param.title = t1; + mi_param.oldstring = t2; + mi_param.max = max_len; + + menu_inputstring(&mi_param); + if (mi_param.newstring == NULL) { + svar_set(dst_no, NULL); + free(t1); free(t2); + return; + } + + t3 = fromUTF8(mi_param.newstring); + + svar_set(dst_no, t3); + + free(t1); + free(t2); + free(t3); + + TRACE("MI(new) %d, %d, %s:", dst_no, max_len, title); +} + void commandMA() { /* num1 の文字列の後ろに num2 をつなげる */ int num1 = getCaliValue(); @@ -161,6 +200,20 @@ void commandMT() { TRACE("MT %s:",str); } +void commands2F28() { + const char *title = sl_getString(0); + + if (nact->game_title_utf8) + free(nact->game_title_utf8); + nact->game_title_utf8 = toUTF8(title); + + ags_setWindowTitle(nact->game_title_utf8); + + enable_hack_by_title(nact->game_title_utf8); + + TRACE("MT(new) %s:",title); +} + void commandMM() { /* num1 の文字列に num2 をコピーする */ int num1 = getCaliValue(); @@ -186,6 +239,17 @@ void commandMH() { TRACE("MH %d,%d,%d:",num1,fig,num2); } +void commandMHH() { + int num1 = getCaliValue(); + int fig = getCaliValue(); + int num2 = getCaliValue(); + char buf[256]; + + svar_set(num1, format_number(num2, fig, buf)); + + TRACE("MHH %d, %d, %d:", num1, fig, num2); +} + void commandMV() { /* シナリオバージョンをシステムへ通知する */ int version = getCaliValue(); diff --git a/src/cmdn.c b/src/cmdn.c index 217374a..6c3c026 100644 --- a/src/cmdn.c +++ b/src/cmdn.c @@ -32,7 +32,7 @@ #include "menu.h" /* NI/NT 用パラメータ */ -INPUTNUM_PARAM ni_param; +static INPUTNUM_PARAM ni_param; void commandNB() { /* var1 から始まるcount個の変数へ @@ -386,6 +386,19 @@ void commandNT() { /* From Panyo */ TRACE("NT %p:", str); } +void commands2F29() { + const char *title = sl_getString(0); + char *t; + + if (ni_param.title != NULL) { + free(ni_param.title); + } + t = toUTF8(title); + ni_param.title = t; + + TRACE("NT(new) %s:", title); +} + void commandNP() { /* 配列比較 */ int *var1 = getCaliVariable(); diff --git a/src/cmdq.c b/src/cmdq.c index a80f09e..4b56557 100644 --- a/src/cmdq.c +++ b/src/cmdq.c @@ -109,3 +109,33 @@ void commandQE() { TRACE("QE %d,%s,%d,%d:", type, filename, var, cnt); } + +void commands2F2A() { + int type = sl_getc(); + const char *file_name = sl_getString(0); + int var, cnt; + struct VarRef vref; + + char *fname_utf8 = toUTF8(file_name); + switch(type) { + case 0: + getCaliArray(&vref); + var = vref.var; + cnt = getCaliValue(); + sysVar[0] = save_vars_to_file(fname_utf8, &vref, cnt); + break; + case 1: + var = getCaliValue(); + cnt = getCaliValue(); + sysVar[0] = save_strs_to_file(fname_utf8, var, cnt); + break; + default: + var = getCaliValue(); + cnt = getCaliValue(); + WARNING("Unknown QE command"); + break; + } + free(fname_utf8); + + TRACE("QE(new) %d, %s, %d, %d:", type, file_name, var, cnt); +} diff --git a/src/cmdt.c b/src/cmdt.c index 171b20e..7fca451 100644 --- a/src/cmdt.c +++ b/src/cmdt.c @@ -35,3 +35,69 @@ void commandT() { TRACE("T %d,%d:",x,y); } + +void commandTOC() { + /* テキストカラーをスタックからポップして設定する */ + sl_popState(STACK_TEXTCOLOR); + TRACE("TOC:"); +} + +void commandTOS() { + /* テキストフォントサイズをスタックからポップして設定する */ + sl_popState(STACK_TEXTSIZE); + TRACE("TOS:"); +} + +void commandTPC() { + /* 現在のテキストカラーをスタックにプッシュする */ + int type = getCaliValue(); + switch (type) { + case 0: sl_pushTextColor(type, nact->msg.MsgFontColor); break; + case 1: sl_pushTextColor(type, nact->sel.MsgFontColor); break; + default: WARNING("TPC: unknown type %d", type); break; + } + TRACE("TPC %d", exp); +} + +void commandTPS() { + /* 現在のテキストフォントサイズをスタックにプッシュする */ + int type = getCaliValue(); + switch (type) { + case 0: sl_pushTextSize(type, nact->msg.MsgFontSize); break; + case 1: sl_pushTextSize(type, nact->sel.MsgFontSize); break; + default: WARNING("TPS: unknown type %d", type); break; + } + TRACE("TPS %d", exp); +} + +void commandTOP() { + /* テキスト表示位置をスタックからポップして設定する */ + sl_popState(STACK_TEXTLOC); + TRACE("TOP:"); +} + +void commandTPP() { + /* 現在のテキスト表示位置をスタックにプッシュする */ + SDL_Point loc; + msg_getMessageLocation(&loc); + sl_pushTextLoc(loc.x, loc.y); + TRACE("TPP:"); +} + +void commandTAA() { + /* アンチエイリアシング付きテキスト描画のフラグ設定 */ + int exp = getCaliValue(); + + ags_setAntialiasedStringMode(exp == 1); + + TRACE("TAA %d:", exp); +} + +void commandTAB() { + /* アンチエイリアシング付きテキスト描画のフラグ取得 */ + int *var = getCaliVariable(); + + *var = ags_getAntialiasedStringMode() ? 1 : 0; + + TRACE("TAB %d:", *var); +} diff --git a/src/cmdu.c b/src/cmdu.c index 2ede1fb..a42ed60 100644 --- a/src/cmdu.c +++ b/src/cmdu.c @@ -122,3 +122,11 @@ void commandUP3() { TRACE_UNIMPLEMENTED("UP3 %s,%s:",str1,str2); } + +void commandUP() { + int type = sl_getc(); + const char *work_dir = sl_getString(0); + const char *file_name = sl_getString(0); + + TRACE_UNIMPLEMENTED("UP(new) %d, %s, %s:", type, work_dir, file_name); +}