1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 04:14:34 +00:00

Filename & line number args cleanup (#1891)

* Filename & line number args cleanup

* Use int for line number args over s32/u32

* Add missing const qualifiers from filename args

* Fix gcc warning in game.c

* Add comment to weird assignments in GameState_Init
This commit is contained in:
Tharo 2024-02-27 07:37:33 +00:00 committed by GitHub
parent a32221c36e
commit dcf61174e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 76 additions and 73 deletions

View file

@ -409,7 +409,10 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
gameState->destroy = NULL;
gameState->running = 1;
startTime = osGetTime();
gameState->size = gameState->init = 0;
// Thse assignments must be written this way for matching and to avoid a warning due to casting a pointer to an
// integer without a cast. This assigns init = NULL and size = 0.
gameState->size = (u32)(gameState->init = NULL);
{
s32 requiredScopeTemp;
@ -495,7 +498,7 @@ u32 GameState_IsRunning(GameState* gameState) {
}
#if OOT_DEBUG
void* GameState_Alloc(GameState* gameState, size_t size, char* file, s32 line) {
void* GameState_Alloc(GameState* gameState, size_t size, const char* file, int line) {
void* ret;
if (THA_IsCrash(&gameState->tha)) {