Fix invalid play.html file reference in emscripten_run.sh script. Update scripts to make sure packkey source file is always assumed unchanged. Fix typos.

mac-build
Nic0Nic0Nii 8 months ago
parent c5f7cc1887
commit 533c089485
  1. 3
      .gitignore
  2. 2
      Adventures in Lestoria/Adventures in Lestoria.html
  3. 35
      Adventures in Lestoria/AdventuresInLestoria.cpp
  4. 1
      debug.sh
  5. 1
      distribute.ps1
  6. 1
      distribute.sh
  7. 1
      emscripten_build.ps1
  8. 1
      emscripten_build.sh
  9. 1
      emscripten_debug_build.ps1
  10. 1
      emscripten_debug_build.sh
  11. 1
      emscripten_run.ps1
  12. 3
      emscripten_run.sh
  13. 1
      release.sh

3
.gitignore vendored

@ -397,10 +397,7 @@ build/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c
build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp
test.cpp test.cpp
/Adventures in Lestoria/Adventures in Lestoria /Adventures in Lestoria/Adventures in Lestoria
/Adventures in Lestoria/packkey.cpp
/x64/Release/Adventures in Lestoria.zip /x64/Release/Adventures in Lestoria.zip
/x64/Release/Adventures in Lestoria_web.zip /x64/Release/Adventures in Lestoria_web.zip
/x64/Release/AdventuresInLestoria_web.zip /x64/Release/AdventuresInLestoria_web.zip
Adventures in Lestoria/packkey.cpp
Adventures in Lestoria/packkey.cpp
packkey.cpp packkey.cpp

@ -35,7 +35,7 @@ var Module = {
})(), })(),
}; };
</script> </script>
<script async type="text/javascript" src="Adventures in Lestoria.js"></script> <script async type="text/javascript" src="AdventuresInLestoria.js"></script>
<script type="text/javascript"> <script type="text/javascript">
Module.canvas.addEventListener("resize", (e) => { Module.canvas.addEventListener("resize", (e) => {

@ -434,6 +434,7 @@ void AiL::HandleUserInput(float fElapsedTime){
Menu::OpenMenu(MenuType::PAUSE); Menu::OpenMenu(MenuType::PAUSE);
} }
float animationSpd=0.f; float animationSpd=0.f;
player->movementVelocity={};
if(player->GetVelocity().mag()<"Player.Move Allowed Velocity Lower Limit"_F&&player->CanMove()){ if(player->GetVelocity().mag()<"Player.Move Allowed Velocity Lower Limit"_F&&player->CanMove()){
auto GetPlayerStaircaseDirection=[&](){ auto GetPlayerStaircaseDirection=[&](){
for(LayerTag&layer:MAP_DATA[GetCurrentLevel()].LayerData){ for(LayerTag&layer:MAP_DATA[GetCurrentLevel()].LayerData){
@ -460,14 +461,14 @@ void AiL::HandleUserInput(float fElapsedTime){
moveAmt*=controllerAmt; moveAmt*=controllerAmt;
}else animationSpd=1.f; }else animationSpd=1.f;
player->SetX(player->GetX()+fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->SetX(player->GetX()+fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.x=moveAmt*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.x+=moveAmt*fElapsedTime*player->GetMoveSpdMult();
if(staircaseDirection=="RIGHT"){ if(staircaseDirection=="RIGHT"){
player->SetY(player->GetY()-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult()); player->SetY(player->GetY()-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
player->movementVelocity.y=-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.y+=-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
} else } else
if(staircaseDirection=="LEFT"){ if(staircaseDirection=="LEFT"){
player->SetY(player->GetY()+"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult()); player->SetY(player->GetY()+"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
player->movementVelocity.y="Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.y+="Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
} }
player->SetFacingDirection(RIGHT); player->SetFacingDirection(RIGHT);
@ -488,14 +489,14 @@ void AiL::HandleUserInput(float fElapsedTime){
moveAmt*=controllerAmt; moveAmt*=controllerAmt;
}else animationSpd=1.f; }else animationSpd=1.f;
player->SetX(player->GetX()-fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->SetX(player->GetX()-fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.x=-moveAmt*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.x+=-moveAmt*fElapsedTime*player->GetMoveSpdMult();
if(staircaseDirection=="RIGHT"){ if(staircaseDirection=="RIGHT"){
player->SetY(player->GetY()+"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult()); player->SetY(player->GetY()+"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
player->movementVelocity.y="Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.y+="Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
} else } else
if(staircaseDirection=="LEFT"){ if(staircaseDirection=="LEFT"){
player->SetY(player->GetY()-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult()); player->SetY(player->GetY()-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult());
player->movementVelocity.y=-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.y+=-"Player.StaircaseClimbSpd"_F*fElapsedTime*player->GetMoveSpdMult();
} }
newAimingAngle-=vf2d{1,0}; newAimingAngle-=vf2d{1,0};
@ -515,7 +516,7 @@ void AiL::HandleUserInput(float fElapsedTime){
moveAmt*=controllerAmt; moveAmt*=controllerAmt;
}else animationSpd=1.f; }else animationSpd=1.f;
player->SetY(player->GetY()-fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->SetY(player->GetY()-fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.y=-moveAmt*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.y+=-moveAmt*fElapsedTime*player->GetMoveSpdMult();
newAimingAngle-=vf2d{0,1}; newAimingAngle-=vf2d{0,1};
@ -534,7 +535,7 @@ void AiL::HandleUserInput(float fElapsedTime){
moveAmt*=controllerAmt; moveAmt*=controllerAmt;
}else animationSpd=1.f; }else animationSpd=1.f;
player->SetY(player->GetY()+fElapsedTime*moveAmt*player->GetMoveSpdMult()); player->SetY(player->GetY()+fElapsedTime*moveAmt*player->GetMoveSpdMult());
player->movementVelocity.y=moveAmt*fElapsedTime*player->GetMoveSpdMult(); player->movementVelocity.y+=moveAmt*fElapsedTime*player->GetMoveSpdMult();
newAimingAngle+=vf2d{0,1}; newAimingAngle+=vf2d{0,1};
@ -564,7 +565,6 @@ void AiL::HandleUserInput(float fElapsedTime){
} }
if(UpReleased()){ if(UpReleased()){
player->SetLastReleasedMovementKey(UP); player->SetLastReleasedMovementKey(UP);
player->movementVelocity.y=0;
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){ if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
if(RightHeld()){ if(RightHeld()){
player->UpdateWalkingAnimation(RIGHT); player->UpdateWalkingAnimation(RIGHT);
@ -579,7 +579,6 @@ void AiL::HandleUserInput(float fElapsedTime){
} }
if(RightReleased()){ if(RightReleased()){
player->SetLastReleasedMovementKey(RIGHT); player->SetLastReleasedMovementKey(RIGHT);
player->movementVelocity.x=0;
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){ if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
if(UpHeld()){ if(UpHeld()){
player->UpdateWalkingAnimation(UP); player->UpdateWalkingAnimation(UP);
@ -594,7 +593,6 @@ void AiL::HandleUserInput(float fElapsedTime){
} }
if(LeftReleased()){ if(LeftReleased()){
player->SetLastReleasedMovementKey(LEFT); player->SetLastReleasedMovementKey(LEFT);
player->movementVelocity.x=0;
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){ if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
if(RightHeld()){ if(RightHeld()){
player->UpdateWalkingAnimation(RIGHT); player->UpdateWalkingAnimation(RIGHT);
@ -609,7 +607,6 @@ void AiL::HandleUserInput(float fElapsedTime){
} }
if(DownReleased()){ if(DownReleased()){
player->SetLastReleasedMovementKey(DOWN); player->SetLastReleasedMovementKey(DOWN);
player->movementVelocity.y=0;
if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){ if(player->GetState()==State::NORMAL||player->GetState()==State::PREP_CAST){
if(RightHeld()){ if(RightHeld()){
player->UpdateWalkingAnimation(RIGHT); player->UpdateWalkingAnimation(RIGHT);
@ -3914,7 +3911,7 @@ void AiL::ShowDamageVignetteOverlay(){
} }
void AiL::GlobalGameUpdates(){ void AiL::GlobalGameUpdates(){
levelTime+=fElapsedTime; levelTime+=GetElapsedTime();
SteamAPI_RunCallbacks(); SteamAPI_RunCallbacks();
STEAMINPUT( STEAMINPUT(
ActivateActionSetForAllControllers(Input::ingameControlsHandle); ActivateActionSetForAllControllers(Input::ingameControlsHandle);
@ -3925,15 +3922,15 @@ void AiL::GlobalGameUpdates(){
for(std::vector<std::shared_ptr<DamageNumber>>::iterator it=DAMAGENUMBER_LIST.begin();it!=DAMAGENUMBER_LIST.end();++it){ for(std::vector<std::shared_ptr<DamageNumber>>::iterator it=DAMAGENUMBER_LIST.begin();it!=DAMAGENUMBER_LIST.end();++it){
DamageNumber*dn=(*it).get(); DamageNumber*dn=(*it).get();
if(dn->pauseTime>0){ if(dn->pauseTime>0){
dn->pauseTime-=fElapsedTime; dn->pauseTime-=GetElapsedTime();
} else{ } else{
dn->lifeTime+=fElapsedTime; dn->lifeTime+=GetElapsedTime();
if(dn->lifeTime<=1){ if(dn->lifeTime<=1){
if(dn->lifeTime<DamageNumber::MOVE_UP_TIME){ if(dn->lifeTime<DamageNumber::MOVE_UP_TIME){
if(dn->invertedDirection){ if(dn->invertedDirection){
dn->pos.y+=dn->riseSpd*fElapsedTime; dn->pos.y+=dn->riseSpd*GetElapsedTime();
}else{ }else{
dn->pos.y-=dn->riseSpd*fElapsedTime; dn->pos.y-=dn->riseSpd*GetElapsedTime();
} }
} }
} }
@ -3944,9 +3941,9 @@ void AiL::GlobalGameUpdates(){
if(GetMousePos()!=lastMousePos){ if(GetMousePos()!=lastMousePos){
lastMouseMovement=0.f; lastMouseMovement=0.f;
lastMousePos=GetMousePos(); lastMousePos=GetMousePos();
}else lastMouseMovement+=fElapsedTime; }else lastMouseMovement+=GetElapsedTime();
vignetteDisplayTime=std::max(0.f,vignetteDisplayTime-fElapsedTime); vignetteDisplayTime=std::max(0.f,vignetteDisplayTime-GetElapsedTime());
if(Audio::Engine().IsPlaying(GetPlayer()->cooldownSoundInstance)){ if(Audio::Engine().IsPlaying(GetPlayer()->cooldownSoundInstance)){
Audio::Engine().SetVolume(GetPlayer()->cooldownSoundInstance,Audio::GetCalculatedSFXVolume("Audio.Casting Sound Volume"_F/100.f)); Audio::Engine().SetVolume(GetPlayer()->cooldownSoundInstance,Audio::GetCalculatedSFXVolume("Audio.Casting Sound Volume"_F/100.f));

@ -1 +1,2 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
cmake -DCMAKE_BUILD_TYPE=Debug -D_DEBUG=1 .;make -j 8 cmake -DCMAKE_BUILD_TYPE=Debug -D_DEBUG=1 .;make -j 8

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
rm -R bin rm -R bin
mkdir bin mkdir bin
mkdir bin/assets mkdir bin/assets

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
rm -R release rm -R release
mkdir release mkdir release
mkdir release/assets mkdir release/assets

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
clear clear
rm -R bin rm -R bin
mkdir bin mkdir bin

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
clear clear
mkdir bin mkdir bin

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
clear clear
rm -R bin rm -R bin
mkdir bin mkdir bin

@ -1,3 +1,4 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
clear clear
source ./emsdk/emsdk_env.sh source ./emsdk/emsdk_env.sh
emcmake cmake -DCMAKE_BUILD_TYPE=Debug -D_DEBUG=1 . emcmake cmake -DCMAKE_BUILD_TYPE=Debug -D_DEBUG=1 .

@ -1 +1,2 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
emrun bin/index.html emrun bin/index.html

@ -1,3 +1,4 @@
cp AdventuresInLestoria/play.html ./bin git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
cp "Adventures in Lestoria/play.html" ./bin
source ./emsdk/emsdk_env.sh source ./emsdk/emsdk_env.sh
emrun --no_browser bin/play.html emrun --no_browser bin/play.html

@ -1 +1,2 @@
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
cmake -DCMAKE_BUILD_TYPE=Release .;make -j 8 cmake -DCMAKE_BUILD_TYPE=Release .;make -j 8

Loading…
Cancel
Save