mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
port: halfassed solution for segmented addresses; fix some dyntex related stuff
This commit is contained in:
1 parent
f9b27d7d01
commit
62f3007d2a
8 files changed
+125
-81
No files matched your search
@@ -1568,12 +1568,21 @@ typedef struct {
|
||||
} GunkC0;
|
||||
|
||||
typedef struct {
|
||||
#ifdef PLATFORM_BIG_ENDIAN
|
||||
unsigned int cmd:8;
|
||||
unsigned int unk08:4;
|
||||
unsigned int unk0c:4;
|
||||
unsigned int unk10:16;
|
||||
unsigned int seg:8;
|
||||
unsigned int offset:24;
|
||||
#else
|
||||
unsigned int unk10:16;
|
||||
unsigned int unk0c:4;
|
||||
unsigned int unk08:4;
|
||||
unsigned int cmd:8;
|
||||
unsigned int offset:24;
|
||||
unsigned int seg:8;
|
||||
#endif
|
||||
} Gvtx;
|
||||
|
||||
/*
|
||||
@@ -1920,6 +1929,15 @@ typedef union {
|
||||
#define gsSPSegment(segment, base) \
|
||||
gsMoveWd(G_MW_SEGMENT, (segment)*4, base)
|
||||
|
||||
#ifdef PLATFORM_N64
|
||||
#define SEGADDR(x) x
|
||||
#define UNSEGADDR(x) x
|
||||
#else
|
||||
// we mark all segmented addresses so that it'll be easier to recognize them later
|
||||
#define SEGADDR(x) ((void *)((uintptr_t)(x) | 1))
|
||||
#define UNSEGADDR(x) ((uintptr_t)(x) & ~1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Clipping Macros
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user