diff options
author | Treeki <treeki@gmail.com> | 2012-10-08 05:37:19 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-10-08 05:37:19 +0200 |
commit | d95bd02a18814ad629cf5fc7fb60449f2ba7a418 (patch) | |
tree | 7f9ae63739abf904b6533c5a8161c29cac05980f | |
parent | 196cbc2f41b72dea9b228815eb61d90a988c817d (diff) | |
download | kamek-d95bd02a18814ad629cf5fc7fb60449f2ba7a418.tar.gz kamek-d95bd02a18814ad629cf5fc7fb60449f2ba7a418.zip |
skawo can go fuck himself with a rake
-rw-r--r-- | bugfixes.yaml | 7 | ||||
-rwxr-xr-x | include/game.h | 18 | ||||
-rw-r--r-- | kamek_pal.x | 1 | ||||
-rw-r--r-- | src/fileselect.S | 18 | ||||
-rw-r--r-- | src/koopatlas/hud.cpp | 6 | ||||
-rw-r--r-- | src/koopatlas/mapdata.h | 4 | ||||
-rw-r--r-- | src/koopatlas/pathmanager.cpp | 6 | ||||
-rw-r--r-- | src/randomcrap.S | 51 |
8 files changed, 89 insertions, 22 deletions
diff --git a/bugfixes.yaml b/bugfixes.yaml index 122d672..b60b994 100644 --- a/bugfixes.yaml +++ b/bugfixes.yaml @@ -3,6 +3,13 @@ # yaml, hasn't it...
source_files: [../src/randomcrap.S, ../src/music.cpp, ../src/fix38.S, ../src/nullsub.S, ../src/newer.cpp]
hooks:
+# FUCK SKAWO
+# - name: TitleScreenFucker
+# type: branch_insn
+# branch_type: bl
+# src_addr_pal: 0x8010191C
+# target_func: 'TitleScreenFucker'
+
- name: MPPauseFix1
type: branch_insn
branch_type: bl
diff --git a/include/game.h b/include/game.h index 95eb4d1..661038a 100755 --- a/include/game.h +++ b/include/game.h @@ -241,14 +241,16 @@ public: struct {
// ALL Newer additions should go here
// This array has been verified as safe to replace
- char newerWorldName[36]; // 0x6FC
- GXColor fsTextColours[2]; // 0x720
- GXColor fsHintColours[2]; // 0x728
- GXColor hudTextColours[2]; // 0x730
- s16 hudHintH; // 0x738
- s8 hudHintS, hudHintL; // 0x73A
- u8 currentMapMusic; // 0x73C
- u8 newerWorldID; // 0x73D
+ char newerWorldName[32]; // 0x6FC
+ GXColor fsTextColours[2]; // 0x71C
+ GXColor fsHintColours[2]; // 0x724
+ GXColor hudTextColours[2]; // 0x72C
+ s16 hudHintH; // 0x734
+ s8 hudHintS, hudHintL; // 0x736
+ u8 currentMapMusic; // 0x738
+ u8 newerWorldID; // 0x739
+ u8 titleScreenWorld; // 0x73A
+ u8 titleScreenLevel; // 0x73B
// Pretty much full up here...
};
};
diff --git a/kamek_pal.x b/kamek_pal.x index bf9fd85..bf1b8a1 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -1,6 +1,7 @@ SECTIONS { /* Scrolling is annoying, clown car goes here! */ + RESTART_CRSIN_LevelStartStruct = 0x80374060; DrawTheFuckingHat = 0x800CA664; DontDrawTheFuckingHat = 0x800CA698; diff --git a/src/fileselect.S b/src/fileselect.S index a10a474..38874cc 100644 --- a/src/fileselect.S +++ b/src/fileselect.S @@ -77,7 +77,7 @@ DFNiceWorldName: ori r4, r4, ConvertedWorldName@l mr r3, r4 mr r5, r31 - li r6, 36 + li r6, 32 mtctr r6 convWNameLoop: lbz r6, 0x6FC(r5) @@ -94,20 +94,20 @@ convWNameLoop: bctrl # now set the colours - # Text colours: 0x720, hint colours: 0x728 - lwz r3, 0x720(r31) + # Text colours: 0x71C, hint colours: 0x724 + lwz r3, 0x71C(r31) stw r3, 0xDC(r20) - lwz r3, 0x724(r31) + lwz r3, 0x720(r31) stw r3, 0xE0(r20) addi r3, r30, 0x74 lis r4, Picture_00@h ori r4, r4, Picture_00@l bl findPictureByName__Q23m2d17EmbedLayoutBase_cCFPCc - lwz r4, 0x728(r31) + lwz r4, 0x724(r31) stw r4, 0xD8(r3) stw r4, 0xDC(r3) - lwz r4, 0x72C(r31) + lwz r4, 0x728(r31) stw r4, 0xE0(r3) stw r4, 0xE4(r3) @@ -342,20 +342,20 @@ DFTitle: ConvertedWorldName: .short 0,0,0,0,0,0,0,0,0,0,0,0 # 12 .short 0,0,0,0,0,0,0,0,0,0,0,0 # 12 -.short 0,0,0,0,0,0,0,0,0,0,0,0 # 12 +.short 0,0,0,0,0,0,0,0 # 8 .align 4 DefaultSavefileInfoData: .string "Yoshi's Island" #15 .byte 0,0,0,0,0,0,0,0,0,0,0 # 11 -.byte 0,0,0,0,0,0,0,0,0,0 # 10 +.byte 0,0,0,0,0,0 # 6 .long 0xFFFF99FF,0x1FB423FF .long 0x173714FF,0x3C9135FF .long 0xFFFF99FF,0x1FB423FF .short 0x75 .byte 0x2E,0xB .byte 0,1 -.byte 0,0 +.byte 0,10 DefaultSavefileInfoDataEnd: .long 0 diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index 7ed1b5d..117773f 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -475,14 +475,14 @@ void dWMHud_c::loadHeaderInfo() { void dWMHud_c::loadFooterInfo() { SaveBlock *save = GetSaveFile()->GetBlock(-1); - wchar_t convertedWorldName[36]; + wchar_t convertedWorldName[32]; int i; - for (i = 0; i < 36; i++) { + for (i = 0; i < 32; i++) { convertedWorldName[i] = save->newerWorldName[i]; if (convertedWorldName[i] == 0) break; } - convertedWorldName[35] = 0; + convertedWorldName[31] = 0; WorldName->SetString(convertedWorldName); WorldNameS->SetString(convertedWorldName); diff --git a/src/koopatlas/mapdata.h b/src/koopatlas/mapdata.h index 8c133b4..9c1cd50 100644 --- a/src/koopatlas/mapdata.h +++ b/src/koopatlas/mapdata.h @@ -197,7 +197,9 @@ struct dKPWorldDef_s { s8 hudHintS, hudHintL; u8 key, trackID; u8 worldID; - u8 padding; + u8 titleScreenWorld; + u8 titleScreenLevel; + u8 padding[3]; }; struct dKPMapFile_s { diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp index 49ba3cd..acaee42 100644 --- a/src/koopatlas/pathmanager.cpp +++ b/src/koopatlas/pathmanager.cpp @@ -135,7 +135,8 @@ dWMPathManager_c::~dWMPathManager_c() { if (isEnteringLevel) { SaveBlock *save = GetSaveFile()->GetBlock(-1); - if (enteredLevel->displayLevel >= 21 && enteredLevel->displayLevel <= 28 && enteredLevel->displayLevel != 26) { + if ((enteredLevel->displayLevel >= 21 && enteredLevel->displayLevel <= 27 && enteredLevel->displayLevel != 26) + || (enteredLevel->displayLevel >= 29 && enteredLevel->displayLevel <= 42)) { if (!save->CheckLevelCondition(enteredLevel->worldSlot, enteredLevel->levelSlot, COND_NORMAL)) { MaybeFinishingLevel[0] = enteredLevel->worldSlot; MaybeFinishingLevel[1] = enteredLevel->levelSlot; @@ -666,6 +667,9 @@ void dWMPathManager_c::moveThroughPath() { save->hudHintS = world->hudHintS; save->hudHintL = world->hudHintL; + save->titleScreenWorld = world->titleScreenWorld; + save->titleScreenLevel = world->titleScreenLevel; + if (dWMHud_c::instance) dWMHud_c::instance->showFooter(); } diff --git a/src/randomcrap.S b/src/randomcrap.S index 1653ce7..b4e8f02 100644 --- a/src/randomcrap.S +++ b/src/randomcrap.S @@ -1,4 +1,55 @@ .text + +.global TitleScreenFucker +.extern RESTART_CRSIN_LevelStartStruct +.extern SaveFileInstance +TitleScreenFucker: + lis r3, RESTART_CRSIN_LevelStartStruct@h + ori r3, r3, RESTART_CRSIN_LevelStartStruct@l + li r4, 0 + stb r4, 7(r3) + + # now get the FUCKING WORLD and FUCKING LEVEL + lis r4, SaveFileInstance@h + ori r4, r4, SaveFileInstance@l + lwz r4, 0(r4) + lbz r5, 0x26(r4) + extsb r5, r5 + mulli r5, r5, 0x980 + addi r4, r4, 0x6C0 + add r4, r4, r5 + + # do we need to use Quick Save? get the QS block + addi r4, r4, 0x1C80 + lbz r6, 2(r4) + clrlwi. r6, r6, 31 + beq quickSaveExists + subi r4, r4, 0x1C80 +quickSaveExists: + + # now we have the save block in r4 + lbz r6, 2(r4) + clrlwi. r6, r6, 31 + bne saveIsNotNew + li r5, 0 + li r6, 9 + b chosenTitle +saveIsNotNew: + lbz r5, 0x73A(r4) + lbz r6, 0x73B(r4) +chosenTitle: + cmpwi r5, 0 + bne isntWorld1_1 + cmpwi r6, 0 + bne isntWorld1_1 + li r5, 0 + li r6, 9 +isntWorld1_1: + stb r5, 0xC(r3) + stb r6, 0xD(r3) + blr + + .global mpPauseFix1 .global mpPauseFix2 .extern continueFromMpPauseFix1 |