Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/src/goddard/gd_main.c
7858 views
1
#include <PR/ultratypes.h>
2
3
#include "debug_utils.h"
4
#include "gd_main.h"
5
#include "gd_memory.h"
6
#include "macros.h"
7
#include "objects.h"
8
#include "renderer.h"
9
10
#include "game/game_init.h"
11
12
/* This file was spilt out of debug_memory.asm based on rodata.
13
* The rodata for functions after this "__main__" function have string literals following
14
* f32 literal, which implies that this is its own file
15
*/
16
17
// data
18
s32 gGdMoveScene = TRUE; // @ 801A8050
19
UNUSED static s32 sUnref801A8054 = TRUE;
20
f32 D_801A8058 = -600.0f;
21
s32 gGdUseVtxNormal = TRUE; // @ 801A805C; instead of face normals
22
UNUSED static s32 sUnrefScnWidth = 320;
23
UNUSED static s32 sUnrefScnHeight = 240;
24
25
// bss
26
struct GdControl gGdCtrl; // @ 801B9920; processed controller info
27
struct GdControl gGdCtrlPrev; // @ 801B9A18; previous frame's controller info
28
29
/**
30
* Unused main function possibly from when this was a standalone demo
31
*/
32
u32 __main__(void) {
33
UNUSED u32 pad1C;
34
35
gd_printf("%x, %x\n", (u32) (uintptr_t) &D_801A8058, (u32) (uintptr_t) &gGdMoveScene);
36
imin("main");
37
gd_init();
38
39
gGdCtrl.unk88 = 0.46799f;
40
gGdCtrl.unkA0 = -34.0f;
41
gGdCtrl.unkAC = 34.0f;
42
gGdCtrl.unk00 = 2;
43
gGdCtrl.newStartPress = FALSE;
44
gGdCtrl.prevFrame = &gGdCtrlPrev;
45
46
imin("main - make_scene");
47
make_scene(); // make_scene does nothing, though
48
imout();
49
50
gd_init_controllers();
51
print_all_memtrackers();
52
53
start_timer("dlgen");
54
stop_timer("dlgen");
55
mem_stats();
56
57
while (TRUE) {
58
func_801A520C();
59
}
60
61
imout();
62
return 0;
63
}
64
65