summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-03-15 02:54:33 +0100
committerTreeki <treeki@gmail.com>2012-03-15 02:54:33 +0100
commite88fd1dcef52d4375fef655918886fc14bb1f40c (patch)
treef081b14a420331258665a58ad31be54b13b1c655
parent18a6c3dbe01f484b346923ebc53f674c1e4a5101 (diff)
downloadkamek-e88fd1dcef52d4375fef655918886fc14bb1f40c.tar.gz
kamek-e88fd1dcef52d4375fef655918886fc14bb1f40c.zip
optimisations to reduce code size
-rw-r--r--include/statelib.h45
-rw-r--r--kamek_pal.x8
-rw-r--r--src/animtiles.cpp8
-rw-r--r--src/bossBalboaWrench.cpp2
-rw-r--r--src/bossFuzzyBear.cpp14
-rw-r--r--src/bossMegaGoomba.cpp68
-rw-r--r--src/bossPodouble.cpp5
-rw-r--r--src/bossRamboo.cpp11
-rw-r--r--src/bossThwompaDomp.cpp15
-rw-r--r--src/bossTopman.cpp4
-rw-r--r--src/compression.S26
-rw-r--r--src/effectvideo.cpp1
-rw-r--r--src/eventblock.cpp2
-rw-r--r--src/eventlooper.cpp1
-rw-r--r--src/fileload.cpp8
-rw-r--r--src/heapbar.S4
-rw-r--r--src/heapbar.cpp1
-rw-r--r--src/koopatlas/camera.cpp3
-rw-r--r--src/koopatlas/hud.cpp3
-rw-r--r--src/koopatlas/map.cpp12
-rw-r--r--src/koopatlas/mapdata.cpp4
-rw-r--r--src/koopatlas/player.cpp6
-rw-r--r--src/levelnames.cpp14
-rw-r--r--src/levelspecial.cpp11
-rw-r--r--src/linegod.cpp17
-rwxr-xr-xsrc/mrsun.cpp33
-rw-r--r--src/msgbox.cpp12
-rw-r--r--src/music.S13
-rw-r--r--src/penguin.cpp4
-rw-r--r--src/player.cpp11
-rw-r--r--src/poweruphax.S40
-rw-r--r--src/shyguy.cpp8
-rwxr-xr-xsrc/spritespawner.cpp3
-rwxr-xr-xsrc/spriteswapper.cpp3
-rw-r--r--src/tilesetfixer.cpp7
-rw-r--r--src/topman.cpp6
-rw-r--r--src/worldmap.cpp32
-rw-r--r--tools/kamek.py2
38 files changed, 65 insertions, 402 deletions
diff --git a/include/statelib.h b/include/statelib.h
index e65f33a..22e1de9 100644
--- a/include/statelib.h
+++ b/include/statelib.h
@@ -1,3 +1,6 @@
+// This is no longer totally accurate to Nintendo's version.
+// Should still work for Newer, though.
+
/******************************************************************************/
// dStateBase_c class
/******************************************************************************/
@@ -14,6 +17,10 @@ public:
virtual bool isSameStateName(const char *name);
virtual const char *getName();
virtual int getID();
+ virtual void doBegin(void *owner);
+ virtual void doExecute(void *owner);
+ virtual void doEnd(void *owner);
+
static dStateBase_c mNoState;
@@ -40,13 +47,6 @@ public:
mEnd = end;
}
- ~dState_c();
- bool isSameStateName(const char *name);
-
- virtual void doBegin(TOwner *owner);
- virtual void doExecute(TOwner *owner);
- virtual void doEnd(TOwner *owner);
-
funcPtr mBegin;
funcPtr mExecute;
funcPtr mEnd;
@@ -54,37 +54,6 @@ public:
void *mBaseState;
};
-template <class TOwner>
-dState_c<TOwner>::~dState_c() { }
-
-template <class TOwner>
-bool dState_c<TOwner>::isSameStateName(const char *name) {
- const char *p = strrchr(name, ':');
- if (p)
- name = p + 1;
-
- int cmp = strcmp(strrchr(getName(), ':')+1, name);
- if (cmp == 0)
- return true;
- else
- return false;
-}
-
-template <class TOwner>
-void dState_c<TOwner>::doBegin(TOwner *owner) {
- (owner->*mBegin)();
-}
-
-template <class TOwner>
-void dState_c<TOwner>::doExecute(TOwner *owner) {
- (owner->*mExecute)();
-}
-
-template <class TOwner>
-void dState_c<TOwner>::doEnd(TOwner *owner) {
- (owner->*mEnd)();
-}
-
/******************************************************************************/
// A Very Useless Class
/******************************************************************************/
diff --git a/kamek_pal.x b/kamek_pal.x
index 7446d34..830f55e 100644
--- a/kamek_pal.x
+++ b/kamek_pal.x
@@ -548,6 +548,14 @@ SECTIONS {
getName__12dStateBase_cFv = 0x8015FA60;
getID__12dStateBase_cFv = 0x8015FA70;
+ /* HACK HACK */
+ /* These don't actually exist, they're just here to save us some space for newer */
+ isSameStateName__12dStateBase_cFPCc = 0x800142A0;
+ doBegin__12dStateBase_cFPv = 0x80012970;
+ doExecute__12dStateBase_cFPv = 0x80012940;
+ doEnd__12dStateBase_cFPv = 0x80012910;
+ /* END HACK */
+
mNoState__12dStateBase_c = 0x80377D04;
__dt__15dStateMgrBase_cFv = 0x8015FB30;
diff --git a/src/animtiles.cpp b/src/animtiles.cpp
index 2efba16..4213e6a 100644
--- a/src/animtiles.cpp
+++ b/src/animtiles.cpp
@@ -18,7 +18,6 @@ struct AnimDef_Entry {
FileHandle fh;
void DoTiles(void* self) {
- //OSReport("fucker\n");
AnimDef_Header *header;
header = (AnimDef_Header*)LoadFile(&fh, "/NewerRes/AnimTiles.bin");
@@ -36,8 +35,6 @@ void DoTiles(void* self) {
AnimDef_Entry *entries = (AnimDef_Entry*)(header+1);
- OSReport("Loading animated tiles\n");
-
for (int i = 0; i < header->entryCount; i++) {
AnimDef_Entry *entry = &entries[i];
char *name = (char*)fh.filePtr+entry->texNameOffset;
@@ -47,12 +44,7 @@ void DoTiles(void* self) {
snprintf(realName, 0x40, "BG_tex/%s", name);
void *blah = BgTexMng__LoadAnimTile(self, entry->tilesetNum, entry->tileNum, realName, frameDelays, entry->reverse);
-
- OSReport("[%d] %s %08x\n", i, name, blah);
- //OSReport("Returned: %08x\n", blah);
}
-
- OSReport("Animated tiles complete\n");
}
diff --git a/src/bossBalboaWrench.cpp b/src/bossBalboaWrench.cpp
index a500b0f..6dfbe42 100644
--- a/src/bossBalboaWrench.cpp
+++ b/src/bossBalboaWrench.cpp
@@ -318,8 +318,6 @@ void daBalboa_c::updateModelMatrices() {
this->pos = this->PopUp[randChoice];
- OSReport("Rand Choice is: %d\n", randChoice);
- OSReport("Position is: %f, %f, %f\n\n", pos.x, pos.y, pos.z);
if (randChoice == 0) { // On the left side!
diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp
index b5b9124..af7699d 100644
--- a/src/bossFuzzyBear.cpp
+++ b/src/bossFuzzyBear.cpp
@@ -255,10 +255,8 @@ int daFuzzyBear_c::onCreate() {
bindAnimChr_and_setUpdateRate("run", 1, 0.0, 1.0);
- OSReport("Setting Fuzzy Bear's State");
doStateChange(&StateID_Grow);
- OSReport("Going to Execute Fuzzy Bear");
this->onExecute();
return true;
}
@@ -268,7 +266,6 @@ int daFuzzyBear_c::onDelete() {
}
int daFuzzyBear_c::onExecute() {
- // OSReport("Fuzzy Bear was Executed.");
acState.execute();
updateModelMatrices();
@@ -331,7 +328,6 @@ void daFuzzyBear_c::endState_Grow() {
void daFuzzyBear_c::beginState_Bounce() {
- OSReport("Begin Bouncing");
if (this->direction = 0) { this->speed.x = 1.5; }
else { this->speed.x = -1.5 ; }
@@ -421,7 +417,6 @@ void daFuzzyBear_c::executeState_Bounce() {
this->timer = 0;
this->pos.y = this->Baseline + 1;
- OSReport("Takeoff Initiated");
this->speed.x = this->storeSpeed;
}
@@ -437,7 +432,7 @@ void daFuzzyBear_c::executeState_Bounce() {
}
-void daFuzzyBear_c::endState_Bounce() { OSReport("No more bouncing."); }
+void daFuzzyBear_c::endState_Bounce() { }
@@ -516,20 +511,17 @@ void daFuzzyBear_c::endState_Bounce() { OSReport("No more bouncing."); }
// }
// void daFuzzyBear_c::endState_Needles() { OSReport("Fuzzy Needle State End"); }
-
// Spray State - jumps in the air and shakes out some small fuzzies
void daFuzzyBear_c::beginState_Spray() {
this->timer = 0;
this->speed.y = 7.0;
this->speed.x = 0.0;
- OSReport("Fuzzy Spray State Begin");
}
void daFuzzyBear_c::executeState_Spray() {
this->speed.x = 0.0;
- OSReport("Fuzzy Spray State Execute");
if (this->speed.y < 1.0) {
this->speed.y = 0;
@@ -572,7 +564,6 @@ void daFuzzyBear_c::endState_Spray() {
this->rot.y = 0;
this->timer = 20;
this->falldown = 1;
- OSReport("Fuzzy Spray State End");
}
@@ -592,7 +583,6 @@ void daFuzzyBear_c::beginState_RolyPoly() {
this->speed.y = 0;
this->RolyBounces = 0;
this->RolyPos = this->pos;
- OSReport("Fuzzy Roly State Begin");
if (BigBossFuzzyBear == 0) {
this->scale = (Vec){2.5, 2.5, 2.5};
@@ -604,7 +594,6 @@ void daFuzzyBear_c::beginState_RolyPoly() {
this->timer = 0;
}
void daFuzzyBear_c::executeState_RolyPoly() {
- OSReport("Fuzzy Roly State Execute");
float wallDistance, scaleDown, scaleUp;
PlaySound(this, SE_OBJ_TEKKYU_G_CRASH);
@@ -669,7 +658,6 @@ void daFuzzyBear_c::executeState_RolyPoly() {
}
void daFuzzyBear_c::endState_RolyPoly() {
this->rot.z = 0;
- OSReport("Fuzzy Roly State End");
this->isInvulnerable = 0;
this->timer = 0;
}
diff --git a/src/bossMegaGoomba.cpp b/src/bossMegaGoomba.cpp
index 2bfc681..e4bc270 100644
--- a/src/bossMegaGoomba.cpp
+++ b/src/bossMegaGoomba.cpp
@@ -114,31 +114,6 @@ daMegaGoomba_c *daMegaGoomba_c::build() {
return new(buffer) daMegaGoomba_c;
}
-void HexDump(char* address, u32 length) {
- length = (length + 0x1f) & ~0x1f;
- char line[0x11] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
- for(u32 ii=0; ii < length; ii += 0x10) {
- for(u32 jj=0; jj < 0x10; jj++) {
- if((address[ii+jj] < 0x20) || (address[ii+jj] > 0x7e)) {
- line[jj] = '.';
- }else{
- line[jj] = address[ii+jj];
- }
- }
- OSReport("%08x: %04x %04x %04x %04x %04x %04x %04x %04x |%s|\n",
- (u32)(address+ii),
- *(u16*)(address+ii+0x00),
- *(u16*)(address+ii+0x02),
- *(u16*)(address+ii+0x04),
- *(u16*)(address+ii+0x06),
- *(u16*)(address+ii+0x08),
- *(u16*)(address+ii+0x0a),
- *(u16*)(address+ii+0x0c),
- *(u16*)(address+ii+0x0e),
- line);
- for(u32 jj=0; jj<0x10; jj++) line[jj] = 0;
- }
-}
@@ -179,21 +154,16 @@ bool daMegaGoomba_c::takeHit(char count) {
#define DEACTIVATE 0
bool daMegaGoomba_c::preSpriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) {
- //OSReport("preSpriteCollision\n");
return false;
}
bool daMegaGoomba_c::prePlayerCollision(ActivePhysics *apThis, ActivePhysics *apOther) {
- //OSReport("prePlayerCollision\n");
return false;
}
-//bool daMegaGoomba_c::preYoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("preYoshiCollision\n"); return false; }
-//bool daMegaGoomba_c::stageActorCollision(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("stageActorCollision\n"); return true; }
void daMegaGoomba_c::spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) {
//HE'S TOO BADASS TO STOP FOR SMALLER GOOMBAS
#if 0
- OSReport("spriteCollision\n");
float me = apThis->firstFloatArray[3];
if(((this->direction == 1) && (me > 0.0)) || ((this->direction == 0) && (me < 0.0))) {
dStateBase_c* state = this->acState.getCurrentState();
@@ -205,7 +175,6 @@ void daMegaGoomba_c::spriteCollision(ActivePhysics *apThis, ActivePhysics *apOth
}
void daMegaGoomba_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) {
- OSReport("Mario collision.\n");
/* * * * * * * * * * * * * * * * * * * * *
* 0=normal??,1=dontHit,2=dontKill
@@ -228,22 +197,17 @@ void daMegaGoomba_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth
char ret = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 2);
if(ret == 1) { // regular jump
apOther->someFlagByte |= 2;
- OSReport("ret == 1; regular jump;\n");
if(this->takeHit(1))
doStateChange(&StateID_DieFall);
} else if(ret == 3) { // spinning
apOther->someFlagByte |= 2;
- OSReport("ret == 3; spinning collision;\n");
if(this->takeHit(1))
doStateChange(&StateID_DieFall);
} else if(ret == 0) {
- OSReport("calling dEn_c::playerCollsiion(apThis, apOther);\n");
this->dEn_c::playerCollision(apThis, apOther);
this->_vf220(apOther->owner);
} else if(ret == 2) {
- OSReport("Y U USIN' MINIMARIO?\n");
} else {
- OSReport("usedForDeter...() returned %d\n", ret);
}
//FIXME hack to make multiple playerCollisions work
@@ -252,34 +216,30 @@ void daMegaGoomba_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth
this->counter_504[apOther->owner->which_player] = 0;
}
-//void daMegaGoomba_c::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("yoshiCollision\n"); }
-void daMegaGoomba_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Hit Fireball\n"); }
-bool daMegaGoomba_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Hit Iceball\n"); return false; }
-void daMegaGoomba_c::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Hit StarMario\n"); }
-void daMegaGoomba_c::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("MarioHit\n"); }
+void daMegaGoomba_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) {}
+bool daMegaGoomba_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; }
+void daMegaGoomba_c::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { }
+void daMegaGoomba_c::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther) { }
void daMegaGoomba_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {
- OSReport("Hit Rolling Object\n");
if(this->takeHit(1))
doStateChange(&StateID_DieFall);
}
-void daMegaGoomba_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Penguin Attack\n"); }
-void daMegaGoomba_c::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Groundpound\n"); }
-void daMegaGoomba_c::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("PipeCannon Hit\n"); }
+void daMegaGoomba_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) {}
+void daMegaGoomba_c::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { }
+void daMegaGoomba_c::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther) {}
void daMegaGoomba_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) {
- OSReport("Hit Hammer\n");
if(this->takeHit(1))
doStateChange(&StateID_DieFall);
}
void daMegaGoomba_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) {
- OSReport("Hit Yoshi Fire\n");
if(this->takeHit(1))
doStateChange(&StateID_DieFall);
}
-void daMegaGoomba_c::_vf120(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("_vf120:\n"); }
-void daMegaGoomba_c::_vf110(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("_vf110:\n"); }
-void daMegaGoomba_c::_vf108(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("_vf108:\n"); }
+void daMegaGoomba_c::_vf120(ActivePhysics *apThis, ActivePhysics *apOther) { }
+void daMegaGoomba_c::_vf110(ActivePhysics *apThis, ActivePhysics *apOther) { }
+void daMegaGoomba_c::_vf108(ActivePhysics *apThis, ActivePhysics *apOther) { }
void daMegaGoomba_c::bindAnimChr_and_setUpdateRate(const char* name, int unk, float unk2, float rate) {
nw4r::g3d::ResAnmChr anmChr = this->resFile.GetResAnmChr(name);
@@ -362,14 +322,12 @@ void daMegaGoomba_c::setupCollision() {
int daMegaGoomba_c::onCreate() {
/*80033230 daEnLkuribo_c::onCreate()*/
- OSReport("Creating MG's body model\n");
this->setupBodyModel();
this->max_speed.y = -4.0;
this->direction = dSprite_c__getXDirectionOfFurthestPlayerRelativeToVEC3(this, this->pos);
this->rot.y = (this->direction) ? 0xE000 : 0x2000;
this->_518 = 2;
- OSReport("Creating MegaGoomba's Physics Struct\n");
ActivePhysics::Info hm;
hm.xDistToCenter = 0.0;
hm.yDistToCenter = 8.0;
@@ -403,10 +361,8 @@ int daMegaGoomba_c::onCreate() {
this->JumpDist = 64.0;
this->JumpTime = 50.0;
- OSReport("Setting MegaGoomba's State\n");
doStateChange(&StateID_Grow);
- OSReport("Going to Execute MegaGoomba\n");
this->onExecute();
return true;
}
@@ -418,7 +374,6 @@ int daMegaGoomba_c::onDelete() {
int daMegaGoomba_c::onExecute() {
//80033450
acState.execute();
- //OSReport("Field_34A: %02x\n", this->_34A);
//if(CheckSomethingEnemyRelated()) // checks class1EC bitfield
// sub_80033f10(this); // spawn hit effect and play hit sound
//else
@@ -675,7 +630,6 @@ void daMegaGoomba_c::endState_Turn() {
void daMegaGoomba_c::beginState_Walk() {
//inline this piece of code
this->direction = dSprite_c__getXDirectionOfFurthestPlayerRelativeToVEC3(this, this->pos);
- OSReport("Direction: %d\n", this->direction);
this->speed.x = this->speed.z = 0.0;
this->max_speed.x = (this->direction) ? -this->XSpeed : this->XSpeed;
this->speed.y = -4.0;
@@ -703,7 +657,6 @@ void daMegaGoomba_c::executeState_Walk() {
}
u32 bitfield2 = this->collMgr.directional_bitfields[this->direction];
if(bitfield2) {
- OSReport("Found wall: %08x\n", bitfield2);
this->doStateChange(&StateID_Turn);
}
DoStuffAndMarkDead(this, this->pos, 1.0);
@@ -731,7 +684,6 @@ void daMegaGoomba_c::executeState_Walk() {
#if 0
//if(CollidedWithTile(this->classAt1EC)) {
if( this->collMgr.CollidedWithTile() {
- OSReport("CollidedWithTile() : true [%08x]\n", this->collMgr.bitfield_for_checks);
}
#endif
diff --git a/src/bossPodouble.cpp b/src/bossPodouble.cpp
index 4470cda..9388d62 100644
--- a/src/bossPodouble.cpp
+++ b/src/bossPodouble.cpp
@@ -164,7 +164,6 @@ int daPodouble::onCreate() {
this->Baseline = this->pos.y - (float)((this->settings & 0xFF) * 0.8);
- OSReport("Creating the Podouble Model\n");
allocator.link(-1, GameHeaps[0], 0, 0x20);
// Fire or Ice
@@ -222,7 +221,6 @@ int daPodouble::onCreate() {
// Stuff I do understand
- OSReport("Setting Podouble's Size to 1.0\n");
this->scale = (Vec){1.0, 1.0, 1.0};
@@ -241,7 +239,6 @@ int daPodouble::onCreate() {
this->goingUp = 0;
- OSReport("Creating Podouble's Physics Struct\n");
ActivePhysics::Info HitMeBaby;
@@ -258,13 +255,11 @@ int daPodouble::onCreate() {
HitMeBaby.unkShort1C = 0;
HitMeBaby.callback = &poodleCollisionCallback;
- OSReport("Making the Physics Class and adding to the list\n");
this->aPhysics.initWithStruct(this, &HitMeBaby);
this->aPhysics.addToList();
doStateChange(&StateID_Grow);
- OSReport("Going to Execute Podouble\n");
this->onExecute();
return true;
}
diff --git a/src/bossRamboo.cpp b/src/bossRamboo.cpp
index 4195884..0c36f04 100644
--- a/src/bossRamboo.cpp
+++ b/src/bossRamboo.cpp
@@ -80,13 +80,11 @@ extern EventTable_t *EventTable;
void daRamboo_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); }
void daRamboo_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) {
- OSReport("Hit Fireball");
SpawnEffect("Wm_en_obakedoor_sm", 0, &apOther->owner->pos, &(S16Vec){0,0,0}, &(Vec){0.5, 0.5, 0.5});
this->pos.x += 6.0;
}
bool daRamboo_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; }
void daRamboo_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {
- OSReport("Hit Rolling Object");
if (apOther->owner->name == 412) { // Check if it's a glow block
SpawnEffect("Wm_en_obakedoor_sm", 0, &apOther->owner->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
@@ -161,14 +159,11 @@ void daRamboo_c::setupModels() {
int daRamboo_c::onCreate() {
- OSReport("Creating the Ramboo Model");
setupModels();
- OSReport("Setting Ramboo's Size to 16.0");
this->scale = (Vec){2.0, 2.0, 2.0};
- OSReport("Creating Ramboo's Physics Struct");
ActivePhysics::Info HitMeBaby;
HitMeBaby.xDistToCenter = 160.0;
@@ -185,11 +180,9 @@ int daRamboo_c::onCreate() {
HitMeBaby.callback = &dEn_c::collisionCallback;
- OSReport("Making the Physics Class and adding to the list");
this->aPhysics.initWithStruct(this, &HitMeBaby);
this->aPhysics.addToList();
- OSReport("Setting up the Box of Goodies");
this->Baseline = this->pos.y;
this->rot.x = 0; // X is vertical axis
@@ -203,7 +196,6 @@ int daRamboo_c::onCreate() {
this->ytimer = 0;
char eventNum = (this->settings >> 16) & 0xFF;
- OSReport("Event to activate: %d", eventNum);
this->eventFlag = (u64)1 << (eventNum - 1);
@@ -221,10 +213,8 @@ int daRamboo_c::onCreate() {
//setUpdateRateForEntry(float rate, int which);
this->fogSrt.setUpdateRateForEntry(1.0, 0);
- OSReport("Setting the State");
doStateChange(&StateID_Grow);
- OSReport("Going to Execute Ramboo");
this->onExecute();
return true;
}
@@ -289,7 +279,6 @@ void daRamboo_c::updateModelMatrices() {
// Grow State
void daRamboo_c::beginState_Grow() {
- OSReport("Growing when Kameck Tells me to.");
this->timer = 0;
SetupKameck(this, Kameck);
diff --git a/src/bossThwompaDomp.cpp b/src/bossThwompaDomp.cpp
index 37d986a..48d0340 100644
--- a/src/bossThwompaDomp.cpp
+++ b/src/bossThwompaDomp.cpp
@@ -113,7 +113,6 @@ void daEnMegaDosun_c::setupBodyModel() {
}
int daEnMegaDosun_c::onCreate() {
- OSReport("daEnMegaDosun::onCreate()\n");
this->setupBodyModel();
@@ -144,7 +143,6 @@ int daEnMegaDosun_c::onCreate() {
//u8 s3[] = {0,0,0,1,0xff,0xfe,0x10,0,0,1,0xf0,0,0,5,0x50,0};
u8 s3[] = {0,0,0,1,0xff,0xfe,0x10,0,0,1,0xf0,0,0xff,0xfe,0x10,0};
- OSReport("this->collMgr.Init(this,(u8*)&this->collision_struct,(u8*)&s3,0);\n");
this->collMgr.Init(this,(u8*)&this->collision_struct,(u8*)&s3,0);
this->pos_delta2.x = 0.0;
@@ -153,7 +151,6 @@ int daEnMegaDosun_c::onCreate() {
this->_320 = 0.0;
this->_324 = 48.0;
- OSReport("this->aPhysics.addToList();\n");
this->aPhysics.addToList();
this->scale.x = 1.0;
@@ -198,7 +195,6 @@ int daEnMegaDosun_c::onExecute() {
float rect[] = {this->_320, this->_324, this->spriteSomeRectX, this->spriteSomeRectY};
int ret = this->outOfZone(this->pos, (float*)&rect, this->currentZoneID);
if(ret) {
- OSReport("daEnMegaDosun_c has left the building\n");
this->OutOfScreenPosition = this->pos;
this->isOutofScreen = true;
@@ -222,7 +218,6 @@ int daEnMegaDosun_c::onDraw() {
}
int daEnMegaDosun_c::onDelete() {
- OSReport("Deleting Thwompy\n");
return true;
}
@@ -336,22 +331,18 @@ int daEnMegaDosun_c::onDelete() {
// StateID_DownMove
void daEnMegaDosun_c::beginState_DownMove() {
- OSReport("beginState_DownMove()\n");
this->speed.y = 0.0;
}
void daEnMegaDosun_c::executeState_DownMove() {
- OSReport("executeState_DownMove()\n");
this->HandleYSpeed();
this->UpdateObjectPosBasedOnSpeedValuesReal();
//FIXME what do I do? - bottom detection
int ret = this->collMgr.execute();
- OSReport("collMgr Returns(): %08x\n", ret);
if(!ret)
return;
if(!(ret & 0x400000)) {
- OSReport("doStateChange(&StateID_DownWait)\n");
this->doStateChange(&StateID_DownWait);
this->countdownTimer = 0x40;
this->speed.y = 0.0;
@@ -360,7 +351,6 @@ int daEnMegaDosun_c::onDelete() {
else {
this->collision_struct[0] = 0x00000001;
this->speed.y = 0.0;
- OSReport("ShakeScreen(%x,%d,%d,%d,%d)\n", ScreenPositionClass,0,1,0,0);
ShakeScreen(ScreenPositionClass, 0, 1, 0, 0);
this->collMgr.Clear2();
}
@@ -371,7 +361,6 @@ int daEnMegaDosun_c::onDelete() {
//SoundRelatedClass.AnotherSoundRelatedFunction(SE_EMY_BIG_DOSSUN, p, 0);
}
void daEnMegaDosun_c::endState_DownMove() {
- OSReport("endState_DownMove()\n");
return;
}
@@ -430,7 +419,6 @@ int daEnMegaDosun_c::onDelete() {
this->pos.y = this->OutOfScreenPosition.y + 280.0;
if (this->timer == 0) {
- OSReport("Outro Play Sound\n");
PlaySound(this, SE_EMY_BIG_DOSSUN_DEAD);
@@ -439,19 +427,16 @@ int daEnMegaDosun_c::onDelete() {
}
if (this->timer == 60) {
- OSReport("Outro Play Fanfare\n");
PlaySound(this, STRM_BGM_SHIRO_BOSS_CLEAR);
MakeMarioEnterDemoMode();
}
if (this->timer == 120) {
- OSReport("Outro Play Victory Cry\n");
PlayerVictoryCries(this);
}
if (this->timer > 240) {
- OSReport("Outro Out\n");
ExitStage(WORLD_MAP, 0, BEAT_LEVEL, MARIO_WIPE);
}
diff --git a/src/bossTopman.cpp b/src/bossTopman.cpp
index 5aec384..bed9104 100644
--- a/src/bossTopman.cpp
+++ b/src/bossTopman.cpp
@@ -356,13 +356,11 @@ int daDreidel::onCreate() {
HitMeBaby.unkShort1C = 0;
HitMeBaby.callback = &dEn_c::collisionCallback;
- OSReport("Making the Physics Class and adding to the list\n");
this->aPhysics.initWithStruct(this, &HitMeBaby);
this->aPhysics.addToList();
// Tile collider
- OSReport("Making the Tile collider Class\n");
// These fucking rects do something for the tile rect
spriteSomeRectX = 28.0f;
@@ -568,8 +566,6 @@ void daDreidel::updateModelMatrices() {
// CreateEffect(&this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 192);
this->direction = 1;
}
- // OSReport("Rotation: %x", this->rot.y);
- // OSReport("Direction: %d", this->direction);
// this->direction ^= 1;
bindAnimChr_and_setUpdateRate("begoman_wait2", 1, 0.0, 1.0);
}
diff --git a/src/compression.S b/src/compression.S
index dfa2894..93cdd05 100644
--- a/src/compression.S
+++ b/src/compression.S
@@ -36,10 +36,10 @@ InitCompression:
stw r0, 0x14(sp)
# -- Prolog
- lis r3, CMsg@h
- ori r3, r3, CMsg@l
- crclr 4*cr1+eq
- bl OSReport
+# lis r3, CMsg@h
+# ori r3, r3, CMsg@l
+# crclr 4*cr1+eq
+# bl OSReport
lis r3, CCCL@h
ori r3, r3, CCCL@l
@@ -54,11 +54,11 @@ InitCompression:
ori r4, r4, DecompBufferPointer@l
stw r3, 0(r4)
- mr r4, r3
- lis r3, CMsg2@h
- ori r3, r3, CMsg2@l
- crclr 4*cr1+eq
- bl OSReport
+# mr r4, r3
+# lis r3, CMsg2@h
+# ori r3, r3, CMsg2@l
+# crclr 4*cr1+eq
+# bl OSReport
# -- Epilog
li r3, 1
@@ -114,11 +114,11 @@ CCCL:
CCCL_End:
.long 0
-CMsg:
- .string "Setting up fancy decompression!\n"
+#CMsg:
+# .string "Setting up fancy decompression!\n"
-CMsg2:
- .string "Buffer: %p\n"
+#CMsg2:
+# .string "Buffer: %p\n"
.align 4
diff --git a/src/effectvideo.cpp b/src/effectvideo.cpp
index 6264142..98e2dcd 100644
--- a/src/effectvideo.cpp
+++ b/src/effectvideo.cpp
@@ -43,7 +43,6 @@ int EffectVideo::onCreate() {
this->timer = 0;
char eventNum = (this->settings >> 24) & 0xFF;
- OSReport("Event to activate: %d", eventNum);
this->eventFlag = (u64)1 << (eventNum - 1);
diff --git a/src/eventblock.cpp b/src/eventblock.cpp
index 6f353b7..f9bc54e 100644
--- a/src/eventblock.cpp
+++ b/src/eventblock.cpp
@@ -110,12 +110,10 @@ int daEnEventBlock_c::onExecute() {
daEnEventBlock_c *daEnEventBlock_c::build() {
- OSReport("Creating EventBlock\n");
void *buffer = AllocFromGameHeap1(sizeof(daEnEventBlock_c));
daEnEventBlock_c *c = new(buffer) daEnEventBlock_c;
- OSReport("Created EventBlock @ %p\n", c);
return c;
}
diff --git a/src/eventlooper.cpp b/src/eventlooper.cpp
index 6bc0526..5acb43c 100644
--- a/src/eventlooper.cpp
+++ b/src/eventlooper.cpp
@@ -83,7 +83,6 @@ void EventLooper_Update(EventLooper *self) {
// Waiting for the right moment
if (self->delayCount < self->delay)
{
-// OSReport("Delaying: %d / %d\n", self->delayCount, self->delay);
self->delayCount = self->delayCount + 1;
return;
diff --git a/src/fileload.cpp b/src/fileload.cpp
index e672863..da9fd81 100644
--- a/src/fileload.cpp
+++ b/src/fileload.cpp
@@ -4,13 +4,11 @@ extern "C" void UncompressBackward(void *bottom);
void *LoadFile(FileHandle *handle, const char *name) {
- OSReport("[LoadFile %s]\n", name);
int entryNum = DVDConvertPathToEntrynum(name);
DVDHandle dvdhandle;
if (!DVDFastOpen(entryNum, &dvdhandle)) {
- OSReport("Cannot open file %s [%d]\n", name, entryNum);
return 0;
}
@@ -21,19 +19,16 @@ void *LoadFile(FileHandle *handle, const char *name) {
DVDClose(&dvdhandle);
- OSReport("[Success %p]\n", handle->filePtr);
return handle->filePtr;
}
/*void *LoadCompressedFile(FileHandle *handle, const char *name) {
- OSReport("[LoadCompressedFile %s]\n", name);
int entryNum = DVDConvertPathToEntrynum(name);
DVDHandle dvdhandle;
if (!DVDFastOpen(entryNum, &dvdhandle)) {
- OSReport("Cannot open file %s [%d]\n", name, entryNum);
return 0;
}
@@ -44,7 +39,6 @@ void *LoadFile(FileHandle *handle, const char *name) {
infoBlock[1] = (infoBlock[1] >> 24) | ((infoBlock[1] >> 8) & 0xFF00) | ((infoBlock[1] & 0xFF00) << 8) | ((infoBlock[1] & 0xFF) << 24);
u32 uncompSize = dvdhandle.length + infoBlock[1];
- OSReport("[Comp:%d UnComp:%d]\n", dvdhandle.length, uncompSize);
handle->length = uncompSize;
handle->filePtr = EGG__Heap__alloc((uncompSize+0x1F) & ~0x1F, 0x20, GetArchiveHeap());
@@ -54,7 +48,6 @@ void *LoadFile(FileHandle *handle, const char *name) {
UncompressBackward((void*)((u32)handle->filePtr + dvdhandle.length));
- OSReport("[Success %p]\n", handle->filePtr);
return handle->filePtr;
}*/
@@ -63,7 +56,6 @@ bool FreeFile(FileHandle *handle) {
if (!handle) return false;
if (handle->filePtr) {
- OSReport("[FreeFile %p]\n", handle->filePtr);
EGG__Heap__free(handle->filePtr, GetArchiveHeap());
}
diff --git a/src/heapbar.S b/src/heapbar.S
index 83b0c3a..b8b1f6d 100644
--- a/src/heapbar.S
+++ b/src/heapbar.S
@@ -69,6 +69,8 @@ doHeapBar:
lwz r3, 0x10(r3)
lwz r4, 0x18(r3)
lwz r5, 0x1C(r3)
+ lis r6, 0x8000
+ lwz r6, 0x3128(r6)
lis r3, THE_THING@h
ori r3, r3, THE_THING@l
bl OSReport
@@ -127,6 +129,6 @@ asmProcessHeap:
blr
.data
-THE_THING: .string "A thing: %x - %x\n"
+THE_THING: .string "A thing: %x - %x and %x\n"
.align 4
diff --git a/src/heapbar.cpp b/src/heapbar.cpp
index 40fefe5..8fe756c 100644
--- a/src/heapbar.cpp
+++ b/src/heapbar.cpp
@@ -93,7 +93,6 @@ void cppProcessHeap(u32 freeSize, u32 heapSize, int heapID, char *name) {
// width: 686
- //OSReport("%s => size %d, free %d\n", name, heapSize, freeSize);
float left = 0;
float right = ((heapSize - freeSize) * 686.0f) / heapSize;
diff --git a/src/koopatlas/camera.cpp b/src/koopatlas/camera.cpp
index 87547d9..47b68a5 100644
--- a/src/koopatlas/camera.cpp
+++ b/src/koopatlas/camera.cpp
@@ -4,12 +4,10 @@
dWorldCamera_c *dWorldCamera_c::instance = 0;
dWorldCamera_c *dWorldCamera_c::build() {
- OSReport("Creating WorldCamera\n");
void *buffer = AllocFromGameHeap1(sizeof(dWorldCamera_c));
dWorldCamera_c *c = new(buffer) dWorldCamera_c;
- OSReport("Created WorldCamera @ %p\n", c);
instance = c;
return c;
@@ -96,7 +94,6 @@ int dWorldCamera_c::onExecute() {
change = true;
}
if (change) {
- OSReport("%f, %f (%f)\n", currentX, currentY, zoomLevel);
}
}
calculateScreenGeometry();
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp
index 183e85f..531c3b1 100644
--- a/src/koopatlas/hud.cpp
+++ b/src/koopatlas/hud.cpp
@@ -3,12 +3,10 @@
dWMHud_c *dWMHud_c::instance = 0;
dWMHud_c *dWMHud_c::build() {
- OSReport("Creating WM_Hud\n");
void *buffer = AllocFromGameHeap1(sizeof(dWMHud_c));
dWMHud_c *c = new(buffer) dWMHud_c;
- OSReport("Created WM_Hud @ %p\n", c);
instance = c;
return c;
@@ -98,7 +96,6 @@ void dWMHud_c::setPointName() {
dKPNode_s *node = dScKoopatlas_c::instance->pathManager.currentNode;
if (node->type == dKPNode_s::LEVEL) {
- OSReport("Trying level %d-%d\n", node->levelNumber[0], node->levelNumber[1]);
dLevelInfo_c *li = &dScKoopatlas_c::instance->levelInfo;
dLevelInfo_c::entry_s *entry = li->search(node->levelNumber[0] - 1, node->levelNumber[1] - 1);
diff --git a/src/koopatlas/map.cpp b/src/koopatlas/map.cpp
index 4600556..258cf7c 100644
--- a/src/koopatlas/map.cpp
+++ b/src/koopatlas/map.cpp
@@ -6,19 +6,16 @@
//#define DOODAD_DEBUGGING
#ifdef TILE_DEBUGGING
-#define TileReport OSReport
#else
inline void TileReport(const char *str, ...) { }
#endif
#ifdef BOUND_DEBUGGING
-#define BoundReport OSReport
#else
inline void BoundReport(const char *str, ...) { }
#endif
#ifdef DOODAD_DEBUGGING
-#define DoodadReport OSReport
#else
inline void DoodadReport(const char *str, ...) { }
#endif
@@ -26,12 +23,10 @@ inline void DoodadReport(const char *str, ...) { }
dWMMap_c *dWMMap_c::instance = 0;
dWMMap_c *dWMMap_c::build() {
- OSReport("Creating WM_Map\n");
void *buffer = AllocFromGameHeap1(sizeof(dWMMap_c));
dWMMap_c *c = new(buffer) dWMMap_c;
- OSReport("Created WM_Map @ %p\n", c);
instance = c;
return c;
@@ -45,12 +40,9 @@ dWMMap_c::dWMMap_c() {
int dWMMap_c::onCreate() {
renderer.allocator.setup(GameHeaps[0], 0x20);
- OSReport("Setting up Renderer\n");
bool result = renderer.setup(&renderer.allocator);
if (result)
- OSReport("Set up Renderer\n");
else
- OSReport(":(\n");
bgMatrix.translation(1140.0f, -2910.0f, -500.0f);
s16 rot = 0x4000;
@@ -135,10 +127,6 @@ void dWMMap_c::renderer_c::beginRendering() {
nw4r::g3d::Camera cam3d(GetCameraByID(0));
cam3d.GetCameraMtx(&renderMtx);
MTXTransApply(renderMtx, renderMtx, 0, 0, baseZ);
- /*OSReport("MTX:\n");
- OSReport("%f, %f, %f, %f:\n", renderMtx[0][0], renderMtx[0][1], renderMtx[0][2], renderMtx[0][3]);
- OSReport("%f, %f, %f, %f:\n", renderMtx[1][0], renderMtx[1][1], renderMtx[1][2], renderMtx[1][3]);
- OSReport("%f, %f, %f, %f:\n", renderMtx[2][0], renderMtx[2][1], renderMtx[2][2], renderMtx[2][3]);//*/
GXSetCurrentMtx(GX_PNMTX0);
diff --git a/src/koopatlas/mapdata.cpp b/src/koopatlas/mapdata.cpp
index 5b38126..eaf9c75 100644
--- a/src/koopatlas/mapdata.cpp
+++ b/src/koopatlas/mapdata.cpp
@@ -40,9 +40,7 @@ dKPMapData_c::~dKPMapData_c() {
}
bool dKPMapData_c::load(const char *filename) {
- OSReport("Loading %s\n", filename);
data = (dKPMapFile_s*)m_fileLoader.load(filename);
- OSReport("%p\n", data);
if (data == 0)
return false;
@@ -60,7 +58,6 @@ bool dKPMapData_c::loadTilesets() {
if (tilesetsLoaded)
return true;
- OSReport("Loading tilesets: %d\n", data->tilesetCount);
if (tilesetLoaders == 0)
tilesetLoaders = new dDvdLoader_c[data->tilesetCount];
@@ -68,7 +65,6 @@ bool dKPMapData_c::loadTilesets() {
for (int i = 0; i < data->tilesetCount; i++) {
char *filename = ((char*)data) + (data->tilesets[i].dummy[3] - 0x10000000);
- OSReport("Loading tileset: %s\n", filename);
result &= (tilesetLoaders[i].load(filename) != 0);
}
diff --git a/src/koopatlas/player.cpp b/src/koopatlas/player.cpp
index c89535f..709fe43 100644
--- a/src/koopatlas/player.cpp
+++ b/src/koopatlas/player.cpp
@@ -3,15 +3,12 @@
daWMPlayer_c *daWMPlayer_c::instance;
int daWMPlayer_c::onCreate() {
- OSReport("* dWMPlayer_c created\n");
- OSReport("Init handler...\n");
this->modelHandler = new dPlayerModelHandler_c(0);
this->modelHandler->loadModel(0, 3, 2);
this->modelHandler->mdlClass->startAnimation(0, 1.2, 10.0, 0.0);
this->modelHandler->setSRT((Vec){0.0,100.0,-100.0}, (S16Vec){0,0,0}, (Vec){2.0,2.0,2.0});
this->modelHandler->draw();
- OSReport("Init done!\n");
pos = (Vec){0.0f,0.0f,3000.0f};
rot = (S16Vec){0,0,0};
@@ -24,7 +21,6 @@ int daWMPlayer_c::onCreate() {
int daWMPlayer_c::onDelete() {
delete modelHandler;
- OSReport("* dWMPlayer_c deleted\n");
return true;
}
@@ -130,12 +126,10 @@ void daWMPlayer_c::startAnimation(int id, float frame, float unk, float updateRa
daWMPlayer_c *daWMPlayer_c::build() {
- OSReport("Creating WMPlayer\n");
void *buffer = AllocFromGameHeap1(sizeof(daWMPlayer_c));
daWMPlayer_c *c = new(buffer) daWMPlayer_c;
- OSReport("Created WMPlayer @ %p\n", c);
instance = c;
return c;
diff --git a/src/levelnames.cpp b/src/levelnames.cpp
index 02aa4b7..1f05386 100644
--- a/src/levelnames.cpp
+++ b/src/levelnames.cpp
@@ -8,40 +8,32 @@
//#define DEBUG_NAMES
#ifndef DEBUG_NAMES
-#define OSReport(...)
#endif
extern char CurrentLevel;
extern char CurrentWorld;
int DoNames(int state) {
- OSReport("DoNames called - State param is %d\n", state);
int wnum = (int)CurrentWorld;
int lnum = (int)CurrentLevel;
- OSReport("Current Level: %d-%d\n", wnum+1, lnum+1);
// Skip the title screen
// and only process the code if the State is set to 1
// (the screen has been initialised)
if (state == 1 && lnum != STAGE_TITLE) {
- OSReport("Processing\n");
// grab the CRSIN object
Actor *ptr = FindActorByType(CRSIN, 0);
- //OSReport("CRSIN actor found at : %08X\n", ptr);
// FIX !!!!!
if (ptr != 0) {
void *worldObj = EmbeddedLayout_FindTextBoxByName((Layout*)((u32)ptr+0xB0), "TXT_WorldName");
void *levelObj = EmbeddedLayout_FindTextBoxByName((Layout*)((u32)ptr+0xB0), "TXT_LevelName");
- //OSReport("WorldObj TextBox : %08X; LevelObj TextBox : %08X\n", worldObj, levelObj);
if (worldObj == 0 || levelObj == 0) return state;
/*char *file = RetrieveFileFromArc(ARC_TABLE, "Mario", "newer/names.bin");
- //OSReport("RetrieveFileFromArc returned : %08X\n", file);
char *worldname = file + (wnum * 0x40);
char *levelname = file + 0x280 + (wnum * 0xA80) + (lnum * 0x40);*/
- OSReport("Loading file...\n");
FileHandle fh;
void *info = LoadFile(&fh, "/NewerRes/LevelInfo.bin");
@@ -49,7 +41,6 @@ int DoNames(int state) {
LevelInfo_Entry *entry = LevelInfo_Search(info, wnum, lnum);
char *worldname = LevelInfo_GetName(info, entry);
char *levelname = "";
- OSReport("Got name : %s\n", worldname);
void *vtable = *((void**)levelObj);
void *funcaddr = *((void**)((u32)vtable+0x7C));
@@ -65,19 +56,14 @@ int DoNames(int state) {
SetString(worldObj, wbuffer, 0);
SetString(levelObj, lbuffer, 0);
- OSReport("Freeing file\n");
FreeFile(&fh);
- OSReport("Inserted strings\n");
}
} else {
- OSReport("Skipped\n");
}
- OSReport("Reached the end of DoNames\n");
return state;
}
int DoNamesTest2(int state, u32 ptr) {
- OSReport("TEST 1:%08X 2:%08X\n", state, ptr);
return DoNames(state);
}
diff --git a/src/levelspecial.cpp b/src/levelspecial.cpp
index 3ce6aab..b5447e9 100644
--- a/src/levelspecial.cpp
+++ b/src/levelspecial.cpp
@@ -82,9 +82,7 @@ bool LevelSpecial_Create(LevelSpecial *self) {
char eventNum = (self->settings >> 24) & 0xFF;
self->eventFlag = (u64)1 << (eventNum - 1);
- OSReport("Special Event created @%p event %d\n", self, eventNum);
- OSReport("Eventnum: %d. Event flag: %08x %08x\n", eventNum, self->eventFlag >> 32, self->eventFlag & 0xFFFFFFFF);
self->type = (self->settings) & 15;
self->effect = (self->settings >> 4) & 15;
@@ -103,7 +101,6 @@ bool LevelSpecial_Execute(LevelSpecial *self) {
void LevelSpecial_Update(LevelSpecial *self) {
- //OSReport("%08x%08x", EventTable->events >> 32, EventTable->events & 0xFFFFFFFF);
u8 newEvState = 0;
if (EventTable->events & self->eventFlag)
@@ -112,13 +109,11 @@ void LevelSpecial_Update(LevelSpecial *self) {
if (newEvState == self->lastEvState)
return;
- OSReport("Event state changed from %d to %d\n", self->lastEvState, newEvState);
u8 offState;
if (newEvState == ACTIVATE)
{
offState = (newEvState == 1) ? 1 : 0;
- OSReport("Activate Special Event!", offState);
switch (self->type) {
// case 1: // Time Freeze
@@ -185,6 +180,7 @@ void LevelSpecial_Update(LevelSpecial *self) {
// // Mario->ePhysics.info.yDistToEdge = Mario->ePhysics.info.yDistToEdge * 4.0;
// }
// }
+
// else //Half-Pint
// {
@@ -260,7 +256,6 @@ void LevelSpecial_Update(LevelSpecial *self) {
else
{
offState = (newEvState == 1) ? 0 : 1;
- OSReport("Deactivate Special Event", offState);
switch (self->type) {
// case 1: // Time Freeze
@@ -286,9 +281,7 @@ void LevelSpecial_Update(LevelSpecial *self) {
// MarioSize = 4.0;
//
// for(int n=0; n<4; n++) {
-// OSReport("Changing Physics for Player %d\n", n);
// Mario = GetSpecificPlayerActor(n);
-// OSReport("Player Actor at %08x\n", Mario);
// if(Mario == 0)
// continue;
// Mario->aPhysics.info.xDistToCenter = Mario->aPhysics.info.xDistToCenter / 4.0;
@@ -380,12 +373,10 @@ void LevelSpecial_Update(LevelSpecial *self) {
break;
}
}
- OSReport("Special Event is %d\n", offState);
- OSReport("Success!\n");
self->lastEvState = newEvState;
diff --git a/src/linegod.cpp b/src/linegod.cpp
index 8de34ac..c727de4 100644
--- a/src/linegod.cpp
+++ b/src/linegod.cpp
@@ -94,9 +94,7 @@ bool LineGod_Create(LineGod *self) {
char eventNum = (self->settings >> 24) & 0xFF;
self->eventFlag = (u64)1 << (eventNum - 1);
- OSReport("LineGod created @%p event %d\n", self, eventNum);
- OSReport("Eventnum: %d. Event flag: %08x %08x\n", eventNum, self->eventFlag >> 32, self->eventFlag & 0xFFFFFFFF);
self->func = (self->settings) & 1;
self->width = (self->settings >> 4) & 15;
@@ -121,7 +119,6 @@ void LineGod_BuildList(LineGod *self) {
}
- //OSReport("I'm at %f,%f. BG_GM offset is %f,%f\n", self->x, self->y, BG_GM_ptr->_0x8FE64, BG_GM_ptr->_0x8FE6C);
float gLeft = self->x - (BG_GM_ptr->_0x8FE64 - fmod(BG_GM_ptr->_0x8FE64, 16));
float gTop = self->y - (BG_GM_ptr->_0x8FE6C - fmod(BG_GM_ptr->_0x8FE6C, 16));
@@ -135,9 +132,6 @@ void LineGod_BuildList(LineGod *self) {
gLeft + (self->width * 16) - 1, gTop - 1, 0
};
- //OSReport("------\n");
- //OSReport("Affects: {%f, %f} ---- {%f, %f}\n", grect1.x, grect1.y, grect2.x, grect2.y);
- //OSReport("------\n");
for (int i = 0; i < dBgActorManager->count; i++) {
BgActor *ac = &dBgActorManager->array[i];
@@ -146,7 +140,6 @@ void LineGod_BuildList(LineGod *self) {
// except for one of the steep slopes, which differs for no reason
BgActorDef *def = &BgActorDefs[ac->def_id];
- //OSReport("Actor at %d,%d. Def X,Y is %f,%f and W/H is %f,%f\n", ac->x, ac->y, def->x, def->y, def->width, def->height);
float aXCentre = (ac->x * 16) + def->x;
float aYCentre = (-ac->y * 16) + def->y;
@@ -161,14 +154,12 @@ void LineGod_BuildList(LineGod *self) {
aXCentre + xDistToCentre, aYCentre + yDistToCentre, 0
};
- //OSReport("Actor: {%f, %f} ---- {%f, %f}\n", arect1.x, arect1.y, arect2.x, arect2.y);
if (RectanglesOverlap(&arect1, &arect2, &grect1, &grect2))
LineGod_AppendToList(self, ac);
}
}
bool LineGod_AppendToList(LineGod *self, BgActor *ac) {
- OSReport("Adding %p to the list (pos: %d,%d)\n", ac, ac->x, ac->y);
for (int search = 0; search < 8; search++) {
if (self->ac[search] == 0) {
@@ -181,7 +172,6 @@ bool LineGod_AppendToList(LineGod *self, BgActor *ac) {
}
void LineGod_Update(LineGod *self) {
- //OSReport("%08x%08x", EventTable->events >> 32, EventTable->events & 0xFFFFFFFF);
u8 newEvState = 0;
if (EventTable->events & self->eventFlag)
@@ -193,7 +183,6 @@ void LineGod_Update(LineGod *self) {
u16 x_bias = (BG_GM_ptr->_0x8FE64 / 16);
u16 y_bias = -(BG_GM_ptr->_0x8FE6C / 16);
- OSReport("Event state changed from %d to %d\n", self->lastEvState, newEvState);
u8 offState;
if (self->func == LINEGOD_FUNC_ACTIVATE)
@@ -201,18 +190,15 @@ void LineGod_Update(LineGod *self) {
else
offState = (newEvState == 1) ? 0 : 1;
- //OSReport("offState is %d\n", offState);
for (int i = 0; i < 8; i++) {
if (self->ac[i] != 0) {
BgActor *ac = self->ac[i];
- //OSReport("Assigning %d to %p->EXTRA_off (actor ID is %d)\n", offState, ac, ac->actor_id);
ac->EXTRA_off = offState;
if (offState == 1 && ac->actor_id != 0) {
fBase_c *assoc_ac = FindActorByID(ac->actor_id);
- OSReport("Got actor: %p\n", assoc_ac);
if (assoc_ac != 0)
assoc_ac->Delete();
ac->actor_id = 0;
@@ -224,12 +210,9 @@ void LineGod_Update(LineGod *self) {
else
*tile = BgActorDefs[ac->def_id].tilenum;
- //OSReport("def_id: %d; def_ptr: %p\n", ac->def_id, &(BgActorDefs[ac->def_id]));
- //OSReport("Placed tile %d at %p [%d,%d]\n", *tile, tile, ac->x+x_bias, ac->y+y_bias);
}
}
- //OSReport("Success!\n");
self->lastEvState = newEvState;
diff --git a/src/mrsun.cpp b/src/mrsun.cpp
index 4e92d7a..ebc33db 100755
--- a/src/mrsun.cpp
+++ b/src/mrsun.cpp
@@ -92,30 +92,23 @@ extern EventTable_t *EventTable;
void daMrSun_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); }
-void daMrSun_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Hit Fireball"); }
+void daMrSun_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { }
bool daMrSun_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) {
- OSReport("Hit Iceball");
if (this->settings == 1) { // It's a moon
- OSReport("What Kind is it?: %d", apOther->owner->name);
if (apOther->owner->name == 0x76) { // BROS_ICEBALL
- OSReport("No hits 4 u.");
return true;
}
}
- OSReport("K it hit.");
return false;
}
void daMrSun_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {
- OSReport("Hit Rolling Object");
this->timer = 0;
doStateChange(&StateID_DieFall); }
void daMrSun_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) {
- OSReport("Hit Hammer");
this->timer = 0;
doStateChange(&StateID_DieFall); }
void daMrSun_c::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) {
- OSReport("Hit StarMario");
this->timer = 0;
doStateChange(&StateID_DieFall); }
void daMrSun_c::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); }
@@ -169,7 +162,6 @@ void daMrSun_c::dieFall_Execute() {
int daMrSun_c::onCreate() {
- OSReport("Creating the Mr.Sun Models");
allocator.link(-1, GameHeaps[0], 0, 0x20);
if ((this->settings & 0xF) == 0) { // It's a sun
@@ -193,10 +185,8 @@ int daMrSun_c::onCreate() {
allocator.unlink();
- OSReport("Setting Mr.Sun's Size to 4.0");
this->scale = (Vec){0.5, 0.5, 0.5};
- OSReport("Creating Mr.Sun's Physics Struct");
ActivePhysics::Info HitMeBaby;
HitMeBaby.xDistToCenter = 0.0;
@@ -220,11 +210,9 @@ int daMrSun_c::onCreate() {
HitMeBaby.callback = &dEn_c::collisionCallback;
- OSReport("Making the Physics Class and adding to the list");
this->aPhysics.initWithStruct(this, &HitMeBaby);
this->aPhysics.addToList();
- OSReport("Setting up Mr.Sun's Box of Goodies");
this->Baseline = this->pos.y;
this->SwoopSlope = 0.0;
this->SpiralLoop = 0;
@@ -241,16 +229,13 @@ int daMrSun_c::onCreate() {
char eventNum = (this->settings >> 16) & 0xFF;
- OSReport("Event to activate: %d", eventNum);
this->eventFlag = (u64)1 << (eventNum - 1);
- OSReport("Setting Mr.Sun's State");
doStateChange(&StateID_Follow);
- OSReport("Going to Execute Mr.Sun");
this->onExecute();
return true;
}
@@ -260,7 +245,6 @@ int daMrSun_c::onDelete() {
}
int daMrSun_c::onExecute() {
- //OSReport("Oh Mr.Sun, Sun, Mr.Golden Sun");
acState.execute();
updateModelMatrices();
@@ -318,7 +302,6 @@ void daMrSun_c::updateModelMatrices() {
// Follow State
void daMrSun_c::beginState_Follow() {
- OSReport("Mr.Sun is following youuuuu.");
this->timer = 0;
this->rot.x = 18000;
this->rot.y = 0;
@@ -334,7 +317,6 @@ void daMrSun_c::executeState_Follow() {
if ((this->settings & 0xF) == 0) { speedDelta = 0.1; } // It's a sun
else { speedDelta = 0.15; } // It's a moon
-// OSReport("Speed: %f", this->speed.x);
if (this->direction == 0) {
this->speed.x = this->speed.x + speedDelta;
@@ -363,7 +345,6 @@ void daMrSun_c::executeState_Follow() {
this->timer = this->timer + 1;
}
void daMrSun_c::endState_Follow() {
- OSReport("Mr.Sun is coming for you.");
this->speed.y = 0;
}
@@ -371,7 +352,6 @@ void daMrSun_c::endState_Follow() {
// Swoop State
void daMrSun_c::beginState_Swoop() {
- OSReport("Swooping down from above, Mr.Sun falls down.");
// Not enough space to swoop, spit instead.
if (this->swoopTarget.y < (this->pos.y - 50)) { doStateChange(&StateID_Spit); }
@@ -419,7 +399,6 @@ void daMrSun_c::executeState_Swoop() {
}
void daMrSun_c::endState_Swoop() {
- OSReport("Returning to the sky, Mr.Sun flies into the sunset.");
this->speed.y = 0;
}
@@ -428,7 +407,6 @@ void daMrSun_c::endState_Swoop() {
// Spiral State
void daMrSun_c::beginState_Spiral() {
- OSReport("Super Spiral Sunspot!");
this->SpiralLoop = 0;
this->xSpiralOffset = this->pos.x;
@@ -457,7 +435,7 @@ void daMrSun_c::executeState_Spiral() {
if (this->SpiralLoop > (3.14 * Loops)) { doStateChange(&StateID_Follow); }
}
-void daMrSun_c::endState_Spiral() { OSReport("Nightmare Spiral Attack Ends!"); }
+void daMrSun_c::endState_Spiral() { }
@@ -465,7 +443,6 @@ void daMrSun_c::endState_Spiral() { OSReport("Nightmare Spiral Attack Ends!"); }
void daMrSun_c::beginState_Spit() {
- OSReport("Goodness Gracious Great Balls of Fire!");
this->timer = 0;
this->spinStateOn = 1;
@@ -529,7 +506,6 @@ void daMrSun_c::executeState_Spit() {
}
void daMrSun_c::endState_Spit() {
this->spinStateOn = 0;
- OSReport("Armageddon complete.");
}
@@ -537,7 +513,6 @@ void daMrSun_c::endState_Spit() {
// Spin State
void daMrSun_c::beginState_Spin() {
- OSReport("Hoola hoola hoola hoop.");
this->spinReduceZ = 0;
this->spinReduceY = 0;
}
@@ -647,7 +622,6 @@ void daMrSun_c::executeState_Spin() {
}
void daMrSun_c::endState_Spin() {
- OSReport("K, I is dizzy now.");
this->rot.x = 18000;
this->rot.y = 0;
this->rot.z = 0;
@@ -661,7 +635,6 @@ void daMrSun_c::endState_Spin() {
void daMrSun_c::beginState_Wait() {
- OSReport("Preparing an attack!");
this->timer = 0;
this->speed.x = 0.0;
@@ -685,7 +658,6 @@ void daMrSun_c::executeState_Wait() {
Choice = GenerateRandomNumber(9);
-// OSReport("Choice: %d", Choice);
if (Choice == 0) { doStateChange(&StateID_Spit); }
else if (Choice == 1) { doStateChange(&StateID_Spit); }
@@ -698,7 +670,6 @@ void daMrSun_c::executeState_Wait() {
this->timer = this->timer + 1;
}
void daMrSun_c::endState_Wait() {
- OSReport("Mr.Sun Cometh!");
this->timer = 0;
}
diff --git a/src/msgbox.cpp b/src/msgbox.cpp
index 99dd8c6..adbeb24 100644
--- a/src/msgbox.cpp
+++ b/src/msgbox.cpp
@@ -99,7 +99,6 @@ int dMsgBoxManager_c::onCreate() {
}
int dMsgBoxManager_c::onExecute() {
- //OSReport("E: %s\n", state.getCurrentState()->getName());
state.execute();
layout.execAnimations();
@@ -129,13 +128,9 @@ int dMsgBoxManager_c::onDelete() {
CREATE_STATE_E(dMsgBoxManager_c, LoadRes);
void dMsgBoxManager_c::executeState_LoadRes() {
- OSReport("Trying to load\n");
if (msgDataLoader.load("/NewerRes/Messages.bin")) {
- OSReport(":)\n");
state.setState(&StateID_Wait);
- OSReport("changed\n");
} else {
- OSReport(":(\n");
}
}
@@ -164,7 +159,6 @@ void dMsgBoxManager_c::showMessage(int id) {
}
if (title == 0) {
- OSReport("WARNING! Tried to show message %x but it could not be found!\n", id);
return;
}
@@ -181,12 +175,10 @@ void dMsgBoxManager_c::beginState_BoxAppearWait() {
visible = true;
MessageBoxIsShowing = true;
layout.enableNonLoopAnim(ANIM_BOX_APPEAR);
- OSReport("Enabling box appear @ %d\n", GlobalTickCount);
}
void dMsgBoxManager_c::executeState_BoxAppearWait() {
if (!layout.isAnimOn(ANIM_BOX_APPEAR)) {
- OSReport("Box appeared @ %d\n", GlobalTickCount);
state.setState(&StateID_ShownWait);
}
}
@@ -213,12 +205,10 @@ CREATE_STATE(dMsgBoxManager_c, BoxDisappearWait);
void dMsgBoxManager_c::beginState_BoxDisappearWait() {
layout.enableNonLoopAnim(ANIM_BOX_DISAPPEAR);
- OSReport("Enabling box disappear @ %d\n", GlobalTickCount);
}
void dMsgBoxManager_c::executeState_BoxDisappearWait() {
if (!layout.isAnimOn(ANIM_BOX_DISAPPEAR)) {
- OSReport("Box disappeared @ %d\n", GlobalTickCount);
state.setState(&StateID_Wait);
for (int i = 0; i < 2; i++)
@@ -265,7 +255,6 @@ CREATE_STATE(daEnMsgBlock_c, Wait);
int daEnMsgBlock_c::onCreate() {
- OSReport("Creating Block\n");
blockInit(pos.y);
physicsInfo.x1 = -8;
@@ -292,7 +281,6 @@ int daEnMsgBlock_c::onCreate() {
tile.tileNumber = 0x98;
doStateChange(&daEnMsgBlock_c::StateID_Wait);
- OSReport("Created Block\n");
return true;
}
diff --git a/src/music.S b/src/music.S
index 59c86a0..93c57dc 100644
--- a/src/music.S
+++ b/src/music.S
@@ -6,10 +6,23 @@
.extern sprintf
.global HaxMusic
+# Without Drums: Type 0
+# Athletic, Castle(Siro)
+
+# With Drums: Type 1
+# Overworld(Chijou), ...
+
HaxMusic:
cmpwi r3, 100
bltlr
+ li r4, 0 # Type: No Yoshi Drums
+ cmpwi r3, 200
+ blt Begin
+
+ li r4, 1
+Begin:
+
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
diff --git a/src/penguin.cpp b/src/penguin.cpp
index 6d12204..2105291 100644
--- a/src/penguin.cpp
+++ b/src/penguin.cpp
@@ -290,13 +290,11 @@ int daPengi::onCreate() {
HitMeBaby.unkShort1C = 0;
HitMeBaby.callback = &dEn_c::collisionCallback;
- OSReport("Making the Physics Class and adding to the list\n");
this->aPhysics.initWithStruct(this, &HitMeBaby);
this->aPhysics.addToList();
// Tile collider
- OSReport("Making the Tile collider Class\n");
// These fucking rects do something for the tile rect
spriteSomeRectX = 28.0f;
@@ -424,4 +422,4 @@ void daPengi::updateModelMatrices() {
this->Delete(1);
}
}
- void daPengi::endState_Die() { } \ No newline at end of file
+ void daPengi::endState_Die() { }
diff --git a/src/player.cpp b/src/player.cpp
index 8aa3ca6..52a8b79 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -6,29 +6,20 @@ char NearestPlayer(dStageActor_c* actor) {
char nearest = -1;
float current = 1000000000000000000000000000000.0;
- // OSReport("FINDING NEAREST PLAYER\n");
for(char ii = 0; ii < 4; ii++) {
- // OSReport("K, let's check out Player %d\n", ii);
dStageActor_c* player = GetSpecificPlayerActor(ii);
if(!player) {
- // OSReport("Player %d is NULL\n", ii);
continue;
}
- // OSReport("Player %d is ok\n", ii);
- // OSReport("[%f,%f,%f] - [%f,%f,%f]\n",
// actor->pos.x, actor->pos.y, actor->pos.z,
// player->pos.x, player->pos.y, player->pos.z);
float distance = VECDistance(&actor->pos, &player->pos);
- // OSReport("Distance: %f [%f]\n", distance, current);
if(distance < current) {
current = distance;
nearest = ii;
- // OSReport("Nearest is now %d\n", ii);
}
}
- // OSReport("NearestPlayer returning %d\n", nearest);
if(nearest < 0) {
- // OSReport("***FIX ME IMMEDIATELY***\n***NEED Z COORDINATES FOR ACTOR***\n");
}
return nearest;
}
@@ -50,7 +41,6 @@ void setNewActivePhysicsRect(dStageActor_c* actor, Vec* scale) {
info.unkShort1C = actor->aPhysics.info.unkShort1C;
info.callback = actor->aPhysics.info.callback;
- //OSReport("Making new Physics Class and adding to the list\n");
actor->aPhysics.removeFromList();
actor->aPhysics.initWithStruct(actor, &info);
actor->aPhysics.addToList();
@@ -70,7 +60,6 @@ void changeActivePhysicsRect(dStageActor_c* actor, float xc, float yc, float xe,
info.unkShort1C = actor->aPhysics.info.unkShort1C;
info.callback = actor->aPhysics.info.callback;
- //OSReport("Making new Physics Class and adding to the list\n");
actor->aPhysics.removeFromList();
actor->aPhysics.initWithStruct(actor, &info);
actor->aPhysics.addToList();
diff --git a/src/poweruphax.S b/src/poweruphax.S
index e028eb9..f8d1c2a 100644
--- a/src/poweruphax.S
+++ b/src/poweruphax.S
@@ -305,38 +305,6 @@ gotTexID2:
-.global PlumberSetPowerupTextureDebug
-.extern OSReport
-.extern continuePlumberSetPowerupTextureDebug
-PlumberSetPowerupTextureDebug:
- stwu sp, -0x30(sp)
- mflr r0
- stw r0, 0x34(sp)
- stw r3, 0x20(sp)
- stw r4, 0x24(sp)
-
- mr r6, r0
- mr r5, r4
- mr r4, r3
- lis r3, PowerupTexDebugStr@h
- ori r3, r3, PowerupTexDebugStr@l
- crclr 4*cr1+eq
- bl OSReport
-
- lwz r3, 0x20(sp)
- lwz r4, 0x24(sp)
- lwz r0, 0x34(sp)
- mtlr r0
- addi sp, sp, 0x30
-
- stwu sp, -0x30(sp)
-
- b continuePlumberSetPowerupTextureDebug
-
-
-
-
-
.global PlumberSetPowerupTextureFix
PlumberSetPowerupTextureFix:
stb r4, 0x153(r3)
@@ -731,11 +699,11 @@ I_hammerModelName:
.string "I_fireflower"
-PowerupTexDebugStr:
- .string "Plumber::SetPowerupTexture() called on class %p with texnum %d lr=%p\n"
+#PowerupTexDebugStr:
+# .string "Plumber::SetPowerupTexture() called on class %p with texnum %d lr=%p\n"
-DBString:
- .string "PW:%d\n"
+#DBString:
+# .string "PW:%d\n"
#.global BrosModelFilename
#BrosModelFilename:
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index 34de1d9..79ed869 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -424,7 +424,6 @@ int daShyGuy::onCreate() {
int baln = this->settings >> 24 & 0xF;
this->distance = this->settings >> 12 & 0xF;
- OSReport("Creating the ShyGuy Model\n");
allocator.link(-1, GameHeaps[0], 0, 0x20);
@@ -534,9 +533,7 @@ int daShyGuy::onCreate() {
allocator.unlink();
// Stuff I do understand
- OSReport("Setting up ShyGuy's Box of Goodies\n");
- OSReport("Setting ShyGuy's Size to 1.0\n");
this->scale = (Vec){20.0, 20.0, 20.0};
this->pos.y = this->pos.y + 30.0; // X is vertical axis
@@ -553,7 +550,6 @@ int daShyGuy::onCreate() {
this->XSpeed = 0.8;
this->balloonSize = 1.5;
- OSReport("Creating ShyGuy's Physics Struct\n");
ActivePhysics::Info HitMeBaby;
@@ -590,13 +586,11 @@ int daShyGuy::onCreate() {
HitMeBaby.unkShort1C = 0;
HitMeBaby.callback = &shyCollisionCallback;
- OSReport("Making the Physics Class and adding to the list\n");
this->aPhysics.initWithStruct(this, &HitMeBaby);
this->aPhysics.addToList();
// Tile collider
- OSReport("Making the Tile collider Class\n");
// These fucking rects do something for the tile rect
spriteSomeRectX = 28.0f;
@@ -684,7 +678,6 @@ int daShyGuy::onCreate() {
doStateChange(&StateID_Walk);
}
- OSReport("Going to Execute ShyGuy\n");
this->onExecute();
return true;
}
@@ -864,7 +857,6 @@ void daShyGuy::updateModelMatrices() {
PlaySoundAsync(this, SE_PLY_JUMPDAI);
}
- OSReport("Takeoff Initiated");
}
}
diff --git a/src/spritespawner.cpp b/src/spritespawner.cpp
index 32462d5..ebfe7a9 100755
--- a/src/spritespawner.cpp
+++ b/src/spritespawner.cpp
@@ -44,10 +44,8 @@ void SpriteSpawner_Update(SpriteSpawner *self);
bool SpriteSpawner_Create(SpriteSpawner *self) {
- OSReport("I exist, dammit!");
char eventNum = (self->settings >> 28) & 0xF;
- OSReport("Event to activate: %d", eventNum);
self->eventFlag = (u64)1 << (eventNum - 1);
self->createdActor = 0;
@@ -80,7 +78,6 @@ void SpriteSpawner_Update(SpriteSpawner *self) {
pos.y = self->y;
pos.z = self->z;
- OSReport("Spawning Sprite: %d at %f,%f,%f\n", self->type, pos.x, pos.y, pos.z);
dStageActor_c *spawned = CreateActor(self->type, self->inheritSet, pos, 0, 0);
self->createdActor = spawned->id;
diff --git a/src/spriteswapper.cpp b/src/spriteswapper.cpp
index 945da34..2bc03d5 100755
--- a/src/spriteswapper.cpp
+++ b/src/spriteswapper.cpp
@@ -44,10 +44,8 @@ void SpriteSpawnerTimed_Update(SpriteSpawnerTimed *self);
bool SpriteSpawnerTimed_Create(SpriteSpawnerTimed *self) {
- OSReport("I exist, dammit!");
char eventNum = (self->settings >> 28) & 0xF;
- OSReport("Event to activate: %d", eventNum);
self->eventFlag = (u64)1 << (eventNum - 1);
self->type = (self->settings >> 16) & 0xFFF;
@@ -79,7 +77,6 @@ void SpriteSpawnerTimed_Update(SpriteSpawnerTimed *self) {
pos.y = self->y;
pos.z = self->z;
- OSReport("Spawning Sprite: %d at %f,%f,%f\n", self->type, pos.x, pos.y, pos.z);
dStageActor_c *spawned = CreateActor(self->type, self->inheritSet, pos, 0, 0);
self->timer = 120;
diff --git a/src/tilesetfixer.cpp b/src/tilesetfixer.cpp
index 73615a1..71bea9d 100644
--- a/src/tilesetfixer.cpp
+++ b/src/tilesetfixer.cpp
@@ -28,11 +28,9 @@ void DoFixes(int slotNumber) {
const char *tsName = GetTilesetName(BGDatClass, GetAreaNum(), slotNumber);
if (tsName == 0 || tsName[0] == 0) {
- OSReport("Skipping set %d\n", slotNumber);
return;
}
- OSReport("Processing %d = %s\n", slotNumber, tsName);
char untHDname[64], untname[64];
snprintf(untHDname, 64, "BG_unt/%s_hd.bin", tsName);
@@ -42,17 +40,14 @@ void DoFixes(int slotNumber) {
void *bg_unt_hd_data = DVD_GetFile(GetDVDClass2(), tsName, untHDname, &unt_hd_length);
void *bg_unt = DVD_GetFile(GetDVDClass2(), tsName, untname);
- OSReport("Unt: %p - Unt_HD: %p\n", bg_unt, bg_unt_hd_data);
ObjLookupEntry *lookups = (ObjLookupEntry*)bg_unt_hd_data;
int objCount = unt_hd_length / sizeof(ObjLookupEntry);
- OSReport("%d objects\n", objCount);
for (int i = 0; i < objCount; i++) {
// process each object
u8 *thisObj = (u8*)((u32)bg_unt + lookups[i].offset);
- //OSReport("processing %d[%p][%04x]\n", i, thisObj, lookups[i].offset);
SwapObjData(thisObj, slotNumber);
}
@@ -64,7 +59,6 @@ void SwapObjData(u8 *data, int slotNumber) {
while (*data != 0xFF) {
u8 cmd = *data;
- //OSReport("Command: %02x\n", cmd);
if (cmd == 0xFE || (cmd & 0x80) != 0) {
data++;
@@ -78,6 +72,5 @@ void SwapObjData(u8 *data, int slotNumber) {
data += 3;
}
- //OSReport("Ended @ %p\n", data);
}
diff --git a/src/topman.cpp b/src/topman.cpp
index 2f9ae4d..fccbb0f 100644
--- a/src/topman.cpp
+++ b/src/topman.cpp
@@ -346,13 +346,11 @@ int daTopman::onCreate() {
HitMeBaby.unkShort1C = 0;
HitMeBaby.callback = &dEn_c::collisionCallback;
- OSReport("Making the Physics Class and adding to the list\n");
this->aPhysics.initWithStruct(this, &HitMeBaby);
this->aPhysics.addToList();
// Tile collider
- OSReport("Making the Tile collider Class\n");
// These fucking rects do something for the tile rect
spriteSomeRectX = 28.0f;
@@ -548,9 +546,7 @@ void daTopman::updateModelMatrices() {
this->direction = 1;
}
- // OSReport("Rotation: %x", this->rot.y);
- // OSReport("Direction: %d", this->direction);
// this->direction ^= 1;
bindAnimChr_and_setUpdateRate("begoman_wait2", 1, 0.0, 1.0);
}
- \ No newline at end of file
+
diff --git a/src/worldmap.cpp b/src/worldmap.cpp
index d650fce..6413d00 100644
--- a/src/worldmap.cpp
+++ b/src/worldmap.cpp
@@ -7,12 +7,10 @@ dScNewerWorldMap_c *dScNewerWorldMap_c::instance = 0;
dScNewerWorldMap_c *dScNewerWorldMap_c::build() {
// return new dScNewerWorldMap_c;
- OSReport("Creating WorldMap\n");
void *buffer = AllocFromGameHeap1(sizeof(dScNewerWorldMap_c));
dScNewerWorldMap_c *c = new(buffer) dScNewerWorldMap_c;
- OSReport("Created WorldMap @ %p\n", c);
instance = c;
return c;
@@ -237,32 +235,23 @@ void dScNewerWorldMap_c::GenText() {
}
int dScNewerWorldMap_c::onCreate() {
- OSReport("1:Loading scene\n");
LoadMapScene();
- OSReport("2:Loading scene\n");
GameSetup__LoadScene(0); // lol, stolen from GAME_SETUP
- OSReport("3:Layout alloc\n");
this->layout = (Layout*)AllocFromGameHeap1(sizeof(Layout));
if (!this->layout) {
- OSReport("memalloc fail\n");
InfiniteLoop;
}
- OSReport("4:Layout ctor\n");
EmbeddedLayout_ctor(this->layout);
- OSReport("5:Layout load arc\n");
EmbeddedLayout_LoadArc(this->layout, "NewerRes/wmap.arc");
- OSReport("6:Layout build\n");
if (!EmbeddedLayout_Build(this->layout, "levelSelect.brlyt", 0)) {
- OSReport("build fail\n");
InfiniteLoop;
}
- OSReport("7:Layout load brlan\n");
const char *anims[2] = {anim1, anim2};
EmbeddedLayout_LoadBrlans(this->layout, anims, 2);
@@ -276,10 +265,8 @@ int dScNewerWorldMap_c::onCreate() {
};
int mappings[30] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
- OSReport("8:Layout load group\n");
EmbeddedLayout_LoadGroups(this->layout, groups, mappings, 30);
- OSReport("9:Layout reset anims\n");
EmbeddedLayout_DisableAllAnims(this->layout);
for (int i = 0; i < 15; i++) {
@@ -287,17 +274,12 @@ int dScNewerWorldMap_c::onCreate() {
}
- OSReport("10:Item 1\n");
this->selectCursor = CreateParentedObject(SELECT_CURSOR, this, 0, 0);
- OSReport("11:Item 2\n");
this->csMenu = CreateParentedObject(COURSE_SELECT_MENU, this, 0, 0);
- OSReport("12:Item 3\n");
this->yesNoWindow = CreateParentedObject(YES_NO_WINDOW, this, 0, 0);
- OSReport("13:Item 4\n");
this->numPeopleChange = CreateParentedObject(NUMBER_OF_PEOPLE_CHANGE, this, 0, 0);
for (int i = 0; i < 4; i++) {
- OSReport("14:Character change select %d\n", i);
void *ccsb = CreateParentedObject(CHARACTER_CHANGE_SELECT_BASE, this, i, 0);
void *ccsc = CreateParentedObject(CHARACTER_CHANGE_SELECT_CONTENTS, this, i, 0);
void *ccsa = CreateParentedObject(CHARACTER_CHANGE_SELECT_ARROW, this, i, 0);
@@ -309,16 +291,12 @@ int dScNewerWorldMap_c::onCreate() {
NPCHG_CCI(this->numPeopleChange, i) = cci;
}
- OSReport("15:Item 5\n");
this->continueObj = CreateParentedObject(CONTINUE, this, 0, 0);
- OSReport("16:Item 6\n");
this->stockItem = CreateParentedObject(STOCK_ITEM, this, 0, 0);
- OSReport("17:Item 7\n");
this->stockItemShadow = CreateParentedObject(STOCK_ITEM_SHADOW, this, 0, 0);
STKI_SHADOW(this->stockItem) = this->stockItemShadow;
- OSReport("18:Item 8\n");
this->easyPairing = CreateParentedObject(EASY_PAIRING, this, 0, 0);
this->state = STATE_START_DVD;
@@ -328,13 +306,10 @@ int dScNewerWorldMap_c::onCreate() {
*CurrentDrawFunc = NewerMapDrawFunc;
// level info
- OSReport("19:Load level info\n");
this->levelInfo = LoadFile(&this->levelInfoFH, "/NewerRes/LevelInfo.bin");
- OSReport("20:Prepare level info\n");
LevelInfo_Prepare(&this->levelInfoFH);
// load the menu info
- OSReport("21:Load save info\n");
SaveBlock *save = GetSaveFile()->GetBlock(-1);
this->currentPage = save->current_world;
@@ -353,14 +328,11 @@ int dScNewerWorldMap_c::onCreate() {
this->selections[this->currentPage] = save->current_path_node;
// show button anim
- OSReport("22:Enable anim\n");
EmbeddedLayout_EnableNonLoopAnim(this->layout, save->current_path_node, false);
- OSReport("23:Make text\n");
this->GenText();
this->GenSBTitle();
- OSReport("24:onCreate complete\n");
return true;
}
@@ -606,13 +578,11 @@ int dScNewerWorldMap_c::onExecute() {
switch (CSMENU_CURRENT(this->csMenu)) {
case 0:
// Star Coins
- //OSReport("Star Coins was pressed\n");
this->state = STATE_NORMAL;
break;
case 1:
// Add/Drop Players
- //OSReport("Add/Drop Players was pressed\n");
this->state = STATE_PLAYER_CHANGE_WAIT;
NPCHG_ACTIVE(this->numPeopleChange) = true;
WpadShit(10);
@@ -621,7 +591,6 @@ int dScNewerWorldMap_c::onExecute() {
case 2:
// Save or Quick Save
- //OSReport("Save or Quick Save was pressed\n");
if (GetSaveFile()->GetBlock(-1)->bitfield & 2) {
this->state = STATE_SAVE_OPEN;
YESNO_TYPE(this->yesNoWindow) = 1;
@@ -638,7 +607,6 @@ int dScNewerWorldMap_c::onExecute() {
case 3:
// Title Screen
- //OSReport("Title Screen was pressed\n");
this->state = STATE_TITLE_CONFIRM_OPEN_WAIT;
YESNO_VISIBLE(this->yesNoWindow) = true;
YESNO_TYPE(this->yesNoWindow) = 10;
diff --git a/tools/kamek.py b/tools/kamek.py
index 3f7fb5c..97b02cf 100644
--- a/tools/kamek.py
+++ b/tools/kamek.py
@@ -267,7 +267,7 @@ class KamekBuilder(object):
if use_mw:
# metrowerks setup
- cc_command = ['%smwcceppc.exe' % mw_path, '-I.', '-I-', '-I.', '-nostdinc', '-Cpp_exceptions', 'off', '-Os', '-proc', 'gekko', '-fp', 'hard', '-enum', 'int', '-sdata', '0', '-sdata2', '0', '-g']
+ cc_command = ['%smwcceppc.exe' % mw_path, '-I.', '-I-', '-I.', '-nostdinc', '-Cpp_exceptions', 'off', '-Os', '-proc', 'gekko', '-fp', 'hard', '-enum', 'int', '-sdata', '0', '-sdata2', '0', '-g', '-RTTI', 'off', '-use_lmw_stmw', 'on']
as_command = ['%smwasmeppc.exe' % mw_path, '-I.', '-I-', '-I.', '-nostdinc', '-proc', 'gekko', '-d', '__MWERKS__']
for d in self._config['defines']: