-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
48 lines (37 loc) · 1.52 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*======================================================================*/
/* File : localdef.h */
/* included by almost all .c files, it defines our global variables */
/*======================================================================*/
#include <nualstl_n.h>
#ifndef _MAIN_H_
#define _MAIN_H_
#define ZBUFFER_ADDR (0x80400000-640*480*2*3)
#define CFB_HIGH_ADDR0 (0x80400000-640*480*2*2)
#define CFB_HIGH_ADDR1 (0x80400000-640*480*2*1)
/*
* Macro for extern declaration of WAVE data segment
*/
#define EXTERN_SEGMENT(name) \
extern char _##name##SegmentStart[], _##name##SegmentEnd[], \
_##name##SegmentRomStart[], _##name##SegmentRomEnd[]
#define EXTERN_SEGMENT_U8(name) \
extern u8 _##name##SegmentStart[], _##name##SegmentEnd[], \
_##name##SegmentRomStart[], _##name##SegmentRomEnd[]
/* this is to know where the segments are in ROM (check initGame() or initExpansionPak() for example) */
EXTERN_SEGMENT(code);
EXTERN_SEGMENT(tahoma_bold);
EXTERN_SEGMENT(tahoma_normal);
EXTERN_SEGMENT(controllers);
/* */
u64 time_lastframe;
/* Counter for how many frames were drawn */
int frame_number;
/* Buffer for console display */
char conbuf[40];
/* storing the amount of RAM available. Shared because calling osGetMemSize() clears memory in the expansion pak, so it needs to be done early in the code */
u32 memory_size;
u8 contPattern;
u8 show_console;
/* dedicated memory area for malloc */
char mem_heap[32 * 1024];
#endif /* _MAIN_H_*/