mirror of https://github.com/pret/pokeemerald.git
Fix Task_Truck1
This commit is contained in:
parent
8ac98f7441
commit
2b81db7ace
|
@ -63,32 +63,24 @@ s16 GetTruckBoxMovement(int a1) // for the box movement?
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// smh STILL BROKEN IN EMERALD
|
|
||||||
void Task_Truck1(u8 taskId)
|
void Task_Truck1(u8 taskId)
|
||||||
{
|
{
|
||||||
s16 *data = gTasks[taskId].data;
|
s16 *data = gTasks[taskId].data;
|
||||||
s16 cameraYpan;
|
s16 cameraXpan = 0, cameraYpan = 0;
|
||||||
s16 box1 = 0;
|
s16 box1, box2, box3;
|
||||||
s16 box2 = 0;
|
|
||||||
s16 box3 = 0;
|
|
||||||
u8 mapNum, mapGroup;
|
|
||||||
register s16 zero asm("r4");
|
|
||||||
|
|
||||||
box1 = GetTruckBoxMovement(data[0] + 30) * 4; // top box.
|
box1 = GetTruckBoxMovement(data[0] + 30) * 4; // top box.
|
||||||
sub_808E82C(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3, box1 + 3);
|
sub_808E82C(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, box1 + 3);
|
||||||
box2 = GetTruckBoxMovement(data[0]) * 2; // bottom left box.
|
box2 = GetTruckBoxMovement(data[0]) * 2; // bottom left box.
|
||||||
sub_808E82C(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 0, box2 - 3);
|
sub_808E82C(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, box2 - 3);
|
||||||
box3 = GetTruckBoxMovement(data[0]) * 4; // bottom right box.
|
box3 = GetTruckBoxMovement(data[0]) * 4; // bottom right box.
|
||||||
mapNum = gSaveBlock1Ptr->location.mapNum;
|
sub_808E82C(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, box3);
|
||||||
mapGroup = gSaveBlock1Ptr->location.mapGroup;
|
|
||||||
zero = 0;
|
|
||||||
sub_808E82C(3, mapNum, mapGroup, -3, box3);
|
|
||||||
|
|
||||||
if (++data[0] == SECONDS(500)) // this will never run
|
if (++data[0] == SECONDS(500)) // this will never run
|
||||||
data[0] = zero; // reset the timer if it gets stuck.
|
data[0] = 0; // reset the timer if it gets stuck.
|
||||||
|
|
||||||
cameraYpan = GetTruckCameraBobbingY(data[0]);
|
cameraYpan = GetTruckCameraBobbingY(data[0]);
|
||||||
SetCameraPanning(0, cameraYpan);
|
SetCameraPanning(cameraXpan, cameraYpan);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Task_Truck2(u8 taskId)
|
void Task_Truck2(u8 taskId)
|
||||||
|
|
Loading…
Reference in New Issue