1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-13 11:24:40 +00:00

Fix misc 21 (#1573)

* Make `sNew` in (unused) `code_800FC620.c` a string

It is passed as a filename to `__osMallocDebug` so should be a nul-terminated string, not a char[3] missing an explicit \0

* Fix gcc warning in `JpegDecoder_ParseNextSymbol` about SLL on negative value

-1U is an unsigned value, aka 0xFFFFFFFF
I keep -1 because it seems that's what a jpeg standard has too

References:
https://stackoverflow.com/questions/40508958/shifting-a-negative-signed-value-is-undefined
https://www.w3.org/Graphics/JPEG/itu-t81.pdf (page 105, figure F.12)

* Small cleanup

* Fix few mistakes (thanks gcc warnings)

* Add `@bug` in file select settings draw code, using the wrong array

* format

* format main

* rename arg for a happy formatter

* Move important function call out of a printf
This commit is contained in:
Dragorn421 2023-11-12 22:59:52 +01:00 committed by GitHub
parent dc323052c3
commit 4c75260097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 47 additions and 39 deletions

View file

@ -1447,6 +1447,7 @@ void Play_InitScene(PlayState* this, s32 spawn) {
void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn) {
SceneTableEntry* scene = &gSceneTable[sceneId];
u32 size;
scene->unk_13 = 0;
this->loadedScene = scene;
@ -1463,7 +1464,9 @@ void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn) {
Play_InitScene(this, spawn);
osSyncPrintf("ROOM SIZE=%fK\n", func_80096FE8(this, &this->roomCtx) / 1024.0f);
size = func_80096FE8(this, &this->roomCtx);
osSyncPrintf("ROOM SIZE=%fK\n", size / 1024.0f);
}
void Play_GetScreenPos(PlayState* this, Vec3f* src, Vec3f* dest) {