mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-03 13:10:18 -04:00
Game.cpp and World.cpp Cleanup (#159)
* Remove CProperties and delete dup Properties from World.h * Improvement * Fix compile * Cleanup * Document gRaceState * wip cleanup * compile * Impl PlayerBombKart * Rename CourseManager_ to CM_ * Finish renames m_ to CM_ * cleanup * Remove extra printf --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
This commit is contained in:
@@ -150,12 +150,31 @@ void DKJungle::LoadTextures() {
|
||||
dma_textures(gTextureDksJungleParkwayKiwanoFruit3, 0x00000364U, 0x00000400U);
|
||||
}
|
||||
|
||||
void DKJungle::SpawnActors() {
|
||||
void DKJungle::BeginPlay() {
|
||||
gWorldInstance.AddActor(new AFinishline());
|
||||
|
||||
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_dks_jungle_parkway_item_box_spawns));
|
||||
init_kiwano_fruit();
|
||||
func_80298D10();
|
||||
|
||||
|
||||
generate_ferry_waypoints();
|
||||
|
||||
// The original game only ran vehicle logic every second frame.
|
||||
// Thus the speed gets divided by two to set speed to match properly
|
||||
gWorldInstance.AddActor(new ABoat((0.6666666f)/4, 0));
|
||||
|
||||
if (gModeSelection == VERSUS) {
|
||||
Vec3f pos = {0, 0, 0};
|
||||
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][50], 50, 3, 0.8333333f));
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][100], 100, 1, 0.8333333f));
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][150], 150, 3, 0.8333333f));
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][190], 190, 1, 0.8333333f));
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][250], 250, 3, 0.8333333f));
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][0], 0, 0, 0.8333333f));
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][0], 0, 0, 0.8333333f));
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
@@ -273,26 +292,6 @@ void DKJungle::SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f
|
||||
func_8003F138(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
}
|
||||
|
||||
void DKJungle::SpawnVehicles() {
|
||||
generate_ferry_waypoints();
|
||||
|
||||
// The original game only ran vehicle logic every second frame.
|
||||
// Thus the speed gets divided by two to set speed to match properly
|
||||
gWorldInstance.AddVehicle(new ABoat((0.6666666f)/4, 0));
|
||||
|
||||
if (gModeSelection == VERSUS) {
|
||||
Vec3f pos = {0, 0, 0};
|
||||
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][50], 50, 3, 0.8333333f);
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][100], 100, 1, 0.8333333f);
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][150], 150, 3, 0.8333333f);
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][190], 190, 1, 0.8333333f);
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][250], 250, 3, 0.8333333f);
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][0], 0, 0, 0.8333333f);
|
||||
gWorldInstance.AddBombKart(pos, &D_80164550[0][0], 0, 0, 0.8333333f);
|
||||
}
|
||||
}
|
||||
|
||||
void DKJungle::Waypoints(Player* player, int8_t playerId) {
|
||||
s16 waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
if ((waypoint >= 0xB9) && (waypoint < 0x119)) {
|
||||
|
||||
Reference in New Issue
Block a user