* z64game.h

* grrrrr

* fix missing stuff

* Update include/z64game.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update include/z64game.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* review

* global.h to the top

* reiew

* fix

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
Anghelo Carvajal
2023-06-06 08:54:18 -04:00
committed by GitHub
parent 4cce444661
commit a0701c170b
16 changed files with 155 additions and 123 deletions
+3 -3
View File
@@ -11,9 +11,9 @@ f32 gFramerateDivisorThird = 1.0f / 3.0f;
void Game_UpdateFramerateVariables(s32 divisor) {
gFramerateDivisor = divisor;
gFramerateDivisorF = (f32)divisor;
gFramerateDivisorHalf = (f32)(divisor * 0.5f);
gFramerateDivisorThird = (f32)(divisor / 3.0f);
gFramerateDivisorF = divisor;
gFramerateDivisorHalf = divisor / 2.0f;
gFramerateDivisorThird = divisor / 3.0f;
}
void Game_SetFramerateDivisor(GameState* gameState, s32 divisor) {
+4 -4
View File
@@ -1,3 +1,4 @@
#include "global.h"
#include "z_prenmi.h"
void PreNMI_Stop(PreNMIState* this) {
@@ -9,10 +10,9 @@ void PreNMI_Update(PreNMIState* this) {
if (this->timer == 0) {
ViConfig_UpdateVi(1);
PreNMI_Stop(this);
return;
} else {
this->timer--;
}
this->timer--;
}
void PreNMI_Draw(PreNMIState* this) {
@@ -48,7 +48,7 @@ void PreNMI_Init(GameState* thisx) {
this->state.main = PreNMI_Main;
this->state.destroy = PreNMI_Destroy;
this->timer = 30;
this->unkA8 = 10;
this->unk_A8 = 10;
Game_SetFramerateDivisor(&this->state, 1);
}
@@ -4,9 +4,10 @@
* Description: "Dawn of ... day" screen
*/
#include "global.h"
#include "z_daytelop.h"
#include "z64save.h"
#include "z64shrink_window.h"
#include "z64view.h"
#include "misc/daytelop_static/daytelop_static.h"
#include "interface/icon_item_gameover_static/icon_item_gameover_static.h"
@@ -1,16 +1,13 @@
#ifndef Z64_DAYTELOP_H
#define Z64_DAYTELOP_H
#include "global.h"
void DayTelop_Init(GameState* thisx);
void DayTelop_Destroy(GameState* thisx);
#include "z64game.h"
#include "z64view.h"
typedef struct {
/* 0x000 */ GameState state;
/* 0x0A4 */ void* daytelopStaticFile;
/* 0x0A8 */ void* gameoverStaticFile;
/* 0x0AC */ UNK_TYPE1 unk_AC[0x4];
/* 0x0B0 */ View view;
/* 0x218 */ UNK_TYPE1 unk_218[0x28];
/* 0x240 */ s16 transitionCountdown;
@@ -24,4 +21,7 @@ typedef enum {
/* 2 */ DAYTELOP_HOURSTEXT_ON
} DaytelopFadeState;
void DayTelop_Init(GameState* thisx);
void DayTelop_Destroy(GameState* thisx);
#endif
@@ -2,6 +2,11 @@
#define FILE_SELECT_H
#include "global.h"
#include "z64game.h"
#include "z64message.h"
#include "z64skybox.h"
#include "z64view.h"
// `sramCtx->noFlashSaveBuf` is never allocated space, so should never be used
// Slot offsets are also based on OoT SaveContext sizes, and contains incorrect sizes from MM
@@ -4,9 +4,12 @@
* Description: Initializes the game into the title screen
*/
#include "global.h"
#include "z_opening.h"
#include "z64save.h"
#include "z64shrink_window.h"
#include "z64view.h"
#include "regs.h"
void TitleSetup_SetupTitleScreen(TitleSetupState* this) {
static s32 sOpeningEntrances[] = { ENTRANCE(CUTSCENE, 0), ENTRANCE(CUTSCENE, 1) };
@@ -1,15 +1,15 @@
#ifndef _Z64_OPENING_H_
#define _Z64_OPENING_H_
#ifndef Z64_OPENING_H
#define Z64_OPENING_H
#include "global.h"
#include "z64game.h"
#include "z64view.h"
typedef struct {
/* 0x000 */ GameState state;
/* 0x0A8 */ View view;
} TitleSetupState; // size = 0x210
void TitleSetup_Init(GameState* thisx);
void TitleSetup_Destroy(GameState* thisx);
typedef struct {
/* 0x000 */ GameState state;
/* 0x0A4 */ UNK_TYPE1 unk_A4[0x4];
/* 0x0A8 */ View view;
} TitleSetupState; // size = 0x210
#endif
@@ -1,7 +1,8 @@
#ifndef _Z64_SELECT_H_
#define _Z64_SELECT_H_
#ifndef Z64_SELECT_H
#define Z64_SELECT_H
#include "global.h"
#include "z64game.h"
#include "z64view.h"
struct MapSelectState;
+5 -3
View File
@@ -2,9 +2,8 @@
#define Z64_TITLE_H
#include "global.h"
void ConsoleLogo_Init(GameState* thisx);
void ConsoleLogo_Destroy(GameState* thisx);
#include "z64game.h"
#include "z64view.h"
typedef struct {
/* 0x000 */ GameState state;
@@ -20,4 +19,7 @@ typedef struct {
/* 0x244 */ u8 exit;
} ConsoleLogoState; // size = 0x248
void ConsoleLogo_Init(GameState* thisx);
void ConsoleLogo_Destroy(GameState* thisx);
#endif