real match 6 functions; static

This commit is contained in:
Zhengwen Jiang 2021-06-27 02:22:17 -05:00 committed by Cleverking2003
parent edc50d394f
commit 477facdc3a
29 changed files with 308 additions and 405 deletions

View File

@ -4,16 +4,5 @@
#include "data.h"
void* CreateBigWaddleDee(struct Object* arg0, u8 arg1);
void sub_080A4B68(struct Object2* arg0);
void BigWaddleDeeChooseXSpeed0(struct Object2* arg0);
void BigWaddleDeeChooseXSpeed1(struct Object2* arg0);
void BigWaddleDeeReverseXOnCounter(struct Object2* arg0);
void BigWaddleDeeChooseXSpeed2(struct Object2* arg0);
void sub_080A4E20(struct Object2* arg0);
void sub_080A4FD0(struct Object2* arg0);
void BigWaddleDeeReverseX(struct Object2* arg0);
void sub_080A5030(struct Object2* arg0);
void sub_080A5054(struct Object2* arg0);
void sub_080A5084(struct Object2* arg0);
#endif

View File

@ -5,11 +5,5 @@
#include "object.h"
void* CreateBlockin(struct Object* arg0, u8 arg1);
void sub_080A4728(struct Object2* arg0);
void sub_080A47C8(struct Object2* arg0);
void sub_080A4840(struct Object2* arg0);
void sub_080A49D0(struct Object2* arg0);
void sub_080A4A08(struct Object2* arg0);
void sub_080A4A7C(struct Object2* arg0);
#endif

View File

@ -7,22 +7,9 @@
#include "task.h"
void* CreateBonus(struct Object* arg0, u8 arg1);
void sub_08122CEC(struct Object2* arg0);
void sub_08122E08(struct Object2* arg0);
void sub_08122ED4(struct Object2* arg0);
void BonusSetFunc(struct Object2* arg0);
void BonusAddHpOrBattery(struct Object2* arg0);
void sub_081232AC(struct Kirby* arg0, u8 arg1);
void BonusAddLives(struct Object2* arg0);
struct Object2* BonusCreateTomatoAt(struct Kirby* arg0, u16 arg1, u16 arg2);
struct Object2* BonusCreateTomato(struct Kirby* arg0);
void BonusCreateRandom(struct Object2* arg0, u8 arg1);
void sub_08123780(struct Object2* arg0);
void BonusGiveInvincibility(struct Object2* arg0);
void sub_08123814(struct Object2* arg0);
void sub_0812385C(struct Object2* arg0);
void sub_081238D0(struct Object2* arg0);
void sub_081238FC(struct Object2* arg0);
void sub_08123924(struct Object2* arg0);
void sub_0812379C(struct Kirby* arg0);
#endif

View File

@ -20,10 +20,7 @@ extern u16 gUnk_02038990[][2];
extern u8 gUnk_03000554;
extern u8 gUnk_03000558;
extern void sub_08025E00(UNUSED struct DemoStruct*);
extern void CreateDemo(u16);
extern u16 sub_08025F2C(void);
extern void sub_08025F50(void);
extern void sub_08025F84(struct DemoStruct*);
#endif

View File

@ -5,15 +5,6 @@
#include "functions.h"
void* CreateGordo(struct Object* arg0, u8 arg1);
void GordoSlowDownX(struct Object2* arg0);
void GordoSetYSpeed(struct Object2* arg0);
void GordoSetXYSpeed(struct Object2* arg0);
void GordoChooseYSpeed(struct Object2* arg0);
void sub_0809FC58(struct Object2* arg0);
void GordoInitType0(struct Object2* arg0);
void GordoInitType1(struct Object2* arg0);
void GordoInitType2(struct Object2* arg0);
void GordoSlowDownXAndSetY(struct Object2* arg0);
void GordoInitType3(struct Object2* arg0);
#endif

View File

@ -4,8 +4,5 @@
#include "global.h"
void sub_080001CC(void);
void sub_080002C8(void);
void sub_0800043C(void);
void nullsub_100(void);
#endif

View File

@ -17,16 +17,5 @@ struct Laser {
};
void* CreateLaserBall(struct Object* arg0, u8 arg1);
void sub_080B2330(struct Object2* arg0);
void sub_080B2710(struct Object2* arg0);
void sub_080B2780(struct Object2* arg0);
u32 sub_080B2A30(struct Laser* arg0);
void sub_080B2BE0(struct Object2* arg0);
void sub_080B2D08(struct Object2* arg0);
void sub_080B2C48(struct Object2* arg0);
void sub_080B2CAC(struct Object2* arg0);
void sub_080B2CD0(struct Object2* arg0);
void sub_080B2D68(struct Object2* arg0);
u32 sub_080B2D74(struct Laser* arg0);
#endif

View File

@ -25,18 +25,6 @@ struct Unk_083877EE {
extern const struct Unk_083877EE gUnk_083877EE;
extern void LogoMain(void);
extern void LogoDestroy(struct Task*);
extern void sub_081388C4(struct LogoStruct*);
extern void LogoInitGraphics(struct LogoStruct*);
extern void LogoFadeIn(struct LogoStruct*);
extern void LogoWait(struct LogoStruct*);
extern void LogoEnd(struct LogoStruct*);
extern void LogoClearGraphics(void);
extern void LogoClearTiles(u8);
extern void LogoClearTilemap(u8);
extern void LogoCopyGraphics(u8, u16, u16);
extern void LogoCopyPalette(u16, u8, u8, u16);
extern void CreateLogo(void);
#endif

View File

@ -5,11 +5,5 @@
#include "object.h"
void* CreateMinny(struct Object* arg0, u8 arg1);
void MinnySetDirection(struct Object2* arg0);
void MinnyInitSpeed(struct Object2* arg0);
void MinnyCalcSpeed(struct Object2* arg0);
void MinnyStart(struct Object2* arg0);
void MinnyTurnAround(struct Object2* arg0);
void MinnySubtype1Start(struct Object2* arg0);
#endif

View File

@ -143,8 +143,7 @@
_obj; \
})
#define Macro_08100F18(r5) \
({ \
#define Macro_08100F18(r5) ({ \
s16 _r3; \
u8 _r6; \
struct Object5 *_r1 = sub_08034E14(r5); \
@ -169,6 +168,26 @@
} \
})
#define Macro_0809E55C(obj4) ({ \
u32 _flag = TRUE; \
u8 _i = gUnk_0203AD44; \
\
if (gUnk_0203AD44) { \
while (1) { \
if (gCurLevelInfo[_i - 1].currentRoom == (obj4)->unk42 && !(gUnk_02026D50[gCurLevelInfo[_i - 1].unk65E] & 8)) { \
_flag = FALSE; \
break; \
} \
if (!--_i) { \
break; \
} \
} \
} \
if (_flag) { \
(obj4)->unk6 |= 0x1000; \
} \
})
void ObjectMain(void);
void ObjectDestroy(struct Task *);
void InitObject(struct Object2 *, struct Object *, u8);

View File

@ -5,18 +5,5 @@
#include "object.h"
void* CreateScarfy(struct Object* arg0, u8 arg1);
void sub_080A75C4(struct Object2* arg0);
void sub_080A78E4(struct Object2* arg0);
void sub_080A7A88(struct Object2* arg0);
void sub_080A7C0C(struct Object2* arg0);
void sub_080A7D90(struct Object2* arg0);
void sub_080A7F64(struct Object2* arg0);
void sub_080A8048(struct Object2* arg0);
void sub_080A80EC(struct Object2* arg0);
void sub_080A8100(struct Object2* arg0);
void sub_080A8148(struct Object2* arg0);
void sub_080A8180(struct Object2* arg0);
void sub_080A81A4(struct Object2* arg0);
void sub_080A81C4(struct Object2* arg0);
#endif

View File

@ -6,17 +6,5 @@
#include "object.h"
void* CreateSparky(struct Object* arg0, u8 arg1);
void sub_080C41B8(struct Object2* arg0);
void sub_080C4248(struct Object2* arg0);
void sub_080C4300(struct Object2* arg0);
void sub_080C4338(struct Object2* arg0);
void sub_080C4428(struct Object2* arg0);
void sub_080C4570(struct Object2* arg0);
void sub_080C45E0(struct Object2* arg0);
void sub_080C4618(struct Object2* arg0);
void sub_080C4654(struct Object2* arg0);
void sub_080C4674(struct Object2* arg0);
void sub_080C4688(struct Object2* arg0);
void sub_080C46A0(struct Object2* arg0);
#endif

View File

@ -32,36 +32,6 @@ extern const u16 gUnk_08D62720[7][3];
extern const u8 gUnk_08D6274A[];
extern void CreateTitleScreen(void);
extern void TitleScreenMain(void);
extern void sub_08149F08(struct TitleStruct*);
extern void TitleScreenGraphicsInit(struct TitleStruct*);
extern void TitleScreenFadeIn(struct TitleStruct*);
extern void sub_0814A1C8(struct Task*);
extern void TitleScreenClearTiles(u8);
extern void TitleScreenClearMap(u8);
extern void sub_0814A274(struct TitleStruct*);
extern void sub_0814A2B0(struct TitleStruct*);
extern void sub_0814A2CC(struct TitleStruct*);
extern void sub_0814A310(struct TitleStruct*);
extern void sub_0814A358(struct TitleStruct*);
extern void sub_0814A39C(struct TitleStruct*);
extern void sub_0814A404(struct TitleStruct*);
extern void sub_0814A410(struct TitleStruct*);
extern void sub_0814A420(struct TitleStruct*);
extern void sub_0814A46C(struct TitleStruct*);
extern void sub_0814A49C(struct TitleStruct*);
extern void sub_0814A4C4(struct TitleStruct*);
extern void sub_0814A504(struct TitleStruct*);
extern void sub_0814A518(struct TitleStruct*);
extern void sub_0814A558(struct TitleStruct*);
extern void TitleScreenFadeSetup(struct TitleStruct*);
extern void TitleScreenFadeOut(struct TitleStruct*);
extern void TitleScreenShowDemo(struct TitleStruct*);
extern void sub_0814A6BC(struct TitleStruct*);
extern void sub_0814A70C(struct TitleStruct*);
extern void sub_0814A75C(struct TitleStruct*);
extern void sub_0814A794(struct TitleStruct*);
extern void sub_0814A7CC(struct TitleStruct*);
#endif

View File

@ -5,25 +5,5 @@
#include "functions.h"
void* CreateWaddleDee(struct Object* arg0, u8 arg1);
void sub_080A3CF0(struct Object2* arg0);
void sub_080A3D8C(struct Object2* arg0);
void WaddleDeeChooseXSpeed0(struct Object2* arg0);
void WaddleDeeChooseXSpeed1(struct Object2* arg0);
void WaddleDeeReverseXOnCounter(struct Object2* arg0);
void WaddleDeeChooseXSpeed2(struct Object2* arg0);
void sub_080A4044(struct Object2* arg0);
void WaddleDeeChooseXSpeedAndPlaySfx(struct Object2* arg0);
void sub_080A41F4(struct Object2* arg0);
void WaddleDee37ChooseXSpeed(struct Object2* arg0);
void WaddleDee37CheckTurnAround(struct Object2* arg0);
void WaddleDeeReverseX(struct Object2* arg0);
void sub_080A4484(struct Object2* arg0);
void sub_080A44C0(struct Object2* arg0);
void sub_080A44E4(struct Object2* arg0);
void WaddleDeeSetStill(struct Object2* arg0);
void sub_080A4568(struct Object2* arg0);
void sub_080A45A8(struct Object2* arg0);
void sub_080A45D8(struct Object2* arg0);
void sub_080A4608(struct Object2* arg0);
#endif

View File

@ -3,6 +3,16 @@
#include "object.h"
#include "task.h"
static void BigWaddleDeeReverseX(struct Object2*);
static void BigWaddleDeeReverseXOnCounter(struct Object2*);
static void BigWaddleDeeChooseXSpeed0(struct Object2*);
static void BigWaddleDeeChooseXSpeed1(struct Object2*);
static void BigWaddleDeeChooseXSpeed2(struct Object2*);
static void sub_080A5084(struct Object2*);
static void sub_080A4E20(struct Object2*);
static void sub_080A5030(struct Object2*);
static void sub_080A5054(struct Object2*);
void* CreateBigWaddleDee(struct Object* arg0, u8 arg1) {
struct Object2 *obj, *obj2;
struct Kirby *kirby;
@ -35,7 +45,7 @@ void* CreateBigWaddleDee(struct Object* arg0, u8 arg1) {
return obj;
}
void sub_080A4B68(struct Object2* arg0) {
static void sub_080A4B68(struct Object2* arg0) {
if (arg0->base.flags & 1) {
arg0->base.xspeed -= 5;
if (arg0->base.xspeed < -0x80) {
@ -76,7 +86,7 @@ void sub_080A4B68(struct Object2* arg0) {
arg0->base.counter++;
}
void BigWaddleDeeChooseXSpeed0(struct Object2* arg0) {
static void BigWaddleDeeChooseXSpeed0(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, BigWaddleDeeReverseX);
switch (arg0->subtype) {
case 0:
@ -97,7 +107,7 @@ void BigWaddleDeeChooseXSpeed0(struct Object2* arg0) {
}
}
void BigWaddleDeeChooseXSpeed1(struct Object2* arg0) {
static void BigWaddleDeeChooseXSpeed1(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, BigWaddleDeeReverseXOnCounter);
switch (arg0->subtype) {
case 0:
@ -118,7 +128,7 @@ void BigWaddleDeeChooseXSpeed1(struct Object2* arg0) {
}
}
void BigWaddleDeeReverseXOnCounter(struct Object2* arg0) {
static void BigWaddleDeeReverseXOnCounter(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.unk62 & 1) {
arg0->base.flags ^= 1;
@ -158,7 +168,7 @@ void BigWaddleDeeReverseXOnCounter(struct Object2* arg0) {
arg0->base.counter++;
}
void BigWaddleDeeChooseXSpeed2(struct Object2* arg0) {
static void BigWaddleDeeChooseXSpeed2(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080A4E20);
arg0->base.counter = 0x64;
switch (arg0->subtype) {
@ -180,7 +190,7 @@ void BigWaddleDeeChooseXSpeed2(struct Object2* arg0) {
}
}
void sub_080A4E20(struct Object2* arg0) {
static void sub_080A4E20(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.unk62 & 1) {
arg0->base.flags ^= 1;
@ -203,7 +213,7 @@ void sub_080A4E20(struct Object2* arg0) {
}
}
void BigWaddleDeeChooseXSpeedAndPlaySfx(struct Object2* arg0) {
static void BigWaddleDeeChooseXSpeedAndPlaySfx(struct Object2* arg0) {
ObjectSetFunc(arg0, 2, sub_080A5084);
arg0->base.yspeed = 0x280;
switch (arg0->subtype) {
@ -226,7 +236,7 @@ void BigWaddleDeeChooseXSpeedAndPlaySfx(struct Object2* arg0) {
PlaySfx(&arg0->base, 0x145);
}
void sub_080A4FD0(struct Object2* arg0) {
static void sub_080A4FD0(struct Object2* arg0) {
switch (arg0->object->subtype1) {
default:
case 0:
@ -241,7 +251,7 @@ void sub_080A4FD0(struct Object2* arg0) {
}
}
void BigWaddleDeeReverseX(struct Object2* arg0) {
static void BigWaddleDeeReverseX(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.unk62 & 1) {
arg0->base.flags ^= 1;
@ -249,13 +259,13 @@ void BigWaddleDeeReverseX(struct Object2* arg0) {
}
}
void sub_080A5030(struct Object2* arg0) {
static void sub_080A5030(struct Object2* arg0) {
ObjectSetFunc(arg0, 1, sub_080A5054);
arg0->base.xspeed = 0;
arg0->unk85 = 0;
}
void sub_080A5054(struct Object2* arg0) {
static void sub_080A5054(struct Object2* arg0) {
if (arg0->base.flags & 2) {
if (arg0->unk85 != 0) {
BigWaddleDeeChooseXSpeedAndPlaySfx(arg0);
@ -267,7 +277,7 @@ void sub_080A5054(struct Object2* arg0) {
}
}
void sub_080A5084(struct Object2* arg0) {
static void sub_080A5084(struct Object2* arg0) {
if (arg0->base.unk62 & 1) {
arg0->base.flags ^= 1;
arg0->base.xspeed = -arg0->base.xspeed;

View File

@ -1,6 +1,9 @@
#include "blockin.h"
#include "functions.h"
static void sub_080A4A7C(struct Object2*);
static void sub_080A4A08(struct Object2*);
void* CreateBlockin(struct Object* arg0, u8 arg1) {
struct Task *task;
struct Object2 *obj;
@ -22,7 +25,7 @@ void* CreateBlockin(struct Object* arg0, u8 arg1) {
return obj;
}
void sub_080A4728(struct Object2* arg0) {
static void sub_080A4728(struct Object2* arg0) {
u8 idx, idx2;
if (arg0->base.flags & 0x40000) {
if (arg0->base.kirby1->base.base.unk68 & 0x80) {
@ -52,7 +55,7 @@ void sub_080A4728(struct Object2* arg0) {
}
}
void sub_080A47C8(struct Object2* arg0) {
static void sub_080A47C8(struct Object2* arg0) {
if (arg0->base.flags & 2) {
sub_080A4A7C(arg0);
}
@ -69,7 +72,7 @@ void sub_080A47C8(struct Object2* arg0) {
}
}
void sub_080A4840(struct Object2* arg0) {
static void sub_080A4840(struct Object2* arg0) {
s32 r2, r3;
arg0->base.flags |= 4;
if (++arg0->unk9E > 3) {
@ -165,7 +168,7 @@ void sub_080A4840(struct Object2* arg0) {
}
}
void sub_080A49D0(struct Object2* arg0) {
static void sub_080A49D0(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080A4728);
arg0->base.xspeed = 0;
arg0->base.yspeed = 0;
@ -175,7 +178,7 @@ void sub_080A49D0(struct Object2* arg0) {
arg0->base.unk68 = 0;
}
void sub_080A4A08(struct Object2* arg0) {
static void sub_080A4A08(struct Object2* arg0) {
arg0->kirby3 = arg0->base.kirby1;
if (arg0->kirby3->base.base.unk0 != 0 && arg0->kirby3->base.base.parent != NULL) {
arg0->kirby3 = arg0->kirby3->base.base.parent;
@ -194,6 +197,6 @@ void sub_080A4A08(struct Object2* arg0) {
arg0->base.unk68 |= 0x40;
}
void sub_080A4A7C(struct Object2* arg0) {
static void sub_080A4A7C(struct Object2* arg0) {
ObjectSetFunc(arg0, 2, sub_080A4840);
}

View File

@ -5,6 +5,17 @@
#include "object.h"
#include "main.h"
static void BonusAddHpOrBattery(struct Object2*);
static void BonusGiveInvincibility(struct Object2*);
static void BonusAddLives(struct Object2*);
static void BonusSetFunc(struct Object2*);
static void sub_08123780(struct Object2*);
static void sub_08123814(struct Object2*);
static void sub_081238D0(struct Object2*);
static void sub_08123924(struct Object2*);
static void sub_081238FC(struct Object2*);
static void sub_0812385C(struct Object2*);
void* CreateBonus(struct Object* arg0, u8 arg1) {
struct Task* task = TaskCreate(ObjectMain, sizeof(struct Object2), 0x2f9c, 0x10, ObjectDestroy);
struct Object2 *obj, *obj2;
@ -64,7 +75,7 @@ void* CreateBonus(struct Object* arg0, u8 arg1) {
return obj;
}
void sub_08122CEC(struct Object2* arg0) {
static void sub_08122CEC(struct Object2* arg0) {
struct Kirby* r8 = arg0->base.parent;
arg0->base.flags |= 0x200;
if (r8->unkD4 == 0x69) {
@ -85,7 +96,7 @@ void sub_08122CEC(struct Object2* arg0) {
}
}
void sub_08122E08(struct Object2* arg0) {
static void sub_08122E08(struct Object2* arg0) {
arg0->base.flags |= 0x200;
if (--arg0->base.counter << 0x10 == 0) {
PlaySfx(&arg0->base, 0xa6);
@ -96,7 +107,7 @@ void sub_08122E08(struct Object2* arg0) {
}
}
void sub_08122ED4(struct Object2* arg0) {
static void sub_08122ED4(struct Object2* arg0) {
if (arg0->object->subtype2 != 0) {
if (arg0->base.counter > 0xf0) {
if (arg0->base.counter & 2) {
@ -127,7 +138,7 @@ void sub_08122ED4(struct Object2* arg0) {
}
}
void BonusSetFunc(struct Object2* arg0) {
static void BonusSetFunc(struct Object2* arg0) {
struct Kirby* kirby = arg0->base.kirby1;
if (kirby->hp > 0) {
if (!(gUnk_03000510.unk4 & (0x10 | 1 << arg0->base.unk56))) {
@ -156,7 +167,7 @@ void BonusSetFunc(struct Object2* arg0) {
}
}
void BonusAddHpOrBattery(struct Object2* arg0) {
static void BonusAddHpOrBattery(struct Object2* arg0) {
struct Kirby* kirby = arg0->base.kirby1;
u8 r8;
@ -199,7 +210,7 @@ void BonusAddHpOrBattery(struct Object2* arg0) {
arg0->base.counter++;
}
void sub_081232AC(struct Kirby* arg0, u8 arg1) {
static void sub_081232AC(struct Kirby* arg0, u8 arg1) {
if (arg0->unkE5 != 0) {
arg0->unkE5 = 0xff;
}
@ -253,7 +264,7 @@ void sub_081232AC(struct Kirby* arg0, u8 arg1) {
}
}
void BonusAddLives(struct Object2* arg0) {
static void BonusAddLives(struct Object2* arg0) {
struct Kirby* kirby = arg0->base.kirby1;
#ifndef NONMATCHING
asm("":::"r5"); //sad
@ -311,7 +322,7 @@ void BonusCreateRandom(struct Object2* arg0, u8 arg1) {
}
}
void sub_08123780(struct Object2* arg0) {
static void sub_08123780(struct Object2* arg0) {
arg0->base.counter = 0;
arg0->base.xspeed = 0;
arg0->base.yspeed = 0;
@ -322,7 +333,7 @@ void sub_0812379C(struct Kirby* arg0) {
sub_081232AC(arg0, gUnk_08357F24[Rand16() & 0x1f]);
}
void BonusGiveInvincibility(struct Object2* arg0) {
static void BonusGiveInvincibility(struct Object2* arg0) {
struct Kirby* kirby = arg0->base.kirby1;
kirby->unkE1 = 0;
kirby->unkE4 = 0x64;
@ -333,7 +344,7 @@ void BonusGiveInvincibility(struct Object2* arg0) {
arg0->unk80 = 0;
}
void sub_08123814(struct Object2* arg0) {
static void sub_08123814(struct Object2* arg0) {
arg0->base.counter = 0;
arg0->base.flags &= ~0x400;
arg0->base.flags &= ~0x800;
@ -344,7 +355,7 @@ void sub_08123814(struct Object2* arg0) {
}
}
void sub_0812385C(struct Object2* arg0) {
static void sub_0812385C(struct Object2* arg0) {
if (arg0->base.yspeed <= 0) {
arg0->base.flags &= ~0x100;
}
@ -364,7 +375,7 @@ void sub_0812385C(struct Object2* arg0) {
}
}
void sub_081238D0(struct Object2* arg0) {
static void sub_081238D0(struct Object2* arg0) {
arg0->base.counter = 5;
arg0->base.flags |= 0x400;
arg0->base.flags |= 0x800;
@ -373,7 +384,7 @@ void sub_081238D0(struct Object2* arg0) {
arg0->unk78 = sub_08122CEC;
}
void sub_081238FC(struct Object2* arg0) {
static void sub_081238FC(struct Object2* arg0) {
struct Kirby* kirby = arg0->base.kirby1;
if (kirby->base.base.unk0 == 0) {
if (kirby->base.base.unk56 < gUnk_0203AD30) {
@ -382,7 +393,7 @@ void sub_081238FC(struct Object2* arg0) {
}
}
void sub_08123924(struct Object2* arg0) {
static void sub_08123924(struct Object2* arg0) {
arg0->base.counter = 0x20;
arg0->base.flags |= 0x400;
arg0->base.flags |= 0x800;

View File

@ -4275,8 +4275,6 @@ void sub_08107FC4(void)
r5->unk6 |= 0x1000;
else
{
u8 r0;
Macro_08105278_4(r5, &sprite, 0x14);
Macro_081050E8(r5, 0x2C3, !r5->unkC.unk1F);
r3 = r5->unk44;
@ -4300,20 +4298,7 @@ void sub_08107FC4(void)
_081081A8:
KirbySomething(r5);
}
// TODO: fix this loop
for (r0 = gUnk_0203AD44; r0; --r0)
{
if (gCurLevelInfo[r0 - 1].currentRoom == r5->unk42 && !(gUnk_02026D50[gCurLevelInfo[r0 - 1].unk65E] & 8))
goto _08108266;
}
#ifndef NONMATCHING
asm("mov\t%0, #1":"=r"(r0));
#else
r0 = 1;
#endif
if (r0)
r5->unk6 |= 0x1000;
_08108266:
Macro_0809E55C(r5);
sub_0806FAC8(r5);
}
}
@ -4348,24 +4333,9 @@ void sub_08108368(void)
r6->unk6 |= 0x1000;
else
{
u8 r0;
Macro_08105278_4(r6, &sprite, 0x30);
Macro_081050E8(r6, 0x39A, !r6->unkC.unk1F);
// TODO: fix this loop
for (r0 = gUnk_0203AD44; r0; --r0)
{
if (gCurLevelInfo[r0 - 1].currentRoom == r6->unk42 && !(gUnk_02026D50[gCurLevelInfo[r0 - 1].unk65E] & 8))
goto _08108556;
}
#ifndef NONMATCHING
asm("mov\t%0, #1":"=r"(r0));
#else
r0 = 1;
#endif
if (r0)
r6->unk6 |= 0x1000;
_08108556:
Macro_0809E55C(r6);
r6->unk34 = r7->base.x;
r6->unk38 = r7->base.y;
if (!(gUnk_03000510.unk4 & ((1 << r7->base.unk56) | 0x10))
@ -4467,24 +4437,9 @@ void sub_08108A50(void)
r6->unk6 |= 0x1000;
else
{
u8 r0;
Macro_08105278_4(r6, &sprite, 0x30);
Macro_081050E8(r6, 0x39A, !r6->unkC.unk1F);
// TODO: fix this loop
for (r0 = gUnk_0203AD44; r0; --r0)
{
if (gCurLevelInfo[r0 - 1].currentRoom == r6->unk42 && !(gUnk_02026D50[gCurLevelInfo[r0 - 1].unk65E] & 8))
goto _08108C42;
}
#ifndef NONMATCHING
asm("mov\t%0, #1":"=r"(r0));
#else
r0 = 1;
#endif
if (r0)
r6->unk6 |= 0x1000;
_08108C42:
Macro_0809E55C(r6);
r6->unk34 = r7->base.x;
r6->unk38 = r7->base.y;
if (!(gUnk_03000510.unk4 & ((1 << r7->base.unk56) | 0x10))

View File

@ -5,7 +5,10 @@
#include "main.h"
#include "title_screen.h"
void sub_08025E00(UNUSED struct DemoStruct* arg0) {
static void sub_08025F50(void);
static void sub_08025F84(struct DemoStruct*);
static void sub_08025E00(UNUSED struct DemoStruct* arg0) {
u16 r3 = 0, i;
for (i = 0; i < gUnk_0203AD30; i++) {
r3 |= gUnk_02038990[i*513][gUnk_02038990[513*i][1] + 2] & 0x3ff;
@ -39,14 +42,14 @@ u16 sub_08025F2C(void) {
return (gUnk_03000558 << 1) + 0xffff + gUnk_03000554;
}
void sub_08025F50(void) {
static void sub_08025F50(void) {
struct DemoStruct* demo;
TaskGetStructPtr(gCurTask, demo)->unk0(demo);
}
extern const struct Unk_082EAB98 gUnk_082EAB98[];
void sub_08025F84(struct DemoStruct* arg0) {
static void sub_08025F84(struct DemoStruct* arg0) {
u16 i;
const struct Unk_082EAB98* r5 = &gUnk_082EAB98[arg0->unk4];
sub_0800AC00(1);

View File

@ -1,6 +1,12 @@
#include "gordo.h"
#include "object.h"
static void GordoInitType0(struct Object2*);
static void GordoInitType1(struct Object2*);
static void GordoInitType2(struct Object2*);
static void GordoSlowDownXAndSetY(struct Object2*);
static void GordoInitType3(struct Object2*);
void* CreateGordo(struct Object* arg0, u8 arg1) {
struct Object2 *obj, *obj2;
struct Task* task = TaskCreate(ObjectMain, sizeof(struct Object2), 0x1000, 0x10, ObjectDestroy);
@ -38,7 +44,7 @@ void* CreateGordo(struct Object* arg0, u8 arg1) {
return obj;
}
void GordoSlowDownX(struct Object2* arg0) {
static void GordoSlowDownX(struct Object2* arg0) {
if (arg0->base.xspeed < 0) {
arg0->base.xspeed += 0xe;
if (arg0->base.xspeed > 0) {
@ -54,7 +60,7 @@ void GordoSlowDownX(struct Object2* arg0) {
arg0->base.counter++;
}
void GordoSetYSpeed(struct Object2* arg0) {
static void GordoSetYSpeed(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.counter & 0x10) {
arg0->base.yspeed = -(0x40 << ((arg0->base.counter >> 3) & 1));
@ -66,7 +72,7 @@ void GordoSetYSpeed(struct Object2* arg0) {
arg0->base.counter &= 0x1f;
}
void GordoSetXYSpeed(struct Object2* arg0) {
static void GordoSetXYSpeed(struct Object2* arg0) {
arg0->base.flags |= 4;
arg0->base.xspeed = gUnk_08352E04[arg0->base.counter];
if (arg0->base.unk62 & 8) {
@ -79,7 +85,7 @@ void GordoSetXYSpeed(struct Object2* arg0) {
arg0->base.counter &= 7;
}
void GordoChooseYSpeed(struct Object2* arg0) {
static void GordoChooseYSpeed(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.counter >= 0x90) {
@ -125,22 +131,22 @@ void sub_0809FC58(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, GordoSlowDownX);
}
void GordoInitType0(struct Object2* arg0) {
static void GordoInitType0(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, GordoSetYSpeed);
arg0->base.flags |= 0x100;
}
void GordoInitType1(struct Object2* arg0) {
static void GordoInitType1(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, GordoSetXYSpeed);
arg0->base.yspeed = -0xc0;
}
void GordoInitType2(struct Object2* arg0) {
static void GordoInitType2(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, GordoSlowDownXAndSetY);
arg0->base.xspeed = -0xc0 - (arg0->subtype * 64);
}
void GordoSlowDownXAndSetY(struct Object2* arg0) {
static void GordoSlowDownXAndSetY(struct Object2* arg0) {
arg0->base.flags |= 4;
arg0->base.yspeed = gUnk_08352E04[arg0->base.counter];
if (arg0->base.unk62 & 3) {
@ -150,7 +156,7 @@ void GordoSlowDownXAndSetY(struct Object2* arg0) {
arg0->base.counter &= 7;
}
void GordoInitType3(struct Object2* arg0) {
static void GordoInitType3(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, GordoChooseYSpeed);
arg0->base.flags |= 0x100;
}

View File

@ -12,6 +12,8 @@ extern const u16 gUnk_082D848C[];
extern const u32 gUnk_082D8498[];
extern const u32 gUnk_082D8768[];
static void sub_080002C8(void);
#define SUB_0800043C_WAIT() ({ \
while (1) { \
if (REG_VCOUNT == 0xa1 \
@ -57,7 +59,7 @@ void sub_080001CC(void) {
CreateLogo();
}
void sub_080002C8(void) {
static void sub_080002C8(void) {
s32 i;
u16 ie, dispcnt, bldcnt, bldalpha, *r2;
const u16* r3;
@ -107,10 +109,10 @@ void sub_080002C8(void) {
}
}
void sub_0800043C(void) {
static void sub_0800043C(void) {
SUB_0800043C_WAIT();
}
void nullsub_100(void) {
static void nullsub_100(void) {
}

View File

@ -1,6 +1,15 @@
#include "functions.h"
#include "laser_ball.h"
static void sub_080B2D68(struct Object2*);
static void sub_080B2D08(struct Object2*);
static void sub_080B2CD0(struct Object2*);
static u32 sub_080B2D74(struct Laser*);
static u32 sub_080B2A30(struct Laser*);
static void sub_080B2C48(struct Object2*);
static void sub_080B2780(struct Object2*);
static void sub_080B2CAC(struct Object2*);
void* CreateLaserBall(struct Object* arg0, u8 arg1) {
struct Object2 *obj, *obj2;
struct Task *task = TaskCreate(ObjectMain, sizeof(struct Object2), 0x1000, 0x10, ObjectDestroy);
@ -23,7 +32,7 @@ void* CreateLaserBall(struct Object* arg0, u8 arg1) {
return obj;
}
void sub_080B2330(struct Object2* arg0) {
static void sub_080B2330(struct Object2* arg0) {
if (arg0->unk83 == 1 && arg0->base.flags & 2) {
arg0->unk83 = 0;
arg0->unk85 = !arg0->unk85;
@ -231,7 +240,7 @@ void sub_080B2330(struct Object2* arg0) {
}
}
void sub_080B2710(struct Object2* arg0) {
static void sub_080B2710(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->unk83 == 3) {
if (arg0->unk85 == 0) {
@ -252,7 +261,7 @@ void sub_080B2710(struct Object2* arg0) {
}
}
void sub_080B2780(struct Object2* arg0) {
static void sub_080B2780(struct Object2* arg0) {
struct Task *task = TaskCreate(sub_08070580, sizeof(struct Laser), 0x3500, 0x10, sub_0803DCCC);
struct Laser *laser2, *laser = TaskGetStructPtr(task, laser2);
sub_0803E380(&laser->base);
@ -318,7 +327,7 @@ void sub_080B2780(struct Object2* arg0) {
PlaySfx(&laser->base, 0x13c);
}
u32 sub_080B2A30(struct Laser* arg0) {
static u32 sub_080B2A30(struct Laser* arg0) {
struct Sprite sprite, *sprite2, *sprite3;
struct Object2 *parent = arg0->base.parent;
if (gKirbys[gUnk_0203AD3C].base.base.unk60 == arg0->base.unk60) {
@ -385,7 +394,7 @@ u32 sub_080B2A30(struct Laser* arg0) {
}
}
void sub_080B2BE0(struct Object2* arg0) {
static void sub_080B2BE0(struct Object2* arg0) {
arg0->base.flags |= 0x140;
arg0->base.flags &= ~0x20;
if (arg0->object->subtype1 != 0) {
@ -403,20 +412,20 @@ void sub_080B2BE0(struct Object2* arg0) {
}
}
void sub_080B2C48(struct Object2* arg0) {
static void sub_080B2C48(struct Object2* arg0) {
ObjectSetFunc(arg0, 2, sub_080B2710);
arg0->base.xspeed = 0;
arg0->base.yspeed = 0;
arg0->unk85 = RandLessThan3() + 1;
}
void sub_080B2CAC(struct Object2* arg0) {
static void sub_080B2CAC(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080B2CD0);
arg0->base.flags ^= 1;
arg0->base.yspeed = 0;
}
void sub_080B2CD0(struct Object2* arg0) {
static void sub_080B2CD0(struct Object2* arg0) {
if (arg0->base.x > arg0->kirby3->base.base.x) {
arg0->base.xspeed = 0x48;
}
@ -427,7 +436,7 @@ void sub_080B2CD0(struct Object2* arg0) {
arg0->base.counter++;
}
void sub_080B2D08(struct Object2* arg0) {
static void sub_080B2D08(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080B2D68);
if (arg0->base.x > arg0->kirby3->base.base.x) {
arg0->base.flags |= 1;
@ -442,11 +451,11 @@ void sub_080B2D08(struct Object2* arg0) {
arg0->unk85 = arg0->base.flags & 1;
}
void sub_080B2D68(struct Object2* arg0) {
static void sub_080B2D68(struct Object2* arg0) {
arg0->base.flags |= 4;
}
u32 sub_080B2D74(struct Laser* arg0) {
static u32 sub_080B2D74(struct Laser* arg0) {
arg0->base.unk10.unk1A = 7;
arg0->unk88 = 1;
arg0->base.flags &= ~0x200;

View File

@ -4,6 +4,19 @@
#include "logo.h"
#include "main.h"
static void LogoCopyGraphics(u8, u16, u16);
static void LogoCopyPalette(u16, u8, u8, u16);
static void LogoClearTiles(u8);
static void LogoClearTilemap(u8);
static void LogoEnd(struct LogoStruct*);
static void LogoWait(struct LogoStruct*);
static void LogoInitGraphics(struct LogoStruct*);
static void LogoFadeIn(struct LogoStruct*);
static void sub_081388C4(struct LogoStruct*);
static void LogoMain(void);
static void LogoClearGraphics(void);
static void LogoDestroy(struct Task*);
void CreateLogo(void) {
u8 i;
u16* r5, *r4_2;
@ -20,14 +33,14 @@ void CreateLogo(void) {
r5 = gBgScrollRegs + 1;
r4_2[i * 2] = r5[i * 2] = 0;
}
r0 = TaskCreate(LogoMain, 0x10, 0x1000, 0, LogoDestroy);
r0 = TaskCreate(LogoMain, sizeof(struct LogoStruct), 0x1000, 0, LogoDestroy);
TaskGetStructPtr(r0, r4);
CpuFill16(0, r4, sizeof(struct LogoStruct));
m4aMPlayAllStop();
r4->unk8 = sub_081388C4;
}
void LogoMain(void) {
static void LogoMain(void) {
struct LogoStruct* r2;
TaskGetStructPtr(gCurTask, r2);
@ -37,15 +50,15 @@ void LogoMain(void) {
r2->unk8(r2);
}
void LogoDestroy(struct Task* arg0) {
static void LogoDestroy(struct Task* arg0) {
}
void sub_081388C4(struct LogoStruct* arg0) {
static void sub_081388C4(struct LogoStruct* arg0) {
arg0->unk8 = LogoInitGraphics;
}
void LogoInitGraphics(struct LogoStruct* arg0) {
static void LogoInitGraphics(struct LogoStruct* arg0) {
LogoClearGraphics();
LogoCopyGraphics(1, 0xc6, 0);
LogoCopyPalette(0xc6, 0x50, 0x50, 0x30);
@ -54,7 +67,7 @@ void LogoInitGraphics(struct LogoStruct* arg0) {
arg0->unk8 = LogoFadeIn;
}
void LogoFadeIn(struct LogoStruct* arg0) {
static void LogoFadeIn(struct LogoStruct* arg0) {
if (++arg0->unkE <= 0x13) {
gBldRegs.bldY = ((0x14 - arg0->unkE) << 4) / 0x14;
}
@ -65,14 +78,14 @@ void LogoFadeIn(struct LogoStruct* arg0) {
}
}
void LogoWait(struct LogoStruct* arg0) {
static void LogoWait(struct LogoStruct* arg0) {
if (--arg0->unkC <= 0) {
arg0->unkE = 0;
arg0->unk8 = LogoEnd;
}
}
void LogoEnd(struct LogoStruct* arg0) {
static void LogoEnd(struct LogoStruct* arg0) {
u16 r5 = arg0->unk0;
TaskDestroy(gCurTask);
if (arg0->unk4 & 1) {
@ -83,7 +96,7 @@ void LogoEnd(struct LogoStruct* arg0) {
}
}
void LogoClearGraphics(void) {
static void LogoClearGraphics(void) {
u8 i;
for (i = 0; i < 3; i++) {
LogoClearTiles(i);
@ -94,15 +107,15 @@ void LogoClearGraphics(void) {
}
}
void LogoClearTiles(u8 arg0) {
static void LogoClearTiles(u8 arg0) {
CpuFill16(0, (u16*)((arg0 << 0xe) + VRAM), 0x4000);
}
void LogoClearTilemap(u8 arg0) {
static void LogoClearTilemap(u8 arg0) {
CpuFill16(0x1ff, (u16*)(((0x1f - arg0) << 0xb) + VRAM), 0x800);
}
void LogoCopyGraphics(u8 arg0, u16 arg1, u16 arg2) {
static void LogoCopyGraphics(u8 arg0, u16 arg1, u16 arg2) {
u16 i;
u16 r5, r1_2, r0_2;
void *r4, *r7, *r6;
@ -119,10 +132,10 @@ void LogoCopyGraphics(u8 arg0, u16 arg1, u16 arg2) {
}
}
void LogoCopyPalette(u16 arg0, u8 arg1, u8 arg2, u16 arg3) {
#ifndef NONMATCHING
asm("":::"r4");
#endif
static void LogoCopyPalette(u16 arg0, u8 arg1, u8 arg2, u16 arg3) {
#ifndef NONMATCHING
asm("":::"r4");
#endif
if (arg3 != 0) {
if (gUnk_03002440 & 0x10000) {
sub_08158334(gUnk_082D7850[arg0]->unk10 + arg1, arg2, arg3);

View File

@ -1,6 +1,10 @@
#include "functions.h"
#include "minny.h"
static void MinnyInitSpeed(struct Object2*);
static void MinnySubtype1Start(struct Object2*);
static void MinnyTurnAround(struct Object2*);
void* CreateMinny(struct Object* arg0, u8 arg1) {
struct Task* task = TaskCreate(ObjectMain, sizeof(struct Object2), 0x1000, 0x10, ObjectDestroy);
struct Object2 *obj2, *obj = TaskGetStructPtr(task, obj2);
@ -20,7 +24,7 @@ void* CreateMinny(struct Object* arg0, u8 arg1) {
return obj;
}
void MinnySetDirection(struct Object2* arg0) {
static void MinnySetDirection(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.x > arg0->kirby3->base.base.x) {
arg0->base.flags |= 1;
@ -40,7 +44,7 @@ void MinnySetDirection(struct Object2* arg0) {
}
}
void MinnyInitSpeed(struct Object2* arg0) {
static void MinnyInitSpeed(struct Object2* arg0) {
ObjectSetFunc(arg0, 1, MinnyTurnAround);
if (arg0->base.x > arg0->kirby3->base.base.x) {
arg0->base.flags |= 1;
@ -58,7 +62,7 @@ void MinnyInitSpeed(struct Object2* arg0) {
}
}
void MinnyCalcSpeed(struct Object2* arg0) {
static void MinnyCalcSpeed(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->subtype != 0) {
if (arg0->base.flags & 1) {
@ -124,7 +128,7 @@ void MinnyCalcSpeed(struct Object2* arg0) {
}
}
void MinnyStart(struct Object2* arg0) {
static void MinnyStart(struct Object2* arg0) {
if (arg0->object->subtype1 == 1) {
MinnySubtype1Start(arg0);
}
@ -135,7 +139,7 @@ void MinnyStart(struct Object2* arg0) {
}
}
void MinnyTurnAround(struct Object2* arg0) {
static void MinnyTurnAround(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.unk62 & 1) {
arg0->base.flags ^= 1;
@ -149,7 +153,7 @@ void MinnyTurnAround(struct Object2* arg0) {
}
}
void MinnySubtype1Start(struct Object2* arg0) {
static void MinnySubtype1Start(struct Object2* arg0) {
ObjectSetFunc(arg0, 1, MinnyCalcSpeed);
arg0->base.flags ^= 1;
arg0->base.counter = (Rand16() % 4) * 10 + 10;

View File

@ -1653,7 +1653,6 @@ static void sub_0809E424(struct Object2 *sb) {
static void sub_0809E55C(void) {
struct Object4 *r0_, *r7 = TaskGetStructPtr(gCurTask, r0_);
struct Object2 *ip = r7->unk44;
u8 r0;
u16 r1;
if (r7->unk6 & 0x1000) {
@ -1669,21 +1668,7 @@ static void sub_0809E55C(void) {
} else {
KirbySomething(r7);
}
// TODO: fix this loop
for (r0 = gUnk_0203AD44; r0; --r0) {
if (gCurLevelInfo[r0 - 1].currentRoom == r7->unk42 && !(gUnk_02026D50[gCurLevelInfo[r0 - 1].unk65E] & 8)) {
goto _0809E6B6;
}
}
#ifndef NONMATCHING
asm("mov\t%0, #1":"=r"(r0));
#else
r0 = 1;
#endif
if (r0) {
r7->unk6 |= 0x1000;
}
_0809E6B6:
Macro_0809E55C(r7);
if (r7->unk6 & 2) {
if (r7->unk8 == 1) {
r7->unk6 |= 0x1000;
@ -1737,7 +1722,6 @@ void sub_0809E79C(struct Object2 *sb) {
static void sub_0809E8D4(void) {
struct Object4 *r0_, *r7 = TaskGetStructPtr(gCurTask, r0_);
struct Object2 *ip = r7->unk44;
u8 r0;
u16 r1;
if (r7->unk6 & 0x1000) {
@ -1753,21 +1737,7 @@ static void sub_0809E8D4(void) {
} else {
KirbySomething(r7);
}
// TODO: fix this loop
for (r0 = gUnk_0203AD44; r0; --r0) {
if (gCurLevelInfo[r0 - 1].currentRoom == r7->unk42 && !(gUnk_02026D50[gCurLevelInfo[r0 - 1].unk65E] & 8)) {
goto _0809EA1C;
}
}
#ifndef NONMATCHING
asm("mov\t%0, #1":"=r"(r0));
#else
r0 = 1;
#endif
if (r0) {
r7->unk6 |= 0x1000;
}
_0809EA1C:
Macro_0809E55C(r7);
if (r7->unk6 & 2) {
r7->unk6 |= 0x1000;
} else {
@ -1840,7 +1810,6 @@ static void sub_0809EB90(struct Object2 *sb) {
static void sub_0809ECD0(void) {
struct Object4 *r0_, *r7 = TaskGetStructPtr(gCurTask, r0_);
struct Object2 *ip = r7->unk44;
u8 r0;
if (r7->unk6 & 0x1000) {
TaskDestroy(gCurTask);
@ -1855,21 +1824,7 @@ static void sub_0809ECD0(void) {
} else {
KirbySomething(r7);
}
// TODO: fix this loop
for (r0 = gUnk_0203AD44; r0; --r0) {
if (gCurLevelInfo[r0 - 1].currentRoom == r7->unk42 && !(gUnk_02026D50[gCurLevelInfo[r0 - 1].unk65E] & 8)) {
goto _0809EE18;
}
}
#ifndef NONMATCHING
asm("mov\t%0, #1":"=r"(r0));
#else
r0 = 1;
#endif
if (r0) {
r7->unk6 |= 0x1000;
}
_0809EE18:
Macro_0809E55C(r7);
if (r7->unk6 & 2) {
if (r7->unk8) {
r7->unk6 |= 0x1000;

View File

@ -1,6 +1,13 @@
#include "scarfy.h"
#include "functions.h"
static void sub_080A8048(struct Object2*);
static void sub_080A8100(struct Object2*);
static void sub_080A8148(struct Object2*);
static void sub_080A8180(struct Object2*);
static void sub_080A81A4(struct Object2*);
static void sub_080A81C4(struct Object2*);
void* CreateScarfy(struct Object* arg0, u8 arg1) {
struct Object2 *obj, *obj2;
struct Task* task = TaskCreate(ObjectMain, sizeof(struct Object2), 0x1000, 0x10, ObjectDestroy);
@ -28,7 +35,7 @@ void* CreateScarfy(struct Object* arg0, u8 arg1) {
return obj;
}
void sub_080A75C4(struct Object2* arg0) {
static void sub_080A75C4(struct Object2* arg0) {
const struct Unk_08353510* temp;
arg0->base.flags |= 4;
if (gUnk_08353510[(u8)(arg0->unk9F + 1)].unk8 == 0) {
@ -131,7 +138,7 @@ void sub_080A75C4(struct Object2* arg0) {
}
}
void sub_080A78E4(struct Object2* arg0) {
static void sub_080A78E4(struct Object2* arg0) {
if (gUnk_08353600[(u8)(arg0->unk9F + 1)].unk8 == 0) {
if (arg0->unk9E == 0) {
arg0->unk9F = 0xff;
@ -178,7 +185,7 @@ void sub_080A78E4(struct Object2* arg0) {
}
}
void sub_080A7A88(struct Object2* arg0) {
static void sub_080A7A88(struct Object2* arg0) {
s32 r3, r2;
arg0->base.flags |= 4;
if (++arg0->unk9E > 7) {
@ -273,7 +280,7 @@ void sub_080A7A88(struct Object2* arg0) {
}
}
void sub_080A7C0C(struct Object2* arg0) {
static void sub_080A7C0C(struct Object2* arg0) {
s32 r3, r2;
arg0->base.flags |= 4;
if (++arg0->unk9E > 7) {
@ -368,7 +375,7 @@ void sub_080A7C0C(struct Object2* arg0) {
}
}
void sub_080A7D90(struct Object2* arg0) {
static void sub_080A7D90(struct Object2* arg0) {
arg0->base.flags |= 4;
if (gUnk_08353624[(u8)(arg0->unk9F + 1)].unk8 == 0) {
if (arg0->unk9E == 0) {
@ -419,7 +426,7 @@ void sub_080A7D90(struct Object2* arg0) {
}
}
void sub_080A7F64(struct Object2* arg0) {
static void sub_080A7F64(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080A8048);
switch (arg0->object->subtype1) {
default:
@ -454,7 +461,7 @@ void sub_080A7F64(struct Object2* arg0) {
}
}
void sub_080A8048(struct Object2* arg0) {
static void sub_080A8048(struct Object2* arg0) {
if (abs(arg0->kirby3->base.base.y - arg0->base.y) < 0x400) {
arg0->base.flags &= ~0x02000000;
ObjectSetFunc(arg0, 0, sub_080A75C4);
@ -474,11 +481,11 @@ void sub_080A8048(struct Object2* arg0) {
}
}
void sub_080A80EC(struct Object2* arg0) {
static void sub_080A80EC(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080A75C4);
}
void sub_080A8100(struct Object2* arg0) {
static void sub_080A8100(struct Object2* arg0) {
arg0->kirby3 = sub_0803D368(arg0);
ObjectSetFunc(arg0, 1, sub_080A78E4);
if (arg0->base.x > arg0->kirby3->base.base.x) {
@ -490,7 +497,7 @@ void sub_080A8100(struct Object2* arg0) {
arg0->type = OBJ_SCARFY_FALLING;
}
void sub_080A8148(struct Object2* arg0) {
static void sub_080A8148(struct Object2* arg0) {
if (arg0->subtype != 0) {
ObjectSetFunc(arg0, 2, sub_080A7C0C);
}
@ -500,18 +507,18 @@ void sub_080A8148(struct Object2* arg0) {
arg0->base.unkC |= 2;
}
void sub_080A8180(struct Object2* arg0) {
static void sub_080A8180(struct Object2* arg0) {
ObjectSetFunc(arg0, 2, sub_080A7D90);
arg0->base.xspeed = 0;
arg0->base.yspeed = 0;
}
void sub_080A81A4(struct Object2* arg0) {
static void sub_080A81A4(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080A81C4);
arg0->base.flags |= 0x600;
}
void sub_080A81C4(struct Object2* arg0) {
static void sub_080A81C4(struct Object2* arg0) {
if (++arg0->base.counter > 8) {
arg0->base.counter = 0;
arg0->kirby3 = sub_0803D368(arg0);

View File

@ -1,6 +1,14 @@
#include "functions.h"
#include "sparky.h"
static void sub_080C4688(struct Object2*);
static void sub_080C46A0(struct Object2*);
static void sub_080C4674(struct Object2*);
static void sub_080C4654(struct Object2*);
static void sub_080C45E0(struct Object2*);
static void sub_080C4618(struct Object2*);
static void sub_080C4300(struct Object2*);
void* CreateSparky(struct Object* arg0, u8 arg1) {
struct Object2 *obj, *obj2;
struct Task *task = TaskCreate(ObjectMain, sizeof(struct Object2), 0x1000, 0x10, ObjectDestroy);
@ -29,7 +37,7 @@ void* CreateSparky(struct Object* arg0, u8 arg1) {
return obj;
}
void sub_080C41B8(struct Object2* arg0) {
static void sub_080C41B8(struct Object2* arg0) {
if (arg0->object->subtype1 <= 1) {
if (arg0->base.unk62 & 4) {
if ((abs(arg0->kirby3->base.base.x - arg0->base.x) < 0x4000) && (Rand16() % 4 == 0)) {
@ -47,7 +55,7 @@ void sub_080C41B8(struct Object2* arg0) {
}
}
void sub_080C4248(struct Object2* arg0) {
static void sub_080C4248(struct Object2* arg0) {
u16 rand;
ObjectSetFunc(arg0, 4, sub_080C4300);
rand = Rand16();
@ -80,7 +88,7 @@ void sub_080C4248(struct Object2* arg0) {
}
}
void sub_080C4300(struct Object2* arg0) {
static void sub_080C4300(struct Object2* arg0) {
if ((arg0->base.yspeed -= 0x40) < -0x300) {
arg0->base.yspeed = -0x300;
}
@ -89,7 +97,7 @@ void sub_080C4300(struct Object2* arg0) {
}
}
void sub_080C4338(struct Object2* arg0) {
static void sub_080C4338(struct Object2* arg0) {
s32 unk0, unk1;
if (arg0->object->subtype1 != 0) {
unk0 = -5;
@ -127,7 +135,7 @@ void sub_080C4338(struct Object2* arg0) {
}
}
void sub_080C4428(struct Object2* arg0) {
static void sub_080C4428(struct Object2* arg0) {
arg0->base.flags |= 4;
if (!(arg0->base.unk1 & 3) || (arg0->base.unk1 & 3) == 3) {
sub_0803E2B0(&arg0->base, -17, -12, 17, 20);
@ -149,7 +157,7 @@ void sub_080C4428(struct Object2* arg0) {
}
}
void sub_080C4570(struct Object2* arg0) {
static void sub_080C4570(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080C41B8);
sub_0803E2B0(&arg0->base, -5, -5, 5, 6);
sub_0803E308(&arg0->base, -6, -6, 6, 8);
@ -163,7 +171,7 @@ void sub_080C4570(struct Object2* arg0) {
}
}
void sub_080C45E0(struct Object2* arg0) {
static void sub_080C45E0(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080C4618);
if (arg0->base.x > arg0->kirby3->base.base.x) {
arg0->base.flags |= 1;
@ -173,7 +181,7 @@ void sub_080C45E0(struct Object2* arg0) {
}
}
void sub_080C4618(struct Object2* arg0) {
static void sub_080C4618(struct Object2* arg0) {
if (arg0->object->subtype1 != 0) {
if (++arg0->base.counter > 7) {
sub_080C4248(arg0);
@ -186,21 +194,21 @@ void sub_080C4618(struct Object2* arg0) {
}
}
void sub_080C4654(struct Object2* arg0) {
static void sub_080C4654(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080C4338);
arg0->base.xspeed >>= 1;
}
void sub_080C4674(struct Object2* arg0) {
static void sub_080C4674(struct Object2* arg0) {
ObjectSetFunc(arg0, 5, sub_080C4688);
}
void sub_080C4688(struct Object2* arg0) {
static void sub_080C4688(struct Object2* arg0) {
if (arg0->base.flags & 2) {
sub_080C46A0(arg0);
}
}
void sub_080C46A0(struct Object2* arg0) {
static void sub_080C46A0(struct Object2* arg0) {
ObjectSetFunc(arg0, 6, sub_080C4428);
}

View File

@ -5,6 +5,36 @@
#include "main.h"
#include "title_screen.h"
static void TitleScreenMain(void);
static void TitleScreenClearMap(u8);
static void TitleScreenClearTiles(u8);
static void TitleScreenShowDemo(struct TitleStruct*);
static void TitleScreenFadeSetup(struct TitleStruct*);
static void TitleScreenFadeOut(struct TitleStruct*);
static void TitleScreenFadeIn(struct TitleStruct*);
static void sub_0814A70C(struct TitleStruct*);
static void sub_0814A75C(struct TitleStruct*);
static void sub_0814A794(struct TitleStruct*);
static void sub_0814A7CC(struct TitleStruct*);
static void sub_0814A518(struct TitleStruct*);
static void sub_0814A558(struct TitleStruct*);
static void sub_0814A404(struct TitleStruct*);
static void sub_0814A4C4(struct TitleStruct*);
static void sub_0814A6BC(struct TitleStruct*);
static void sub_0814A504(struct TitleStruct*);
static void sub_0814A2CC(struct TitleStruct*);
static void sub_0814A358(struct TitleStruct*);
static void sub_0814A39C(struct TitleStruct*);
static void sub_0814A46C(struct TitleStruct*);
static void sub_0814A310(struct TitleStruct*);
static void sub_0814A420(struct TitleStruct*);
static void sub_0814A49C(struct TitleStruct*);
static void sub_0814A2B0(struct TitleStruct*);
static void sub_08149F08(struct TitleStruct*);
static void sub_0814A410(struct TitleStruct*);
static void sub_0814A274(struct TitleStruct*);
static void sub_0814A1C8(struct Task*);
void CreateTitleScreen(void) {
u16 *r4, *r6;
u8 i;
@ -26,7 +56,7 @@ void CreateTitleScreen(void) {
gBldRegs.bldCnt = BLDCNT_EFFECT_LIGHTEN | BLDCNT_TGT1_BD | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG0;
gBldRegs.bldAlpha = 0;
gBldRegs.bldY = 16;
task = TaskCreate(TitleScreenMain, 0x148, 0x1000, 0, sub_0814A1C8);
task = TaskCreate(TitleScreenMain, sizeof(struct TitleStruct), 0x1000, 0, sub_0814A1C8);
TaskGetStructPtr(task, title);
CpuFill16(0, title, sizeof(struct TitleStruct));
title->unk4 = 0;
@ -34,7 +64,7 @@ void CreateTitleScreen(void) {
sub_0814A274(title);
}
void TitleScreenMain(void) {
static void TitleScreenMain(void) {
struct TitleStruct* title;
struct TitleStruct* r0;
@ -57,7 +87,7 @@ void TitleScreenMain(void) {
title->unk130(title);
}
void TitleScreenSpriteInit(struct TitleStruct* arg0) {
static void TitleScreenSpriteInit(struct TitleStruct* arg0) {
u8 i;
struct Sprite* cur;
@ -80,7 +110,7 @@ void TitleScreenSpriteInit(struct TitleStruct* arg0) {
arg0->unk12C = sub_08149F08;
}
void sub_08149F08(struct TitleStruct* arg0) {
static void sub_08149F08(struct TitleStruct* arg0) {
struct Sprite* r6;
u8 r0 = arg0->unk128;
arg0->unk8 |= 1;
@ -123,7 +153,7 @@ static inline void sub_08158334_wrapper(u16* a1, u8 a2, u16 a3) {
sub_08158334(a1, a2, a3);
}
void TitleScreenGraphicsInit(struct TitleStruct* arg0) {
static void TitleScreenGraphicsInit(struct TitleStruct* arg0) {
u8 i;
u16 r0;
@ -153,7 +183,7 @@ void TitleScreenGraphicsInit(struct TitleStruct* arg0) {
arg0->unk130 = TitleScreenFadeIn;
}
void TitleScreenFadeIn(struct TitleStruct* arg0) {
static void TitleScreenFadeIn(struct TitleStruct* arg0) {
arg0->unk134++;
gBldRegs.bldY = 16 - ((arg0->unk134 * 16) / 15);
@ -166,7 +196,7 @@ void TitleScreenFadeIn(struct TitleStruct* arg0) {
}
}
void sub_0814A1C8(struct Task* arg0) {
static void sub_0814A1C8(struct Task* arg0) {
struct TitleStruct* r0, *r6;
u8 i;
@ -180,47 +210,47 @@ void sub_0814A1C8(struct Task* arg0) {
}
}
void TitleScreenClearTiles(u8 arg0) {
static void TitleScreenClearTiles(u8 arg0) {
CpuFill16(0, (void*)VRAM + (arg0 << 0xe), 0x4000);
}
void TitleScreenClearMap(u8 arg0) {
static void TitleScreenClearMap(u8 arg0) {
CpuFill16(0x1ff, (void*)VRAM + ((0x1f - arg0) << 0xb), 0x800);
}
void sub_0814A274(struct TitleStruct* arg0) {
static void sub_0814A274(struct TitleStruct* arg0) {
sub_0814F3C4(&arg0->unk138, *gUnk_08D626F0[gUnk_08D60A80][1]);
arg0->unk144 = sub_0814A2B0;
}
void sub_0814A2B0(struct TitleStruct* arg0) {
static void sub_0814A2B0(struct TitleStruct* arg0) {
if (arg0->unk4 == 1) {
arg0->unk144 = sub_0814A2CC;
}
}
void sub_0814A2CC(struct TitleStruct* arg0) {
static void sub_0814A2CC(struct TitleStruct* arg0) {
if (sub_0814F274(&arg0->unk138) == 0) {
sub_0814F3C4(&arg0->unk138, *gUnk_08D626F0[gUnk_08D60A80][0]);
arg0->unk144 = sub_0814A310;
}
}
void sub_0814A310(struct TitleStruct* arg0) {
static void sub_0814A310(struct TitleStruct* arg0) {
if (sub_0814F274(&arg0->unk138) == 0) {
sub_0814F3C4(&arg0->unk138, *gUnk_08D626F0[gUnk_08D60A80][1]);
arg0->unk144 = sub_0814A358;
}
}
void sub_0814A358(struct TitleStruct* arg0) {
static void sub_0814A358(struct TitleStruct* arg0) {
if (sub_0814F274(&arg0->unk138) == 0) {
sub_0814F3C4(&arg0->unk138, *gUnk_08D626F0[gUnk_08D60A80][0]);
arg0->unk144 = sub_0814A310;
}
}
void sub_0814A39C(struct TitleStruct* arg0) {
static void sub_0814A39C(struct TitleStruct* arg0) {
u8 i, r7 = arg0->unk128;
for (i = 0; i < r7; i++) {
struct Sprite* cur = &arg0->unk10[gUnk_08D6274A[i]];
@ -230,15 +260,15 @@ void sub_0814A39C(struct TitleStruct* arg0) {
}
}
void sub_0814A404(struct TitleStruct* arg0) {
static void sub_0814A404(struct TitleStruct* arg0) {
sub_0814A39C(arg0);
}
void sub_0814A410(struct TitleStruct* arg0) {
static void sub_0814A410(struct TitleStruct* arg0) {
arg0->unk130 = TitleScreenGraphicsInit;
}
void sub_0814A420(struct TitleStruct* arg0) {
static void sub_0814A420(struct TitleStruct* arg0) {
arg0->unk134 = 0;
gBldRegs.bldCnt = BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG0;
gBldRegs.bldAlpha = BLDALPHA_BLEND(16, 16);
@ -247,20 +277,20 @@ void sub_0814A420(struct TitleStruct* arg0) {
arg0->unk130 = sub_0814A46C;
}
void sub_0814A46C(struct TitleStruct* arg0) {
static void sub_0814A46C(struct TitleStruct* arg0) {
if (++arg0->unk134 > 2) {
arg0->unk130 = sub_0814A49C;
arg0->unk134 = 0;
}
}
void sub_0814A49C(struct TitleStruct* arg0) {
static void sub_0814A49C(struct TitleStruct* arg0) {
m4aSongNumStartOrChange(1);
arg0->unk134 = 0;
arg0->unk130 = sub_0814A4C4;
}
void sub_0814A4C4(struct TitleStruct* arg0) {
static void sub_0814A4C4(struct TitleStruct* arg0) {
if (arg0->unk0 > 0x18f) {
m4aMPlayFadeOut(&gUnk_030016A0, 0x11);
arg0->unk130 = sub_0814A504;
@ -268,25 +298,25 @@ void sub_0814A4C4(struct TitleStruct* arg0) {
arg0->unk12C(arg0);
}
void sub_0814A504(struct TitleStruct* arg0) {
static void sub_0814A504(struct TitleStruct* arg0) {
arg0->unk12C(arg0);
}
void sub_0814A518(struct TitleStruct* arg0) {
static void sub_0814A518(struct TitleStruct* arg0) {
arg0->unk144 = NULL;
arg0->unk138.unk6 &= ~0x40;
arg0->unk130 = sub_0814A558;
arg0->unk12C(arg0);
}
void sub_0814A558(struct TitleStruct* arg0) {
static void sub_0814A558(struct TitleStruct* arg0) {
if (sub_0814F274(&arg0->unk138) == 0) {
arg0->unk130 = TitleScreenFadeSetup;
}
arg0->unk12C(arg0);
}
void TitleScreenFadeSetup(struct TitleStruct* arg0) {
static void TitleScreenFadeSetup(struct TitleStruct* arg0) {
gDispCnt &= ~DISPCNT_BG0_ON;
gBldRegs.bldCnt = BLDCNT_EFFECT_LIGHTEN | BLDCNT_TGT1_BD | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG0;
gBldRegs.bldAlpha = 0;
@ -296,7 +326,7 @@ void TitleScreenFadeSetup(struct TitleStruct* arg0) {
arg0->unk12C(arg0);
}
void TitleScreenFadeOut(struct TitleStruct* arg0) {
static void TitleScreenFadeOut(struct TitleStruct* arg0) {
arg0->unk134++;
gBldRegs.bldY = arg0->unk134 * 16 / 60;
@ -307,7 +337,7 @@ void TitleScreenFadeOut(struct TitleStruct* arg0) {
arg0->unk12C(arg0);
}
void TitleScreenShowDemo(struct TitleStruct* arg0) {
static void TitleScreenShowDemo(struct TitleStruct* arg0) {
if (gUnk_03000554 == 0) {
TaskDestroy(gCurTask);
CreateCutscene();
@ -324,7 +354,7 @@ void TitleScreenShowDemo(struct TitleStruct* arg0) {
}
}
void sub_0814A6BC(struct TitleStruct* arg0) {
static void sub_0814A6BC(struct TitleStruct* arg0) {
gDispCnt &= ~DISPCNT_BG0_ON;
gBldRegs.bldCnt = BLDCNT_EFFECT_LIGHTEN | BLDCNT_TGT1_BD | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG0;
gBldRegs.bldAlpha = 0;
@ -334,7 +364,7 @@ void sub_0814A6BC(struct TitleStruct* arg0) {
arg0->unk12C(arg0);
}
void sub_0814A70C(struct TitleStruct* arg0) {
static void sub_0814A70C(struct TitleStruct* arg0) {
arg0->unk134++;
gBldRegs.bldY = arg0->unk134 * 16 / 10;
@ -345,21 +375,21 @@ void sub_0814A70C(struct TitleStruct* arg0) {
arg0->unk12C(arg0);
}
void sub_0814A75C(struct TitleStruct* arg0) {
static void sub_0814A75C(struct TitleStruct* arg0) {
m4aSongNumStop(1);
arg0->unk134 = 0;
arg0->unk130 = sub_0814A794;
arg0->unk12C(arg0);
}
void sub_0814A794(struct TitleStruct* arg0) {
static void sub_0814A794(struct TitleStruct* arg0) {
if (++arg0->unk134 > 4) {
arg0->unk130 = sub_0814A7CC;
}
arg0->unk12C(arg0);
}
void sub_0814A7CC(struct TitleStruct* arg0) {
static void sub_0814A7CC(struct TitleStruct* arg0) {
CpuFill16(RGB_WHITE, gBgPalette, BG_PLTT_SIZE);
CpuFill16(RGB_WHITE, gObjPalette, OBJ_PLTT_SIZE);
gUnk_03002440 |= 3;

View File

@ -1,6 +1,23 @@
#include "object.h"
#include "waddle_dee.h"
static void WaddleDeeChooseXSpeed0(struct Object2*);
static void WaddleDeeChooseXSpeed1(struct Object2*);
static void WaddleDeeChooseXSpeed2(struct Object2*);
static void WaddleDee37ChooseXSpeed(struct Object2*);
static void WaddleDee37CheckTurnAround(struct Object2*);
static void WaddleDeeReverseXOnCounter(struct Object2*);
static void WaddleDeeReverseX(struct Object2*);
static void WaddleDeeSetStill(struct Object2*);
static void sub_080A45D8(struct Object2*);
static void sub_080A4608(struct Object2*);
static void sub_080A45A8(struct Object2*);
static void sub_080A44C0(struct Object2*);
static void sub_080A44E4(struct Object2*);
static void sub_080A4484(struct Object2*);
static void sub_080A4044(struct Object2*);
static void sub_080A4568(struct Object2*);
void* CreateWaddleDee(struct Object* arg0, u8 arg1) {
struct Object2 *obj, *obj2;
struct Kirby* kirby;
@ -39,7 +56,7 @@ void* CreateWaddleDee(struct Object* arg0, u8 arg1) {
return obj;
}
void sub_080A3CF0(struct Object2* arg0) {
static void sub_080A3CF0(struct Object2* arg0) {
arg0->unk84 = 0;
switch (arg0->object->subtype1) {
case 1:
@ -67,7 +84,7 @@ void sub_080A3CF0(struct Object2* arg0) {
}
}
void sub_080A3D8C(struct Object2* arg0) {
static void sub_080A3D8C(struct Object2* arg0) {
if (arg0->base.flags & 1) {
arg0->base.xspeed -= 5;
if (arg0->base.xspeed < -0x80) {
@ -108,7 +125,7 @@ void sub_080A3D8C(struct Object2* arg0) {
arg0->base.counter++;
}
void WaddleDeeChooseXSpeed0(struct Object2* arg0) {
static void WaddleDeeChooseXSpeed0(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, WaddleDeeReverseX);
switch (arg0->subtype) {
case 0:
@ -129,7 +146,7 @@ void WaddleDeeChooseXSpeed0(struct Object2* arg0) {
}
}
void WaddleDeeChooseXSpeed1(struct Object2* arg0) {
static void WaddleDeeChooseXSpeed1(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, WaddleDeeReverseXOnCounter);
switch (arg0->subtype) {
case 0:
@ -150,7 +167,7 @@ void WaddleDeeChooseXSpeed1(struct Object2* arg0) {
}
}
void WaddleDeeReverseXOnCounter(struct Object2* arg0) {
static void WaddleDeeReverseXOnCounter(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.unk62 & 1) {
arg0->base.flags ^= 1;
@ -190,7 +207,7 @@ void WaddleDeeReverseXOnCounter(struct Object2* arg0) {
arg0->base.counter++;
}
void WaddleDeeChooseXSpeed2(struct Object2* arg0) {
static void WaddleDeeChooseXSpeed2(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080A4044);
arg0->base.counter = 0x64;
switch (arg0->subtype) {
@ -212,7 +229,7 @@ void WaddleDeeChooseXSpeed2(struct Object2* arg0) {
}
}
void sub_080A4044(struct Object2* arg0) {
static void sub_080A4044(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.unk62 & 1) {
arg0->base.flags ^= 1;
@ -235,7 +252,7 @@ void sub_080A4044(struct Object2* arg0) {
}
}
void WaddleDeeChooseXSpeedAndPlaySfx(struct Object2* arg0) {
static void WaddleDeeChooseXSpeedAndPlaySfx(struct Object2* arg0) {
ObjectSetFunc(arg0, 2, sub_080A4484);
arg0->base.yspeed = 0x280;
switch (arg0->subtype) {
@ -258,7 +275,7 @@ void WaddleDeeChooseXSpeedAndPlaySfx(struct Object2* arg0) {
PlaySfx(&arg0->base, 0x145);
}
void sub_080A41F4(struct Object2* arg0) {
static void sub_080A41F4(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.unk62 & 4) {
arg0->unk84 = 0;
@ -288,7 +305,7 @@ void sub_080A41F4(struct Object2* arg0) {
}
}
void WaddleDee37ChooseXSpeed(struct Object2* arg0) {
static void WaddleDee37ChooseXSpeed(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, WaddleDee37CheckTurnAround);
switch (arg0->subtype) {
case 0:
@ -309,7 +326,7 @@ void WaddleDee37ChooseXSpeed(struct Object2* arg0) {
}
}
void WaddleDee37CheckTurnAround(struct Object2* arg0) {
static void WaddleDee37CheckTurnAround(struct Object2* arg0) {
ObjXSomething(arg0);
arg0->base.flags |= 4;
if (arg0->base.unk62 & 1) {
@ -318,7 +335,7 @@ void WaddleDee37CheckTurnAround(struct Object2* arg0) {
}
}
void WaddleDeeReverseX(struct Object2* arg0) {
static void WaddleDeeReverseX(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.unk62 & 1) {
arg0->base.flags ^= 1;
@ -326,7 +343,7 @@ void WaddleDeeReverseX(struct Object2* arg0) {
}
}
void sub_080A4484(struct Object2* arg0) {
static void sub_080A4484(struct Object2* arg0) {
if (arg0->base.unk62 & 1) {
arg0->base.flags ^= 1;
arg0->base.xspeed = -arg0->base.xspeed;
@ -336,13 +353,13 @@ void sub_080A4484(struct Object2* arg0) {
}
}
void sub_080A44C0(struct Object2* arg0) {
static void sub_080A44C0(struct Object2* arg0) {
ObjectSetFunc(arg0, 1, sub_080A44E4);
arg0->base.xspeed = 0;
arg0->unk85 = 0;
}
void sub_080A44E4(struct Object2* arg0) {
static void sub_080A44E4(struct Object2* arg0) {
if (arg0->base.flags & 2) {
if (arg0->unk85 != 0) {
WaddleDeeChooseXSpeedAndPlaySfx(arg0);
@ -354,7 +371,7 @@ void sub_080A44E4(struct Object2* arg0) {
}
}
void WaddleDeeSetStill(struct Object2* arg0) {
static void WaddleDeeSetStill(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080A4568);
arg0->base.xspeed = 0;
arg0->base.yspeed = 0;
@ -364,7 +381,7 @@ void WaddleDeeSetStill(struct Object2* arg0) {
arg0->base.flags |= 0x2000;
}
void sub_080A4568(struct Object2* arg0) {
static void sub_080A4568(struct Object2* arg0) {
arg0->base.flags &= ~0x2000;
if (arg0->object->subtype1 == 3) {
sub_080C29C0(arg0, arg0->object->subtype2);
@ -376,7 +393,7 @@ void sub_080A4568(struct Object2* arg0) {
}
}
void sub_080A45A8(struct Object2* arg0) {
static void sub_080A45A8(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080A41F4);
arg0->base.xspeed = 0;
arg0->base.yspeed = 0;
@ -384,7 +401,7 @@ void sub_080A45A8(struct Object2* arg0) {
arg0->unk84 = 5;
}
void sub_080A45D8(struct Object2* arg0) {
static void sub_080A45D8(struct Object2* arg0) {
ObjectSetFunc(arg0, 0, sub_080A4608);
arg0->base.xspeed = 0;
arg0->base.yspeed = 0;
@ -392,7 +409,7 @@ void sub_080A45D8(struct Object2* arg0) {
arg0->unk84 = 5;
}
void sub_080A4608(struct Object2* arg0) {
static void sub_080A4608(struct Object2* arg0) {
arg0->base.flags |= 4;
if (arg0->base.unk62 & 4) {
arg0->unk83 = 0;