mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-11-12 17:24:40 +03:00
fix(whoa): update thunderbrew to use the refactored squall error/validation and bc allocation macros
This commit is contained in:
1 parent
1aeacd0d2e
commit
46843880ef
66 files changed
+459
-457
No files matched your search
@@ -5,8 +5,7 @@
|
||||
#include "util/Filesystem.hpp"
|
||||
#include "util/SFile.hpp"
|
||||
#include <cstring>
|
||||
#include <new>
|
||||
#include <storm/Memory.hpp>
|
||||
#include <bc/Memory.hpp>
|
||||
#include <storm/String.hpp>
|
||||
#include <tempest/Box.hpp>
|
||||
|
||||
@@ -36,8 +35,7 @@ CM2Shared* CM2Cache::CreateShared(const char* path, uint32_t flags) {
|
||||
SFile* fileptr;
|
||||
|
||||
if (SFile::OpenEx(nullptr, convertedPath, (flags >> 2) & 1, &fileptr)) {
|
||||
auto m = SMemAlloc(sizeof(CM2Shared), __FILE__, __LINE__, 0x0);
|
||||
auto shared = new (m) CM2Shared(this);
|
||||
auto shared = NEW(CM2Shared, this);
|
||||
|
||||
if (shared->Load(fileptr, flags & 0x4, &v28)) {
|
||||
strcpy(shared->m_filePath, convertedPath);
|
||||
@@ -53,7 +51,7 @@ CM2Shared* CM2Cache::CreateShared(const char* path, uint32_t flags) {
|
||||
}
|
||||
|
||||
SFile::Close(fileptr);
|
||||
delete shared;
|
||||
DEL(shared);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
@@ -16,6 +16,7 @@ target_link_libraries(model
|
||||
math
|
||||
util
|
||||
PUBLIC
|
||||
bc
|
||||
common
|
||||
storm
|
||||
tempest
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
#include "console/CVar.hpp"
|
||||
#include "util/Filesystem.hpp"
|
||||
#include <cstring>
|
||||
#include <new>
|
||||
#include <common/ObjectAlloc.hpp>
|
||||
#include <storm/Memory.hpp>
|
||||
#include <bc/Memory.hpp>
|
||||
#include <storm/String.hpp>
|
||||
|
||||
static CVar* s_M2UseZFillVar;
|
||||
@@ -116,8 +115,7 @@ int32_t M2ConvertModelFileName(const char* source, char* dest, uint32_t a3, uint
|
||||
}
|
||||
|
||||
CM2Scene* M2CreateScene() {
|
||||
auto m = SMemAlloc(sizeof(CM2Scene), __FILE__, __LINE__, 0x0);
|
||||
return new (m) CM2Scene(&CM2Cache::s_cache);
|
||||
return NEW(CM2Scene, &CM2Cache::s_cache);
|
||||
}
|
||||
|
||||
uint32_t M2GetCacheFlags() {
|
||||
|
||||
Reference in new issue
Block a user