2020-02-22 19:04:53 +00:00
|
|
|
|
#ifndef ERROR_NOT_RESIDENT
|
|
|
|
|
# define ERROR_NOT_RESIDENT "<22>킽<EFBFBD><ED82BD><EFBFBD>A<EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>悧"
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef REMOVED
|
|
|
|
|
# define REMOVED "<22><><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>A<EFBFBD>܂<EFBFBD><DC82><EFBFBD><EF82A6><EFBFBD>炢<EFBFBD><E782A2><EFBFBD><EFBFBD>"
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef INITIALIZED
|
|
|
|
|
# define INITIALIZED "<22><><EFBFBD><EFBFBD><EFBFBD>ł́A<CD81><41><EFBFBD>낵<EFBFBD><EB82B5><EFBFBD><EFBFBD><EFBFBD>肢<EFBFBD><E882A2><EFBFBD>܂<EFBFBD>"
|
|
|
|
|
#endif
|
|
|
|
|
|
2020-02-21 16:22:58 +00:00
|
|
|
|
int main(int argc, const unsigned char **argv)
|
2020-02-21 21:56:18 +00:00
|
|
|
|
{
|
|
|
|
|
seg_t sgm;
|
2020-02-22 19:04:53 +00:00
|
|
|
|
#if GAME == 5
|
|
|
|
|
int i;
|
|
|
|
|
resident_t far *resident;
|
|
|
|
|
char far *resident_bytes;
|
|
|
|
|
const char *res_id = RES_ID;
|
|
|
|
|
#else
|
2020-02-21 21:56:18 +00:00
|
|
|
|
const char *res_id = RES_ID;
|
|
|
|
|
int i;
|
|
|
|
|
char far *resident_bytes;
|
2020-02-22 19:04:53 +00:00
|
|
|
|
#endif
|
2020-02-21 21:56:18 +00:00
|
|
|
|
|
|
|
|
|
sgm = resdata_exist(res_id, RES_ID_STRLEN, RES_PARASIZE);
|
|
|
|
|
dos_puts2("\n\n" LOGO "\n");
|
|
|
|
|
graph_clear();
|
|
|
|
|
#ifdef RES_INIT_TOP
|
|
|
|
|
RES_INIT_TOP;
|
|
|
|
|
#endif
|
|
|
|
|
if(argc == 2) {
|
|
|
|
|
#define arg1_is(capital, small) \
|
|
|
|
|
(argv[1][0] == '-' || argv[1][0] == '/') \
|
|
|
|
|
&& (argv[1][1] == (capital) || argv[1][1] == (small))
|
|
|
|
|
if(arg1_is('R', 'r')) {
|
|
|
|
|
if(!sgm) {
|
2020-02-22 19:04:53 +00:00
|
|
|
|
dos_puts2(ERROR_NOT_RESIDENT "\n\n");
|
2020-02-21 21:56:18 +00:00
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
dos_free(sgm);
|
2020-02-22 19:04:53 +00:00
|
|
|
|
dos_puts2(REMOVED "\n\n");
|
2020-02-21 21:56:18 +00:00
|
|
|
|
return 0;
|
|
|
|
|
} else if(arg1_is('D', 'd')) {
|
|
|
|
|
debug = 1;
|
|
|
|
|
} else {
|
|
|
|
|
dos_puts2("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȃI<EFBFBD>v<EFBFBD>V<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><EFBFBD>A<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ł<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
|
|
|
|
|
sgm = sgm; /* optimization barrier #1 */
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(sgm) {
|
|
|
|
|
dos_puts2("<EFBFBD>킽<EFBFBD><EFBFBD><EFBFBD>A<EFBFBD><EFBFBD><EFBFBD>łɂ<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>悧\n\n");
|
|
|
|
|
argv = argv; /* optimization barrier #2 */
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
sgm = resdata_create(res_id, RES_ID_STRLEN, RES_PARASIZE);
|
|
|
|
|
if(!sgm) {
|
|
|
|
|
dos_puts2("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>킽<EFBFBD><EFBFBD><EFBFBD>̋<EFBFBD><EFBFBD>ꏊ<EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><EFBFBD>́I\n\n");
|
2020-02-22 19:04:53 +00:00
|
|
|
|
optimization_barrier_3();
|
2020-02-21 21:56:18 +00:00
|
|
|
|
return 1;
|
|
|
|
|
}
|
2020-02-21 16:22:58 +00:00
|
|
|
|
resident_bytes = (char far *)MK_FP(sgm, 0);
|
2020-02-22 19:04:53 +00:00
|
|
|
|
dos_puts2(INITIALIZED "\n\n");
|
2020-02-21 21:56:18 +00:00
|
|
|
|
for(i = (RES_ID_STRLEN + 1); i < sizeof(resident_t); i++) {
|
|
|
|
|
resident_bytes[i] = 0;
|
|
|
|
|
}
|
2020-02-22 17:47:52 +00:00
|
|
|
|
RES_INIT_BOTTOM;
|
2020-02-21 21:56:18 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|