mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-14 21:40:03 +00:00
[headers 8] Add main.h
, segmented_address.h
, and changes for main.c
symbols (#2151)
* [headers 8] Add main.h and changes for main.c symbols * fix gSystemHeapSize is size_t only in MM * segmented_address.h * rm now useless include * actually commit segmented_address.h, oops * rm gGraphThread (faulty copypaste from MM) * bss
This commit is contained in:
parent
27533a1507
commit
277ce1c0d3
12 changed files with 46 additions and 15 deletions
|
@ -19,7 +19,6 @@
|
|||
|
||||
#define PHYSICAL_TO_VIRTUAL(addr) (void*)((uintptr_t)(addr) + 0x80000000)
|
||||
#define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - 0x80000000)
|
||||
#define SEGMENTED_TO_VIRTUAL(addr) PHYSICAL_TO_VIRTUAL(gSegments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr))
|
||||
|
||||
#define ABS(x) ((x) >= 0 ? (x) : -(x))
|
||||
#define DECR(x) ((x) == 0 ? 0 : --(x))
|
||||
|
|
12
include/main.h
Normal file
12
include/main.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
extern s32 gScreenWidth;
|
||||
extern s32 gScreenHeight;
|
||||
extern u32 gSystemHeapSize;
|
||||
|
||||
void Main(void* arg);
|
||||
|
||||
#endif
|
|
@ -101,4 +101,6 @@ void PadMgr_RumbleSet(PadMgr* padMgr, u8* enable);
|
|||
} \
|
||||
(void)0
|
||||
|
||||
extern PadMgr gPadMgr;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -67,4 +67,6 @@ typedef struct Scheduler {
|
|||
void Sched_Notify(Scheduler* sc);
|
||||
void Sched_Init(Scheduler* sc, void* stack, OSPri priority, u8 viModeType, UNK_TYPE arg4, IrqMgr* irqMgr);
|
||||
|
||||
extern Scheduler gScheduler;
|
||||
|
||||
#endif
|
||||
|
|
11
include/segmented_address.h
Normal file
11
include/segmented_address.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef SEGMENTED_ADDRESS_H
|
||||
#define SEGMENTED_ADDRESS_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "stdint.h"
|
||||
|
||||
extern uintptr_t gSegments[NUM_SEGMENTS];
|
||||
|
||||
#define SEGMENTED_TO_VIRTUAL(addr) (void*)(gSegments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr) + K0BASE)
|
||||
|
||||
#endif
|
|
@ -102,8 +102,6 @@ extern KaleidoMgrOverlay gKaleidoMgrOverlayTable[KALEIDO_OVL_MAX];
|
|||
extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
|
||||
extern u8 gBossMarkState;
|
||||
|
||||
extern s32 gScreenWidth;
|
||||
extern s32 gScreenHeight;
|
||||
#if OOT_DEBUG
|
||||
extern u32 gIsCtrlr2Valid;
|
||||
#endif
|
||||
|
@ -200,7 +198,6 @@ extern u32 D_8016139C;
|
|||
extern PauseMapMarksData* gLoadedPauseMarkDataTable;
|
||||
|
||||
extern PreNmiBuff* gAppNmiBufferPtr;
|
||||
extern uintptr_t gSegments[NUM_SEGMENTS];
|
||||
extern Scheduler gScheduler;
|
||||
extern PadMgr gPadMgr;
|
||||
extern IrqMgr gIrqMgr;
|
||||
|
|
|
@ -67,6 +67,8 @@
|
|||
#include "sys_math3d.h"
|
||||
#include "fp_math.h"
|
||||
#include "sys_matrix.h"
|
||||
#include "main.h"
|
||||
#include "segmented_address.h"
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
*/
|
||||
#if PLATFORM_GC
|
||||
|
||||
#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-eu-mq-dbg:208 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224" \
|
||||
#pragma increment_block_number "gc-eu:208 gc-eu-mq:208 gc-eu-mq-dbg:208 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224" \
|
||||
"gc-us-mq:224"
|
||||
|
||||
#include "global.h"
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
#include "ultra64.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:80 gc-eu-mq:80 gc-jp:80 gc-jp-ce:80 gc-jp-mq:80 gc-us:80 gc-us-mq:80"
|
||||
|
||||
struct PreNmiBuff* gAppNmiBufferPtr;
|
||||
|
||||
#include "segmented_address.h"
|
||||
|
||||
struct Scheduler gScheduler;
|
||||
struct PadMgr gPadMgr;
|
||||
struct IrqMgr gIrqMgr;
|
||||
uintptr_t gSegments[NUM_SEGMENTS];
|
||||
|
||||
#include "global.h"
|
||||
#include "fault.h"
|
||||
#include "stack.h"
|
||||
|
@ -14,13 +27,6 @@ s32 gScreenWidth = SCREEN_WIDTH;
|
|||
s32 gScreenHeight = SCREEN_HEIGHT;
|
||||
u32 gSystemHeapSize = 0;
|
||||
|
||||
#pragma increment_block_number "gc-eu:208 gc-eu-mq:208 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208 gc-us-mq:208"
|
||||
|
||||
PreNmiBuff* gAppNmiBufferPtr;
|
||||
Scheduler gScheduler;
|
||||
PadMgr gPadMgr;
|
||||
IrqMgr gIrqMgr;
|
||||
uintptr_t gSegments[NUM_SEGMENTS];
|
||||
OSThread sGraphThread;
|
||||
STACK(sGraphStack, 0x1800);
|
||||
STACK(sSchedStack, 0x600);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "macros.h"
|
||||
#include "sys_math3d.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:106 gc-eu-mq:106 gc-jp:106 gc-jp-ce:106 gc-jp-mq:106 gc-us:106 gc-us-mq:106"
|
||||
#pragma increment_block_number "gc-eu:105 gc-eu-mq:105 gc-jp:105 gc-jp-ce:105 gc-jp-mq:105 gc-us:105 gc-us-mq:105"
|
||||
|
||||
s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB,
|
||||
Vec3f* lineAClosestToB, Vec3f* lineBClosestToA);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "cic6105.h"
|
||||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:148 gc-eu-mq:148 gc-jp:150 gc-jp-ce:150 gc-jp-mq:150 gc-us:150 gc-us-mq:150"
|
||||
#pragma increment_block_number "gc-eu:145 gc-eu-mq:145 gc-jp:147 gc-jp-ce:147 gc-jp-mq:147 gc-us:147 gc-us-mq:147"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_4
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ static s32 D_80858AA4;
|
|||
static Vec3f sInteractWallCheckResult;
|
||||
static Input* sControlInput;
|
||||
|
||||
#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224"
|
||||
#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192"
|
||||
|
||||
// .data
|
||||
|
||||
|
|
Loading…
Reference in a new issue