Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matched 2 Functions in game.c #117

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions src/P2/game.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include <game.h>


void StartupGame(void)
{
StartGame();
StartGame();
return;
}

INCLUDE_ASM(const s32, "P2/game", func_00160090);
Expand Down Expand Up @@ -41,7 +43,17 @@ INCLUDE_ASM(const s32, "P2/game", FUN_00160650);

INCLUDE_ASM(const s32, "P2/game", SetupGame__FPci);

INCLUDE_ASM(const s32, "P2/game", UpdateGameState__Ff);
void UpdateGameState(float dt)
{
WS *wsCur;
LS *lsCur;
wsCur = g_pwsCur;
g_pgsCur->dt = g_pgsCur-> dt + dt;
lsCur = g_plsCur;
wsCur->dt = wsCur->dt + dt;
lsCur->dt = lsCur->dt + dt;
return;
}

INCLUDE_ASM(const s32, "P2/game", LsFromWid);

Expand All @@ -59,30 +71,39 @@ INCLUDE_ASM(const s32, "P2/game", calculate_percent_completion);

void SetCcharm(int nParam)
{
g_pgsCur->ccharm = nParam;
g_pgsCur->ccharm = nParam;
return;
}

INCLUDE_ASM(const s32, "P2/game", FCharmAvailable__Fv);

INCLUDE_ASM(const s32, "P2/game", func_00160C90);

INCLUDE_ASM(const s32, "P2/game", PfLookupDialog__FP2LS3OID);
int PfLookupDialog(LS *pls, OID oidDialog)
{
if (((oidDialog) - (0x33bU)) >= 0xc) {
return 0;
}
return + -0xcd8 + (int)pls + (oidDialog * 4);
}

INCLUDE_ASM(const s32, "P2/game", clr_8_bytes_1);

void FUN_00160ce8(int param_1)
{
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 4) = 0;
return;
}

void OnGameAlarmTriggered(GAME *pgame)
{
pgame->cAlarmsTriggered++;
pgame->cAlarmsTriggered++;
}

void OnGameAlarmDisabled(GAME *pgame)
{
pgame->cAlarmsTriggered--;
pgame->cAlarmsTriggered--;
return;
}

INCLUDE_ASM(const s32, "P2/game", grfvault_something__Fv);
Expand All @@ -91,7 +112,6 @@ INCLUDE_ASM(const s32, "P2/game", GetBlueprintInfo);

int CcharmMost()
{
// Holdover from when there was a powerup that increased the charm limit
return 2;
}

Expand Down
Loading