fix web build

efd/v1
Dominik Madarász 2023-01-23 00:58:07 +01:00
parent 3174b8a3c3
commit a31f4f6f25
4 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@ uint64_t assembler_spawn(void) {
producer->push_filter = PRODUCER_PUSH_PRODUCT; producer->push_filter = PRODUCER_PUSH_PRODUCT;
producer->target_item = ASSET_INVALID; producer->target_item = ASSET_INVALID;
ecs_set(world_ecs(), e, ItemRouter, {1}); ecs_set(world_ecs(), e, ItemRouter, {.push_qty = 1, .counter = 0});
return (uint64_t)e; return (uint64_t)e;
} }

View File

@ -17,7 +17,7 @@ uint64_t furnace_spawn(void) {
producer->pending_task = PRODUCER_CRAFT_AUTO; producer->pending_task = PRODUCER_CRAFT_AUTO;
producer->push_filter = PRODUCER_PUSH_ANY; producer->push_filter = PRODUCER_PUSH_ANY;
ecs_set(world_ecs(), e, ItemRouter, {1}); ecs_set(world_ecs(), e, ItemRouter, {.push_qty = 1, .counter = 0});
return (uint64_t)e; return (uint64_t)e;
} }

View File

@ -11,7 +11,7 @@ uint64_t splitter_spawn(void) {
ItemContainer *storage = ecs_get_mut(world_ecs(), e, ItemContainer); ItemContainer *storage = ecs_get_mut(world_ecs(), e, ItemContainer);
*storage = (ItemContainer){0}; *storage = (ItemContainer){0};
ecs_set(world_ecs(), e, ItemRouter, {1}); ecs_set(world_ecs(), e, ItemRouter, {.push_qty = 1, .counter = 0});
return (uint64_t)e; return (uint64_t)e;
} }

View File

@ -9,10 +9,10 @@ if not exist "..\emsdk" (
if "%EMSDK%"=="" call ..\emsdk\emsdk_env.bat if "%EMSDK%"=="" call ..\emsdk\emsdk_env.bat
rem host webserver, compile and launch rem host webserver, compile and launch
start python -m http.server --bind 127.0.0.1 8000 --directory build_web rem start "" python3 -m http.server --bind 127.0.0.1 8000 --directory build_web
pushd .. pushd ..
emcmake cmake -S . -B build_web -DCMAKE_BUILD_TYPE=Release -DPLATFORM=Web call emcmake cmake -S . -B build_web -DCMAKE_BUILD_TYPE=Release -DPLATFORM=Web
cmake --build build_web --parallel call cmake --build build_web --parallel
move build_web\eco2d.html build_web\index.html move build_web\eco2d.html build_web\index.html
popd popd