Fixing build

Former-commit-id: f8e02c251c
This commit is contained in:
Henrique Gemignani Passos Lima 2022-12-22 01:26:49 -03:00
parent 77a34e5480
commit fa49ecfc17
9 changed files with 16 additions and 32 deletions

View File

@ -42,11 +42,11 @@ inline void* operator new(size_t n, void* ptr) { return ptr; };
#ifdef __MWERKS__ #ifdef __MWERKS__
inline void operator delete(void* ptr) { CMemory::Free(ptr); } inline void operator delete(void* ptr) { CMemory::Free(ptr); }
inline void operator delete[](void* ptr) { CMemory::Free(ptr); } inline void operator delete[](void* ptr) { CMemory::Free(ptr); }
#define NEW new ("??(??)", nullptr)
#else #else
__attribute__((weak)) void operator delete(void* ptr) { CMemory::Free(ptr); } __attribute__((weak)) void operator delete(void* ptr) { CMemory::Free(ptr); }
__attribute__((weak)) void operator delete[](void* ptr) { CMemory::Free(ptr); } __attribute__((weak)) void operator delete[](void* ptr) { CMemory::Free(ptr); }
#define NEW new
#endif #endif
#define NEW new ("??(??)", nullptr)
#endif // _CMEMORY #endif // _CMEMORY

View File

@ -2,6 +2,7 @@
#define _TONESTATIC #define _TONESTATIC
#include "types.h" #include "types.h"
#include "stdio.h"
template < typename T > template < typename T >
class TOneStatic { class TOneStatic {

View File

@ -39,8 +39,8 @@ public:
if (x8_item != nullptr) { if (x8_item != nullptr) {
return true; return true;
} }
if (HasLock() && CToken::IsLoaded()) { if (CToken::HasLock() && CToken::IsLoaded()) {
x8_item = TToken::GetT(); x8_item = TToken< T >::GetT();
return true; return true;
} else { } else {
return false; return false;

View File

@ -36,23 +36,7 @@ static inline void OSInitFastCast(void) {
mtspr GQR5, r3 mtspr GQR5, r3
} }
#else #else
asm volatile ("
li 3, 0x0004
oris 3, 3, 0x0004
mtspr GQR2, 3
li 3, 0x0005
oris 3, 3, 0x0005
mtspr GQR3, 3
li 3, 0x0006
oris 3, 3, 0x0006
mtspr GQR4, 3
li 3, 0x0007
oris 3, 3, 0x0007
mtspr GQR5, 3
" : : : "r3" );
#endif #endif
} }
// clang-format off // clang-format off

View File

@ -146,10 +146,10 @@ public:
}; };
template <typename T> template <typename T>
inline pair_sorter_finder< T::value_type, less< select1st< typename T::value_type >::value_type > > default_pair_sorter_finder() inline pair_sorter_finder< typename T::value_type, less< typename select1st< typename T::value_type >::value_type > > default_pair_sorter_finder()
{ {
less< select1st< typename T::value_type >::value_type > l; less< typename select1st< typename T::value_type >::value_type > l;
pair_sorter_finder< T::value_type, less< select1st< typename T::value_type >::value_type > > a(l); pair_sorter_finder< typename T::value_type, less< typename select1st< typename T::value_type >::value_type > > a(l);
return a; return a;
} }

View File

@ -101,9 +101,9 @@ public:
struct iterator : public const_iterator { struct iterator : public const_iterator {
iterator(node* node, const header* header, bool b) : const_iterator(node, header, b) {} iterator(node* node, const header* header, bool b) : const_iterator(node, header, b) {}
P* operator->() { return mNode->get_value(); } P* operator->() { return const_iterator::mNode->get_value(); }
P* operator*() { return mNode->get_value(); } P* operator*() { return const_iterator::mNode->get_value(); }
node* get_node() { return mNode; } node* get_node() { return const_iterator::mNode; }
}; };
red_black_tree() : x0_(0), x1_(0), x4_count(0) {} red_black_tree() : x0_(0), x1_(0), x4_count(0) {}

View File

@ -111,10 +111,10 @@ void ErrorHandler(OSError code, OSContext* context, int arg1, int arg2) {
} }
void SetErrorHandlers() { void SetErrorHandlers() {
OSSetErrorHandler(2, (OSErrorHandler*)ErrorHandler); OSSetErrorHandler(2, (OSErrorHandler)ErrorHandler);
OSSetErrorHandler(3, (OSErrorHandler*)ErrorHandler); OSSetErrorHandler(3, (OSErrorHandler)ErrorHandler);
OSSetErrorHandler(5, (OSErrorHandler*)ErrorHandler); OSSetErrorHandler(5, (OSErrorHandler)ErrorHandler);
OSSetErrorHandler(15, (OSErrorHandler*)ErrorHandler); OSSetErrorHandler(15, (OSErrorHandler)ErrorHandler);
} }
void rs_debugger_printf(const char* format, ...) { void rs_debugger_printf(const char* format, ...) {

View File

@ -85,8 +85,6 @@ void CMainFlow::SetGameState(EClientFlowStates state, CArchitectureQueue& queue)
break; break;
} }
break; break;
default:
break;
} }
break; break;
} }

View File

@ -13,6 +13,7 @@
#include "dolphin/os.h" #include "dolphin/os.h"
#include "limits.h" #include "limits.h"
#include "stdint.h"
static const CVector3f MinesPostTransforms[3] = { static const CVector3f MinesPostTransforms[3] = {
CVector3f(0.f, 0.f, 200.f), CVector3f(0.f, 0.f, 200.f),