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:
2023-09-28 20:22:15 -04:00
parent d76163ae84
commit 2f6e60d472
15 changed files with 187 additions and 126 deletions

3
project/gen/Readme.md Normal file
View File

@ -0,0 +1,3 @@
# Universal Generated Code
This is for generated code used for multiple modules.

View 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

View File

@ -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