forked from pjasicek/OpenClaw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request pjasicek#151 from RicoRodriges/emscripten
Emscripten compatibility and some improvements
- Loading branch information
Showing
32 changed files
with
498 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
Build_Release/ASSETS/ACTOR_PROTOTYPES/LEVEL1/LEVEL1_RAT_BOMB.XML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Actor Type="Level1_RatBomb" Parent="ActorPrototype_BaseProjectile" ActorPrototypeName="ActorPrototype_Level1_RatBomb"> | ||
<ActorRenderComponent> | ||
<Mirrored>true</Mirrored> | ||
<ImagePath>/LEVEL1/IMAGES/RATBOMB/*</ImagePath> | ||
<Palette>/LEVEL1/PALETTES/MAIN.PAL</Palette> | ||
</ActorRenderComponent> | ||
<AnimationComponent> | ||
<AnimationPath>/LEVEL1/ANIS/RATBOMB/FALLEASTWEST.ANI</AnimationPath> | ||
</AnimationComponent> | ||
<ProjectileAIComponent> | ||
<Damage>20</Damage> | ||
<ProjectileType>DamageType_Explosion</ProjectileType> | ||
<!-- CAN BE MODIFIED IN CODE --> | ||
<ProjectileSpeed x="9.00000" y="0.000000" /> | ||
</ProjectileAIComponent> | ||
<PhysicsComponent> | ||
<CollisionFlag>262144</CollisionFlag> | ||
<CollisionMask>1048834</CollisionMask> | ||
<CollisionSize width="25" height="25" /> | ||
<PositionOffset x="-10" y="0" /> | ||
</PhysicsComponent> | ||
</Actor> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.2) | |
option(Android "Android" OFF) | ||
|
||
option(Emscripten "Build as WASM" OFF) | ||
option(Extern_Config "Do not embed config file" ON) | ||
set(EMSCRIPTEN_PATH "CHANGE ME PLEASE!!!/emsdk") | ||
|
||
project(OpenClaw) | ||
|
@@ -64,7 +65,12 @@ list(APPEND TARGET_LIBS | |
Box2D | ||
) | ||
if (Emscripten) | ||
set_target_properties(openclaw PROPERTIES LINK_FLAGS "-s WASM=1 -s BINARYEN_METHOD='native-wasm' -s EXPORTED_FUNCTIONS='[_main]' -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='[\"pcx\",\"png\",\"tga\"]' -s USE_SDL_TTF=2 -s USE_SDL_GFX=2 -s ASYNCIFY=1 -s TOTAL_MEMORY=268435456 --preload-file ../Build_Release/[email protected] --preload-file ../Build_Release/[email protected] --preload-file ../Build_Release/[email protected] --preload-file ../Build_Release/[email protected] --preload-file ../Build_Release/[email protected] --preload-file ../Build_Release/[email protected]") | ||
if (Extern_Config) | ||
set(CONFIG_PRELOAD_FILE "") | ||
else (Extern_Config) | ||
set(CONFIG_PRELOAD_FILE "--preload-file ../Build_Release/[email protected]") | ||
endif (Extern_Config) | ||
set_target_properties(openclaw PROPERTIES LINK_FLAGS "-s WASM=1 -s BINARYEN_METHOD='native-wasm' -s EXPORTED_FUNCTIONS='[_main]' -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='[\"pcx\",\"png\",\"tga\"]' -s USE_SDL_TTF=2 -s USE_SDL_GFX=2 -s ASYNCIFY=1 -s TOTAL_MEMORY=268435456 ${CONFIG_PRELOAD_FILE} --preload-file ../Build_Release/[email protected] --preload-file ../Build_Release/[email protected] --preload-file ../Build_Release/[email protected] --preload-file ../Build_Release/[email protected]") | ||
else (Emscripten) | ||
list(APPEND TARGET_LIBS | ||
SDL2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.