Header cleanup, NONMATCHING option

This commit is contained in:
2022-08-31 20:22:20 -04:00
parent 3e43c0878f
commit 174a2d98f7
7 changed files with 24 additions and 60 deletions

View File

@@ -143,7 +143,7 @@ private:
static const GXColor black = {0, 0, 0, 0};
GXSetFog(static_cast< GXFogType >(sGXState.x53_fogType), sGXState.x24c_fogParams.x0_fogStartZ, sGXState.x24c_fogParams.x4_fogEndZ,
sGXState.x24c_fogParams.x8_fogNearZ, sGXState.x24c_fogParams.xc_fogFarZ,
(sGXState.x56_blendMode & 0xE0) == 0x20 ? black : sGXState.x24c_fogParams.x10_fogColor);
(sGXState.x56_blendMode & (7 << 5)) == (GX_BL_ONE << 5) ? black : sGXState.x24c_fogParams.x10_fogColor);
}
static SGXState sGXState;

View File

@@ -1,12 +1,15 @@
#ifndef _DOLPHIN_OS_H
#define _DOLPHIN_OS_H
#include "types.h"
#include <dolphin/types.h>
#ifdef __cplusplus
extern "C" {
#endif
// TODO OSInerrupt.h
typedef s16 __OSInterrupt;
// Upper words of the masks, since UIMM is only 16 bits
#define OS_CACHED_REGION_PREFIX 0x8000
#define OS_UNCACHED_REGION_PREFIX 0xC000
@@ -20,6 +23,8 @@ extern "C" {
#else
#define AT_ADDRESS
#endif
typedef s64 OSTime;
typedef u32 OSTick;
u32 __OSBusClock AT_ADDRESS(OS_BASE_CACHED | 0x00F8); // sync with OSLoMem.h
u32 __OSCoreClock AT_ADDRESS(OS_BASE_CACHED | 0x00FC); // sync with OSLoMem.h
#define OS_BUS_CLOCK __OSBusClock

View File

@@ -64,10 +64,13 @@ typedef int BOOL;
#define NULL 0
#endif
#endif
#ifndef __cplusplus
#if !defined(__cplusplus) || defined(__MWERKS__)
#ifndef nullptr
#define nullptr NULL
#endif
#ifndef override
#define override
#endif
#endif
#ifndef ATTRIBUTE_ALIGN

View File

@@ -7,65 +7,11 @@
extern "C" {
#endif
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
typedef signed char s8;
typedef signed short s16;
typedef signed int s32;
typedef signed long long s64;
typedef volatile u8 vu8;
typedef volatile u16 vu16;
typedef volatile u32 vu32;
typedef volatile u64 vu64;
typedef volatile s8 vs8;
typedef volatile s16 vs16;
typedef volatile s32 vs32;
typedef volatile s64 vs64;
typedef float f32;
typedef double f64;
typedef volatile float vf32;
typedef volatile double vf64;
typedef s16 __OSInterrupt;
typedef s64 OSTime;
typedef u32 OSTick;
#include <dolphin/types.h>
// Pointer to unknown, to be determined at a later date.
typedef void* unkptr;
#ifndef NULL
#define NULL 0
#endif
#ifndef nullptr
#define nullptr 0
#endif
#ifndef override
#define override
#endif
typedef int BOOL;
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef ATTRIBUTE_ALIGN
#define ATTRIBUTE_ALIGN(num) __attribute__ ((aligned (num)))
#endif
// where should these go?
void srand(int);
int rand();
#ifdef __cplusplus
}
#endif