mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-17 05:41:46 -04:00
Merge branch 'develop-zhora' into zhora-to-rnext-merge
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
#ifndef COLOR_H
|
||||
#define COLOR_H
|
||||
|
||||
typedef struct {
|
||||
u8 r, g, b;
|
||||
} Color_RGB8;
|
||||
|
||||
typedef struct {
|
||||
u8 r, g, b, a;
|
||||
} Color_RGBA8;
|
||||
|
||||
// only use when necessary for alignment purposes
|
||||
typedef union {
|
||||
struct {
|
||||
u8 a, b, g, r;
|
||||
};
|
||||
u32 rgba;
|
||||
} Color_RGBA8_u32;
|
||||
|
||||
typedef struct {
|
||||
f32 r, g, b, a;
|
||||
} Color_RGBAf;
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
u16 r : 5;
|
||||
u16 g : 5;
|
||||
u16 b : 5;
|
||||
u16 a : 1;
|
||||
};
|
||||
u16 rgba;
|
||||
} Color_RGBA16;
|
||||
|
||||
#endif
|
||||
@@ -6,6 +6,15 @@
|
||||
* Each macro packs bytes (B), halfwords (H) and words (W, for consistency) into a single word
|
||||
*/
|
||||
|
||||
#ifdef IS_BIGENDIAN
|
||||
#define CMD_BBBB(a, b, c, d) (_SHIFTL(a, 24, 8) | _SHIFTL(b, 16, 8) | _SHIFTL(c, 8, 8) | _SHIFTL(d, 0, 8))
|
||||
|
||||
#define CMD_BBH(a, b, c) (_SHIFTL(a, 24, 8) | _SHIFTL(b, 16, 8) | _SHIFTL(c, 0, 16))
|
||||
|
||||
#define CMD_HBB(a, b, c) (_SHIFTL(a, 16, 16) | _SHIFTL(b, 8, 8) | _SHIFTL(c, 0, 8))
|
||||
|
||||
#define CMD_HH(a, b) (_SHIFTL(a, 16, 16) | _SHIFTL(b, 0, 16))
|
||||
#else
|
||||
#define CMD_BBBB(a, b, c, d) (_SHIFTL(a, 0, 8) | _SHIFTL(b, 8, 8) | _SHIFTL(c, 16, 8) | _SHIFTL(d, 24, 8))
|
||||
|
||||
#define CMD_BBH(a, b, c) (_SHIFTL(a, 0, 8) | _SHIFTL(b, 8, 8) | _SHIFTL(c, 16, 16))
|
||||
@@ -13,6 +22,7 @@
|
||||
#define CMD_HBB(a, b, c) (_SHIFTL(a, 0, 16) | _SHIFTL(b, 16, 8) | _SHIFTL(c, 24, 8))
|
||||
|
||||
#define CMD_HH(a, b) (_SHIFTL(a, 0, 16) | _SHIFTL(b, 16, 16))
|
||||
#endif
|
||||
|
||||
#define CMD_W(a) (a)
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ void Locale_ResetRegion(void);
|
||||
u32 func_80001F48(void);
|
||||
u32 func_80001F8C(void);
|
||||
u32 Locale_IsRegionNative(void);
|
||||
#ifndef __APPLE__
|
||||
#if !defined(__APPLE__) && !defined(__SWITCH__)
|
||||
void __assert(const char* exp, const char* file, s32 line);
|
||||
#endif
|
||||
void isPrintfInit(void);
|
||||
@@ -1872,7 +1872,7 @@ void FaultDrawer_SetCharPad(s8, s8);
|
||||
void FaultDrawer_SetCursor(s32, s32);
|
||||
void FaultDrawer_FillScreen();
|
||||
void* FaultDrawer_FormatStringFunc(void*, const char*, u32);
|
||||
void FaultDrawer_VPrintf(const char*, char*);
|
||||
void FaultDrawer_VPrintf(const char*, va_list);
|
||||
void FaultDrawer_Printf(const char*, ...);
|
||||
void FaultDrawer_DrawText(s32, s32, const char*, ...);
|
||||
void FaultDrawer_SetDrawerFB(void*, u16, u16);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef MACROS_H
|
||||
#define MACROS_H
|
||||
|
||||
#include "endianness.h"
|
||||
|
||||
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
|
||||
|
||||
@@ -254,12 +256,5 @@ extern GraphicsContext* __gfxCtx;
|
||||
|
||||
#define SEG_ADDR(seg, addr) (addr | (seg << 24) | 1)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define BOMSWAP16 _byteswap_ushort
|
||||
#define BOMSWAP32 _byteswap_ulong
|
||||
#else
|
||||
#define BOMSWAP16 __builtin_bswap16
|
||||
#define BOMSWAP32 __builtin_bswap32
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+1
-3
@@ -30,7 +30,7 @@
|
||||
#include "ichain.h"
|
||||
#include "regs.h"
|
||||
|
||||
#if defined(_WIN64) || defined(__x86_64__) || defined(__arm64__)
|
||||
#if defined(__LP64__)
|
||||
#define _SOH64
|
||||
#endif
|
||||
|
||||
@@ -1458,8 +1458,6 @@ typedef struct {
|
||||
/* 0x18 */ s16 (*roomCompassOffsetY)[44]; // dungeon compass icon Y offset by room
|
||||
/* 0x1C */ u8* dgnMinimapCount; // number of room minimaps
|
||||
/* 0x20 */ u16* dgnMinimapTexIndexOffset; // dungeon minimap texture index offset
|
||||
/* 0x24 */ u16* owMinimapTexSize;
|
||||
/* 0x28 */ u16* owMinimapTexOffset;
|
||||
/* 0x2C */ s16* owMinimapPosX;
|
||||
/* 0x30 */ s16* owMinimapPosY;
|
||||
/* 0x34 */ s16 (*owCompassInfo)[4]; // [X scale, Y scale, X offset, Y offset]
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef Z64_AUDIO_H
|
||||
#define Z64_AUDIO_H
|
||||
|
||||
#include "endianness.h"
|
||||
|
||||
#define MK_CMD(b0,b1,b2,b3) ((((b0) & 0xFF) << 0x18) | (((b1) & 0xFF) << 0x10) | (((b2) & 0xFF) << 0x8) | (((b3) & 0xFF) << 0))
|
||||
|
||||
#define NO_LAYER ((SequenceLayer*)(-1))
|
||||
@@ -685,6 +687,35 @@ typedef struct {
|
||||
} AudioPreloadReq; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
#ifdef IS_BIGENDIAN
|
||||
union{
|
||||
u32 opArgs;
|
||||
struct {
|
||||
u8 op;
|
||||
u8 arg0;
|
||||
u8 arg1;
|
||||
u8 arg2;
|
||||
};
|
||||
};
|
||||
union {
|
||||
void* data;
|
||||
f32 asFloat;
|
||||
s32 asInt;
|
||||
struct {
|
||||
u16 asUShort;
|
||||
u8 pad2[2];
|
||||
};
|
||||
struct {
|
||||
s8 asSbyte;
|
||||
u8 pad1[3];
|
||||
};
|
||||
struct {
|
||||
u8 asUbyte;
|
||||
u8 pad0[3];
|
||||
};
|
||||
u32 asUInt;
|
||||
};
|
||||
#else
|
||||
union{
|
||||
u32 opArgs;
|
||||
struct {
|
||||
@@ -712,6 +743,7 @@ typedef struct {
|
||||
};
|
||||
u32 asUInt;
|
||||
};
|
||||
#endif
|
||||
} AudioCmd;
|
||||
|
||||
typedef struct {
|
||||
@@ -783,6 +815,8 @@ typedef struct {
|
||||
/* 0x0E */ u8 ttl; // duration after which the DMA can be discarded
|
||||
} SampleDma; // size = 0x10
|
||||
|
||||
#include <PR/ultra64/abi.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ char unk_0000;
|
||||
/* 0x0001 */ s8 numSynthesisReverbs;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "z64math.h"
|
||||
#include "z64audio.h"
|
||||
#include "soh/Enhancements/randomizer/randomizerTypes.h"
|
||||
|
||||
typedef struct {
|
||||
@@ -114,9 +115,9 @@ typedef struct {
|
||||
/* 0x0EF8 */ u16 infTable[30]; // "inf_table"
|
||||
/* 0x0F38 */ u32 worldMapAreaData; // "area_arrival"
|
||||
/* 0x0F40 */ u8 scarecrowCustomSongSet;
|
||||
/* 0x0F41 */ u8 scarecrowCustomSong[0x360];
|
||||
/* 0x0F41 */ OcarinaNote scarecrowCustomSong[108];
|
||||
/* 0x12C5 */ u8 scarecrowSpawnSongSet;
|
||||
/* 0x12C6 */ u8 scarecrowSpawnSong[0x80];
|
||||
/* 0x12C6 */ OcarinaNote scarecrowSpawnSong[16];
|
||||
/* 0x1346 */ char unk_1346[0x02];
|
||||
/* 0x1348 */ HorseData horseData;
|
||||
/* 0x1354 */ s32 fileNum; // "file_no"
|
||||
|
||||
Reference in New Issue
Block a user