mirror of
https://github.com/Ed94/HandmadeHero.git
synced 2025-06-16 03:31:49 -07:00
symbols for engine module are now generated into a header
Started to to use gencpp to codegen. Now instead of loading the symbol table file made by the build script I can just have it get directly compiled.
This commit is contained in:
3
project/gen/Readme.md
Normal file
3
project/gen/Readme.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Universal Generated Code
|
||||
|
||||
This is for generated code used for multiple modules.
|
17
project/gen/engine_symbol_table.hpp
Normal file
17
project/gen/engine_symbol_table.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "platform/platform.hpp"
|
||||
|
||||
NS_ENGINE_BEGIN
|
||||
|
||||
constexpr
|
||||
Str const symbol_on_module_load = str_ascii("?on_module_reload@engine@@YAXPEAUMemory@1@PEAUModuleAPI@platform@@@Z");
|
||||
constexpr
|
||||
Str const symbol_startup = str_ascii("?startup@engine@@YAXPEAUMemory@1@PEAUModuleAPI@platform@@@Z");
|
||||
constexpr
|
||||
Str const symbol_shutdown = str_ascii("?shutdown@engine@@YAXPEAUMemory@1@PEAUModuleAPI@platform@@@Z");
|
||||
constexpr
|
||||
Str const symbol_update_and_render = str_ascii("?update_and_render@engine@@YAXPEAUInputState@1@PEAUOffscreenBuffer@1@PEAUMemory@1@PEAUModuleAPI@platform@@@Z");
|
||||
constexpr
|
||||
Str const symbol_update_audio = str_ascii("?update_audio@engine@@YAXPEAUAudioBuffer@1@PEAUMemory@1@PEAUModuleAPI@platform@@@Z");
|
||||
|
||||
NS_ENGINE_END
|
@ -1,19 +0,0 @@
|
||||
#if GEN_TIME
|
||||
#define GEN_DEFINE_LIBRARY_CODE_CONSTANTS
|
||||
#define GEN_IMPLEMENTATION
|
||||
#define GEN_BENCHMARK
|
||||
#define GEN_ENFORCE_STRONG_CODE_TYPES
|
||||
#include "gen.hpp"
|
||||
using namespace gen;
|
||||
|
||||
int gen_main()
|
||||
{
|
||||
gen::init();
|
||||
log_fmt("Generating code for Handmade Hero\n");
|
||||
|
||||
log_fmt("Generaton finished for Handmade Hero\n");
|
||||
// gen::deinit();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user