diff --git a/modules/NIGHTDLL/sprite_draw.c b/modules/NIGHTDLL/sprite_draw.c index 7422c55..5b797e9 100644 --- a/modules/NIGHTDLL/sprite_draw.c +++ b/modules/NIGHTDLL/sprite_draw.c @@ -139,4 +139,5 @@ int sp_draw_scg(sprite_t *sp, MyRectangle *r) { WARNING("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n", sp->no, sx, sy, w, h, dx, dy); + return OK; } diff --git a/modules/lib/graph.c b/modules/lib/graph.c index 796f213..a416643 100644 --- a/modules/lib/graph.c +++ b/modules/lib/graph.c @@ -17,10 +17,10 @@ */ #undef WARNING -#define WARNING // +#define WARNING(...) #undef NOTICE -#define NOTICE // +#define NOTICE(...) /** diff --git a/modules/nDEMO/nDEMO.c b/modules/nDEMO/nDEMO.c index 862b0cf..46afe04 100644 --- a/modules/nDEMO/nDEMO.c +++ b/modules/nDEMO/nDEMO.c @@ -19,13 +19,13 @@ void Init() { } void SetKeyCancelFlag() { - int p1 = getCaliVariable(); + int p1 = getCaliValue(); DEBUG_COMMAND_YET("nDEMO.SetKeyCancelFlag %d:\n", p1); } void SetLoopFlag() { - int p1 = getCaliVariable(); + int p1 = getCaliValue(); DEBUG_COMMAND_YET("nDEMO.SetLoopFlag %d:\n", p1); } diff --git a/src/filecheck.c b/src/filecheck.c index 0a6b067..ebb0548 100644 --- a/src/filecheck.c +++ b/src/filecheck.c @@ -38,7 +38,7 @@ struct fnametable { static char *saveDataPath; static boolean newfile_kanjicode_utf8 = TRUE; -static char *get_fullpath(char* dir, char *filename) { +static char *get_fullpath(const char* dir, char *filename) { char *fn = malloc(strlen(filename) + strlen(dir) + 3); if (fn == NULL) { return NULL; diff --git a/src/hankaku.c b/src/hankaku.c index 5faebd2..eb32af7 100644 --- a/src/hankaku.c +++ b/src/hankaku.c @@ -618,7 +618,7 @@ BYTE *zen2han(BYTE *src) { dst = _dst = malloc(strlen(src) + 1); if (dst == NULL) { - fprintf(stderr, "zen2han(): Out of Memory (size %d)", strlen(src) + 1); + fprintf(stderr, "zen2han(): Out of Memory (size %zu)", strlen(src) + 1); return NULL; } @@ -651,7 +651,7 @@ BYTE *han2zen(BYTE *src) { dst = _dst = malloc(strlen(src) * 2 + 1); if (dst == NULL) { - fprintf(stderr, "han2zen(): Out of Memory (size %d)", strlen(src) *2 + 1); + fprintf(stderr, "han2zen(): Out of Memory (size %zu)", strlen(src) *2 + 1); return NULL; } diff --git a/src/joystick_sdl.c b/src/joystick_sdl.c index b2f7397..29db3c8 100644 --- a/src/joystick_sdl.c +++ b/src/joystick_sdl.c @@ -45,8 +45,8 @@ int joy_open(void) { int i; const char *name; for( i=0 ; i +#include #include #include "portab.h" diff --git a/src/scenario.c b/src/scenario.c index 73741fd..5142019 100644 --- a/src/scenario.c +++ b/src/scenario.c @@ -80,7 +80,7 @@ static void showStackData() { if (fp == NULL) return; fprintf(fp, "Page = %d, index = %x\n", sl_getPage(), sl_getIndex()); - fprintf(fp, "stack top = %p, cur = %p, size=%d, index=%d\n", sco_stackbuf, sco_stackindex, sco_stacksize, (sco_stackindex - sco_stackbuf)); + fprintf(fp, "stack top = %p, cur = %p, size=%d, index=%td\n", sco_stackbuf, sco_stackindex, sco_stacksize, (sco_stackindex - sco_stackbuf)); var = sco_stackbuf; for (i = 0; i < sco_stacksize; i+=10) { diff --git a/src/utfsjis.c b/src/utfsjis.c index 6f9b023..ef145fa 100644 --- a/src/utfsjis.c +++ b/src/utfsjis.c @@ -33,7 +33,7 @@ #include "utfsjis.h" #include "s2utbl.h" -BYTE *sjis2utf(BYTE *src) { +BYTE *sjis2utf(const BYTE *src) { BYTE* dst = malloc(strlen(src) * 3 + 1); BYTE* dstp = dst; @@ -79,7 +79,7 @@ static int unicode_to_sjis(int u) { return 0; } -BYTE *utf2sjis(BYTE *src) { +BYTE *utf2sjis(const BYTE *src) { BYTE* dst = malloc(strlen(src) + 1); BYTE* dstp = dst; @@ -119,7 +119,7 @@ BYTE *utf2sjis(BYTE *src) { } /* src 内に半角カナもしくはASCII文字があるかどうか */ -boolean sjis_has_hankaku(BYTE *src) { +boolean sjis_has_hankaku(const BYTE *src) { while(*src) { if (CHECKSJIS1BYTE(*src)) { src++; @@ -132,7 +132,7 @@ boolean sjis_has_hankaku(BYTE *src) { } /* src 内に 全角文字があるかどうか */ -boolean sjis_has_zenkaku(BYTE *src) { +boolean sjis_has_zenkaku(const BYTE *src) { while(*src) { if (CHECKSJIS1BYTE(*src)) { return TRUE; @@ -143,7 +143,7 @@ boolean sjis_has_zenkaku(BYTE *src) { } /* src 中の文字数を数える 全角文字も1文字 */ -int sjis_count_char(BYTE *src) { +int sjis_count_char(const BYTE *src) { int c = 0; while(*src) { @@ -170,7 +170,7 @@ void sjis_toupper(BYTE *src) { } /* SJIS を含む文字列の ASCII を大文字化する2 */ -BYTE *sjis_toupper2(BYTE *src) { +BYTE *sjis_toupper2(const BYTE *src) { BYTE *dst; dst = malloc(strlen(src) +1); diff --git a/src/utfsjis.h b/src/utfsjis.h index 1f0e179..9f19f7b 100644 --- a/src/utfsjis.h +++ b/src/utfsjis.h @@ -32,12 +32,12 @@ #define CHECKSJIS1BYTE(b) ( ((b) & 0xe0) == 0x80 || ((b) & 0xe0) == 0xe0 ) -extern BYTE* sjis2utf(BYTE *src); -extern BYTE* utf2sjis(BYTE *src); -extern boolean sjis_has_hankaku(BYTE *src); -extern boolean sjis_has_zenkaku(BYTE *src); -extern int sjis_count_char(BYTE *src); +extern BYTE* sjis2utf(const BYTE *src); +extern BYTE* utf2sjis(const BYTE *src); +extern boolean sjis_has_hankaku(const BYTE *src); +extern boolean sjis_has_zenkaku(const BYTE *src); +extern int sjis_count_char(const BYTE *src); extern void sjis_toupper(BYTE *src); -extern BYTE* sjis_toupper2(BYTE *src); +extern BYTE* sjis_toupper2(const BYTE *src); #endif /* __UTFSJIS__ */ diff --git a/src/xsystem35.h b/src/xsystem35.h index ae79a1c..ea94959 100644 --- a/src/xsystem35.h +++ b/src/xsystem35.h @@ -51,9 +51,9 @@ #define DEBUG_COMMAND sys_nextdebuglv = 5, DEBUG_SHOWSCOADR, sys_message #define DEBUG_MESSAGE sys_nextdebuglv = 6, sys_message #else -#define DEBUG_MESSAGE -#define DEBUG_COMMAND -#define DEBUG_COMMAND_YET +#define DEBUG_MESSAGE(...) +#define DEBUG_COMMAND(...) +#define DEBUG_COMMAND_YET(...) #endif /* 配列外参照チェック/cali異常値検出 */