summaryrefslogtreecommitdiff
path: root/src/linegod.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/linegod.cpp')
-rw-r--r--src/linegod.cpp17
1 files changed, 0 insertions, 17 deletions
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;