mirror of https://github.com/PrimeDecomp/prime.git
Fix all compilation errors when building for host
This commit is contained in:
parent
f7964a3908
commit
c473566160
|
@ -1127,7 +1127,7 @@ else:
|
|||
n.newline()
|
||||
n.variable("host_cflags", "-I include/ -Wno-trigraphs")
|
||||
n.variable("host_cppflags",
|
||||
"-std=c++98 -I include/ -fno-exceptions -fno-rtti -Wno-trigraphs")
|
||||
"-std=c++98 -I include/ -fno-exceptions -fno-rtti -D_CRT_SECURE_NO_WARNINGS -Wno-trigraphs")
|
||||
|
||||
###
|
||||
# Rules
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
}
|
||||
|
||||
uint GetIndexFromPtr(const void* ptr) const {
|
||||
return ((const uchar*)ptr - x0_mainData) / kPointerSize;
|
||||
return ((const uchar*)ptr - (const uchar*)x0_mainData) / kPointerSize;
|
||||
}
|
||||
long GetEntryValue(uint idx) const { return (long)*((uchar*)x4_bookKeeping + idx); }
|
||||
uchar* GetPtrFromIndex(unsigned int idx) const {
|
||||
|
|
|
@ -14,8 +14,8 @@ public:
|
|||
virtual ~IElement(){};
|
||||
|
||||
// -> CFrameDelayedKiller
|
||||
void* operator new(unsigned long sz, const char*, const char*);
|
||||
void* operator new(unsigned long sz) { return operator new(sz, "??(??)", nullptr); }
|
||||
void* operator new(size_t sz, const char*, const char*);
|
||||
void* operator new(size_t sz) { return operator new(sz, "??(??)", nullptr); }
|
||||
void operator delete(void* ptr, size_t sz);
|
||||
};
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
template < typename T >
|
||||
class TOneStatic {
|
||||
public:
|
||||
void* operator new(unsigned long sz, const char*, const char*); /* {
|
||||
void* operator new(size_t sz, const char*, const char*); /* {
|
||||
ReferenceCount()++;
|
||||
return GetAllocSpace();
|
||||
}*/
|
||||
void* operator new(unsigned long sz) { return operator new(sz, "??(??)", nullptr); }
|
||||
void* operator new(size_t sz) { return operator new(sz, "??(??)", nullptr); }
|
||||
void operator delete(void* ptr);
|
||||
|
||||
private:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _DOLPHIN_OSCACHE
|
||||
#define _DOLPHIN_OSCACHE
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -22,7 +22,11 @@ void VISetWindowFullscreen(bool fullscreen);
|
|||
bool VIGetWindowFullscreen();
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
vu16 __VIRegs[59] : 0xCC002000;
|
||||
#else
|
||||
vu16 __VIRegs[59];
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
#include "dolphin/os/OSMemory.h"
|
||||
#include "dolphin/pad.h"
|
||||
#include "dolphin/vi.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
static const char* buildTime = "Build v1.088 10/29/2002 2:21:25";
|
||||
static char rs_debugger_buffer[1024];
|
||||
|
@ -42,7 +44,7 @@ void ErrorHandler(OSError code, OSContext* context, int arg1, int arg2) {
|
|||
local_60 = 0x2010408;
|
||||
if ((pads[1].button & 0xc10) == 0xc10) {
|
||||
if ((pads[1].button & 0xf) != 0) {
|
||||
if (pads[1].button & loopExitCriteria == 0) { // TODO: wrong logic with loopExitCriteria
|
||||
if ((pads[1].button & loopExitCriteria) == 0) { // TODO: wrong logic with loopExitCriteria
|
||||
if ((loopExitCriteria != 0) &&
|
||||
pads[1].button == 0) { // TODO: wrong logic with pads[1].button
|
||||
loopExitCriteria = 0;
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
|
||||
#include <dolphin/mtx.h>
|
||||
|
||||
#ifndef __MWERKS__
|
||||
void __memcpy(void*, const void*, int);
|
||||
#endif
|
||||
|
||||
|
||||
inline void CGX::SetAlphaCompare(GXCompare comp0, uchar ref0, GXAlphaOp op, GXCompare comp1,
|
||||
uchar ref1) {
|
||||
uint flags = MaskAndShiftLeft(comp0, 7, 0) | MaskAndShiftLeft(ref0, 0xFF, 3) |
|
||||
|
|
Loading…
Reference in New Issue