RCS file: /cvsroot/scummvm/tools/descumm-tool.cpp,v
retrieving revision 1.12
diff -u -r1.12 descumm-tool.cpp
|
|
|
277 | 277 | mem += 4; |
278 | 278 | } |
279 | 279 | } else if (scriptVersion >= 5) { |
280 | | if (size_of_code < (scriptVersion == 5 ? 8 : 10)) { |
| 280 | if (size_of_code < (scriptVersion == 5 ? 8 : 9)) { |
281 | 281 | printf("File too small to be a script\n"); |
282 | 282 | return 1; |
283 | 283 | } |
284 | 284 | |
285 | 285 | switch (TO_BE_32(*((uint32 *)mem))) { |
286 | 286 | case 'LSC2': |
| 287 | if (size_of_code < 13) { |
| 288 | printf("File too small to be a local script\n"); |
| 289 | } |
287 | 290 | printf("Script# %d\n", TO_LE_32(*((int32 *)(mem+8)))); |
288 | 291 | mem += 12; |
289 | 292 | break; /* Local script */ |
290 | 293 | case 'LSCR': |
291 | 294 | if (scriptVersion == 8) { |
| 295 | if (size_of_code < 13) { |
| 296 | printf("File too small to be a local script\n"); |
| 297 | } |
292 | 298 | printf("Script# %d\n", TO_LE_32(*((int32 *)(mem+8)))); |
293 | 299 | mem += 12; |
294 | 300 | } else if (scriptVersion == 7) { |
| 301 | if (size_of_code < 11) { |
| 302 | printf("File too small to be a local script\n"); |
| 303 | } |
295 | 304 | printf("Script# %d\n", TO_LE_16(*((int16 *)(mem+8)))); |
296 | 305 | mem += 10; |
297 | 306 | } else { |
| 307 | if (size_of_code < 10) { |
| 308 | printf("File too small to be a local script\n"); |
| 309 | } |
298 | 310 | printf("Script# %d\n", (byte)mem[8]); |
299 | 311 | mem += 9; |
300 | 312 | } |
RCS file: /cvsroot/scummvm/tools/descumm6.cpp,v
retrieving revision 1.189
diff -u -r1.189 descumm6.cpp
|
|
|
363 | 363 | /* 88 */ |
364 | 364 | NULL, |
365 | 365 | NULL, |
366 | | NULL, |
367 | | NULL, |
| 366 | "VAR_GAME_DISK_MSG", |
| 367 | "VAR_OPEN_FAILED_MSG", |
368 | 368 | /* 92 */ |
369 | | NULL, |
370 | | NULL, |
371 | | NULL, |
372 | | NULL, |
| 369 | "VAR_READ_ERROR_MSG", |
| 370 | "VAR_PAUSE_MSG", |
| 371 | "VAR_RESTART_MSG", |
| 372 | "VAR_QUIT_MSG", |
373 | 373 | /* 96 */ |
374 | | NULL, |
375 | | NULL, |
376 | | NULL, |
377 | | NULL, |
| 374 | "VAR_SAVE_BTN", |
| 375 | "VAR_LOAD_BTN", |
| 376 | "VAR_PLAY_BTN", |
| 377 | "VAR_CANCEL_BTN", |
378 | 378 | /* 100 */ |
379 | | NULL, |
380 | | NULL, |
381 | | NULL, |
382 | | NULL, |
| 379 | "VAR_QUIT_BTN", |
| 380 | "VAR_OK_BTN", |
| 381 | "VAR_SAVE_DISK_MSG", |
| 382 | "VAR_ENTER_NAME_MSG", |
383 | 383 | /* 104 */ |
384 | | NULL, |
385 | | NULL, |
386 | | NULL, |
387 | | NULL, |
| 384 | "VAR_NOT_SAVED_MSG", |
| 385 | "VAR_NOT_LOADED_MSG", |
| 386 | "VAR_SAVE_MSG", |
| 387 | "VAR_LOAD_MSG", |
388 | 388 | /* 108 */ |
389 | | NULL, |
390 | | NULL, |
391 | | NULL, |
392 | | NULL, |
| 389 | "VAR_SAVE_MENU_TITLE", |
| 390 | "VAR_LOAD_MENU_TITLE", |
| 391 | "VAR_GUI_COLORS", |
| 392 | "VAR_DEBUG_PASSWORD", |
393 | 393 | /* 112 */ |
394 | 394 | NULL, |
395 | 395 | NULL, |
… |
… |
|
397 | 397 | NULL, |
398 | 398 | /* 116 */ |
399 | 399 | NULL, |
400 | | NULL, |
| 400 | "VAR_MAIN_MENU_TITLE", |
401 | 401 | "VAR_RANDOM_NR", |
402 | 402 | "VAR_TIMEDATE_YEAR", |
403 | 403 | /* 120 */ |
404 | 404 | NULL, |
405 | 405 | NULL, |
406 | | NULL, |
| 406 | "VAR_GAME_VERSION", |
407 | 407 | "VAR_CHARSET_MASK", |
408 | 408 | /* 124 */ |
409 | 409 | NULL, |
… |
… |
|
911 | 911 | break; |
912 | 912 | case seArray: |
913 | 913 | if (se->left) { |
914 | | where += sprintf(where, "array%ld[", se->data); |
| 914 | if(scriptVersion == 8 && !(se->data & 0xF0000000) && |
| 915 | (s = getVarName(se->data & 0xFFFFFFF)) != NULL) |
| 916 | where += sprintf(where, "%s[",s); |
| 917 | else if(scriptVersion < 8 && !(se->data & 0xF000) && |
| 918 | (s = getVarName(se->data & 0xFFF)) != NULL) |
| 919 | where += sprintf(where, "%s[",s); |
| 920 | else |
| 921 | where += sprintf(where, "array%ld[", se->data); |
915 | 922 | where = se_astext(se->left, where); |
916 | 923 | where = strecpy(where, "]["); |
917 | 924 | where = se_astext(se->right, where); |
918 | 925 | where = strecpy(where, "]"); |
919 | 926 | } else { |
920 | | where += sprintf(where, "array%ld[", se->data); |
| 927 | if(scriptVersion == 8 && !(se->data & 0xF0000000) && |
| 928 | (s = getVarName(se->data & 0xFFFFFFF)) != NULL) |
| 929 | where += sprintf(where, "%s[",s); |
| 930 | else if(scriptVersion < 8 && !(se->data & 0xF000) && |
| 931 | (s = getVarName(se->data & 0xFFF)) != NULL) |
| 932 | where += sprintf(where, "%s[",s); |
| 933 | else |
| 934 | where += sprintf(where, "array%ld[", se->data); |
921 | 935 | where = se_astext(se->right, where); |
922 | 936 | where = strecpy(where, "]"); |
923 | 937 | } |
… |
… |
|
1230 | 1244 | args[numArgs++] = se_get_list(); |
1231 | 1245 | } else if (cmd == 'j') { |
1232 | 1246 | args[numArgs++] = se_int(get_word()); |
| 1247 | } else if (cmd == 'v') { |
| 1248 | args[numArgs++] = se_var(get_word()); |
1233 | 1249 | } else { |
1234 | 1250 | error("Character '%c' unknown in argument string '%s', \n", fmt, cmd); |
1235 | 1251 | } |
… |
… |
|
3342 | 3358 | break; |
3343 | 3359 | case 0xBC: |
3344 | 3360 | ext(output, "x" "dimArray\0" |
3345 | | "\xC7pw|int," |
3346 | | "\xC8pw|bit," |
3347 | | "\xC9pw|nibble," |
3348 | | "\xCApw|byte," |
3349 | | "\xCBpw|string," |
3350 | | "\xCCw|nukeArray"); |
| 3361 | "\xC7pv|int," |
| 3362 | "\xC8pv|bit," |
| 3363 | "\xC9pv|nibble," |
| 3364 | "\xCApv|byte," |
| 3365 | "\xCBpv|string," |
| 3366 | "\xCCv|nukeArray"); |
3351 | 3367 | break; |
3352 | 3368 | case 0xBD: |
3353 | 3369 | if (HumongousFlag) |
… |
… |
|
3369 | 3385 | break; |
3370 | 3386 | case 0xC0: |
3371 | 3387 | ext(output, "x" "dim2dimArray\0" |
3372 | | "\xC7ppw|int," |
3373 | | "\xC8ppw|bit," |
3374 | | "\xC9ppw|nibble," |
3375 | | "\xCAppw|byte," |
3376 | | "\xCBppw|string"); |
| 3388 | "\xC7ppv|int," |
| 3389 | "\xC8ppv|bit," |
| 3390 | "\xC9ppv|nibble," |
| 3391 | "\xCAppv|byte," |
| 3392 | "\xCBppv|string"); |
| 3393 | break; |
| 3394 | case 0xC1: |
| 3395 | ext(output, "ps|unknownOp"); |
3377 | 3396 | break; |
3378 | 3397 | case 0xC4: |
3379 | 3398 | ext(output, "rp|abs"); |
… |
… |
|
3484 | 3503 | ext(output, "rpp|getAnimateVariable"); |
3485 | 3504 | break; |
3486 | 3505 | case 0xD4: |
3487 | | ext(output, "wpp|shuffle"); |
| 3506 | ext(output, "vpp|shuffle"); |
3488 | 3507 | break; |
3489 | 3508 | case 0xD5: |
3490 | 3509 | ext(output, "lpp|jumpToScript"); |