From 5f99dee42cef74583f22c7839b68139cd822a74c Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 14 Apr 2020 19:42:57 +1000 Subject: [PATCH] jap-final: Fix mismatches in setup files --- Makefile | 2 +- checksums.jap-final.md5 | 2 +- src/files/setup/setupame.c | 9 +++++++-- src/files/setup/setupimp.c | 10 ++++++++++ src/files/setup/setuplee.c | 9 +++++++++ src/files/setup/setuplip.c | 10 ++++++++++ src/files/setup/setuplue.c | 5 +++++ src/files/setup/setuprit.c | 4 ++++ src/files/setup/setupwax.c | 2 +- src/include/constants.h | 7 +++++++ 10 files changed, 55 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9e0c9bda9..1d55dd69c 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ CFLAGS := -DVERSION=$(VERSION) \ -non_shared \ -G 0 \ -Xcpluscomm \ - -woff 649,819,820,821,838,852 \ + -woff 581,649,819,820,821,838,852 \ -w2 \ -I src/include \ -mips2 diff --git a/checksums.jap-final.md5 b/checksums.jap-final.md5 index ca6bbfa66..eda846106 100644 --- a/checksums.jap-final.md5 +++ b/checksums.jap-final.md5 @@ -2012,7 +2012,7 @@ ea5a2ff4e5e0a68822f62feff2c40af4 build/jap-final/files/bgdata/bg_uff_tilesZ 6181a79f82156e6c8a3525ed4a09780f build/jap-final/files/bgdata/bg_wax.seg f0068491f441172310f2b6868c03739d build/jap-final/files/bgdata/bg_wax_padsZ ea5a2ff4e5e0a68822f62feff2c40af4 build/jap-final/files/bgdata/bg_wax_tilesZ -b3de7796dab48652639f01b0ea6539d4 build/jap-final/files/ob/ob_mid.seg +d41d8cd98f00b204e9800998ecf8427e build/jap-final/files/ob/ob_mid.seg 39ef58f5babf5d619bec8b2629c26bc8 build/jap-final/ucode/boot.bin bd6e5fc360d5e0c35ea3605e2514f205 build/jap-final/ucode/game.bin 22d5e92bffcc67b222cf3697e96106f6 build/jap-final/ucode/gamedata.bin diff --git a/src/files/setup/setupame.c b/src/files/setup/setupame.c index 96418e9d7..91ddc160a 100644 --- a/src/files/setup/setupame.c +++ b/src/files/setup/setupame.c @@ -626,7 +626,12 @@ u32 props[] = { tinted_glass(0x0100, MODEL_DD_WINDOW, 0x011f, 0x14000b62, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x04b007d0, 0x0000ffff, 0x00000000) tinted_glass(0x0100, MODEL_DD_WINDOW, 0x0120, 0x14000b62, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x04b007d0, 0x0000ffff, 0x00000000) tag(0x41, 1) +#if VERSION >= VERSION_JAP_FINAL + // ........................................................ v + shield(0x0100, MODEL_CHRSHIELD, 0x000a, 0x00004001, 0x00000080, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x00010000, 0x00000000, 0x00000000) +#else shield(0x0100, MODEL_CHRSHIELD, 0x000a, 0x00004001, 0x000000c0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x00010000, 0x00000000, 0x00000000) +#endif tag(0x42, 1) shield(0x0100, MODEL_CHRSHIELD, 0x025f, 0x00000001, 0x000000e0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x00010000, 0x00000000, 0x00000000) tag(0x43, 1) @@ -2765,7 +2770,7 @@ u8 unregistered_function6[] = { * 042d finishes intro */ u8 func0422_intro[] = { -#if VERSION >= VERSION_PAL_FINAL +#if VERSION == VERSION_PAL_FINAL yield set_stage_flag(STAGEFLAG_TRIGGER_INTRO) yield @@ -3466,7 +3471,7 @@ u8 func0422_intro_speaking[] = { unset_stage_flag(STAGEFLAG_TRIGGER_INTRO) restart_timer -#if VERSION >= VERSION_PAL_FINAL +#if VERSION == VERSION_PAL_FINAL beginloop(0xb7) if_stage_flag_eq(STAGEFLAG_STOP_INTRO, TRUE, /*goto*/ 0x06) if_timer_gt(60, /*goto*/ 0x2c) diff --git a/src/files/setup/setupimp.c b/src/files/setup/setupimp.c index 7040ebed0..4604f9446 100644 --- a/src/files/setup/setupimp.c +++ b/src/files/setup/setupimp.c @@ -521,7 +521,12 @@ u32 props[] = { tag(0x3f, 1) shield(0x0100, MODEL_CHRSHIELD, 0x0288, 0x00000001, 0x000000e0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x00010000, 0x00000000, 0x00000000) tag(0x40, 1) +#if VERSION >= VERSION_JAP_FINAL + // ........................................................ v + shield(0x0180, MODEL_CHRSHIELD, 0x0092, 0x00000001, 0x00000080, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x00010000, 0x00000000, 0x00000000) +#else shield(0x0180, MODEL_CHRSHIELD, 0x0092, 0x00000001, 0x000000c0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x00010000, 0x00000000, 0x00000000) +#endif tag(0x45, 1) weapon(0x0100, MODEL_CHRDEVASTATOR, 0xffff, 0x20000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, WEAPON_DEVASTATOR, 0x00ffffff, 0x00000000) endprops @@ -2776,6 +2781,9 @@ u8 func1014_carrington_messages[] = { endloop(0xc0) label(0x08) +#if VERSION >= VERSION_JAP_FINAL + unset_object_flag(OBJ_SAFEINFO, OBJFLAG_INVINCIBLE) +#endif restart_timer speak(CHR_BOND, L_IMP(26), 0x8199, CHANNEL_6, COLOR_06_WHITE) // "Damn it. My office... If they get access..." @@ -3438,8 +3446,10 @@ u8 func1018_hurt_carrington[] = { u8 func1019_setup_safeinfo[] = { label(0x08) +#if VERSION < VERSION_JAP_FINAL unset_object_flag(OBJ_SAFEDOOR, OBJFLAG_INVINCIBLE) unset_object_flag(OBJ_SAFEINFO, OBJFLAG_INVINCIBLE) +#endif set_ailist(CHR_SELF, GAILIST_IDLE) endlist }; diff --git a/src/files/setup/setuplee.c b/src/files/setup/setuplee.c index cfe5e3aee..8d82ca395 100644 --- a/src/files/setup/setuplee.c +++ b/src/files/setup/setuplee.c @@ -486,11 +486,20 @@ u32 props[] = { }; s32 intro[] = { +#if VERSION >= VERSION_JAP_FINAL + ammo(AMMOTYPE_PISTOL, 10) + intro_weapon(WEAPON_FALCON2, -1) + ammo(AMMOTYPE_PISTOL, 20) + ammo(AMMOTYPE_KNIFE, 1) + ammo(AMMOTYPE_ROCKET, 2) + ammo(AMMOTYPE_RIFLE, 400) +#else intro_weapon(WEAPON_COMBATKNIFE, -1) ammo(AMMOTYPE_KNIFE, 1) ammo(AMMOTYPE_ROCKET, 2) ammo(AMMOTYPE_RIFLE, 400) ammo(AMMOTYPE_PISTOL, 10) +#endif outfit(OUTFIT_FROCK_RIPPED) spawn(0x00d9) endintro diff --git a/src/files/setup/setuplip.c b/src/files/setup/setuplip.c index aea60a2d0..70dcd6989 100644 --- a/src/files/setup/setuplip.c +++ b/src/files/setup/setuplip.c @@ -2646,6 +2646,16 @@ u8 func041f_labtech_lights[] = { label(0x06) object_do_animation(0x025a, 0xff, 0x02, 0xffff) speak(CHR_TARGET, L_LIP(37), 0x8103, CHANNEL_4, COLOR_08_RED) // "Who are you?" + +#if VERSION >= VERSION_JAP_FINAL + label(0x68) + if_sound_finished(CHANNEL_4, /*goto*/ 0x06) + yield + goto_first(0x68) + + label(0x06) +#endif + goto_next(0x06) label(0x2d) diff --git a/src/files/setup/setuplue.c b/src/files/setup/setuplue.c index 30fe1cd0a..fa5cc054b 100644 --- a/src/files/setup/setuplue.c +++ b/src/files/setup/setuplue.c @@ -485,7 +485,12 @@ u32 props[] = { stdobject(0x0100, MODEL_A51_CRATE1, 0x0504, 0x000004e8, 0x00002010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000) stdobject(0x0100, MODEL_A51_CRATE1, 0x0505, 0x000004e8, 0x00002010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000) tag(0x3a, 1) +#if VERSION >= VERSION_JAP_FINAL + // ........................................................ v + shield(0x0100, MODEL_CHRSHIELD, 0x0565, 0x00000001, 0x00000080, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x00010000, 0x00000000, 0x00000000) +#else shield(0x0100, MODEL_CHRSHIELD, 0x0565, 0x00000001, 0x000000c0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x00010000, 0x00000000, 0x00000000) +#endif tag(0x3b, 1) shield(0x0100, MODEL_CHRSHIELD, 0x0096, 0x00000001, 0x000000e0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003e8, 0x00000000, 0x00000000, 0x0fff0000, 0x00010000, 0x00000000, 0x00000000) endprops diff --git a/src/files/setup/setuprit.c b/src/files/setup/setuprit.c index b02aac796..9a625f50b 100644 --- a/src/files/setup/setuprit.c +++ b/src/files/setup/setuprit.c @@ -641,6 +641,10 @@ u8 func1004_reassign_ailists_during_conversation[] = { u8 func1005_check_neutrals_killed[] = { set_chr_chrflag(0x01, CHRCFLAG_KILLCOUNTABLE) +#if VERSION >= VERSION_JAP_FINAL + set_chr_chrflag(CHR_STEWARDESS, CHRCFLAG_KILLCOUNTABLE) + set_chr_chrflag(CHR_STEWARD, CHRCFLAG_KILLCOUNTABLE) +#endif set_chr_chrflag(0x04, CHRCFLAG_KILLCOUNTABLE) set_chr_chrflag(0x05, CHRCFLAG_KILLCOUNTABLE) set_chr_chrflag(0x06, CHRCFLAG_KILLCOUNTABLE) diff --git a/src/files/setup/setupwax.c b/src/files/setup/setupwax.c index 8c1c02e39..619cc5918 100644 --- a/src/files/setup/setupwax.c +++ b/src/files/setup/setupwax.c @@ -564,7 +564,7 @@ s32 intro[] = { intro_weapon(WEAPON_CAMSPY, -1) outfit(OUTFIT_MRBLONDE) intro_weapon(WEAPON_CLOAKINGDEVICE, -1) -#if VERSION >= VERSION_PAL_FINAL +#if VERSION == VERSION_PAL_FINAL ammo(AMMOTYPE_CLOAK, 1500) // 25 seconds #else ammo(AMMOTYPE_CLOAK, 1800) // 30 seconds diff --git a/src/include/constants.h b/src/include/constants.h index 0afa3819f..774f09d6c 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -2022,8 +2022,15 @@ #define SAVEFILEFLAG_43 0x43 #define SAVEFILEFLAG_HOWTO_HOVERCRATE 0x47 #define SAVEFILEFLAG_HOWTO_HOVERBIKE 0x48 + +#if VERSION >= VERSION_JAP_FINAL +#define SAVEFILEFLAG_HOWTO_ELEVATORS 0x4a +#define SAVEFILEFLAG_HOWTO_DOORS 0x49 +#else #define SAVEFILEFLAG_HOWTO_ELEVATORS 0x49 #define SAVEFILEFLAG_HOWTO_DOORS 0x4a +#endif + #define SAVEFILEFLAG_HOWTO_TERMINALS 0x4b #define SCREENRATIO_NORMAL 0