Emscripten build seems to refuse
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
39c4db9c6f
commit
a1a35fabd0
@ -12,12 +12,12 @@ source ../emsdk/emsdk_env.sh
|
||||
if [ ! -f "pixelGameEngine_wasm.o" ]
|
||||
then
|
||||
printf "Pixel Game Engine compile object missing. Compiling for the first time..."
|
||||
em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 -c pixelGameEngine.cpp -o pixelGameEngine_wasm.o
|
||||
em++ -std=c++20 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 -c pixelGameEngine.cpp -o pixelGameEngine_wasm.o
|
||||
fi
|
||||
if [ -d "assets" ]; then
|
||||
em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html --preload-file ./assets
|
||||
em++ -std=c++20 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html --preload-file ./assets
|
||||
else
|
||||
em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html
|
||||
em++ -std=c++20 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html
|
||||
fi
|
||||
|
||||
cp buildtemplate.html ${PROJECT_NAME}.html
|
||||
|
@ -386,16 +386,16 @@ void Monster::Set(_ATTRIBUTE a,std::variant<VARIANTS>val){
|
||||
//Error handling below!
|
||||
//The idea is if we cannot retrieve the value, the program errors out.
|
||||
switch(a.type){
|
||||
case Attribute::TYPE::FLOAT:{
|
||||
case ATTRIBUTE_TYPE::FLOAT:{
|
||||
GetFloat(a);
|
||||
}break;
|
||||
case Attribute::TYPE::INT:{
|
||||
case ATTRIBUTE_TYPE::INT:{
|
||||
GetInt(a);
|
||||
}break;
|
||||
case Attribute::TYPE::STRING:{
|
||||
case ATTRIBUTE_TYPE::STRING:{
|
||||
GetString(a);
|
||||
}break;
|
||||
case Attribute::TYPE::BOOL:{
|
||||
case ATTRIBUTE_TYPE::BOOL:{
|
||||
GetBool(a);
|
||||
}break;
|
||||
}
|
||||
|
4
Crawler/MonsterAttribute.cpp
Normal file
4
Crawler/MonsterAttribute.cpp
Normal file
@ -0,0 +1,4 @@
|
||||
#include "MonsterAttribute.h"
|
||||
|
||||
_ATTRIBUTE Attribute::IFRAME_TIME_UPON_HIT{ATTRIBUTE_TYPE::FLOAT};
|
||||
_ATTRIBUTE Attribute::SHOOT_RING_TIMER{ATTRIBUTE_TYPE::FLOAT};
|
@ -1,20 +1,21 @@
|
||||
#pragma once
|
||||
#define VARIANTS float,int,std::string,bool
|
||||
#define CREATE_ATTRIBUTE(variable,type) _ATTRIBUTE variable{Attribute::TYPE::type};
|
||||
|
||||
namespace Attribute{
|
||||
enum class TYPE{
|
||||
FLOAT,
|
||||
INT,
|
||||
STRING,
|
||||
BOOL,
|
||||
};
|
||||
}
|
||||
|
||||
struct _ATTRIBUTE{
|
||||
Attribute::TYPE type;
|
||||
enum class ATTRIBUTE_TYPE{
|
||||
FLOAT,
|
||||
INT,
|
||||
STRING,
|
||||
BOOL,
|
||||
};
|
||||
|
||||
namespace Attribute{
|
||||
CREATE_ATTRIBUTE(IFRAME_TIME_UPON_HIT,FLOAT);
|
||||
CREATE_ATTRIBUTE(SHOOT_RING_TIMER,FLOAT);
|
||||
}
|
||||
struct _ATTRIBUTE{
|
||||
ATTRIBUTE_TYPE type;
|
||||
bool operator<(const _ATTRIBUTE&rhs)const{
|
||||
return int(type)<int(rhs.type);
|
||||
}
|
||||
};
|
||||
|
||||
struct Attribute{
|
||||
static _ATTRIBUTE IFRAME_TIME_UPON_HIT;
|
||||
static _ATTRIBUTE SHOOT_RING_TIMER;
|
||||
};
|
@ -12,7 +12,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,int strategyNumbe
|
||||
case 0:{
|
||||
m.size=ConfigInt("Phase1.Size")/100;
|
||||
m.diesNormally=false;
|
||||
m.Set(Attribute::IFRAME_TIME_UPON_HIT,0.f);
|
||||
m.Set(Attribute::IFRAME_TIME_UPON_HIT,0);
|
||||
m.iframe_timer=ConfigFloat("Phase5.IframeTimePerHit");
|
||||
m.phase=1;
|
||||
}break;
|
||||
|
@ -10,7 +10,7 @@ gfx_config = gfx/gfx.txt
|
||||
map_config = levels.txt
|
||||
|
||||
# Starting map when loading the game.
|
||||
starting_map = CAMPAIGN_1_1
|
||||
starting_map = BOSS_1
|
||||
|
||||
# Player Properties Loading Config
|
||||
player_config = Player.txt
|
||||
|
@ -1,4 +1,4 @@
|
||||
export AUTO_UPDATE=true
|
||||
export AUTO_UPDATE=false
|
||||
|
||||
source utils/define.sh
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user