Skip to content

Commit

Permalink
lab: fix camera on moving cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
UnclePunch committed Dec 2, 2020
1 parent 16b3458 commit d58115e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions ASM/training-mode/Misc/Load .gct on Boot.s
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
addi r4,REG_Codeset,HeaderSize
branchl r12,GeckoCodehandler

#Now flush the instruction cache
lis r3,0x8000
load r4,0x3b722c #might be overkill but flush the entire dol file
branchl r12,0x80328f50

#Return End of Heap
mr r3,r25

Expand Down
Binary file modified patch/events/lab/output/EvLab.dat
Binary file not shown.
12 changes: 6 additions & 6 deletions patch/events/lab/source/lab.c
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@ GOBJ *InfoDisplay_Init()
Text *text = Text_CreateText(2, canvas_index);
text->kerning = 1;
text->use_aspect = 1;
text->aspect.X = 535;
text->aspect.X = 545;

// Create subtexts for each row
for (int i = 0; i < 8; i++)
Expand Down Expand Up @@ -6218,11 +6218,6 @@ void Event_Think(GOBJ *event)
// facing player
this_fighter_data->facing_direction = hmn_data->facing_direction * -1;

// update camera box
Fighter_UpdateCameraBox(this_fighter);
this_fighter_data->cameraBox->boundleft_curr = this_fighter_data->cameraBox->boundleft_proj;
this_fighter_data->cameraBox->boundright_curr = this_fighter_data->cameraBox->boundright_proj;

// set grounded
this_fighter_data->phys.air_state = 0;
//Fighter_SetGrounded(this_fighter);
Expand All @@ -6238,6 +6233,11 @@ void Event_Think(GOBJ *event)
Coll_ECBCurrToPrev(&this_fighter_data->collData);
this_fighter_data->cb.Coll(this_fighter);

// update camera box
Fighter_UpdateCameraBox(this_fighter);
this_fighter_data->cameraBox->boundleft_curr = this_fighter_data->cameraBox->boundleft_proj;
this_fighter_data->cameraBox->boundright_curr = this_fighter_data->cameraBox->boundright_proj;

// init CPU logic (for nana's popo position history...)
int cpu_kind = Fighter_GetCPUKind(this_fighter_data->ply);
int cpu_level = Fighter_GetCPULevel(this_fighter_data->ply);
Expand Down
Binary file modified patch/tmdata/output/TmDt.dat
Binary file not shown.

0 comments on commit d58115e

Please sign in to comment.