@ -188,7 +188,7 @@ AiL::AiL(bool testingMode){
void InitializeGameConfigurations ( ) {
DATA . Reset ( ) ;
utils : : datafile : : Read ( DATA , " assets/config/configuration.txt " ) ;
utils : : datafile : : DEBUG_ACCESS_OPTIONS = " debug_access_options " _I ;
@ -2387,55 +2387,7 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){
}
# pragma endregion
bossIndicatorPos . reset ( ) ;
SPAWNER_LIST . clear ( ) ;
SPAWNER_CONTROLLER = { } ;
foregroundTileGroups . clear ( ) ;
upperForegroundTileGroups . clear ( ) ;
MONSTER_LIST . clear ( ) ;
BULLET_LIST . clear ( ) ;
DAMAGENUMBER_LIST . clear ( ) ;
hudOverlay . Reset ( ) ;
backgroundEffects . clear ( ) ;
foregroundEffects . clear ( ) ;
lockOnTargets . clear ( ) ;
lockOnSpecialTargets . clear ( ) ;
ItemDrop : : drops . clear ( ) ;
GameEvent : : events . clear ( ) ;
Audio : : SetBGMPitch ( 1.f ) ;
RepeatingSoundEffect : : StopAllSounds ( ) ;
# ifdef __EMSCRIPTEN__
Audio : : muted = true ;
Audio : : UpdateBGMVolume ( ) ;
# endif
zoomAdjustSpeed = " Default Zoom Adjust Speed " _F ;
targetZoom = 1.f ;
game - > view . SetZoom ( 0.95f , game - > view . WorldToScreen ( game - > camera . GetViewPosition ( ) ) ) ;
worldColor = WHITE ;
worldColorFunc = [ & ] ( vi2d pos ) { return game - > worldColor ; } ;
levelTime = 0 ;
bossName = " " ;
bossDisplayTimer = 0.f ;
worldShakeTime = 0.f ;
encounterDuration = 0 ;
totalDamageDealt = 0 ;
encounterStarted = false ;
totalBossEncounterMobs = 0 ;
SetWindSpeed ( { } ) ;
Inventory : : ResetLoadoutItemsUsed ( ) ;
Input : : StopVibration ( ) ;
Input : : SetLightbar ( { 255 , 0 , 255 } ) ;
GetPlayer ( ) - > hp = GetPlayer ( ) - > GetMaxHealth ( ) ;
GetPlayer ( ) - > mana = GetPlayer ( ) - > GetMaxMana ( ) ;
GetPlayer ( ) - > SetState ( State : : NORMAL ) ;
GetPlayer ( ) - > GetCastInfo ( ) = { } ;
GetPlayer ( ) - > ResetAccumulatedXP ( ) ;
GetPlayer ( ) - > _SetIframes ( 0.f ) ;
GetPlayer ( ) - > SetInvisible ( false ) ;
GetPlayer ( ) - > ResetVelocity ( ) ;
GetPlayer ( ) - > RemoveAllBuffs ( ) ;
GetPlayer ( ) - > ResetTimers ( ) ;
ResetLevelStates ( ) ;
STEAMINPUT ( //This is kind of a hack to refresh the in-game controls handle and button icons if for some reason it's not setup correctly.
Input : : LoadSteamButtonIcons ( ) ;
@ -4618,4 +4570,56 @@ void AiL::InitializeCamera(){
camera . SetMode ( olc : : utils : : Camera2D : : Mode : : LazyFollow ) ;
camera . SetWorldBoundary ( { 0 , 0 } , GetCurrentMap ( ) . MapData . MapSize * GetCurrentMap ( ) . MapData . TileSize ) ;
camera . EnableWorldBoundary ( false ) ;
}
void AiL : : ResetLevelStates ( ) {
bossIndicatorPos . reset ( ) ;
SPAWNER_LIST . clear ( ) ;
SPAWNER_CONTROLLER = { } ;
foregroundTileGroups . clear ( ) ;
upperForegroundTileGroups . clear ( ) ;
MONSTER_LIST . clear ( ) ;
BULLET_LIST . clear ( ) ;
DAMAGENUMBER_LIST . clear ( ) ;
hudOverlay . Reset ( ) ;
backgroundEffects . clear ( ) ;
foregroundEffects . clear ( ) ;
lockOnTargets . clear ( ) ;
lockOnSpecialTargets . clear ( ) ;
ItemDrop : : drops . clear ( ) ;
GameEvent : : events . clear ( ) ;
Audio : : SetBGMPitch ( 1.f ) ;
RepeatingSoundEffect : : StopAllSounds ( ) ;
# ifdef __EMSCRIPTEN__
Audio : : muted = true ;
Audio : : UpdateBGMVolume ( ) ;
# endif
zoomAdjustSpeed = " Default Zoom Adjust Speed " _F ;
targetZoom = 1.f ;
game - > view . SetZoom ( 0.95f , game - > view . WorldToScreen ( game - > camera . GetViewPosition ( ) ) ) ;
worldColor = WHITE ;
worldColorFunc = [ & ] ( vi2d pos ) { return game - > worldColor ; } ;
levelTime = 0 ;
bossName = " " ;
bossDisplayTimer = 0.f ;
worldShakeTime = 0.f ;
encounterDuration = 0 ;
totalDamageDealt = 0 ;
encounterStarted = false ;
totalBossEncounterMobs = 0 ;
SetWindSpeed ( { } ) ;
Inventory : : ResetLoadoutItemsUsed ( ) ;
Input : : StopVibration ( ) ;
Input : : SetLightbar ( { 255 , 0 , 255 } ) ;
GetPlayer ( ) - > hp = GetPlayer ( ) - > GetMaxHealth ( ) ;
GetPlayer ( ) - > mana = GetPlayer ( ) - > GetMaxMana ( ) ;
GetPlayer ( ) - > SetState ( State : : NORMAL ) ;
GetPlayer ( ) - > GetCastInfo ( ) = { } ;
GetPlayer ( ) - > ResetAccumulatedXP ( ) ;
GetPlayer ( ) - > _SetIframes ( 0.f ) ;
GetPlayer ( ) - > SetInvisible ( false ) ;
GetPlayer ( ) - > ResetVelocity ( ) ;
GetPlayer ( ) - > RemoveAllBuffs ( ) ;
GetPlayer ( ) - > ResetTimers ( ) ;
}