mirror of
https://github.com/thunderbrewhq/bc.git
synced 2025-12-12 10:02:30 +00:00
chore: initial commit
This commit is contained in:
commit
d5300e4723
19 changed files with 18365 additions and 0 deletions
17
bc/CMakeLists.txt
Normal file
17
bc/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
file(GLOB BC_SOURCES
|
||||
"*.cpp"
|
||||
)
|
||||
|
||||
add_library(bc STATIC
|
||||
${BC_SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(bc
|
||||
PUBLIC
|
||||
${PROJECT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(bc
|
||||
PUBLIC
|
||||
storm
|
||||
)
|
||||
18
bc/Memory.cpp
Normal file
18
bc/Memory.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include "bc/Memory.hpp"
|
||||
#include <storm/Memory.hpp>
|
||||
|
||||
void* Blizzard::Memory::Allocate(uint32_t bytes) {
|
||||
return SMemAlloc(bytes, __FILE__, __LINE__, 0x0);
|
||||
}
|
||||
|
||||
void* Blizzard::Memory::Allocate(uint32_t bytes, uint32_t flags, const char* filename, uint32_t linenumber, const char* a5) {
|
||||
// TODO
|
||||
// - determine purpose of a5
|
||||
// - flags manipulation
|
||||
|
||||
return SMemAlloc(bytes, filename, linenumber, flags);
|
||||
}
|
||||
|
||||
void Blizzard::Memory::Free(void* ptr) {
|
||||
SMemFree(ptr);
|
||||
}
|
||||
17
bc/Memory.hpp
Normal file
17
bc/Memory.hpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef BC_MEMORY_HPP
|
||||
#define BC_MEMORY_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace Blizzard {
|
||||
namespace Memory {
|
||||
|
||||
// Functions
|
||||
void* Allocate(uint32_t bytes);
|
||||
void* Allocate(uint32_t bytes, uint32_t flags, const char* filename, uint32_t linenumber, const char* a5);
|
||||
void Free(void* ptr);
|
||||
|
||||
} // namespace Memory
|
||||
} // namespace Blizzard
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue