-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weapon assets and statically linked #1470
Conversation
The msvc line that fails is the same as in nodejs/build#3739
That fix still seems to be in preview. We could try this:
|
Could also try disabling optimizations at the cmake level like https://stackoverflow.com/questions/33540578/cmake-how-to-disable-optimization-of-a-single-cpp-file |
It seems like if we get rid of this syntax the older version would work
|
How about just do |
I think I finally got it! EDIT: nvmd, CI did not run |
Allow to compile weapon overlays as a single C files. The benefit is to disallow symbols to be exported by statically compile them all but the header. We would no longer need to use `OVL_EXPORT` as long as the symbols are marked as `static`. The frames data is also generated as an array of data that can be just included into their respective C files, generated by JSON files on the fly. I changed `animset` to `frameset` as the data does not represent a set of animations but rather a set of frames, where every frame has multiple sprites. The information on how the frames are played (e.g. animation) is found elsewhere. Following the full list of changes to achieve this project: * The `animset` from splat is now dummied out * The `frameset` JSON is now generated by the asset manager * The `frameset` JSON is now compiled into `src/weapon/w_0xx_y.h` * The `header.c` has been moved into `shared.h` * For simplicity I added a `#define g_Animset w_000_1`. I did not want to hack the asset manager too much to force the name to be `g_Animset` and I did not want to change all the symbols yet. * Simplified `weapon_pc.c` as we now only need the exported header * Always try to build the most up-to-date asset manager: this should avoid weird errors whenever people pull new changes As the asset manager now can accept those `config` files, now the CLI supports the following commands: * `stage extract` * `stage build` * `config extract` (NEW) * `config build` (NEW) The config structure is heavily inspired to Splat to maintain consistency and continuity.
Allow to compile weapon overlays as a single C files. The benefit is to disallow symbols to be exported by statically compile them all but the header. We would no longer need to use
OVL_EXPORT
as long as the symbols are marked asstatic
. The frames data is also generated as an array of data that can be just included into their respective C files, generated by JSON files on the fly.I changed
animset
toframeset
as the data does not represent a set of animations but rather a set of frames, where every frame has multiple sprites. The information on how the frames are played (e.g. animation) is found elsewhere.Following the full list of changes to achieve this project:
animset
from splat is now dummied outframeset
JSON is now generated by the asset managerframeset
JSON is now compiled intosrc/weapon/w_0xx_y.h
header.c
has been moved intoshared.h
#define g_Animset w_000_1
. I did not want to hack the asset manager too much to force the name to beg_Animset
and I did not want to change all the symbols yet.weapon_pc.c
as we now only need the exported headerAs the asset manager now can accept those
config
files, now the CLI supports the following commands:stage extract
stage build
config extract
(NEW)config build
(NEW)The config structure is heavily inspired to Splat to maintain consistency and continuity.