summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--NewerProject.yaml5
-rw-r--r--kamek_pal.x75
-rw-r--r--spritetex.yaml57
-rw-r--r--src/spritetex.S159
4 files changed, 234 insertions, 62 deletions
diff --git a/NewerProject.yaml b/NewerProject.yaml
index 727447c..acfa899 100644
--- a/NewerProject.yaml
+++ b/NewerProject.yaml
@@ -18,4 +18,9 @@ modules:
# - processed/replay.yaml
- processed/growup.yaml
- processed/levelspecial.yaml
+<<<<<<< HEAD
+ - processed/eventlooper.yaml
+ - processed/spritespawner.yaml
+=======
- processed/compression.yaml
+>>>>>>> 673484e580337cd1ab14bfd43c770f004494b9a4
diff --git a/kamek_pal.x b/kamek_pal.x
index 720c71b..d255c9a 100644
--- a/kamek_pal.x
+++ b/kamek_pal.x
@@ -5,18 +5,18 @@ OUTPUT_FORMAT ("binary")
}*/
SECTIONS {
- GetSpecificPlayerActor = 0x8005F900;
- TimeStopFlag = 0x80429FDA;
- TimerBranch = 0x800E3AB8;
- MarioDescentRate = 0x8042BB44;
- MarioJumpArc = 0x802F591C;
- MarioJumpMax = 0x8042BB28;
- MiniMarioJumpArc = 0x802F5964;
- MarioSize = 0x8042BB54;
- AlwaysDrawFlag = 0x80064540;
- AlwaysDrawBranch = 0x80064544;
-
-
+ GetSpecificPlayerActor = 0x8005F900;
+ TimeStopFlag = 0x80429FDA;
+ TimerBranch = 0x800E3AB8;
+ MarioDescentRate = 0x8042BB44;
+ MarioJumpArc = 0x802F591C;
+ MarioJumpMax = 0x8042BB28;
+ MiniMarioJumpArc = 0x802F5964;
+ MarioSize = 0x8042BB54;
+ AlwaysDrawFlag = 0x80064540;
+ AlwaysDrawBranch = 0x80064544;
+ GenerateRandomNumber = 0x800B2EE0;
+
_savefpr_14 = 0x802DCF98;
_savefpr_15 = 0x802DCF9C;
_savefpr_16 = 0x802DCFA0;
@@ -185,18 +185,9 @@ SECTIONS {
DrawAllLayoutsAfterX__Fi = 0x801634D0;
DrawAllLayoutsAfterXandBeforeY__Fii = 0x80163560;
- findPaneByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x80007300;
- findTextBoxByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x80007320;
- findPictureByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x800073D0;
- findWindowByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x80007470;
__ct__Q23m2d13EmbedLayout_cFv = 0x800C89A0;
__dt__Q23m2d13EmbedLayout_cFv = 0x800C89F0;
loadArc__Q23m2d13EmbedLayout_cFPCcb = 0x800C8D00;
- loadAnimations__Q23m2d13EmbedLayout_cFPPCci = 0x800C90A0;
- loadGroups__Q23m2d13EmbedLayout_cFPPCcPii = 0x800C91E0;
- enableNonLoopAnim__Q23m2d13EmbedLayout_cFib = 0x800C93E0;
- enableLoopAnim__Q23m2d13EmbedLayout_cFi = 0x800C9470;
- disableAllAnimations__Q23m2d13EmbedLayout_cFv = 0x800C95F0;
free__Q23m2d13EmbedLayout_cFv = 0x800C9A20;
execAnimations__Q23m2d13EmbedLayout_cFv = 0x800C9650;
scheduleForDrawing__Q23m2d6Base_cFv = 0x80163990;
@@ -221,30 +212,14 @@ SECTIONS {
Init__Q34nw4r3g3d7ResFileFv = 0x8023A6D0;
Bind__Q34nw4r3g3d7ResFileFQ34nw4r3g3d7ResFile = 0x8023A490;
GetResMdl__Q34nw4r3g3d7ResFileCFPCc = 0x80239F70;
- GetResTex__Q34nw4r3g3d7ResFileCFPCc = 0x8023A060;
g3dMemAllocator__Q24nw4r3g3d = 0x8042A6A8;
__ScnMdl__Construct__Q24nw4r3g3dFPvPUiPvUii = 0x8025CB60;
__ScnMdlSimple__Construct__Q24nw4r3g3dFPvPUiPvi = 0x8025A4C0;
InsertIntoScene__Q24nw4r3g3dFPv = 0x80164F90;
- GetResMat__Q34nw4r3g3d6ResMdlCFPCc = 0x8023B8A0;
-
- DisableIndirectTexturing__3m3dFv = 0x80165090;
- InitTexObjWithResTex__3m3dFP9_GXTexObjPv14_GXTexWrapMode14_GXTexWrapMode12_GXTexFilter12_GXTexFilter = 0x802C7F60;
-
- /* This is preliminary and kinda strange, most of these just point to ScnLeaf for now */
- setup__Q23m3d6proc_cFPvPUi = 0x80165110;
- __ct__Q23m3d6proc_cFv = 0x8016A150;
- __dt__Q23m3d6proc_cFv = 0x8016A170;
- free__Q23m3d6proc_cFv = 0x8016A1D0;
- scheduleForDrawing__Q23m3d6proc_cFv = 0x8016A220;
- getViewMatrix__Q23m3d6proc_cFPA3_A4_f = 0x8016A2D0;
- returnUnknown__Q23m3d6proc_cFv = 0x8000F720;
- /* End preliminary section */
-
__ct__Q23m3d5mdl_cFv = 0x80169E10;
__dt__Q23m3d5mdl_cFv = 0x80169E60;
- setup__Q23m3d5mdl_cFQ34nw4r3g3d6ResMdlPvUiiPUi = 0x80169ED0;
+ setup__Q23m3d5mdl_cFPvPvUiiPUi = 0x80169ED0;
oneSetupType__Q23m3d5mdl_cFv = 0x80064C10;
sub_80064BF0__Q23m3d5mdl_cFv = 0x80064BF0;
setDrawMatrix__Q23m3d5mdl_cFPA4_Cf = 0x8016A2B0;
@@ -268,12 +243,6 @@ SECTIONS {
allocateBuffer__10mTexture_cFPv = 0x802C14D0;
plotPixel__10mTexture_cFUsUs8_GXColor = 0x802C1570;
- SetFontSize__Q34nw4r2ut10CharWriterFff = 0x8022D430;
-
- __ct__Q34nw4r2ut10TextWriterFv = 0x802308C0;
- __dt__Q34nw4r2ut10TextWriterFv = 0x80230920;
- CalcStringWidth__Q34nw4r2ut10TextWriterCFPCwi = 0x80231210;
-
GameHeaps = 0x80377F48;
BGDatClass = 0x8042A0D0;
@@ -343,16 +312,6 @@ SECTIONS {
load__12dDvdLoader_cFPCcUcPv = 0x8008F1B0;
unload__12dDvdLoader_cFv = 0x8008F310;
- SZSDecompClass = 0x80377DE4;
- LZDecompClass = 0x80377DF0;
- LHDecompClass = 0x80377DFC;
- LRCDecompClass = 0x80377E08;
- RLDecompClass = 0x80377E14;
- StoreCompressionClassList = 0x8016B1D0;
- DecompBufferPointer = 0x80429758;
-
- TryAndFindCompressedFile = 0x8016BBE0;
-
_Z22BgTexMng__LoadAnimTilePvisPcS0_c = 0x80087B60; /* same for ntsc */
BgTexMng__LoadAnimTile__FPvisPcPcc = 0x80087B60; /* same for ntsc */
@@ -426,8 +385,6 @@ SECTIONS {
AllocFromGameHeap1__FUi = 0x80162A00;
FreeFromGameHeap1__FPv = 0x80162A60;
- AllocFromGameHeap1 = 0x80162A00;
-
_Z19lyt__Layout__LayoutPv = 0x802ACC80;
_Z15lyt__Layout__dtPvi = 0x802ACCC0;
_Z18lyt__Layout__BuildPvPKvS_ = 0x802ACDF0;
@@ -458,8 +415,6 @@ SECTIONS {
DVDReadPrio__FP9DVDHandlePviii = 0x801CAC60;
DVDClose__FP9DVDHandle = 0x801CAB40;
- DVDConvertPathToEntrynum = 0x801CA7C0;
-
_ZN8SaveFile8GetBlockEi = 0x800E0470;
_ZN8SaveFile10GetQSBlockEi = 0x800E04A0;
@@ -549,7 +504,6 @@ SECTIONS {
_Z6memsetPvij = 0x800046B4;
sprintf__FPcPCce = 0x802E1ACC;
snprintf__FPciPCce = 0x802E19D8;
- memcmp__FPCvPCvUi = 0x802DF388;
_Z6strcatPKcS0_ = 0x802E1D2C;
_Znaj = 0x802B9350;
@@ -638,15 +592,12 @@ SECTIONS {
GXSetTevKAlphaSel = 0x801C86F0;
GXSetTevSwapMode = 0x801C8740;
GXSetTevSwapModeTable = 0x801C8780;
- GXSetAlphaCompare = 0x801C8800;
GXSetTevOrder = 0x801C88D0;
GXSetNumTevStages = 0x801C8A30;
GXSetFog = 0x801C8A60;
- GXSetFogRangeAdj = 0x801C8DF0;
GXSetBlendMode = 0x801C8F00;
GXSetZMode = 0x801C8FB0;
GXSetZCompLoc = 0x801C8FF0;
- GXSetDither = 0x801C90D0;
GXCallDisplayList = 0x801C9720;
GXSetProjection = 0x801C9980;
GXLoadPosMtxImm = 0x801C9A80;
diff --git a/spritetex.yaml b/spritetex.yaml
index a9c107c..4d49a8a 100644
--- a/spritetex.yaml
+++ b/spritetex.yaml
@@ -477,3 +477,60 @@ hooks:
src_addr_pal: 0x80AB6054
target_func: 'TEX_SpikeBall'
+
+
+
+
+
+
+
+
+
+
+
+ - name: TEX_YoshiEggSetColour
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x80911050
+ target_func: 'TEX_YoshiEggSetColour'
+
+ - name: TEX_YoshiEggSetBrres
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x809113D0
+ target_func: 'TEX_YoshiEggSetBrres'
+
+ - name: TEX_YoshiEggSetFrame
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x809114B4
+ target_func: 'TEX_YoshiEggSetFrame'
+
+ - name: TEX_YoshiEggEffect
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x80911658
+ target_func: 'TEX_YoshiEggEffect'
+
+ - name: TEX_YoshiSetColour
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x8005E9C8
+ target_func: 'TEX_YoshiSetColour'
+
+ - name: TEX_YoshiHack
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x800FE58C
+ target_func: 'TEX_YoshiHack'
+
+ - name: TEX_YoshiColourOrderA
+ type: patch
+ data: '3F8000004000000040400000'
+ addr_pal: 0x8093DAB4
+
+ - name: TEX_YoshiColourOrderB
+ type: patch
+ data: '00000003000000010000000200000000'
+ addr_pal: 0x8093DAD8
+
diff --git a/src/spritetex.S b/src/spritetex.S
index bf7a02f..55c00af 100644
--- a/src/spritetex.S
+++ b/src/spritetex.S
@@ -1,4 +1,5 @@
.extern sprintf
+.extern GenerateRandomNumber
#ifndef __MWERKS__
.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
@@ -55,6 +56,125 @@ GetTexFilenameForR5:
blr
+.global TEX_YoshiEggSetColour
+TEX_YoshiEggSetColour:
+
+ stwu sp, -0x30(sp)
+ mflr r0
+ stw r0, 0x24(sp)
+ mr r9, r3
+ stw r4, 0x18(sp)
+ stw r5, 0x14(sp)
+ stw r6, 0x10(sp)
+ stw r7, 0x0C(sp)
+
+ li r3, 10
+ bl GenerateRandomNumber
+ stw r3, 0x5F8(r9)
+
+ lwz r0, 0x24(sp)
+ mr r3, r9
+ lwz r4, 0x18(sp)
+ lwz r5, 0x14(sp)
+ lwz r6, 0x10(sp)
+ lwz r7, 0x0C(sp)
+ mtlr r0
+ addi sp, sp, 0x30
+ blr
+
+
+.global TEX_YoshiEggSetBrres
+TEX_YoshiEggSetBrres:
+
+ lwz r5, 0x5F8(r27)
+ clrlwi r5, r5, 28
+
+ cmpwi r5, 4
+ blt YoshiEggOne
+
+ cmpwi r5, 8
+ blt YoshiEggTwo
+
+ li r5, 2
+ b GetTexFilenameForR5
+
+
+YoshiEggOne:
+ li r5, 0
+ b GetTexFilenameForR5
+
+YoshiEggTwo:
+ li r5, 1
+ b GetTexFilenameForR5
+
+
+
+.global TEX_YoshiEggSetFrame
+TEX_YoshiEggSetFrame:
+
+ lwz r5, 0x5F8(r27)
+ clrlwi r5, r5, 30
+ blr
+
+
+.global TEX_YoshiEggEffect
+TEX_YoshiEggEffect:
+
+ lwz r0, 0x5F8(r3)
+ clrlwi r0, r0, 30
+ blr
+
+
+.global TEX_YoshiSetColour
+TEX_YoshiSetColour:
+
+ lwz r4, 0x5F8(r31)
+ oris r4, r4, 1
+ blr
+
+
+.global TEX_YoshiHack
+TEX_YoshiHack:
+
+ stwu sp, -0x30(sp)
+ mflr r0
+ stw r0, 0x24(sp)
+ stw r3, 0x1C(sp)
+ stw r4, 0x18(sp)
+ stw r5, 0x14(sp)
+ stw r6, 0x10(sp)
+ stw r7, 0x0C(sp)
+ stw r8, 0x08(sp)
+ stw r9, 0x04(sp)
+
+ lwz r5, 0x24C(r31)
+ clrlwi r5, r5, 28
+
+ lis r3, TexFilenameBuffer@h
+ ori r3, r3, TexFilenameBuffer@l
+
+ lis r4, TexFormatString@h
+ ori r4, r4, TexFormatString@l
+
+ crclr 4*cr1+eq
+ bl sprintf
+
+ lis r5, TexFilenameBuffer@h
+ ori r5, r5, TexFilenameBuffer@l
+
+ lis r4, YoshiArc@h
+ ori r4, r4, YoshiArc@l
+
+ lwz r0, 0x24(sp)
+ lwz r3, 0x1C(sp)
+ lwz r6, 0x10(sp)
+ lwz r7, 0x0C(sp)
+ lwz r8, 0x08(sp)
+ lwz r9, 0x04(sp)
+ mtlr r0
+ addi sp, sp, 0x30
+ blr
+
@@ -723,3 +843,42 @@ AddAmount:
.float 32.0
.align 4
+
+YoshiArc:
+ .string "Y_TexGreen"
+.align 4
+
+Y_TexGreen:
+ .string "Y_TexGreen"
+.align 4
+Y_TexRed:
+ .string "Y_TexRed"
+.align 4
+Y_TexYellow:
+ .string "Y_TexYellow"
+.align 4
+Y_TexBlue:
+ .string "Y_TexBlue"
+.align 4
+Y_TexPurple:
+ .string "Y_TexPurple"
+.align 4
+Y_TexOrange:
+ .string "Y_TexOrange"
+.align 4
+Y_TexSkyBlue:
+ .string "Y_TexSkyBlue"
+.align 4
+Y_TexBlack:
+ .string "Y_TexBlack"
+.align 4
+Y_TexWhite:
+ .string "Y_TexWhite"
+.align 4
+
+YoshiStrings:
+ .long Y_TexGreen, Y_TexRed, Y_TexYellow, Y_TexBlue, Y_TexPurple, Y_TexOrange, Y_TexSkyBlue, Y_TexBlack, Y_TexWhite
+
+.align 4
+
+