Added shine effect to engine for upcoming Deadly Dash effect. Release Build 10097.

removeExposedPackKey
sigonasr2 4 months ago
parent ed4a755d1c
commit fe91e36b60
  1. 4
      Adventures in Lestoria/Adventures in Lestoria.vcxproj
  2. 3
      Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
  3. 1
      Adventures in Lestoria/AdventuresInLestoria.cpp
  4. 9
      Adventures in Lestoria/Effect.h
  5. 49
      Adventures in Lestoria/ShineEffect.cpp
  6. 5
      Adventures in Lestoria/Thief.cpp
  7. 2
      Adventures in Lestoria/Version.h
  8. 4
      Adventures in Lestoria/assets/config/configuration.txt
  9. 1
      Adventures in Lestoria/assets/config/gfx/gfx.txt
  10. BIN
      Adventures in Lestoria/assets/gamepack.pak
  11. BIN
      Adventures in Lestoria/assets/shine.png
  12. BIN
      x64/Release/Adventures in Lestoria.exe

@ -983,6 +983,10 @@
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="ShineEffect.cpp">
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="ShootAfar.cpp" />
<ClCompile Include="SlimeKing.cpp" />
<ClCompile Include="SoundEffect.cpp">

@ -1124,6 +1124,9 @@
<ClCompile Include="FallingStone.cpp">
<Filter>Source Files\Bullet Types</Filter>
</ClCompile>
<ClCompile Include="ShineEffect.cpp">
<Filter>Source Files\Effects</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="cpp.hint" />

@ -2358,6 +2358,7 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){
Audio::muted=true;
Audio::UpdateBGMVolume();
#endif
zoomAdjustSpeed="Default Zoom Adjust Speed"_F;
targetZoom=1.f;
game->view.SetZoom(1.2f,game->view.WorldToScreen(game->camera.GetViewPosition()));
worldColor=WHITE;

@ -127,4 +127,13 @@ struct RockLaunch:Effect{
private:
float delayTime;
vf2d futureSpd;
};
struct ShineEffect:Effect{
//An effect that starts invisible, becomes visible, then fades out again.
ShineEffect(vf2d pos,float fadeinTime,float fadeoutTime,std::string imgFile,float size,vf2d spd,Pixel col,float rotation,float rotationSpd,bool additiveBlending=false);
virtual bool Update(float fElapsedTime)override final;
private:
float fadeinTime;
const Pixel originalCol;
};

@ -0,0 +1,49 @@
#pragma region License
/*
License (OLC-3)
~~~~~~~~~~~~~~~
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions or derivations of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions or derivative works in binary form must reproduce the above
copyright notice. This list of conditions and the following disclaimer must be
reproduced in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Portions of this software are copyright © 2024 The FreeType
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
All rights reserved.
*/
#pragma endregion
#include "Effect.h"
#include "util.h"
ShineEffect::ShineEffect(vf2d pos,float fadeinTime,float fadeoutTime,std::string imgFile,float size,vf2d spd,Pixel col,float rotation,float rotationSpd,bool additiveBlending)
:fadeinTime(fadeinTime),originalCol(col),Effect(pos,fadeinTime,imgFile,false,size,fadeoutTime,spd,col,rotation,rotationSpd,additiveBlending){
col.a=0; //Starts invisible.
}
bool ShineEffect::Update(float fElapsedTime){
col.a=util::lerp(0.f,1.f,lifetime/fadeinTime)*originalCol.a;
return Effect::Update(fElapsedTime);
}

@ -136,10 +136,11 @@ void Thief::InitializeClassAbilities(){
return true;
};
#pragma endregion
#pragma region Thief Ability 2 (???)
#pragma region Thief Ability 2 (Deadly Dash)
Thief::ability2.action=
[](Player*p,vf2d pos={}){
return false;
game->AddEffect(std::make_unique<ShineEffect>(p->GetPos(),0.5f,0.5f,"shine.png",1.5f,vf2d{},WHITE,util::random(2*PI),PI/2,true));
return true;
};
#pragma endregion
#pragma region Thief Ability 3 (???)

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_PATCH 3
#define VERSION_BUILD 10094
#define VERSION_BUILD 10097
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -180,4 +180,6 @@ user_id_message = In order to save progress online, we ask that you provide a un
user_id_message2 = When loading a file, you will need this unique ID.
# How large the exit ring is for a boss when it's killed.
boss_spawn_ring_radius = 116
boss_spawn_ring_radius = 116
Default Zoom Adjust Speed = 0.1/s

@ -108,6 +108,7 @@ Images
GFX_Feather = feather.png
GFX_LargeRock = large_rock.png
GFX_Dagger = dagger.png
GFX_Shine = shine.png
GFX_Thief_Sheet = nico-thief.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Loading…
Cancel
Save