.extern sprintf .extern GenerateRandomNumber .extern BombExplodeState .extern AbsValue #ifndef __MWERKS__ .set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4 .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 .set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 .set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 .set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 .set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 .set r30,30; .set r31,31; .set f0,0; .set f2,2; .set f3,3 #endif .text .align 4 .global GetTexFilenameForR5, TexFilenameBuffer, TexFormatString .set sp, 1 GetTexFilenameForR5: # obj number should be put into r5 # returned filename is in r5 # this makes it easy to use with dRes_c::GetResource stwu sp, -0x20(sp) mflr r0 stw r0, 0x24(sp) stw r3, 0x1C(sp) stw r4, 0x18(sp) stw r6, 0x14(sp) stw r7, 0x10(sp) stw r8, 0xC(sp) stw r9, 0x8(sp) 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 lwz r0, 0x24(sp) lwz r3, 0x1C(sp) lwz r4, 0x18(sp) lwz r6, 0x14(sp) lwz r7, 0x10(sp) lwz r8, 0xC(sp) lwz r9, 0x8(sp) mtlr r0 addi sp, sp, 0x20 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 .global TEX_WoodBox TEX_WoodBox: lwz r5, 4(r30) srwi r5, r5, 24 b GetTexFilenameForR5 .global TEX_Bush TEX_Bush: srwi r5, r27, 28 b GetTexFilenameForR5 # The below was added by Tempus .global TEX_Goomba TEX_Goomba: lwz r5, 4(r3) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_BigGoomba TEX_BigGoomba: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Barrel TEX_Barrel: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Blooper TEX_Blooper: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_BigBlock TEX_BigBlock: lwz r5, 4(r28) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Thwomp TEX_Thwomp: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_GiantBuzzy TEX_GiantBuzzy: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Buzzy TEX_Buzzy: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_BuzzyShell TEX_BuzzyShell: lwz r5, 4(r3) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_SpikeTop TEX_SpikeTop: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Spiny TEX_Spiny: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_SpinyShell TEX_SpinyShell: lwz r5, 4(r3) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_SpringBlock TEX_SpringBlock: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Coaster TEX_Coaster: lwz r5, 4(r3) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Koopa TEX_Koopa: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Gabon TEX_Gabon: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Gabon_Spike TEX_Gabon_Spike: andis. r4, r4, 0xFFF0 blr .global TEX_GabonRock TEX_GabonRock: lwz r5, 4(r28) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Podoboo TEX_Podoboo: lwz r5, 4(r31) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Switch TEX_Switch: lwz r5, 4(r29) srwi r5, r5, 16 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_WiggleShroom TEX_WiggleShroom: lwz r5, -0x520(r3) # This sprite is pretty complex # The register with THIS is r29 # before the loading function, # it passes it into r3, and then mr's # it into r30. r3 is then overwritten. # Then, it puts r31 into r5, r30 partly # into r3 and partly into r4. Why? # So, the possibilities for THIS are # r30, r3, and r4, no? In the next function, # r30 is stored over before our getFile, as # are r29/r28. srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Bramball TEX_Bramball: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Monty TEX_Monty: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_ChainChomp TEX_ChainChomp: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Manta TEX_Manta: lwz r5, 4(r28) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Parabeetle TEX_Parabeetle: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Bomb TEX_Bomb: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_ParaBomb TEX_ParaBomb: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_CheepA TEX_CheepA: lwz r5, 4(r27) srwi r5, r5, 20 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_CheepB TEX_CheepB: lwz r5, 4(r28) srwi r5, r5, 20 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_CheepC TEX_CheepC: lwz r5, 4(r28) srwi r5, r5, 20 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_CheepChomp TEX_CheepChomp: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_BigBoo TEX_BigBoo: lwz r5, 4(r27) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Boo TEX_Boo: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Midway TEX_Midway: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xFF b GetTexFilenameForR5 .global TEX_Goal TEX_Goal: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_StretchMush TEX_StretchMush: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_BlockSlide TEX_BlockSlide: lwz r5, 4(r28) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Spinner TEX_Spinner: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Platforms TEX_Platforms: li r5, 1 b GetTexFilenameForR5 # cmpwi r0, 9 # blt ReplacePlatforms # # lwzx r5, r5, r0 # blr ReplacePlatforms: lwz r5, 4(r29) srwi r5, r5, 4 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Platform_ShifterH TEX_Platform_ShifterH: stw r5, 0x504(r30) lwz r5, 4(r30) stw r5, 0x3D8(r30) blr .global TEX_Platform_ShifterF TEX_Platform_ShifterF: stw r4, 0x504(r30) lwz r4, 4(r30) stw r4, 0x3D8(r30) blr .global TEX_Platform_ShifterL TEX_Platform_ShifterL: stw r5, 0x504(r28) lwz r5, 4(r28) stw r5, 0x3D8(r28) blr .global TEX_Platform_ShifterR TEX_Platform_ShifterR: stw r4, 0x504(r31) lwz r4, 4(r31) stw r4, 0x3D8(r31) blr .global TEX_Platform_ShifterS TEX_Platform_ShifterS: stw r30, 0x4C4(r27) lwz r30, 4(r27) stw r30, 0x398(r27) blr .global TEX_Platform_ShifterK TEX_Platform_ShifterK: stw r4, 0x5A4(r27) lwz r4, 4(r27) stw r4, 0x478(r27) blr .global TEX_Platform_ShifterW TEX_Platform_ShifterW: stw r0, 0x504(r29) lwz r0, 4(r29) stw r0, 0x3D8(r29) blr .global TEX_Platform_ShifterSL TEX_Platform_ShifterSL: stw r4, 0x504(r29) lwz r4, 4(r29) stw r4, 0x3D8(r29) blr .global TEX_PokeyA TEX_PokeyA: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_PokeyB TEX_PokeyB: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_PokeySnowman TEX_PokeySnowman: lwz r10, 4(r30) srwi r10, r10, 24 andi. r10, r10, 0xF cmpwi r10, 0x2 bne SnowmanPokey lwz r10, 4(r30) # r10 is the current height andi. r10, r10, 0xF # Find it lis r11, SnowmanTable@h ori r11, r11, SnowmanTable@l slwi r10, r10, 2 # size *= 4 (size of float) lfsx f0, r11, r10 # get it from the array blr SnowmanPokey: lfs f0, 0x54(r31) blr .global TEX_PokeySnowmanPosF TEX_PokeySnowmanPosF: lwz r10, 4(r31) andi. r10, r10, 0xF lis r11, SnowmanTable@h ori r11, r11, SnowmanTable@l slwi r10, r10, 2 # size *= 4 (size of float) lfsx f2, r11, r10 # get it from the array fmuls f0, f0, f2 stfs f0, 0xB0(r30) blr .global TEX_PokeySnowmanPosE TEX_PokeySnowmanPosE: lwz r10, 4(r31) andi. r10, r10, 0xF lis r11, SnowmanTable@h ori r11, r11, SnowmanTable@l slwi r10, r10, 2 # size *= 4 (size of float) lfsx f2, r11, r10 # get it from the array fmuls f31, f31, f2 stfs f31, 0xB0(r29) blr .global TEX_PokeySnowmanPosD TEX_PokeySnowmanPosD: lwz r10, 4(r31) andi. r10, r10, 0xF lis r11, SnowmanTable@h ori r11, r11, SnowmanTable@l slwi r10, r10, 2 # size *= 4 (size of float) lfsx f2, r11, r10 # get it from the array fmuls f1, f1, f2 stfs f1, 0xB0(r30) blr .global TEX_PokeySnowmanPosC TEX_PokeySnowmanPosC: lwz r10, 4(r31) andi. r10, r10, 0xF lis r11, SnowmanTable@h ori r11, r11, SnowmanTable@l slwi r10, r10, 2 # size *= 4 (size of float) lfsx f2, r11, r10 # get it from the array fmuls f0, f0, f2 stfs f0, 0xB0(r31) blr .global TEX_PokeySnowmanPosB TEX_PokeySnowmanPosB: lwz r10, 4(r31) andi. r10, r10, 0xF lis r11, SnowmanTable@h ori r11, r11, SnowmanTable@l slwi r10, r10, 2 # size *= 4 (size of float) lfsx f0, r11, r10 # get it from the array fmuls f1, f1, f0 stfs f1, 0x18(r1) blr .global TEX_PokeySnowmanPosA TEX_PokeySnowmanPosA: lwz r10, 4(r31) andi. r10, r10, 0xF lis r11, SnowmanTable@h ori r11, r11, SnowmanTable@l slwi r10, r10, 2 # size *= 4 (size of float) lfsx f0, r11, r10 # get it from the array fmuls f3, f3, f0 stfs f3, 0x168(r31) blr .global TEX_PokeySnowmanPos TEX_PokeySnowmanPos: mr r3, r30 lwz r10, 4(r30) andi. r10, r10, 0xF lis r11, SnowmanTable@h ori r11, r11, SnowmanTable@l slwi r10, r10, 2 # size *= 4 (size of float) lfsx f0, r11, r10 # get it from the array lis r5, AddAmount@h ori r5, r5, AddAmount@l slwi r6, r6, 2 # size *= 4 (size of float) lfsx f3, r5, r6 # get it from the array lfs f2, 0xB0(r30) fmuls f3, f3, f0 fmuls f3, f3, f0 fmuls f3, f3, f0 fsubs f2, f2, f3 stfs f2, 0xB0(r30) blr SnowmanPokeyPos: fsubs f0, f0, f31 fsubs f0, f0, f31 fsubs f1, f1, f31 fsubs f1, f1, f31 lfs f2, 8(r1) fadds f2, f2, f31 stfs f2, 8(r1) blr .global TEX_PokeyC TEX_PokeyC: lwz r5, 4(r30) andis. r5, r5, 0xFFF0 or r5, r5, r31 or r5, r5, r0 lwz r0, 0x524(r30) slwi r0, r0, 8 or r5, r5, r0 blr .global TEX_PokeyNoSand TEX_PokeyNoSand: cmpwi r3, 0x20 blr .global TEX_CloudBounce TEX_CloudBounce: lwz r5, 4(r28) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_SpikeBall TEX_SpikeBall: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_Huckit TEX_Huckit: lwz r5, 4(r29) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_HuckitBalls TEX_HuckitBalls: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global TEX_HuckitBallsInherit TEX_HuckitBallsInherit: lwz r10, 4(r9) andis. r10, r10, 0xF00 or r4, r4, r0 or r4, r4, r10 blr .global HammerColour HammerColour: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .global HammerTime HammerTime: lwz r8, 4(r31) srwi r8, r8, 8 andi. r8, r8, 0xF cmpwi r8, 1 beq ThrowBobomb cmpwi r8, 2 beq ThrowGoomba cmpwi r8, 3 beq ThrowSpiny cmpwi r8, 4 beq ThrowCoin cmpwi r8, 5 beq ThrowLemmyBall blr ThrowBobomb: li r3, 133 lis r4, 0x3000 ori r4, r4, 0x0041 blr ThrowGoomba: li r3, 0x33 li r4, 1 blr ThrowSpiny: li r3, 0x39 li r4, 1 blr ThrowCoin: li r3, 10 mflr r8 mr r9, r5 bl GenerateRandomNumber mr r5, r9 mtlr r8 cmpwi r3, 1 beq ThrowItem li r3, 0x193 li r4, 0 li r6, 0 li r7, 0 blr ThrowItem: li r3, 6 mflr r8 mr r9, r5 bl GenerateRandomNumber mtlr r8 mr r5, r9 li r4, 0 mr r4, r3 li r3, 0x3C li r6, 0 li r7, 0 blr ThrowLemmyBall: li r3, 0x232 li r4, 0 blr .global HammerLaunch HammerLaunch: mr r3, r30 mr r10, r30 # r31 is the new actor currently # r30 is self, all others are volatile lwz r5, 4(r30) lbz r8, 0x348(r30) srwi r5, r5, 8 andi. r5, r5, 0xF cmpwi r5, 0 beqlr lis r7, LaunchAngle@h ori r7, r7, LaunchAngle@l # lfs f0, 0(r7) # stfs f0, 0xDC(r31) # stfs f0, 0xE0(r31) # stfs f0, 0xE4(r31) # Nybble 11 is for y right now li r6, 0 slwi r6, r6, 2 # size *= 4 (size of float) lfsx f0, r7, r6 # get it from the array stfs f0, 0xEC(r31) cmpwi r5, 5 beq LemmyLaunch # cmpwi r5, 1 # beq BombLaunch li r6, 1 slwi r6, r6, 2 # size *= 4 (size of float) cmpwi r8, 0 bne FacingLeft # Nybble 12 is for x right now lfsx f0, r7, r6 # get it from the array stfs f0, 0xE8(r31) blr FacingLeft: lis r7, LaunchAngleLeft@h ori r7, r7, LaunchAngleLeft@l # Nybble 12 is for x right now lfsx f0, r7, r6 # get it from the array stfs f0, 0xE8(r31) blr LemmyLaunch: li r6, 2 slwi r6, r6, 2 # size *= 4 (size of float) cmpwi r8, 0 bne FacingLeft # Nybble 12 is for x right now lfsx f0, r7, r6 # get it from the array stfs f0, 0xE8(r31) blr BombLaunch: stwu sp, -0x40(sp) mflr r0 stw r31, 0x2C(sp) stw r30, 0x28(sp) stw r0, 0x24(sp) stw r3, 0x20(sp) stw r4, 0x1C(sp) stw r5, 0x18(sp) stw r6, 0x10(sp) stw r7, 0x8(sp) stw r8, 0x34(sp) stw r9, 0x30(sp) mr r3, r31 lwz r12, 0x60(r31) lwz r12, 0xD4(r12) mtctr r12 lis r4, BombExplodeState@h ori r4, r4, BombExplodeState@l lwz r5, 4(r30) srwi r5, r5, 28 mulli r5, r5, 0x40 add r4, r4, r5 bctrl lwz r31, 0x2C(sp) lwz r30, 0x28(sp) lwz r0, 0x24(sp) lwz r3, 0x20(sp) lwz r4, 0x1C(sp) lwz r5, 0x18(sp) lwz r6, 0x10(sp) lwz r7, 0x8(sp) lwz r8, 0x34(sp) lwz r9, 0x30(sp) mr r3, r30 lis r7, LaunchAngle@h ori r7, r7, LaunchAngle@l li r6, 0 slwi r6, r6, 2 # size *= 4 (size of float) lwz r8, 0x348(r30) cmpwi r8, 0 bne BombFacingLeft lfsx f0, r7, r6 stfs f0, 0xE8(r31) mtlr r0 addi sp, sp, 0x40 blr BombFacingLeft: lis r7, LaunchAngleLeft@h ori r7, r7, LaunchAngleLeft@l lfsx f0, r7, r6 stfs f0, 0xE8(r31) mtlr r0 addi sp, sp, 0x40 blr .global HammerSpin HammerSpin: # sth r3, 0x100(r31) blr .global HammerLeft HammerLeft: lbz r8, 0x348(r10) lha r7, 0x102(r31) cmpwi r8, 0 bne GoingLeft blr GoingLeft: li r8, 1 stb r8, 0x348(r31) li r6, 0xFD00 add r7, r6, r7 sth r7, 0x102(r31) sth r7, 0x108(r31) sth r7, 0xC(r1) blr .global TEX_BlackFlakes TEX_BlackFlakes: mflr r9 lwz r6, 4(r23) srwi r6, r6, 24 andi. r6, r6, 0xF cmpwi r6, 1 beq FlakeyLeaves cmpwi r6, 2 beq FlakeySakura cmpwi r6, 3 beq FlakeyStardust stb r5, 0x5BB(r23) blr # li r5, 0xFF # li r4, 0 # li r3, 0 # li r0, 0xFF # # stb r5, 0x5B4(r23) # stb r4, 0x5B5(r23) # stb r3, 0x5B6(r23) # stb r0, 0x5B7(r23) # stb r5, 0x5B8(r23) # stb r4, 0x5B9(r23) # stb r3, 0x5BA(r23) # stb r0, 0x5BB(r23) FlakeyLeaves: li r5, 0xB4 stb r5, 0x5B4(r23) stb r5, 0x5B8(r23) li r3, 0x40 bl GenerateRandomNumber mr r4, r3 stb r4, 0x5B5(r23) stb r4, 0x5B9(r23) li r3, 0x0 stb r3, 0x5B6(r23) stb r3, 0x5BA(r23) li r0, 0xFF stb r0, 0x5B7(r23) stb r0, 0x5BB(r23) mtlr r9 blr FlakeySakura: li r3, 0x20 bl GenerateRandomNumber li r5, 0xFF sub r5, r5, r3 stb r5, 0x5B4(r23) stb r5, 0x5B8(r23) li r4, 0xC8 sub r4, r4, r3 stb r4, 0x5B5(r23) stb r4, 0x5B9(r23) li r4, 0xF8 sub r3, r4, r3 stb r3, 0x5B6(r23) stb r3, 0x5BA(r23) li r0, 0xD0 stb r0, 0x5B7(r23) stb r0, 0x5BB(r23) mtlr r9 blr FlakeyStardust: li r5, 0xFF stb r5, 0x5B4(r23) stb r5, 0x5B8(r23) li r4, 0xF8 stb r4, 0x5B5(r23) stb r4, 0x5B9(r23) li r3, 0xD8 stb r3, 0x5B6(r23) stb r3, 0x5BA(r23) li r3, 0xFF bl GenerateRandomNumber mr r0, r3 stb r0, 0x5B7(r23) stb r0, 0x5BB(r23) mtlr r9 blr .global TEX_Flakes TEX_Flakes: lwz r5, 4(r30) srwi r5, r5, 24 andi. r5, r5, 0xF b GetTexFilenameForR5 .data BomombDir: .word 0x0400FC00 TexFilenameBuffer: .long 0,0,0,0 TexFormatString: .string "g3d/t%02d.brres" ConvertFloat: .word 0x43300000,0x0,0x43300000,0x80000000 .align 4 SnowmanTable: .float 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5 AddAmount: .float 32.0 LaunchAngle: .float 4.0, 2.5, 1.5 LaunchAngleLeft: .float -4.0, -2.5, -1.5 .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