├── DATA ├── Levels │ ├── 1 │ │ ├── LevelData │ │ │ ├── SkyboxConfig.ini │ │ │ ├── Config.ini │ │ │ ├── StaticLightsData.conf │ │ │ ├── TexturesData.conf │ │ │ ├── _README - Description of ConfigFiles.txt │ │ │ ├── MapDoorData.conf │ │ │ ├── MapWallData.conf │ │ │ ├── MapCeilingData.conf │ │ │ └── MapFloorData.conf │ │ ├── PlayerData │ │ │ └── Config.ini │ │ └── EntityData │ │ │ ├── 0.ini │ │ │ ├── 1.ini │ │ │ ├── 2.ini │ │ │ ├── 3.ini │ │ │ └── 4.ini │ ├── 2 │ │ ├── LevelData │ │ │ ├── StaticLightsData.conf │ │ │ ├── TexturesData.conf │ │ │ ├── SkyboxConfig.ini │ │ │ ├── Config.ini │ │ │ ├── _README - Description of ConfigFiles.txt │ │ │ ├── MapDoorData.conf │ │ │ ├── MapCeilingData.conf │ │ │ ├── MapFloorData.conf │ │ │ └── MapWallData.conf │ │ ├── PlayerData │ │ │ └── Config.ini │ │ └── EntityData │ │ │ ├── 0.ini │ │ │ ├── 1.ini │ │ │ ├── 2.ini │ │ │ ├── 4.ini │ │ │ ├── 5.ini │ │ │ ├── 6.ini │ │ │ ├── 7.ini │ │ │ └── 3.ini │ └── 3 │ │ ├── EntityData │ │ └── Dummy.txt │ │ ├── LevelData │ │ ├── StaticLightsData.conf │ │ ├── TexturesData.conf │ │ ├── SkyboxConfig.ini │ │ ├── Config.ini │ │ ├── MapDoorData.conf │ │ ├── MapFloorData.conf │ │ ├── MapWallData.conf │ │ ├── MapCeilingData.conf │ │ └── _README - Description of ConfigFiles.txt │ │ └── PlayerData │ │ └── Config.ini ├── Assets_Weapons │ ├── Weapon_1_TexturesData.conf │ ├── Weapon_0_TexturesData.conf │ ├── Weapon_0_MuzzleFlashTexturesData.conf │ ├── Weapon_1_MuzzleFlashTexturesData.conf │ ├── Weapon_1_Data.ini │ ├── Weapon_0_Data.ini │ └── README - Description of ConfigFiles.txt ├── GameConfig │ ├── MenuDefinition.txt │ ├── WindowConfig.ini │ ├── EffectsConfig.ini │ ├── GameConfig.ini │ ├── RaycasterConfig.ini │ ├── MenuConfig.ini │ ├── HUDHealthBarConfig.ini │ ├── TransitionsConfig.ini │ ├── HUDMinimapConfig.ini │ ├── HUDWeaponDisplayConfig.ini │ ├── IntroHeader.txt │ └── InputConfig.ini ├── Assets_Entities │ ├── AmmoBox │ │ └── AssetData.ini │ ├── Demon │ │ └── AssetData.ini │ ├── Turret │ │ └── AssetData.ini │ └── Soldier │ │ └── AssetData.ini └── Assets_Doors │ └── Door_1_Data.ini ├── .gitattributes ├── Release.zip ├── GFX ├── HUD │ ├── Mouse.png │ ├── Crosshair.png │ ├── WeaponHUD.png │ └── XBoxController.png ├── SkyBox │ └── Sky.png ├── Effects │ └── Bloodstains.png ├── Entities │ └── 64 │ │ ├── Demon │ │ ├── 0 │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ └── 3.png │ │ ├── 1 │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ └── 3.png │ │ ├── 2 │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ └── 3.png │ │ ├── 3 │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ └── 3.png │ │ ├── 4 │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ └── 3.png │ │ ├── 5 │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ └── 3.png │ │ ├── 6 │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ └── 3.png │ │ ├── 7 │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ └── 3.png │ │ ├── Kill │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ └── 4.png │ │ └── Attack │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ └── 2.png │ │ ├── Turret │ │ ├── 0 │ │ │ └── 0.png │ │ ├── 1 │ │ │ └── 0.png │ │ ├── 2 │ │ │ └── 0.png │ │ ├── 3 │ │ │ └── 0.png │ │ ├── 4 │ │ │ └── 0.png │ │ ├── 5 │ │ │ └── 0.png │ │ ├── 6 │ │ │ └── 0.png │ │ ├── 7 │ │ │ └── 0.png │ │ └── Kill │ │ │ └── 0.png │ │ ├── AmmoBox │ │ ├── 0 │ │ │ └── 0.png │ │ ├── 1 │ │ │ └── 0.png │ │ ├── 2 │ │ │ └── 0.png │ │ ├── 3 │ │ │ └── 0.png │ │ ├── 4 │ │ │ └── 0.png │ │ ├── 5 │ │ │ └── 0.png │ │ ├── 6 │ │ │ └── 0.png │ │ └── 7 │ │ │ └── 0.png │ │ └── Soldier │ │ ├── 0 │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ │ ├── 1 │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ │ ├── 2 │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ │ ├── 3 │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ │ ├── 4 │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ │ ├── 5 │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ │ ├── 6 │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ │ ├── 7 │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ └── 3.png │ │ ├── Kill │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ └── 5.png │ │ └── Attack │ │ ├── 0.png │ │ └── 1.png ├── LevelTextures │ └── 64 │ │ ├── Door1.png │ │ ├── Vent1.png │ │ ├── Vent2.png │ │ ├── Wall1.png │ │ ├── Wall2.png │ │ ├── Wall3.png │ │ ├── Wall4.png │ │ ├── Crate1.png │ │ ├── Floor1.png │ │ ├── Floor2.png │ │ ├── Pipes1.png │ │ ├── Pipes2.png │ │ ├── Ceiling1.png │ │ ├── Console1.png │ │ ├── Console2.png │ │ ├── LavaWall1.png │ │ └── StoneFloor1.png └── PlayerAssets │ └── Weapons │ ├── HBRa3 │ ├── HBRa3.png │ └── MuzzleFlash.png │ └── ARX160 │ ├── ARX160.png │ └── MuzzleFlash.png ├── Tools └── 7Zip │ ├── 7za.dll │ ├── 7za.exe │ ├── 7zxa.dll │ └── readme.txt ├── Documentation ├── Assets │ ├── Fonts.txt │ ├── Soldier Info.txt │ ├── Demon Info.txt │ ├── Demon.gif │ ├── Soldier.png │ ├── AmmoBox.blend │ ├── Turret.blend │ ├── Turret Info.txt │ └── AmmoBox Info.txt ├── NARC.png ├── NARC1.png ├── Engine │ ├── ImageFormat.txt │ ├── Entity Types and Movement.txt │ └── AudioFormat.txt ├── Used Raycasting Tutorials │ ├── Lodev.url │ └── Permadi Raycasting Tutorial.url └── Development │ └── Used Software.txt ├── SFX ├── PlayerSounds │ ├── Hurt.mp3 │ ├── DeathScream.mp3 │ └── PlayerFootSteps.mp3 ├── BackgroundMusic │ └── AtmoLoop.mp3 ├── DoorSounds │ └── Sliding_Door.mp3 ├── WeaponSounds │ ├── ARX160 │ │ ├── DryFire.mp3 │ │ ├── Reload.mp3 │ │ └── SingleShot.mp3 │ └── HBRa3 │ │ ├── DryFire.mp3 │ │ ├── Reload.mp3 │ │ └── SingleShot.mp3 └── EntitySounds │ ├── Demon │ ├── Demon_Grunt.mp3 │ └── Demon_DeathScream.mp3 │ ├── Turret │ ├── Turret_Shot.mp3 │ └── Turret_Explosion.mp3 │ ├── Soldier │ ├── Soldier_Shot.mp3 │ └── Soldier_DeathScream.mp3 │ └── AmmoBox │ └── AmmoBox_Pickup.mp3 ├── Sources ├── lwmf │ ├── lwmf_lines.hpp │ ├── lwmf_general.hpp │ ├── lwmf_polygons.hpp │ ├── lwmf_simd.hpp │ ├── lwmf_fpscounter.hpp │ ├── lwmf.hpp │ ├── lwmf_pixel.hpp │ ├── lwmf_fill.hpp │ ├── lwmf_bmp.hpp │ ├── lwmf_color.hpp │ ├── lwmf_multithreading.hpp │ ├── lwmf_rectangles.hpp │ ├── lwmf_rawinput.hpp │ ├── lwmf_circles.hpp │ ├── lwmf_math.hpp │ ├── lwmf_perlinnoise.hpp │ ├── lwmf_ellipses.hpp │ └── lwmf_inifile.hpp ├── Game_Folder.hpp ├── GFX_ImageHandling.hpp ├── GFX_LightingClass.hpp ├── Tools_Cleanup.hpp ├── Game_PreGame.hpp ├── GFX_Window.hpp ├── Game_GlobalDefinitions.hpp ├── Game_Effects.hpp ├── HID_Mouse.hpp ├── Game_Config.hpp ├── Game_HealthBarClass.hpp ├── Tools_Console.hpp ├── Game_SkyboxHandling.hpp ├── Game_WeaponDisplayClass.hpp ├── Game_PlayerClass.hpp ├── Tools_ErrorHandling.hpp ├── Game_DataStructures.hpp ├── HID_Keyboard.hpp └── Game_Transitions.hpp ├── _CountLOC.ps1 ├── _PackRelease.cmd ├── Fonts └── Ubuntu_Mono │ ├── UbuntuMono-Bold.ttf │ └── UFL.txt ├── _PackReleaseFileList.txt ├── NARC.vcxproj.user ├── _PrepareX64Folders.cmd ├── LICENSE ├── NARC.sln └── NARC.vcxproj.filters /DATA/Levels/3/EntityData/Dummy.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.* linguist-language=C++ 2 | -------------------------------------------------------------------------------- /DATA/Levels/2/LevelData/StaticLightsData.conf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /DATA/Levels/3/LevelData/StaticLightsData.conf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /DATA/Levels/3/LevelData/TexturesData.conf: -------------------------------------------------------------------------------- 1 | Wall1.png -------------------------------------------------------------------------------- /Release.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Release.zip -------------------------------------------------------------------------------- /DATA/Assets_Weapons/Weapon_1_TexturesData.conf: -------------------------------------------------------------------------------- 1 | ./GFX/PlayerAssets/Weapons/HBRa3/HBRa3.png -------------------------------------------------------------------------------- /GFX/HUD/Mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/HUD/Mouse.png -------------------------------------------------------------------------------- /DATA/Assets_Weapons/Weapon_0_TexturesData.conf: -------------------------------------------------------------------------------- 1 | ./GFX/PlayerAssets/Weapons/ARX160/ARX160.png -------------------------------------------------------------------------------- /DATA/Levels/2/LevelData/TexturesData.conf: -------------------------------------------------------------------------------- 1 | LavaWall1.png 2 | StoneFloor1.png 3 | Crate1.png -------------------------------------------------------------------------------- /GFX/SkyBox/Sky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/SkyBox/Sky.png -------------------------------------------------------------------------------- /Tools/7Zip/7za.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Tools/7Zip/7za.dll -------------------------------------------------------------------------------- /Tools/7Zip/7za.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Tools/7Zip/7za.exe -------------------------------------------------------------------------------- /Tools/7Zip/7zxa.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Tools/7Zip/7zxa.dll -------------------------------------------------------------------------------- /Documentation/Assets/Fonts.txt: -------------------------------------------------------------------------------- 1 | Used fonts are taken from 2 | 3 | https://fonts.google.com/ 4 | -------------------------------------------------------------------------------- /Documentation/Assets/Soldier Info.txt: -------------------------------------------------------------------------------- 1 | The soldier was created by ID software for the original DooM. -------------------------------------------------------------------------------- /Documentation/NARC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Documentation/NARC.png -------------------------------------------------------------------------------- /GFX/HUD/Crosshair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/HUD/Crosshair.png -------------------------------------------------------------------------------- /GFX/HUD/WeaponHUD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/HUD/WeaponHUD.png -------------------------------------------------------------------------------- /Documentation/NARC1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Documentation/NARC1.png -------------------------------------------------------------------------------- /SFX/PlayerSounds/Hurt.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/PlayerSounds/Hurt.mp3 -------------------------------------------------------------------------------- /DATA/Assets_Weapons/Weapon_0_MuzzleFlashTexturesData.conf: -------------------------------------------------------------------------------- 1 | ./GFX/PlayerAssets/Weapons/ARX160/MuzzleFlash.png -------------------------------------------------------------------------------- /DATA/Assets_Weapons/Weapon_1_MuzzleFlashTexturesData.conf: -------------------------------------------------------------------------------- 1 | ./GFX/PlayerAssets/Weapons/HBRa3/MuzzleFlash.png -------------------------------------------------------------------------------- /GFX/Effects/Bloodstains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Effects/Bloodstains.png -------------------------------------------------------------------------------- /GFX/HUD/XBoxController.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/HUD/XBoxController.png -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_lines.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Sources/lwmf/lwmf_lines.hpp -------------------------------------------------------------------------------- /_CountLOC.ps1: -------------------------------------------------------------------------------- 1 | (gci -include *.cpp,*.hpp,*.vertexshader,*.fragmentshader -recurse | select-string .).Count -------------------------------------------------------------------------------- /_PackRelease.cmd: -------------------------------------------------------------------------------- 1 | del Release.zip 2 | Tools\7Zip\7za a -tzip Release.zip @_PackReleaseFileList.txt 3 | pause -------------------------------------------------------------------------------- /DATA/Levels/1/LevelData/SkyboxConfig.ini: -------------------------------------------------------------------------------- 1 | [SKYBOX] 2 | SkyBoxEnabled=true 3 | SkyBoxImageName=./GFX/SkyBox/Sky.png -------------------------------------------------------------------------------- /DATA/Levels/2/LevelData/SkyboxConfig.ini: -------------------------------------------------------------------------------- 1 | [SKYBOX] 2 | SkyBoxEnabled=true 3 | SkyBoxImageName=./GFX/SkyBox/Sky.png -------------------------------------------------------------------------------- /DATA/Levels/3/LevelData/SkyboxConfig.ini: -------------------------------------------------------------------------------- 1 | [SKYBOX] 2 | SkyBoxEnabled=false 3 | SkyBoxImageName=./GFX/SkyBox/Sky.png -------------------------------------------------------------------------------- /Documentation/Assets/Demon Info.txt: -------------------------------------------------------------------------------- 1 | The demon was created by Adrian Carmack of ID software for the original DooM. -------------------------------------------------------------------------------- /Documentation/Assets/Demon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Documentation/Assets/Demon.gif -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/0/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/0/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/0/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/0/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/0/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/1/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/1/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/1/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/1/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/1/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/1/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/1/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/2/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/2/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/2/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/2/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/2/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/2/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/2/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/2/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/3/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/3/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/3/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/3/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/3/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/3/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/3/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/3/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/4/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/4/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/4/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/4/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/4/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/4/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/4/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/4/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/5/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/5/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/5/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/5/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/5/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/5/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/5/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/5/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/6/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/6/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/6/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/6/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/6/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/6/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/6/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/6/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/7/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/7/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/7/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/7/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/7/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/7/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/7/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/7/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Turret/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Turret/0/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Turret/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Turret/1/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Turret/2/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Turret/2/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Turret/3/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Turret/3/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Turret/4/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Turret/4/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Turret/5/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Turret/5/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Turret/6/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Turret/6/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Turret/7/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Turret/7/0.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Door1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Door1.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Vent1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Vent1.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Vent2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Vent2.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Wall1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Wall1.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Wall2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Wall2.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Wall3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Wall3.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Wall4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Wall4.png -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_general.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Sources/lwmf/lwmf_general.hpp -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_polygons.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Sources/lwmf/lwmf_polygons.hpp -------------------------------------------------------------------------------- /Documentation/Assets/Soldier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Documentation/Assets/Soldier.png -------------------------------------------------------------------------------- /GFX/Entities/64/AmmoBox/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/AmmoBox/0/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/AmmoBox/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/AmmoBox/1/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/AmmoBox/2/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/AmmoBox/2/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/AmmoBox/3/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/AmmoBox/3/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/AmmoBox/4/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/AmmoBox/4/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/AmmoBox/5/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/AmmoBox/5/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/AmmoBox/6/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/AmmoBox/6/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/AmmoBox/7/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/AmmoBox/7/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/Kill/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/Kill/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/Kill/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/Kill/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/Kill/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/Kill/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/Kill/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/Kill/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/Kill/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/Kill/4.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/0/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/0/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/0/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/0/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/0/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/1/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/1/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/1/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/1/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/1/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/1/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/1/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/2/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/2/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/2/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/2/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/2/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/2/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/2/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/2/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/3/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/3/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/3/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/3/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/3/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/3/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/3/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/3/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/4/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/4/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/4/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/4/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/4/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/4/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/4/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/4/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/5/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/5/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/5/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/5/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/5/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/5/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/5/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/5/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/6/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/6/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/6/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/6/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/6/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/6/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/6/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/6/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/7/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/7/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/7/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/7/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/7/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/7/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/7/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/7/3.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Crate1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Crate1.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Floor1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Floor1.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Floor2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Floor2.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Pipes1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Pipes1.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Pipes2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Pipes2.png -------------------------------------------------------------------------------- /SFX/BackgroundMusic/AtmoLoop.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/BackgroundMusic/AtmoLoop.mp3 -------------------------------------------------------------------------------- /SFX/DoorSounds/Sliding_Door.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/DoorSounds/Sliding_Door.mp3 -------------------------------------------------------------------------------- /SFX/PlayerSounds/DeathScream.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/PlayerSounds/DeathScream.mp3 -------------------------------------------------------------------------------- /Documentation/Assets/AmmoBox.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Documentation/Assets/AmmoBox.blend -------------------------------------------------------------------------------- /Documentation/Assets/Turret.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Documentation/Assets/Turret.blend -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/Attack/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/Attack/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/Attack/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/Attack/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Demon/Attack/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Demon/Attack/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/Kill/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/Kill/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/Kill/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/Kill/1.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/Kill/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/Kill/2.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/Kill/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/Kill/3.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/Kill/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/Kill/4.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/Kill/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/Kill/5.png -------------------------------------------------------------------------------- /GFX/Entities/64/Turret/Kill/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Turret/Kill/0.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Ceiling1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Ceiling1.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Console1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Console1.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/Console2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/Console2.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/LavaWall1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/LavaWall1.png -------------------------------------------------------------------------------- /SFX/WeaponSounds/ARX160/DryFire.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/WeaponSounds/ARX160/DryFire.mp3 -------------------------------------------------------------------------------- /SFX/WeaponSounds/ARX160/Reload.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/WeaponSounds/ARX160/Reload.mp3 -------------------------------------------------------------------------------- /SFX/WeaponSounds/HBRa3/DryFire.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/WeaponSounds/HBRa3/DryFire.mp3 -------------------------------------------------------------------------------- /SFX/WeaponSounds/HBRa3/Reload.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/WeaponSounds/HBRa3/Reload.mp3 -------------------------------------------------------------------------------- /DATA/GameConfig/MenuDefinition.txt: -------------------------------------------------------------------------------- 1 | 0,Options,0,0 2 | 1,Exit Game,0,0 3 | 2,Input,0,1 4 | 3,Toogle Mouse / GameController,2,2 -------------------------------------------------------------------------------- /Fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/Attack/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/Attack/0.png -------------------------------------------------------------------------------- /GFX/Entities/64/Soldier/Attack/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/Entities/64/Soldier/Attack/1.png -------------------------------------------------------------------------------- /GFX/LevelTextures/64/StoneFloor1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/LevelTextures/64/StoneFloor1.png -------------------------------------------------------------------------------- /SFX/PlayerSounds/PlayerFootSteps.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/PlayerSounds/PlayerFootSteps.mp3 -------------------------------------------------------------------------------- /SFX/WeaponSounds/HBRa3/SingleShot.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/WeaponSounds/HBRa3/SingleShot.mp3 -------------------------------------------------------------------------------- /GFX/PlayerAssets/Weapons/HBRa3/HBRa3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/PlayerAssets/Weapons/HBRa3/HBRa3.png -------------------------------------------------------------------------------- /SFX/EntitySounds/Demon/Demon_Grunt.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/EntitySounds/Demon/Demon_Grunt.mp3 -------------------------------------------------------------------------------- /SFX/EntitySounds/Turret/Turret_Shot.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/EntitySounds/Turret/Turret_Shot.mp3 -------------------------------------------------------------------------------- /SFX/WeaponSounds/ARX160/SingleShot.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/WeaponSounds/ARX160/SingleShot.mp3 -------------------------------------------------------------------------------- /DATA/GameConfig/WindowConfig.ini: -------------------------------------------------------------------------------- 1 | [WINDOW] 2 | WindowName=NARC_RaycastingGameEngine 3 | ViewportWidth=640 4 | ViewportHeight=480 5 | -------------------------------------------------------------------------------- /GFX/PlayerAssets/Weapons/ARX160/ARX160.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/PlayerAssets/Weapons/ARX160/ARX160.png -------------------------------------------------------------------------------- /SFX/EntitySounds/Soldier/Soldier_Shot.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/EntitySounds/Soldier/Soldier_Shot.mp3 -------------------------------------------------------------------------------- /_PackReleaseFileList.txt: -------------------------------------------------------------------------------- 1 | x64\Release\DATA\* 2 | x64\Release\Fonts\* 3 | x64\Release\GFX\* 4 | x64\Release\SFX\* 5 | x64\Release\NARC.exe -------------------------------------------------------------------------------- /Documentation/Engine/ImageFormat.txt: -------------------------------------------------------------------------------- 1 | Accepted image formats: 2 | 3 | PNG, 32bit 4 | BMP, 24bit 5 | 6 | Alpha is needed when using PNG -------------------------------------------------------------------------------- /SFX/EntitySounds/AmmoBox/AmmoBox_Pickup.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/EntitySounds/AmmoBox/AmmoBox_Pickup.mp3 -------------------------------------------------------------------------------- /SFX/EntitySounds/Demon/Demon_DeathScream.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/EntitySounds/Demon/Demon_DeathScream.mp3 -------------------------------------------------------------------------------- /SFX/EntitySounds/Turret/Turret_Explosion.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/EntitySounds/Turret/Turret_Explosion.mp3 -------------------------------------------------------------------------------- /GFX/PlayerAssets/Weapons/ARX160/MuzzleFlash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/PlayerAssets/Weapons/ARX160/MuzzleFlash.png -------------------------------------------------------------------------------- /GFX/PlayerAssets/Weapons/HBRa3/MuzzleFlash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/GFX/PlayerAssets/Weapons/HBRa3/MuzzleFlash.png -------------------------------------------------------------------------------- /Documentation/Engine/Entity Types and Movement.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/Documentation/Engine/Entity Types and Movement.txt -------------------------------------------------------------------------------- /SFX/EntitySounds/Soldier/Soldier_DeathScream.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StefanKubsch/NARC/HEAD/SFX/EntitySounds/Soldier/Soldier_DeathScream.mp3 -------------------------------------------------------------------------------- /DATA/Levels/1/LevelData/Config.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | Lighting=true 3 | 4 | [AUDIO] 5 | BackgroundMusicEnabled=true 6 | BackgroundMusic=./SFX/BackgroundMusic/AtmoLoop.mp3 -------------------------------------------------------------------------------- /DATA/Levels/2/LevelData/Config.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | Lighting=false 3 | 4 | [AUDIO] 5 | BackgroundMusicEnabled=true 6 | BackgroundMusic=./SFX/BackgroundMusic/AtmoLoop.mp3 -------------------------------------------------------------------------------- /DATA/Levels/3/LevelData/Config.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | Lighting=true 3 | 4 | [AUDIO] 5 | BackgroundMusicEnabled=false 6 | BackgroundMusic=./SFX/BackgroundMusic/AtmoLoop.mp3 -------------------------------------------------------------------------------- /Documentation/Engine/AudioFormat.txt: -------------------------------------------------------------------------------- 1 | Supported audio formats: 2 | 3 | SFX & Music 4 | MPEG1 MP3 (Samplerate, Bitrate and Number of Channels will be detected) 5 | -------------------------------------------------------------------------------- /Documentation/Assets/Turret Info.txt: -------------------------------------------------------------------------------- 1 | Blender Turret model downloaded here: 2 | 3 | A-1 Turret 4 | by hjmediastudios 5 | 6 | https://www.blendswap.com/blends/view/4434 -------------------------------------------------------------------------------- /DATA/GameConfig/EffectsConfig.ini: -------------------------------------------------------------------------------- 1 | [EFFECTS] 2 | ; BloodstainDuration is given in frames 3 | BloodstainDuration=15 4 | 5 | [TEXTURES] 6 | Bloodstains=./GFX/Effects/Bloodstains.png -------------------------------------------------------------------------------- /Documentation/Assets/AmmoBox Info.txt: -------------------------------------------------------------------------------- 1 | Blender AmmoBox model downloaded here: 2 | 3 | Author: 4 | Clint Bellanger 5 | 6 | https://opengameart.org/content/sci-fi-crate 7 | -------------------------------------------------------------------------------- /DATA/Assets_Entities/AmmoBox/AssetData.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | AssetType=AmmoBox 3 | EntityAssetName=AmmoBox 4 | 5 | [AUDIO] 6 | AmmoPickup=./SFX/EntitySounds/AmmoBox/AmmoBox_Pickup.mp3 -------------------------------------------------------------------------------- /Documentation/Used Raycasting Tutorials/Lodev.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,11 3 | [InternetShortcut] 4 | IDList= 5 | URL=https://lodev.org/cgtutor/ 6 | -------------------------------------------------------------------------------- /NARC.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /DATA/Assets_Entities/Demon/AssetData.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | AssetType=Enemy 3 | EntityAssetName=Demon 4 | 5 | [AUDIO] 6 | KillSound=./SFX/EntitySounds/Demon/Demon_DeathScream.mp3 7 | AttackSound=./SFX/EntitySounds/Demon/Demon_Grunt.mp3 -------------------------------------------------------------------------------- /DATA/Assets_Entities/Turret/AssetData.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | AssetType=Turret 3 | EntityAssetName=Turret 4 | 5 | [AUDIO] 6 | KillSound=./SFX/EntitySounds/Turret/Turret_Explosion.mp3 7 | AttackSound=./SFX/EntitySounds/Turret/Turret_Shot.mp3 -------------------------------------------------------------------------------- /DATA/Assets_Entities/Soldier/AssetData.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | AssetType=Enemy 3 | EntityAssetName=Soldier 4 | 5 | [AUDIO] 6 | KillSound=./SFX/EntitySounds/Soldier/Soldier_DeathScream.mp3 7 | AttackSound=./SFX/EntitySounds/Soldier/Soldier_Shot.mp3 -------------------------------------------------------------------------------- /DATA/Levels/1/LevelData/StaticLightsData.conf: -------------------------------------------------------------------------------- 1 | 8.5 1.5 1 0.7 0.6 2 | 8.5 6.5 0 0.5 0.5 3 | 10.5 6.5 0 0.5 0.5 4 | 8.5 8.5 0 0.5 0.5 5 | 10.5 8.5 0 0.5 0.5 6 | 8.5 6.5 2 0.1 7.0 7 | 10.5 6.5 2 0.1 7.0 8 | 8.5 8.5 2 0.1 7.0 9 | 10.5 8.5 2 0.1 7.0 -------------------------------------------------------------------------------- /Documentation/Used Raycasting Tutorials/Permadi Raycasting Tutorial.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,11 3 | [InternetShortcut] 4 | IDList= 5 | URL=https://permadi.com/1996/05/ray-casting-tutorial-table-of-contents/ 6 | -------------------------------------------------------------------------------- /DATA/Levels/3/LevelData/MapDoorData.conf: -------------------------------------------------------------------------------- 1 | 0, 0, 0, 0, 0, 0, 0, 0 2 | 0, 0, 0, 0, 0, 0, 0, 0 3 | 0, 0, 0, 0, 0, 0, 0, 0 4 | 0, 0, 0, 0, 0, 0, 0, 0 5 | 0, 0, 0, 0, 0, 0, 0, 0 6 | 0, 0, 0, 0, 0, 0, 0, 0 7 | 0, 0, 0, 0, 0, 0, 0, 0 8 | 0, 0, 0, 0, 0, 0, 0, 0 -------------------------------------------------------------------------------- /DATA/Levels/3/LevelData/MapFloorData.conf: -------------------------------------------------------------------------------- 1 | 1, 1, 1, 1, 1, 1, 1, 1 2 | 1, 1, 1, 1, 1, 1, 1, 1 3 | 1, 1, 1, 1, 1, 1, 1, 1 4 | 1, 1, 1, 1, 1, 1, 1, 1 5 | 1, 1, 1, 1, 1, 1, 1, 1 6 | 1, 1, 1, 1, 1, 1, 1, 1 7 | 1, 1, 1, 1, 1, 1, 1, 1 8 | 1, 1, 1, 1, 1, 1, 1, 1 -------------------------------------------------------------------------------- /DATA/Levels/3/LevelData/MapWallData.conf: -------------------------------------------------------------------------------- 1 | 1, 1, 1, 1, 1, 1, 1, 1 2 | 1, 0, 0, 0, 0, 0, 0, 1 3 | 1, 0, 0, 0, 0, 0, 0, 1 4 | 1, 0, 0, 0, 0, 0, 0, 1 5 | 1, 0, 0, 0, 0, 0, 0, 1 6 | 1, 0, 0, 0, 0, 0, 0, 1 7 | 1, 0, 0, 0, 0, 0, 0, 1 8 | 1, 1, 1, 1, 1, 1, 1, 1 -------------------------------------------------------------------------------- /DATA/Levels/3/LevelData/MapCeilingData.conf: -------------------------------------------------------------------------------- 1 | 1, 1, 1, 1, 1, 1, 1, 1 2 | 1, 1, 1, 1, 1, 1, 1, 1 3 | 1, 1, 1, 1, 1, 1, 1, 1 4 | 1, 1, 1, 1, 1, 1, 1, 1 5 | 1, 1, 1, 1, 1, 1, 1, 1 6 | 1, 1, 1, 1, 1, 1, 1, 1 7 | 1, 1, 1, 1, 1, 1, 1, 1 8 | 1, 1, 1, 1, 1, 1, 1, 1 -------------------------------------------------------------------------------- /DATA/Levels/1/LevelData/TexturesData.conf: -------------------------------------------------------------------------------- 1 | Wall1.png 2 | Wall2.png 3 | Wall3.png 4 | Wall4.png 5 | Floor1.png 6 | Floor2.png 7 | Ceiling1.png 8 | Crate1.png 9 | Console1.png 10 | Console2.png 11 | Pipes1.png 12 | Pipes2.png 13 | Vent1.png 14 | Vent2.png 15 | Door1.png -------------------------------------------------------------------------------- /DATA/GameConfig/GameConfig.ini: -------------------------------------------------------------------------------- 1 | [TEXTURES] 2 | ; TextureSize needs to be 64, 128, 256, 512, 1024, 2048, 4096, 8192 3 | TextureSize=64 4 | ; EntitySize needs to be 64, 128, 256, 512, 1024, 2048, 4096, 8192 5 | EntitySize=64 6 | 7 | [GENERAL] 8 | ; Framelock defines at how many fps the "physics" of the game will run 9 | FrameLock=60 10 | 11 | -------------------------------------------------------------------------------- /DATA/Assets_Doors/Door_1_Data.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | ; OpenCloseSpeed is given in pixels per frame 3 | OpenCloseSpeed=4 4 | ; StayOpentime is given in seconds 5 | StayOpenTime=3 6 | MaximumOpenPercent=100.0 7 | MinimumOpenPercent=0.0 8 | 9 | [TEXTURE] 10 | DoorTexture=./GFX/LevelTextures/64/Door1.png 11 | 12 | [AUDIO] 13 | OpenCloseSound=./SFX/DoorSounds/Sliding_Door.mp3 -------------------------------------------------------------------------------- /DATA/GameConfig/RaycasterConfig.ini: -------------------------------------------------------------------------------- 1 | [RAYCASTER] 2 | PlaneXStartValue=0.0 3 | PlaneYStartValue=0.66 4 | ; VerticalLookUpLimit will be clamped between 0.0 and 0.4 if out of bounds! 5 | VerticalLookUpLimit=0.4 6 | ; VerticalLookDownLimit will be clamped between 0.0 and 0.4 if out of bounds! 7 | VerticalLookDownLimit=0.4 8 | VerticalLookStep=0.02 9 | FogOfWarDistance=2.5 10 | 11 | -------------------------------------------------------------------------------- /DATA/Levels/1/PlayerData/Config.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | MoveSpeed=0.05 3 | Hitpoints=100 4 | CollisionDetectionWallDist=0.25 5 | 6 | [POSITION] 7 | PosX=14.5 8 | PosY=1.5 9 | DirX=-1.0 10 | DirY=0.0 11 | 12 | [WEAPON] 13 | SelectedWeapon=0 14 | 15 | [AUDIO] 16 | FootStepsAudio=./SFX/PlayerSounds/PlayerFootSteps.mp3 17 | HurtAudio=./SFX/PlayerSounds/Hurt.mp3 18 | DeathScreamAudio=./SFX/PlayerSounds/DeathScream.mp3 -------------------------------------------------------------------------------- /DATA/Levels/2/PlayerData/Config.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | MoveSpeed=0.05 3 | Hitpoints=100 4 | CollisionDetectionWallDist=0.25 5 | 6 | [POSITION] 7 | PosX=14.5 8 | PosY=1.5 9 | DirX=-1.0 10 | DirY=0.0 11 | 12 | [WEAPON] 13 | SelectedWeapon=0 14 | 15 | [AUDIO] 16 | FootStepsAudio=./SFX/PlayerSounds/PlayerFootSteps.mp3 17 | HurtAudio=./SFX/PlayerSounds/Hurt.mp3 18 | DeathScreamAudio=./SFX/PlayerSounds/DeathScream.mp3 -------------------------------------------------------------------------------- /DATA/Levels/3/PlayerData/Config.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | MoveSpeed=0.05 3 | Hitpoints=100 4 | CollisionDetectionWallDist=0.25 5 | 6 | [POSITION] 7 | PosX=5.5 8 | PosY=3.5 9 | DirX=-1.0 10 | DirY=0.0 11 | 12 | [WEAPON] 13 | SelectedWeapon=0 14 | 15 | [AUDIO] 16 | FootStepsAudio=./SFX/PlayerSounds/PlayerFootSteps.mp3 17 | HurtAudio=./SFX/PlayerSounds/Hurt.mp3 18 | DeathScreamAudio=./SFX/PlayerSounds/DeathScream.mp3 -------------------------------------------------------------------------------- /DATA/GameConfig/MenuConfig.ini: -------------------------------------------------------------------------------- 1 | [MENU] 2 | MenuPosX=100 3 | MenuPosY=200 4 | 5 | [MENUFONT] 6 | FontName=./Fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf 7 | FontSize=30.0 8 | ColorRED=255 9 | ColorGREEN=255 10 | ColorBLUE=255 11 | OffsetX=0 12 | OffsetY=0 13 | 14 | [MENUFONTHIGHLIGHT] 15 | FontName=./Fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf 16 | FontSize=30.0 17 | ColorRED=255 18 | ColorGREEN=255 19 | ColorBLUE=0 20 | OffsetX=0 21 | OffsetY=0 -------------------------------------------------------------------------------- /DATA/GameConfig/HUDHealthBarConfig.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | PosX=490 3 | PosY=40 4 | HealthBarWidth=15 5 | HealthBarLength=100 6 | 7 | [GREEN] 8 | Red=0 9 | Green=255 10 | Blue=0 11 | Alpha=255 12 | 13 | [RED] 14 | Red=255 15 | Green=0 16 | Blue=0 17 | Alpha=255 18 | 19 | [ORANGE] 20 | Red=255 21 | Green=165 22 | Blue=0 23 | Alpha=255 24 | 25 | [BLACK] 26 | Red=0 27 | Green=0 28 | Blue=0 29 | Alpha=255 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /DATA/Levels/1/LevelData/_README - Description of ConfigFiles.txt: -------------------------------------------------------------------------------- 1 | TexturesData.conf 2 | 3 | Contains the filenames of the used textures. 4 | Need to be in the right order as used in "Map*Data". 5 | 6 | Format: 7 | 8 | One filename each line 9 | 10 | Example: 11 | Wall1.png 12 | Wall2.png 13 | Wall3.png 14 | Wall4.png 15 | Floor1.png 16 | Ceiling1.png 17 | Crate1.png 18 | Console1.png 19 | Console2.png 20 | Pipes1.png 21 | Pipes2.png 22 | Vent1.png 23 | Vent2.png 24 | 25 | -------------------------------------------------------------------------------- /DATA/Levels/2/LevelData/_README - Description of ConfigFiles.txt: -------------------------------------------------------------------------------- 1 | TexturesData.conf 2 | 3 | Contains the filenames of the used textures. 4 | Need to be in the right order as used in "Map*Data". 5 | 6 | Format: 7 | 8 | One filename each line 9 | 10 | Example: 11 | Wall1.png 12 | Wall2.png 13 | Wall3.png 14 | Wall4.png 15 | Floor1.png 16 | Ceiling1.png 17 | Crate1.png 18 | Console1.png 19 | Console2.png 20 | Pipes1.png 21 | Pipes2.png 22 | Vent1.png 23 | Vent2.png 24 | 25 | -------------------------------------------------------------------------------- /DATA/Levels/3/LevelData/_README - Description of ConfigFiles.txt: -------------------------------------------------------------------------------- 1 | TexturesData.conf 2 | 3 | Contains the filenames of the used textures. 4 | Need to be in the right order as used in "Map*Data". 5 | 6 | Format: 7 | 8 | One filename each line 9 | 10 | Example: 11 | Wall1.png 12 | Wall2.png 13 | Wall3.png 14 | Wall4.png 15 | Floor1.png 16 | Ceiling1.png 17 | Crate1.png 18 | Console1.png 19 | Console2.png 20 | Pipes1.png 21 | Pipes2.png 22 | Vent1.png 23 | Vent2.png 24 | 25 | -------------------------------------------------------------------------------- /DATA/Assets_Weapons/Weapon_1_Data.ini: -------------------------------------------------------------------------------- 1 | [DATA] 2 | Name=HBRa3 3 | Weight=4.2 4 | PaceFactor=0.04 5 | Capacity=35 6 | Damage=10 7 | WeaponType=DirectHit 8 | CarriedAmmo=0 9 | Cadence=500 10 | 11 | [POSITION] 12 | PosX=320 13 | PosY=355 14 | FadeInOutSpeed=10 15 | 16 | [MUZZLEFLASH] 17 | MuzzleFlashDuration=5 18 | MuzzleFlashPosX=73 19 | MuzzleFlashPosY=0 20 | 21 | [AUDIO] 22 | SingleShotAudio=./SFX/WeaponSounds/HBRa3/SingleShot.mp3 23 | DryFireAudio=./SFX/WeaponSounds/HBRa3/DryFire.mp3 24 | ReloadAudio=./SFX/WeaponSounds/HBRa3/Reload.mp3 -------------------------------------------------------------------------------- /DATA/Assets_Weapons/Weapon_0_Data.ini: -------------------------------------------------------------------------------- 1 | [DATA] 2 | Name=ARX160 3 | Weight=3.1 4 | PaceFactor=0.05 5 | Capacity=30 6 | Damage=15 7 | WeaponType=DirectHit 8 | CarriedAmmo=0 9 | Cadence=700 10 | 11 | [POSITION] 12 | PosX=320 13 | PosY=350 14 | FadeInOutSpeed=10 15 | 16 | [MUZZLEFLASH] 17 | MuzzleFlashDuration=5 18 | MuzzleFlashPosX=65 19 | MuzzleFlashPosY=3 20 | 21 | [AUDIO] 22 | SingleShotAudio=./SFX/WeaponSounds/ARX160/SingleShot.mp3 23 | DryFireAudio=./SFX/WeaponSounds/ARX160/DryFire.mp3 24 | ReloadAudio=./SFX/WeaponSounds/ARX160/Reload.mp3 -------------------------------------------------------------------------------- /DATA/Levels/1/EntityData/0.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Demon 3 | EntityType=Enemy 4 | WalkAnimStepWidth=12 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.01 11 | MovementBehaviour=2 12 | AttackMode=1 13 | 14 | [POSITION] 15 | StartPosX=12.5 16 | StartPosY=4.5 17 | 18 | [DIRECTION] 19 | Direction=N 20 | 21 | [STATUS] 22 | Hitpoints=100 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=10 27 | DamageHitrate=1 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/1/EntityData/1.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Demon 3 | EntityType=Neutral 4 | WalkAnimStepWidth=12 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.02 11 | MovementBehaviour=2 12 | AttackMode=0 13 | 14 | [POSITION] 15 | StartPosX=1.5 16 | StartPosY=9.5 17 | 18 | [DIRECTION] 19 | Direction=W 20 | 21 | [STATUS] 22 | Hitpoints=100 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=10 27 | DamageHitrate=1 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/1/EntityData/2.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Demon 3 | EntityType=Enemy 4 | WalkAnimStepWidth=12 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.02 11 | MovementBehaviour=2 12 | AttackMode=0 13 | 14 | [POSITION] 15 | StartPosX=13.5 16 | StartPosY=9.5 17 | 18 | [DIRECTION] 19 | Direction=N 20 | 21 | [STATUS] 22 | Hitpoints=100 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=10 27 | DamageHitrate=1 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/1/EntityData/3.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=AmmoBox 3 | EntityType=AmmoBox 4 | WalkAnimStepWidth=0 5 | AttackAnimStepWidth=0 6 | KillAnimStepWidth=0 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.0 11 | MovementBehaviour=0 12 | AttackMode=0 13 | 14 | [POSITION] 15 | StartPosX=12.5 16 | StartPosY=7.5 17 | 18 | [DIRECTION] 19 | Direction=W 20 | 21 | [STATUS] 22 | Hitpoints=0 23 | HitAnimDuration=0 24 | 25 | [DAMAGE] 26 | DamagePoints=0 27 | DamageHitrate=0 28 | 29 | [CONTAINS] 30 | ContainedItem=ARX160 31 | ContainedItemValue=15 -------------------------------------------------------------------------------- /DATA/Levels/1/EntityData/4.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Soldier 3 | EntityType=Enemy 4 | WalkAnimStepWidth=8 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.01 11 | MovementBehaviour=2 12 | AttackMode=1 13 | 14 | [POSITION] 15 | StartPosX=5.5 16 | StartPosY=2.5 17 | 18 | [DIRECTION] 19 | Direction=N 20 | 21 | [STATUS] 22 | Hitpoints=50 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=20 27 | DamageHitrate=2 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/2/EntityData/0.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Demon 3 | EntityType=Enemy 4 | WalkAnimStepWidth=12 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.01 11 | MovementBehaviour=2 12 | AttackMode=0 13 | 14 | [POSITION] 15 | StartPosX=12.5 16 | StartPosY=4.5 17 | 18 | [DIRECTION] 19 | Direction=N 20 | 21 | [STATUS] 22 | Hitpoints=100 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=10 27 | DamageHitrate=1 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/2/EntityData/1.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Demon 3 | EntityType=Neutral 4 | WalkAnimStepWidth=12 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.02 11 | MovementBehaviour=2 12 | AttackMode=0 13 | 14 | [POSITION] 15 | StartPosX=1.5 16 | StartPosY=9.5 17 | 18 | [DIRECTION] 19 | Direction=W 20 | 21 | [STATUS] 22 | Hitpoints=100 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=10 27 | DamageHitrate=1 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/2/EntityData/2.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Demon 3 | EntityType=Enemy 4 | WalkAnimStepWidth=12 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.02 11 | MovementBehaviour=2 12 | AttackMode=1 13 | 14 | [POSITION] 15 | StartPosX=13.5 16 | StartPosY=9.5 17 | 18 | [DIRECTION] 19 | Direction=N 20 | 21 | [STATUS] 22 | Hitpoints=100 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=10 27 | DamageHitrate=1 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/2/EntityData/4.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Turret 3 | EntityType=Turret 4 | WalkAnimStepWidth=6 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=16.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.01 11 | MovementBehaviour=1 12 | AttackMode=1 13 | 14 | [POSITION] 15 | StartPosX=9.5 16 | StartPosY=5.5 17 | 18 | [DIRECTION] 19 | Direction=E 20 | 21 | [STATUS] 22 | Hitpoints=500 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=25 27 | DamageHitrate=2 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/2/EntityData/5.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Soldier 3 | EntityType=Enemy 4 | WalkAnimStepWidth=8 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.01 11 | MovementBehaviour=2 12 | AttackMode=1 13 | 14 | [POSITION] 15 | StartPosX=20.5 16 | StartPosY=20.5 17 | 18 | [DIRECTION] 19 | Direction=N 20 | 21 | [STATUS] 22 | Hitpoints=50 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=20 27 | DamageHitrate=2 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/2/EntityData/6.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Soldier 3 | EntityType=Enemy 4 | WalkAnimStepWidth=8 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.01 11 | MovementBehaviour=2 12 | AttackMode=1 13 | 14 | [POSITION] 15 | StartPosX=20.5 16 | StartPosY=30.5 17 | 18 | [DIRECTION] 19 | Direction=N 20 | 21 | [STATUS] 22 | Hitpoints=50 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=20 27 | DamageHitrate=2 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/2/EntityData/7.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=Soldier 3 | EntityType=Enemy 4 | WalkAnimStepWidth=8 5 | AttackAnimStepWidth=6 6 | KillAnimStepWidth=6 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.01 11 | MovementBehaviour=2 12 | AttackMode=1 13 | 14 | [POSITION] 15 | StartPosX=15.5 16 | StartPosY=15.5 17 | 18 | [DIRECTION] 19 | Direction=N 20 | 21 | [STATUS] 22 | Hitpoints=50 23 | HitAnimDuration=3 24 | 25 | [DAMAGE] 26 | DamagePoints=20 27 | DamageHitrate=2 28 | 29 | [CONTAINS] 30 | ContainedItem=Dummy 31 | ContainedItemValue=0 -------------------------------------------------------------------------------- /DATA/Levels/2/EntityData/3.ini: -------------------------------------------------------------------------------- 1 | [ENTITY] 2 | EntityTypeName=AmmoBox 3 | EntityType=AmmoBox 4 | WalkAnimStepWidth=0 5 | AttackAnimStepWidth=0 6 | KillAnimStepWidth=0 7 | EntityMoveV=64.0 8 | 9 | [MOVEMENT] 10 | MoveSpeed=0.0 11 | MovementBehaviour=0 12 | AttackMode=0 13 | 14 | [POSITION] 15 | StartPosX=12.5 16 | StartPosY=7.5 17 | 18 | [DIRECTION] 19 | Direction=W 20 | 21 | [STATUS] 22 | Hitpoints=0 23 | HitAnimDuration=0 24 | 25 | [DAMAGE] 26 | DamagePoints=0 27 | DamageHitrate=0 28 | 29 | 30 | [CONTAINS] 31 | ContainedItem=ARX160 32 | ContainedItemValue=15 -------------------------------------------------------------------------------- /DATA/GameConfig/TransitionsConfig.ini: -------------------------------------------------------------------------------- 1 | [GENERALFONT] 2 | FontName=./Fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf 3 | FontSize=35.0 4 | ColorRED=255 5 | ColorGREEN=255 6 | ColorBLUE=255 7 | OffsetX=0 8 | OffsetY=0 9 | 10 | [GAMEOVERFONT] 11 | FontName=./Fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf 12 | FontSize=40.0 13 | ColorRED=255 14 | ColorGREEN=255 15 | ColorBLUE=255 16 | OffsetX=0 17 | OffsetY=0 18 | 19 | [GAMEOVERFONT1] 20 | FontName=./Fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf 21 | FontSize=30.0 22 | ColorRED=255 23 | ColorGREEN=255 24 | ColorBLUE=255 25 | OffsetX=0 26 | OffsetY=0 27 | -------------------------------------------------------------------------------- /_PrepareX64Folders.cmd: -------------------------------------------------------------------------------- 1 | RD .\x64\Debug\DATA /S /Q 2 | RD .\x64\Debug\Fonts /S /Q 3 | RD .\x64\Debug\GFX /S /Q 4 | RD .\x64\Debug\SFX /S /Q 5 | 6 | RD .\x64\Release\DATA /S /Q 7 | RD .\x64\Release\Fonts /S /Q 8 | RD .\x64\Release\GFX /S /Q 9 | RD .\x64\Release\SFX /S /Q 10 | 11 | xcopy .\DATA .\x64\Debug\DATA\ /S 12 | xcopy .\Fonts .\x64\Debug\Fonts\ /S 13 | xcopy .\GFX .\x64\Debug\GFX\ /S 14 | xcopy .\SFX .\x64\Debug\SFX\ /S 15 | 16 | xcopy .\DATA .\x64\Release\DATA\ /S 17 | xcopy .\Fonts .\x64\Release\Fonts\ /S 18 | xcopy .\GFX .\x64\Release\GFX\ /S 19 | xcopy .\SFX .\x64\Release\SFX\ /S 20 | 21 | pause -------------------------------------------------------------------------------- /DATA/Levels/1/LevelData/MapDoorData.conf: -------------------------------------------------------------------------------- 1 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 2 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 3 | 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 4 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 5 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 6 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 7 | 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 8 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 9 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 10 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 11 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 12 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 13 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 14 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 15 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 16 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -------------------------------------------------------------------------------- /DATA/Levels/1/LevelData/MapWallData.conf: -------------------------------------------------------------------------------- 1 | 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1 2 | 2, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2 3 | 1, 0, 0,12, 0, 0, 0, 0, 0, 0, 1 4 | 2, 0, 0, 0, 0, 0, 8, 0, 0, 0, 2 5 | 1, 0,11, 0, 0, 0, 8, 0, 0, 0, 1 6 | 2, 0, 0, 0, 0, 0, 8, 0, 0, 0,10 7 | 1, 3, 3, 3, 0, 8, 8, 0, 0, 0, 1 8 | 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 9 | 1, 9,13,13,13, 0, 0, 0, 0, 0, 1 10 | 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 2 11 | 1, 0,13, 0, 0, 0, 0, 0, 0, 0, 1 12 | 2, 0,14, 0, 0, 0, 0, 4, 0, 0, 2 13 | 1, 0,13, 0, 0, 0, 0, 0, 0, 0, 1 14 | 2, 0,14,13, 0, 0, 4, 0, 4, 0, 2 15 | 1, 0,13,13, 0, 0, 0, 0, 0, 0, 9 16 | 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 -------------------------------------------------------------------------------- /DATA/Assets_Weapons/README - Description of ConfigFiles.txt: -------------------------------------------------------------------------------- 1 | Weapon_x_TexturesData.conf 2 | 3 | Contains the filenames of the used textures for each weapon. 4 | 5 | Format: 6 | 7 | One filename each line 8 | 9 | Example: 10 | 11 | ./GFX/PlayerAssets/Weapons/ARX160/ARX160.png 12 | 13 | 14 | _____________________________________ 15 | 16 | 17 | Weapon_x_MuzzleFlashTexturesData.conf 18 | 19 | Contains the filenames of the used muzzle flash texture for each weapon. 20 | 21 | Format: 22 | 23 | One filename each line 24 | 25 | Example: 26 | 27 | ./GFX/PlayerAssets/Weapons/ARX160/MuzzleFlash.png -------------------------------------------------------------------------------- /DATA/Levels/1/LevelData/MapCeilingData.conf: -------------------------------------------------------------------------------- 1 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 2 | 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 7 3 | 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 7 4 | 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 7 5 | 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 7 6 | 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 7 7 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 8 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 9 | 7, 7, 7, 7, 7, 7, 7, 6, 7, 7, 7 10 | 7, 7, 7, 7, 7, 7, 6, 7, 6, 7, 7 11 | 7, 7, 7, 7, 7, 7, 7, 6, 7, 7, 7 12 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 13 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 14 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 15 | 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7 16 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 -------------------------------------------------------------------------------- /DATA/Levels/1/LevelData/MapFloorData.conf: -------------------------------------------------------------------------------- 1 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 2 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 3 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 4 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 5 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 6 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 7 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 8 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 9 | 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 5 10 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 11 | 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 5 12 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 13 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 14 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 15 | 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5 16 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 -------------------------------------------------------------------------------- /DATA/GameConfig/HUDMinimapConfig.ini: -------------------------------------------------------------------------------- 1 | [GENERAL] 2 | PosX=20 3 | PosY=20 4 | ; ShowWayoints is used for debug reasons 5 | ShowWaypoints=true 6 | 7 | [PLAYER] 8 | Red=0 9 | Green=255 10 | Blue=0 11 | Alpha=255 12 | 13 | [ENEMY] 14 | Red=255 15 | Green=0 16 | Blue=0 17 | Alpha=255 18 | 19 | [NEUTRAL] 20 | Red=255 21 | Green=0 22 | Blue=255 23 | Alpha=255 24 | 25 | [AMMO] 26 | Red=255 27 | Green=255 28 | Blue=0 29 | Alpha=255 30 | 31 | [WALLS] 32 | Red=255 33 | Green=165 34 | Blue=0 35 | Alpha=255 36 | 37 | [DOORS] 38 | Red=128 39 | Green=128 40 | Blue=128 41 | Alpha=255 42 | 43 | [WAYPOINT] 44 | Red=255 45 | Green=0 46 | Blue=0 47 | Alpha=255 48 | 49 | 50 | -------------------------------------------------------------------------------- /DATA/GameConfig/HUDWeaponDisplayConfig.ini: -------------------------------------------------------------------------------- 1 | [HUD] 2 | WeaponHUDPosX=0 3 | WeaponHUDPosY=0 4 | CrosshairFileName=./GFX/HUD/Crosshair.png 5 | WeaponHUDFileName=./GFX/HUD/WeaponHUD.png 6 | 7 | [HUDAMMOFONT] 8 | FontName=./Fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf 9 | FontSize=40.0 10 | ColorRED=255 11 | ColorGREEN=0 12 | ColorBLUE=0 13 | OffsetX=17 14 | OffsetY=19 15 | 16 | [HUDCARRIEDAMMOFONT] 17 | FontName=./Fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf 18 | FontSize=14.0 19 | ColorRED=255 20 | ColorGREEN=255 21 | ColorBLUE=255 22 | OffsetX=130 23 | OffsetY=46 24 | 25 | [HUDWEAPONFONT] 26 | FontName=./Fonts/Ubuntu_Mono/UbuntuMono-Bold.ttf 27 | FontSize=14.0 28 | ColorRED=255 29 | ColorGREEN=255 30 | ColorBLUE=255 31 | OffsetX=130 32 | OffsetY=29 -------------------------------------------------------------------------------- /Sources/Game_Folder.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************** 3 | * * 4 | * Game_Folder.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | *************************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | 14 | inline const std::string LevelFolder{ "./DATA/Levels/" }; 15 | inline const std::string GameConfigFolder{ "./DATA/GameConfig/" }; 16 | 17 | inline const std::string AssetsEntitiesFolder{ "./DATA/Assets_Entities/" }; 18 | inline const std::string AssetsDoorsFolder{ "./DATA/Assets_Doors/" }; 19 | inline const std::string AssetsWeaponsFolder{ "./DATA/Assets_Weapons/" }; 20 | 21 | inline const std::string GFXEntitiesFolder{ "./GFX/Entities/" }; -------------------------------------------------------------------------------- /DATA/GameConfig/IntroHeader.txt: -------------------------------------------------------------------------------- 1 | **************************************************** 2 | * _______ _____ ___________________ * 3 | * \ \ / _ \\______ \_ ___ \ * 4 | * / | \ / /_\ \| _/ \ \/ * 5 | * / | \/ | \ | \ \____ * 6 | * \____|__ /\____|__ /____|_ /\______ / * 7 | * \/ \/ \/ \/ * 8 | * * 9 | * * 10 | * Not Another RayCaster * 11 | * * 12 | * (C)opyright 2017 - 2020 by Stefan Kubsch * 13 | * * 14 | **************************************************** 15 | 16 | Initializing game engine... 17 | 18 | 19 | -------------------------------------------------------------------------------- /DATA/GameConfig/InputConfig.ini: -------------------------------------------------------------------------------- 1 | [MOUSE] 2 | MouseSensitivity=0.6 3 | MouseSensitivityLowerLimit=0.1 4 | MouseSensitivityUpperLimit=3.0 5 | MouseSensitivityStep=0.01 6 | MouseIcon=./GFX/HUD/Mouse.png 7 | 8 | [GAMECONTROLLER] 9 | DeadZone=0.3 10 | Sensitivity=0.3 11 | RotationXLimit=0.01 12 | RepeatIntervall=0 13 | VirtMouseUpKey=38 14 | VirtMouseDownKey=40 15 | VirtMouseLeftKey=37 16 | VirtMouseRightKey=39 17 | FireSingleShotKey=162 18 | RapidFireKey=160 19 | ChangeWeaponUpKey=33 20 | ChangeWeaponDownKey=34 21 | XBoxControllerIcon=./GFX/HUD/XBoxController.png 22 | 23 | [KEYBOARD] 24 | MoveForwardKey=87 25 | MoveBackwardKey=83 26 | StrafeLeftKey=65 27 | StrafeRightKey=68 28 | ReloadWeaponKey=82 29 | HUDKey=72 30 | MiniMapKey=77 31 | ActionKey=32 32 | IncreaseMouseSensitivityKey=107 33 | DecreaseMouseSensitivityKey=109 34 | SelectNextLevelKey=78 35 | SwitchLightingKey=76 36 | PauseKey=27 37 | MenuItemDownKey=40 38 | MenuItemUpKey=38 39 | MenuItemSelectKey=13 40 | -------------------------------------------------------------------------------- /Documentation/Development/Used Software.txt: -------------------------------------------------------------------------------- 1 | Development: 2 | 3 | Microsoft Visual Studio 2022 Community Edition 4 | https://visualstudio.microsoft.com/de/vs/community/ 5 | 6 | PVS Studio (Static Code Analyzer) 7 | https://www.viva64.com/en/pvs-studio/ 8 | 9 | LLVM 10 | https://llvm.org/ 11 | 12 | CLANG Power Tools (-> Tidy, Static Code Analyzer) 13 | https://marketplace.visualstudio.com/items?itemName=caphyon.ClangPowerTools 14 | 15 | Github Desktop 16 | https://desktop.github.com/ 17 | 18 | 19 | 3D Models: 20 | 21 | Blender 22 | https://www.blender.org/ 23 | 24 | 25 | Graphics: 26 | 27 | IrfanView 28 | https://www.irfanview.com/ 29 | 30 | GIMP 31 | https://www.gimp.org/ 32 | 33 | PNGGauntlet (excellent PNG compression!) 34 | https://pnggauntlet.com/ 35 | 36 | xnConvert (Image batch processing) 37 | https://www.xnview.com/de/xnconvert/ 38 | 39 | 40 | Audio: 41 | 42 | Audacity 43 | https://www.audacityteam.org/ 44 | 45 | 46 | Zip: 47 | 48 | 7Zip Standalone 49 | https://www.7-zip.org/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_simd.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | **************************************************** 3 | * * 4 | * lwmf_simd - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | **************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "lwmf_logging.hpp" 18 | 19 | namespace lwmf 20 | { 21 | 22 | 23 | void CheckForSSESupport(); 24 | 25 | // 26 | // Functions 27 | // 28 | 29 | inline void CheckForSSESupport() 30 | { 31 | LWMFSystemLog.AddEntry(LogLevel::Info, __FILENAME__, __LINE__, "Checking for SSE 4.2 Extensions..."); 32 | 33 | std::array CPUInfo{}; 34 | __cpuid(CPUInfo.data(), 1); 35 | 36 | if ((CPUInfo[2] & (1 << 20)) == 0) 37 | { 38 | LWMFSystemLog.AddEntry(LogLevel::Critical, __FILENAME__, __LINE__, "lwmf::CheckForSSESupport(): SSE 4.2 is not supported on this computer!"); 39 | } 40 | else 41 | { 42 | LWMFSystemLog.AddEntry(LogLevel::Info, __FILENAME__, __LINE__, "SSE 4.2 extension found!"); 43 | } 44 | } 45 | 46 | 47 | } // namespace lwmf 48 | -------------------------------------------------------------------------------- /Sources/GFX_ImageHandling.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * GFX_ImageHandling.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | 15 | #include "Tools_ErrorHandling.hpp" 16 | 17 | namespace GFX_ImageHandling 18 | { 19 | 20 | 21 | lwmf::TextureStruct ImportImage(const std::string& ImageFileName); 22 | lwmf::TextureStruct ImportTexture(const std::string& ImageFileName, std::int_fast32_t Size); 23 | 24 | // 25 | // Functions 26 | // 27 | 28 | inline lwmf::TextureStruct ImportImage(const std::string& ImageFileName) 29 | { 30 | lwmf::TextureStruct TempTexture{}; 31 | lwmf::LoadPNG(TempTexture, ImageFileName); 32 | 33 | return TempTexture; 34 | } 35 | 36 | inline lwmf::TextureStruct ImportTexture(const std::string& ImageFileName, const std::int_fast32_t Size) 37 | { 38 | lwmf::TextureStruct TempTexture{}; 39 | lwmf::LoadPNG(TempTexture, ImageFileName); 40 | 41 | if (Tools_ErrorHandling::CheckTextureSize(TempTexture.Width, TempTexture.Height, Size, StopOnError)) 42 | { 43 | // Dummy, just check Size 44 | } 45 | 46 | return TempTexture; 47 | } 48 | 49 | 50 | } // namespace GFX_ImageHandling 51 | -------------------------------------------------------------------------------- /Sources/GFX_LightingClass.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************** 3 | * * 4 | * GFX_LightingClass.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | *************************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | 14 | class GFX_LightingClass final 15 | { 16 | public: 17 | GFX_LightingClass(float PosX, float PosY, std::int_fast32_t Location, float Radius, float Intensity); 18 | float GetIntensity(float x, float y) const; 19 | 20 | // Location settings: 21 | // see LevelMapLayers in "Game_LevelHandling.hpp" 22 | std::int_fast32_t Location{}; 23 | 24 | private: 25 | lwmf::FloatPointStruct Pos{}; 26 | float Radius{}; 27 | float Intensity{}; 28 | }; 29 | 30 | inline GFX_LightingClass::GFX_LightingClass(const float PosX, const float PosY, const std::int_fast32_t Location, const float Radius, const float Intensity) 31 | { 32 | this->Pos = { PosX, PosY }; 33 | this->Location = Location; 34 | this->Radius = Radius; 35 | this->Intensity = Intensity; 36 | } 37 | 38 | inline float GFX_LightingClass::GetIntensity(const float x, const float y) const 39 | { 40 | const float Distance{ lwmf::CalcEuclidianDistance(x, Pos.X, y, Pos.Y) }; 41 | return Distance > Radius ? 0.0F : Intensity * ((Radius - Distance) / Radius); 42 | } -------------------------------------------------------------------------------- /Sources/Tools_Cleanup.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************************** 3 | * * 4 | * Tools_Cleanup.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "Game_LevelHandling.hpp" 13 | #include "Game_EntityHandling.hpp" 14 | #include "Game_Doors.hpp" 15 | #include "Game_WeaponHandling.hpp" 16 | 17 | namespace Tools_Cleanup 18 | { 19 | 20 | 21 | void DestroySubsystems(); 22 | void CloseAllAudio(); 23 | 24 | // 25 | // Functions 26 | // 27 | 28 | inline void DestroySubsystems() 29 | { 30 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Destroy subsystems..."); 31 | 32 | lwmf::UnregisterRawInputDevice(lwmf::DeviceIdentifier::HID_MOUSE); 33 | lwmf::UnregisterRawInputDevice(lwmf::DeviceIdentifier::HID_KEYBOARD); 34 | lwmf::DeleteOpenGLContext(); 35 | } 36 | 37 | inline void CloseAllAudio() 38 | { 39 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Close all audio handles..."); 40 | 41 | Game_LevelHandling::CloseAudio(); 42 | Game_EntityHandling::CloseAudio(); 43 | Game_Doors::CloseAudio(); 44 | Game_WeaponHandling::CloseAudio(); 45 | Player.CloseAudio(); 46 | } 47 | 48 | 49 | } // namespace Tools_Cleanup -------------------------------------------------------------------------------- /NARC.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28917.181 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NARC", "NARC.vcxproj", "{EE2F2228-2772-4154-8096-70BEAFC64A02}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {EE2F2228-2772-4154-8096-70BEAFC64A02}.Debug|x64.ActiveCfg = Debug|x64 17 | {EE2F2228-2772-4154-8096-70BEAFC64A02}.Debug|x64.Build.0 = Debug|x64 18 | {EE2F2228-2772-4154-8096-70BEAFC64A02}.Debug|x86.ActiveCfg = Debug|Win32 19 | {EE2F2228-2772-4154-8096-70BEAFC64A02}.Debug|x86.Build.0 = Debug|Win32 20 | {EE2F2228-2772-4154-8096-70BEAFC64A02}.Release|x64.ActiveCfg = Release|x64 21 | {EE2F2228-2772-4154-8096-70BEAFC64A02}.Release|x64.Build.0 = Release|x64 22 | {EE2F2228-2772-4154-8096-70BEAFC64A02}.Release|x86.ActiveCfg = Release|Win32 23 | {EE2F2228-2772-4154-8096-70BEAFC64A02}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {A76C1262-1E4D-4617-864C-DC117B13FEBA} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Sources/Game_PreGame.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * Game_PreGame.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "Game_GlobalDefinitions.hpp" 18 | #include "Tools_Console.hpp" 19 | #include "Tools_ErrorHandling.hpp" 20 | 21 | namespace Game_PreGame 22 | { 23 | 24 | 25 | void ShowIntroHeader(); 26 | void SetOptions(); 27 | 28 | // 29 | // Functions 30 | // 31 | 32 | inline void ShowIntroHeader() 33 | { 34 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Show intro header..."); 35 | 36 | if (const std::string FileName{ GameConfigFolder + "IntroHeader.txt" }; Tools_ErrorHandling::CheckFileExistence(FileName, ContinueOnError)) 37 | { 38 | std::ifstream IntroHeaderFile(FileName, std::ios::in); 39 | 40 | std::string Line; 41 | 42 | while (std::getline(IntroHeaderFile, Line)) 43 | { 44 | std::cout << Line << "\n"; 45 | } 46 | } 47 | } 48 | 49 | inline void SetOptions() 50 | { 51 | std::cout << "***************\n* SET OPTIONS *\n***************\n\n"; 52 | 53 | SelectedLevel = NumberOfLevels > StartLevel ? Tools_Console::QuestionForValue("Please select Level (" + std::to_string(StartLevel) + " - " + std::to_string(NumberOfLevels) + "): ", StartLevel, NumberOfLevels) : StartLevel; 54 | Fullscreen = Tools_Console::QuestionForYesNo("Fullscreen (y/n): "); 55 | VSync = Tools_Console::QuestionForYesNo("VSync (y/n): "); 56 | } 57 | 58 | 59 | } // namespace Game_PreGame -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_fpscounter.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ******************************************************* 3 | * * 4 | * lwmf_fpscounter - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | ******************************************************* 9 | */ 10 | 11 | #pragma once 12 | 13 | #define NOMINMAX 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #include "lwmf_text.hpp" 22 | #include "lwmf_texture.hpp" 23 | 24 | namespace lwmf 25 | { 26 | 27 | 28 | void FPSCounter(); 29 | void DisplayFPSCounter(TextureStruct& Texture, std::int_fast32_t PosX, std::int_fast32_t PosY, std::int_fast32_t Color); 30 | 31 | // 32 | // Variables and constants 33 | // 34 | 35 | inline std::int_fast32_t FPS{}; 36 | 37 | // 38 | // Functions 39 | // 40 | 41 | inline void FPSCounter() 42 | { 43 | static ULONGLONG FPSUpdate{}; 44 | static std::int_fast32_t FPSFrames{}; 45 | 46 | if (const ULONGLONG SystemTime{ GetTickCount64() }; SystemTime - FPSUpdate >= 1000) 47 | { 48 | FPS = FPSFrames; 49 | FPSUpdate = SystemTime; 50 | FPSFrames = 0; 51 | } 52 | 53 | ++FPSFrames; 54 | } 55 | 56 | inline void DisplayFPSCounter(TextureStruct& Texture, const std::int_fast32_t PosX, const std::int_fast32_t PosY, const std::int_fast32_t Color) 57 | { 58 | std::array FPSString{}; 59 | std::to_chars(FPSString.data(), FPSString.data() + FPSString.size(), FPS); 60 | RenderText(Texture, "fps:" + std::string(FPSString.data()), PosX, PosY, Color); 61 | } 62 | 63 | 64 | } // namespace lwmf -------------------------------------------------------------------------------- /Sources/GFX_Window.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * GFX_Window.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | 15 | #include "Game_GlobalDefinitions.hpp" 16 | #include "Tools_ErrorHandling.hpp" 17 | 18 | namespace GFX_Window 19 | { 20 | 21 | 22 | void Init(); 23 | 24 | // 25 | // Functions 26 | // 27 | 28 | inline void Init() 29 | { 30 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Init window..."); 31 | 32 | if (const std::string INIFile{ GameConfigFolder + "WindowConfig.ini" }; Tools_ErrorHandling::CheckFileExistence(INIFile, StopOnError)) 33 | { 34 | lwmf::CreateOpenGLWindow(lwmf::WindowInstance, 35 | Canvas, 36 | lwmf::ReadINIValue(INIFile, "WINDOW", "ViewportWidth"), 37 | lwmf::ReadINIValue(INIFile, "WINDOW", "ViewportHeight"), 38 | lwmf::ReadINIValue(INIFile, "WINDOW", "WindowName").c_str(), Fullscreen); 39 | 40 | VSync ? lwmf::SetVSync(-1) : lwmf::SetVSync(0); 41 | 42 | // lwmf::Fullscreenflag is always true, since window cannot be resized - so we can create faster OpenGL textures 43 | lwmf::FullscreenFlag = true; 44 | lwmf::InitOpenGLLoader(); 45 | 46 | // Prepare main shader and texture for rendering 47 | CanvasShader.LoadShader("Default", Canvas); 48 | CanvasShader.PrepareLWMFTexture(Canvas, 0, 0); 49 | 50 | // Inital clearance of window. Looks better while loading the rest of the game... 51 | lwmf::ClearBuffer(); 52 | lwmf::SwapBuffer(); 53 | } 54 | } 55 | 56 | 57 | } // namespace GFX_Window 58 | 59 | -------------------------------------------------------------------------------- /Sources/Game_GlobalDefinitions.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************** 3 | * * 4 | * Game_GlobalDefinitions.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | *************************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | 15 | // Setting planes/viewport for raycaster 16 | inline lwmf::FloatPointStruct Plane{}; 17 | inline lwmf::FloatPointStruct PlaneStartValue{}; 18 | 19 | // Settings for looking up/down 20 | inline float VerticalLookCamera{}; 21 | inline float VerticalLookUpLimit{}; 22 | inline float VerticalLookDownLimit{}; 23 | inline float VerticalLookStep{}; 24 | inline float FogOfWarDistance{}; 25 | inline std::int_fast32_t VerticalLook{}; 26 | 27 | // Current Level + Number of Levels 28 | inline std::int_fast32_t StartLevel{ 1 }; 29 | inline std::int_fast32_t SelectedLevel{}; 30 | inline std::int_fast32_t NumberOfLevels{}; 31 | 32 | // Options for Renderer 33 | inline bool VSync{}; 34 | inline bool Fullscreen{}; 35 | 36 | // Size of textures (width and height) 37 | inline std::int_fast32_t TextureSize{}; 38 | inline std::int_fast32_t EntitySize{}; 39 | 40 | // Set factor for bitshifting from TextureSize 41 | // 7 for 128x128, 8 for 256x256, 9 for 512x512, 10 for 1024x1024 42 | // is calculated in "Game_Config.hpp" dependent on given TextureSize 43 | inline std::int_fast32_t TextureSizeShiftFactor{}; 44 | 45 | // Variables for fixed timestep gameloop 46 | inline std::uint_fast32_t LengthOfFrame{}; 47 | inline std::uint_fast32_t FrameLock{}; 48 | inline bool GamePausedFlag{}; 49 | inline bool GameControllerFlag{}; 50 | inline bool QuitGameFlag{}; 51 | 52 | // Random Number Generator 53 | // C++ 11 Mersenne-Twister-Engine 54 | inline std::mt19937 RNG(std::random_device{}()); -------------------------------------------------------------------------------- /Sources/lwmf/lwmf.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ******************************************************************** 3 | * * 4 | * lwmf - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | ******************************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #define WIN32_LEAN_AND_MEAN 14 | 15 | // ************************************************* 16 | // ** YOU CAN MAKE SOME SETTINGS HERE !!! ** 17 | // ************************************************* 18 | 19 | // #define LWMF_LOGGINGENABLED in your application if you want to write any logsfiles 20 | // #define LWMF_THROWEXCEPTIONS in your application if you want to handle errors by exceptions 21 | 22 | #include "lwmf_logging.hpp" 23 | 24 | // Establish lwmf system logfile 25 | // Will not be created if "LoggingEnabled" = false 26 | inline lwmf::Logging LWMFSystemLog("lwmf_systemlog.log"); 27 | 28 | #include "lwmf_simd.hpp" 29 | #include "lwmf_math.hpp" 30 | #include "lwmf_general.hpp" 31 | #include "lwmf_color.hpp" 32 | #include "lwmf_openglloader.hpp" 33 | #include "lwmf_openglwindow.hpp" 34 | #include "lwmf_openglshader.hpp" 35 | #include "lwmf_rawinput.hpp" 36 | #include "lwmf_pixel.hpp" 37 | #include "lwmf_lines.hpp" 38 | #include "lwmf_fill.hpp" 39 | #include "lwmf_rectangles.hpp" 40 | #include "lwmf_circles.hpp" 41 | #include "lwmf_ellipses.hpp" 42 | #include "lwmf_polygons.hpp" 43 | #include "lwmf_texture.hpp" 44 | #include "lwmf_bmp.hpp" 45 | #include "lwmf_png.hpp" 46 | #include "lwmf_text.hpp" 47 | #include "lwmf_mp3player.hpp" 48 | #include "lwmf_gamepad.hpp" 49 | #include "lwmf_perlinnoise.hpp" 50 | #include "lwmf_fpscounter.hpp" 51 | #include "lwmf_multithreading.hpp" 52 | #include "lwmf_inifile.hpp" -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_pixel.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | **************************************************** 3 | * * 4 | * lwmf_pixel - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | **************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | 15 | #include "lwmf_texture.hpp" 16 | 17 | namespace lwmf 18 | { 19 | 20 | void SetPixel(TextureStruct& Texture, std::int_fast32_t x, std::int_fast32_t y, std::int_fast32_t Color); 21 | void SetPixelSafe(TextureStruct& Texture, std::int_fast32_t x, std::int_fast32_t y, std::int_fast32_t Color); 22 | std::int_fast32_t GetPixel(const TextureStruct& Texture, std::int_fast32_t x, std::int_fast32_t y); 23 | std::int_fast32_t GetPixelSafe(const TextureStruct& Texture, std::int_fast32_t x, std::int_fast32_t y); 24 | 25 | // 26 | // Functions 27 | // 28 | 29 | inline void SetPixel(TextureStruct& Texture, const std::int_fast32_t x, const std::int_fast32_t y, const std::int_fast32_t Color) 30 | { 31 | Texture.Pixels[y * Texture.Width + x] = Color; 32 | } 33 | 34 | inline void SetPixelSafe(TextureStruct& Texture, const std::int_fast32_t x, const std::int_fast32_t y, const std::int_fast32_t Color) 35 | { 36 | if (static_cast(x) >= static_cast(Texture.Width) || static_cast(y) >= static_cast(Texture.Height)) 37 | { 38 | return; 39 | } 40 | 41 | Texture.Pixels[y * Texture.Width + x] = Color; 42 | } 43 | 44 | inline std::int_fast32_t GetPixel(const TextureStruct& Texture, const std::int_fast32_t x, const std::int_fast32_t y) 45 | { 46 | return Texture.Pixels[y * Texture.Width + x]; 47 | } 48 | 49 | inline std::int_fast32_t GetPixelSafe(const TextureStruct& Texture, const std::int_fast32_t x, const std::int_fast32_t y) 50 | { 51 | if (static_cast(x) >= static_cast(Texture.Width) || static_cast(y) >= static_cast(Texture.Height)) 52 | { 53 | return 0x00000000; 54 | } 55 | 56 | return Texture.Pixels[y * Texture.Width + x]; 57 | } 58 | 59 | 60 | } // namespace lwmf -------------------------------------------------------------------------------- /Sources/Game_Effects.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * Game_Effects.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "Tools_ErrorHandling.hpp" 17 | 18 | namespace Game_Effects 19 | { 20 | 21 | 22 | void InitEffects(); 23 | void StartBloodstainDrawing(); 24 | void CountdownBloodstainCounter(); 25 | void DrawBloodstain(); 26 | 27 | // 28 | // Variables and constants 29 | // 30 | 31 | inline lwmf::ShaderClass BloodstainShader{}; 32 | inline std::int_fast32_t BloodstainDuration{}; 33 | inline std::int_fast32_t BloodstainCounter{}; 34 | inline bool BloodstainFlag{}; 35 | 36 | // 37 | // Functions 38 | // 39 | 40 | inline void InitEffects() 41 | { 42 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Init effects..."); 43 | 44 | if (const std::string INIFile{ GameConfigFolder + "EffectsConfig.ini" }; Tools_ErrorHandling::CheckFileExistence(INIFile, StopOnError)) 45 | { 46 | // Init the "bloodstain" effect when player is hit by an enemy 47 | BloodstainDuration = lwmf::ReadINIValue(INIFile, "EFFECTS", "BloodstainDuration"); 48 | BloodstainShader.LoadShader("Default", Canvas); 49 | 50 | const lwmf::TextureStruct TempTexture{ GFX_ImageHandling::ImportImage(lwmf::ReadINIValue(INIFile, "TEXTURES", "Bloodstains")) }; 51 | BloodstainShader.LoadStaticTextureInGPU(TempTexture, &BloodstainShader.OGLTextureID, 0, 0, TempTexture.Width, TempTexture.Height); 52 | } 53 | } 54 | 55 | inline void StartBloodstainDrawing() 56 | { 57 | BloodstainFlag = true; 58 | BloodstainCounter = BloodstainDuration; 59 | } 60 | 61 | inline void CountdownBloodstainCounter() 62 | { 63 | if (--BloodstainCounter == 0) 64 | { 65 | BloodstainFlag = false; 66 | } 67 | } 68 | 69 | inline void DrawBloodstain() 70 | { 71 | if (BloodstainFlag) 72 | { 73 | BloodstainShader.RenderStaticTexture(&BloodstainShader.OGLTextureID, true, std::clamp(0.5F - (0.5F / static_cast(BloodstainCounter)), 0.0F, 0.5F)); 74 | } 75 | } 76 | 77 | 78 | } // namespace Game_Effects 79 | -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_fill.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | **************************************************** 3 | * * 4 | * lwmf_fill - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | **************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "lwmf_general.hpp" 18 | #include "lwmf_texture.hpp" 19 | #include "lwmf_pixel.hpp" 20 | 21 | namespace lwmf 22 | { 23 | 24 | 25 | void ScanlineFill(TextureStruct& Texture, const IntPointStruct& CenterPoint, std::int_fast32_t FillColor); 26 | 27 | // 28 | // Functions 29 | // 30 | 31 | inline void ScanlineFill(TextureStruct& Texture, const IntPointStruct& CenterPoint, const std::int_fast32_t FillColor) 32 | { 33 | IntPointStruct Points{ CenterPoint }; 34 | std::vector Stack{}; 35 | Stack.push_back(Points); 36 | 37 | while (!Stack.empty()) 38 | { 39 | Points = Stack.back(); 40 | Stack.pop_back(); 41 | 42 | std::int_fast32_t x1{ Points.X }; 43 | 44 | while (x1 >= 0 && Texture.Pixels[Points.Y * Texture.Width + x1] != FillColor) 45 | { 46 | --x1; 47 | } 48 | 49 | ++x1; 50 | 51 | bool Above{}; 52 | bool Below{}; 53 | const std::int_fast32_t TempY{ Points.Y * Texture.Width }; 54 | 55 | while (x1 < Texture.Width && Texture.Pixels[TempY + x1] != FillColor) 56 | { 57 | Texture.Pixels[TempY + x1] = FillColor; 58 | 59 | if (!Above && Points.Y > 0 && Texture.Pixels[(Points.Y - 1) * Texture.Width + x1] != FillColor) 60 | { 61 | Stack.push_back({ x1, Points.Y - 1 }); 62 | Above = true; 63 | } 64 | else if (Above && Points.Y > 0 && Texture.Pixels[(Points.Y - 1) * Texture.Width + x1] == FillColor) 65 | { 66 | Above = false; 67 | } 68 | 69 | if (!Below && Points.Y < Texture.Height - 1 && Texture.Pixels[(Points.Y + 1) * Texture.Width + x1] != FillColor) 70 | { 71 | Stack.push_back({ x1, Points.Y + 1 }); 72 | Below = true; 73 | } 74 | else if (Below && Points.Y < Texture.Height - 1 && Texture.Pixels[(Points.Y + 1) * Texture.Width + x1] == FillColor) 75 | { 76 | Below = false; 77 | } 78 | 79 | ++x1; 80 | } 81 | } 82 | } 83 | 84 | 85 | } // namespace lwmf -------------------------------------------------------------------------------- /Sources/HID_Mouse.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *********************************************** 3 | * * 4 | * HID_Mouse.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | *********************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | 14 | #include "Tools_ErrorHandling.hpp" 15 | 16 | namespace HID_Mouse 17 | { 18 | 19 | 20 | void Init(); 21 | void ChangeMouseSensitivity(char Change); 22 | 23 | // 24 | // Variables and constants 25 | // 26 | 27 | inline lwmf::ShaderClass MouseIconShader{}; 28 | inline lwmf::IntPointStruct MousePos{}; 29 | inline lwmf::IntPointStruct OldMousePos{}; 30 | 31 | inline float MouseSensitivity{}; 32 | inline float MouseSensitivityLowerLimit{}; 33 | inline float MouseSensitivityUpperLimit{}; 34 | inline float MouseSensitivityStep{}; 35 | 36 | // 37 | // Functions 38 | // 39 | 40 | inline void Init() 41 | { 42 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Init mouse config..."); 43 | 44 | if (const std::string INIFile{ GameConfigFolder + "InputConfig.ini" }; Tools_ErrorHandling::CheckFileExistence(INIFile, StopOnError)) 45 | { 46 | MouseSensitivityLowerLimit = lwmf::ReadINIValue(INIFile, "MOUSE", "MouseSensitivityLowerLimit"); 47 | MouseSensitivityUpperLimit = lwmf::ReadINIValue(INIFile, "MOUSE", "MouseSensitivityUpperLimit"); 48 | MouseSensitivityStep = lwmf::ReadINIValue(INIFile, "MOUSE", "MouseSensitivityStep"); 49 | 50 | MouseSensitivity = lwmf::ReadINIValue(INIFile, "MOUSE", "MouseSensitivity"); 51 | Tools_ErrorHandling::CheckAndClampRange(MouseSensitivity, MouseSensitivityLowerLimit, MouseSensitivityUpperLimit, __FILENAME__, "MouseSensitivity"); 52 | 53 | // Load MouseIcon 54 | const lwmf::TextureStruct TempMouseIconTexture{ GFX_ImageHandling::ImportImage(lwmf::ReadINIValue(INIFile, "MOUSE", "MouseIcon")) }; 55 | MouseIconShader.LoadShader("Default", Canvas); 56 | MouseIconShader.LoadStaticTextureInGPU(TempMouseIconTexture, &MouseIconShader.OGLTextureID, Canvas.Width - 153, 0, TempMouseIconTexture.Width, TempMouseIconTexture.Height); 57 | 58 | lwmf::RegisterRawInputDevice(lwmf::MainWindow, lwmf::DeviceIdentifier::HID_MOUSE); 59 | ShowCursor(FALSE); 60 | } 61 | } 62 | 63 | inline void ChangeMouseSensitivity(const char Change) 64 | { 65 | if (Change == '+') 66 | { 67 | MouseSensitivity += MouseSensitivityStep; 68 | } 69 | else if (Change == '-') 70 | { 71 | MouseSensitivity -= MouseSensitivityStep; 72 | } 73 | 74 | Tools_ErrorHandling::CheckAndClampRange(MouseSensitivity, MouseSensitivityLowerLimit, MouseSensitivityUpperLimit, __FILENAME__, "MouseSensitivity"); 75 | } 76 | 77 | 78 | } // namespace HID_Mouse -------------------------------------------------------------------------------- /Sources/Game_Config.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * Game_Config.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "Game_GlobalDefinitions.hpp" 17 | #include "Tools_ErrorHandling.hpp" 18 | 19 | namespace Game_Config 20 | { 21 | 22 | 23 | void Init(); 24 | void GatherNumberOfLevels(); 25 | 26 | // 27 | // Functions 28 | // 29 | 30 | inline void Init() 31 | { 32 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Init general game config..."); 33 | 34 | if (const std::string INIFile{ GameConfigFolder + "GameConfig.ini" }; Tools_ErrorHandling::CheckFileExistence(INIFile, StopOnError)) 35 | { 36 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Check used texture sizes..."); 37 | 38 | const std::map TextureCompare //-V808 39 | { 40 | { 64, 6 }, 41 | { 128, 7 }, 42 | { 256, 8 }, 43 | { 512, 9 }, 44 | { 1024, 10 }, 45 | { 2048, 11 }, 46 | { 4096, 12 }, 47 | { 8192, 13 } 48 | }; 49 | 50 | TextureSize = lwmf::ReadINIValue(INIFile, "TEXTURES", "TextureSize"); 51 | 52 | if (const auto State{ TextureCompare.find(TextureSize) }; State != TextureCompare.end()) 53 | { 54 | TextureSizeShiftFactor = State->second; 55 | } 56 | else 57 | { 58 | NARCLog.AddEntry(lwmf::LogLevel::Critical, __FILENAME__, __LINE__, "Init(): TextureSize has an incorrect value!"); 59 | } 60 | 61 | EntitySize = lwmf::ReadINIValue(INIFile, "TEXTURES", "EntitySize"); 62 | 63 | if (TextureCompare.find(EntitySize) == TextureCompare.end()) 64 | { 65 | NARCLog.AddEntry(lwmf::LogLevel::Critical, __FILENAME__, __LINE__, "Init(): EntitySize has an incorrect value!"); 66 | } 67 | 68 | FrameLock = lwmf::ReadINIValue(INIFile, "GENERAL", "FrameLock"); 69 | } 70 | } 71 | 72 | inline void GatherNumberOfLevels() 73 | { 74 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Gathering number of levels..."); 75 | 76 | NumberOfLevels = StartLevel; 77 | 78 | while (Tools_ErrorHandling::CheckFolderExistence(LevelFolder + std::to_string(NumberOfLevels), ContinueOnError)) 79 | { 80 | ++NumberOfLevels; 81 | } 82 | 83 | --NumberOfLevels == StartLevel - 1 ? NARCLog.AddEntry(lwmf::LogLevel::Critical, __FILENAME__, __LINE__, "GatherNumberOfLevels(): No Leveldata found.") : 84 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Data of " + std::to_string(NumberOfLevels) + " level(s) was found!"); 85 | } 86 | 87 | 88 | } // namespace Game_Config -------------------------------------------------------------------------------- /Sources/Game_HealthBarClass.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * Game_HealthBarClass.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | 15 | #include "Tools_ErrorHandling.hpp" 16 | #include "Game_PlayerClass.hpp" 17 | 18 | class Game_HealthBarClass final 19 | { 20 | public: 21 | void Init(); 22 | void Display() const; 23 | 24 | private: 25 | lwmf::IntRectStruct RectRed{}; 26 | lwmf::IntRectStruct RectOrange{}; 27 | lwmf::IntRectStruct RectBlack1{}; 28 | lwmf::IntRectStruct RectBlack2{}; 29 | 30 | lwmf::IntPointStruct Pos{}; 31 | std::int_fast32_t HealthBarWidth{}; 32 | std::int_fast32_t HealthBarFactor{}; 33 | 34 | std::int_fast32_t Green{}; 35 | std::int_fast32_t Red{}; 36 | std::int_fast32_t Orange{}; 37 | std::int_fast32_t Black{}; 38 | }; 39 | 40 | inline void Game_HealthBarClass::Init() 41 | { 42 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Init health bar..."); 43 | 44 | if (const std::string INIFile{ GameConfigFolder + "HUDHealthBarConfig.ini" }; Tools_ErrorHandling::CheckFileExistence(INIFile, StopOnError)) 45 | { 46 | Pos = { lwmf::ReadINIValue(INIFile, "GENERAL", "PosX"), lwmf::ReadINIValue(INIFile, "GENERAL", "PosY") }; 47 | HealthBarWidth = lwmf::ReadINIValue(INIFile, "GENERAL", "HealthBarWidth"); 48 | const std::int_fast32_t HealthBarLength{ lwmf::ReadINIValue(INIFile, "GENERAL", "HealthBarLength") }; 49 | HealthBarFactor = HealthBarLength / 100; 50 | 51 | Green = lwmf::ReadINIValueRGBA(INIFile, "GREEN"); 52 | Red = lwmf::ReadINIValueRGBA(INIFile, "RED"); 53 | Orange = lwmf::ReadINIValueRGBA(INIFile, "ORANGE"); 54 | Black = lwmf::ReadINIValueRGBA(INIFile, "BLACK"); 55 | 56 | RectRed = { Pos.X, Pos.Y, HealthBarLength, HealthBarWidth }; 57 | RectOrange = { Pos.X - 3, Pos.Y - 3, HealthBarLength + 6, HealthBarWidth + 6 }; 58 | RectBlack1 = { Pos.X - 1, Pos.Y - 1, HealthBarLength + 2, HealthBarWidth + 2 }; 59 | RectBlack2 = { Pos.X - 4, Pos.Y - 4, HealthBarLength + 8, HealthBarWidth + 8 }; 60 | } 61 | } 62 | 63 | inline void Game_HealthBarClass::Display() const 64 | { 65 | lwmf::Rectangle(Canvas, RectBlack2.X, RectBlack2.Y, RectBlack2.Width, RectBlack2.Height, Black); 66 | lwmf::FilledRectangle(Canvas, RectOrange.X, RectOrange.Y, RectOrange.Width, RectOrange.Height, Orange, Orange); 67 | lwmf::Rectangle(Canvas, RectBlack1.X, RectBlack1.Y, RectBlack1.Width, RectBlack1.Height, Black); 68 | lwmf::FilledRectangle(Canvas, RectRed.X, RectRed.Y, RectRed.Width, RectRed.Height, Red, Red); 69 | lwmf::FilledRectangle(Canvas, Pos.X, Pos.Y, Player.Hitpoints * HealthBarFactor, HealthBarWidth, Green, Green); 70 | } -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_bmp.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************** 3 | * * 4 | * lwmf_bmp - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | *************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #define NOMINMAX 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #include "lwmf_logging.hpp" 22 | #include "lwmf_color.hpp" 23 | #include "lwmf_texture.hpp" 24 | 25 | namespace lwmf 26 | { 27 | 28 | 29 | void LoadBMP(TextureStruct& Texture, const std::string& Filename); 30 | 31 | // 32 | // Functions 33 | // 34 | 35 | inline void LoadBMP(TextureStruct& Texture, const std::string& Filename) 36 | { 37 | LWMFSystemLog.AddEntry(LogLevel::Info, __FILENAME__, __LINE__, "Load BMP file " + Filename + "..."); 38 | 39 | std::ifstream File(Filename, std::ios::in | std::ios::binary); 40 | 41 | if (File.fail()) 42 | { 43 | std::array ErrorMessage{}; 44 | strerror_s(ErrorMessage.data(), 100, errno); 45 | 46 | LWMFSystemLog.AddEntry(LogLevel::Error, __FILENAME__, __LINE__, "Error loading " + Filename + ": " + std::string(ErrorMessage.data())); 47 | } 48 | else 49 | { 50 | std::array FileHeaderBuffer{}; 51 | File.read(reinterpret_cast(FileHeaderBuffer.data()), sizeof(BITMAPFILEHEADER)); 52 | 53 | std::array InfoHeaderBuffer{}; 54 | File.read(reinterpret_cast(InfoHeaderBuffer.data()), sizeof(BITMAPINFOHEADER)); 55 | 56 | const BITMAPFILEHEADER* BMPHeader{ reinterpret_cast(FileHeaderBuffer.data()) }; 57 | const BITMAPINFOHEADER* BMPInfo{ reinterpret_cast(InfoHeaderBuffer.data()) }; 58 | 59 | std::vector InputBuffer(BMPInfo->biSizeImage); 60 | File.seekg(BMPHeader->bfOffBits); 61 | File.read(InputBuffer.data(), BMPInfo->biSizeImage); 62 | 63 | CreateTexture(Texture, BMPInfo->biWidth, BMPInfo->biHeight, 0x00000000); 64 | 65 | // Since we read the data from bottom upwards, we need to flip everything upside down 66 | for (std::int_fast32_t Offset{}, y{ Texture.Height - 1 }; y >= 0; --y) 67 | { 68 | const std::int_fast32_t TempY{ y * Texture.Width }; 69 | 70 | for (std::int_fast32_t x{}; x < Texture.Width; ++x) 71 | { 72 | // Combine RGB values to given colour 73 | const std::int_fast32_t TempPos{ 3 * (TempY + x) }; 74 | Texture.Pixels[static_cast(Offset++)] = RGBAtoINT(InputBuffer[static_cast(TempPos) + 2] & 255, InputBuffer[static_cast(TempPos) + 1] & 255, InputBuffer[static_cast(TempPos)] & 255, 255); 75 | } 76 | } 77 | } 78 | } 79 | 80 | 81 | } // namespace lwmf -------------------------------------------------------------------------------- /Sources/Tools_Console.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * Tools_Console.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #define NOMINMAX 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | namespace Tools_Console 22 | { 23 | 24 | 25 | void CreateConsole(); 26 | void CloseConsole(); 27 | void ClearInputBuffer(); 28 | bool QuestionForYesNo(std::string_view Text); 29 | std::int_fast32_t QuestionForValue(std::string_view Text, std::int_fast32_t BeginRange, std::int_fast32_t EndRange); 30 | 31 | // 32 | // Functions 33 | // 34 | 35 | inline void CreateConsole() 36 | { 37 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Create console..."); 38 | 39 | AllocConsole(); 40 | SetConsoleTitle("NARC Console"); 41 | 42 | freopen_s(reinterpret_cast(stdout), "CONOUT$", "w", stdout); 43 | freopen_s(reinterpret_cast(stdin), "CONIN$", "r", stdin); 44 | freopen_s(reinterpret_cast(stderr), "CONOUT$", "w", stderr); 45 | } 46 | 47 | inline void CloseConsole() 48 | { 49 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Close console..."); 50 | 51 | std::fclose(stdout); 52 | std::fclose(stdin); 53 | std::fclose(stderr); 54 | FreeConsole(); 55 | } 56 | 57 | inline void ClearInputBuffer() 58 | { 59 | std::cin.clear(); 60 | std::cin.ignore(std::cin.rdbuf()->in_avail(), '\n'); 61 | std::cin.rdbuf()->in_avail(); 62 | } 63 | 64 | inline bool QuestionForYesNo(const std::string_view Text) 65 | { 66 | char Response{ '\0' }; 67 | 68 | while (Response != 'y' && Response != 'n') 69 | { 70 | std::cout << Text; 71 | ClearInputBuffer(); 72 | 73 | if (std::string Input; std::getline(std::cin, Input)) 74 | { 75 | Response = Input.length() == 1 ? Input[0] : '\0'; 76 | } 77 | 78 | Response = static_cast(std::tolower(Response)); 79 | } 80 | 81 | return Response == 'y'; 82 | } 83 | 84 | inline std::int_fast32_t QuestionForValue(const std::string_view Text, const std::int_fast32_t BeginRange, const std::int_fast32_t EndRange) 85 | { 86 | const std::regex DigitsOnlyPattern(R"(\d+)", std::regex::optimize | std::regex::icase); 87 | 88 | while (true) 89 | { 90 | std::cout << Text; 91 | ClearInputBuffer(); 92 | 93 | if (std::string Input; std::getline(std::cin, Input)) 94 | { 95 | if (std::regex_match(Input, DigitsOnlyPattern)) 96 | { 97 | std::istringstream InputStream(Input); 98 | std::int_fast32_t InputValue{}; 99 | InputStream >> InputValue; 100 | 101 | if (InputValue >= BeginRange && InputValue <= EndRange) 102 | { 103 | return InputValue; 104 | } 105 | } 106 | } 107 | } 108 | } 109 | 110 | 111 | } // namespace Tools_Console -------------------------------------------------------------------------------- /Sources/Game_SkyboxHandling.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ***************************************** 3 | * * 4 | * Game_SkyboxHandling.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ***************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "Game_GlobalDefinitions.hpp" 17 | #include "Tools_ErrorHandling.hpp" 18 | #include "GFX_ImageHandling.hpp" 19 | 20 | namespace Game_SkyboxHandling 21 | { 22 | 23 | 24 | void Init(); 25 | void LoadSkyboxImage(); 26 | void Render(); 27 | void ClearSkyBox(); 28 | 29 | // 30 | // Variables and constants 31 | // 32 | 33 | inline lwmf::ShaderClass SkyboxShader{}; 34 | inline std::int_fast32_t SkyboxWidth{}; 35 | inline std::int_fast32_t SkyboxHeight{}; 36 | inline bool SkyBoxEnabled{}; 37 | 38 | // 39 | // Functions 40 | // 41 | 42 | inline void Init() 43 | { 44 | SkyboxShader.LoadShader("Default", Canvas); 45 | } 46 | 47 | inline void LoadSkyboxImage() 48 | { 49 | ClearSkyBox(); 50 | 51 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Init skybox..."); 52 | 53 | std::string INIFile{ LevelFolder }; 54 | INIFile += std::to_string(SelectedLevel); 55 | INIFile += "/LevelData/SkyboxConfig.ini"; 56 | 57 | if (Tools_ErrorHandling::CheckFileExistence(INIFile, StopOnError)) 58 | { 59 | SkyBoxEnabled = lwmf::ReadINIValue(INIFile, "SKYBOX", "SkyBoxEnabled"); 60 | 61 | if (SkyBoxEnabled) 62 | { 63 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Load skybox image..."); 64 | 65 | const lwmf::TextureStruct TempTexture { GFX_ImageHandling::ImportImage(lwmf::ReadINIValue(INIFile, "SKYBOX", "SkyBoxImageName")) }; 66 | 67 | SkyboxWidth = TempTexture.Width; 68 | SkyboxHeight = TempTexture.Height; 69 | 70 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Load skybox texture into GPU RAM..."); 71 | SkyboxShader.LoadTextureInGPU(TempTexture, &SkyboxShader.OGLTextureID); 72 | } 73 | } 74 | } 75 | 76 | inline void Render() 77 | { 78 | if (SkyBoxEnabled) 79 | { 80 | const std::int_fast32_t Left{ static_cast(lwmf::FastAtan2Approx(Plane.X, Plane.Y) / lwmf::DoublePI * -SkyboxWidth) }; 81 | const std::int_fast32_t Top{ static_cast(VerticalLookCamera * 360.0F - 180.0F) }; 82 | 83 | SkyboxShader.RenderTexture(&SkyboxShader.OGLTextureID, Left, Top, SkyboxWidth, SkyboxHeight, false, 1.0F); 84 | 85 | if (Left < SkyboxWidth - Canvas.Width) 86 | { 87 | SkyboxShader.RenderTexture(&SkyboxShader.OGLTextureID, Left - SkyboxWidth, Top, SkyboxWidth, SkyboxHeight, false, 1.0F); 88 | } 89 | } 90 | } 91 | 92 | inline void ClearSkyBox() 93 | { 94 | if (SkyBoxEnabled) 95 | { 96 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Delete skybox texture from GPU..."); 97 | glDeleteTextures(1, &SkyboxShader.OGLTextureID); 98 | } 99 | } 100 | 101 | 102 | } // namespace Game_SkyboxHandling 103 | 104 | -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_color.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | **************************************************** 3 | * * 4 | * lwmf_color - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | **************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include 15 | 16 | namespace lwmf 17 | { 18 | 19 | 20 | struct ColorStructRGBA final 21 | { 22 | std::int_fast32_t Red{}; 23 | std::int_fast32_t Green{}; 24 | std::int_fast32_t Blue{}; 25 | std::int_fast32_t Alpha{}; 26 | }; 27 | 28 | std::int_fast32_t RGBAtoINT(std::int_fast32_t Red, std::int_fast32_t Green, std::int_fast32_t Blue, std::int_fast32_t Alpha); 29 | ColorStructRGBA INTtoRGBA(std::int_fast32_t Color); 30 | std::int_fast32_t ShadeColor(std::int_fast32_t Color, float ShadeFactor, float Limit); 31 | std::int_fast32_t BlendColor(std::int_fast32_t Color1, std::int_fast32_t Color2, float Ratio); 32 | 33 | // 34 | // Variables and constants 35 | // 36 | 37 | // Define little-endian bitmasks 38 | inline constexpr std::uint_fast32_t RMask{ 0x000000FF }; 39 | inline constexpr std::uint_fast32_t GMask{ 0x0000FF00 }; 40 | inline constexpr std::uint_fast32_t BMask{ 0x00FF0000 }; 41 | inline constexpr std::uint_fast32_t AMask{ 0xFF000000 }; 42 | 43 | // 44 | // Functions 45 | // 46 | 47 | inline std::int_fast32_t RGBAtoINT(const std::int_fast32_t Red, const std::int_fast32_t Green, const std::int_fast32_t Blue, const std::int_fast32_t Alpha) 48 | { 49 | return static_cast(static_cast(Red) + (static_cast(Green) << 8) + (static_cast(Blue) << 16) + (static_cast(Alpha) << 24)); 50 | } 51 | 52 | inline ColorStructRGBA INTtoRGBA(const std::int_fast32_t Color) 53 | { 54 | return { (Color & static_cast(RMask)), (Color & static_cast(GMask)) >> 8, (Color & static_cast(BMask)) >> 16, (Color & static_cast(AMask)) >> 24 }; 55 | } 56 | 57 | inline std::int_fast32_t ShadeColor(const std::int_fast32_t Color, const float ShadeFactor, const float Limit) 58 | { 59 | if (ShadeFactor > Limit) 60 | { 61 | return AMask; 62 | } 63 | 64 | const float Weight{ (Limit - ShadeFactor) / Limit }; 65 | 66 | return static_cast(static_cast(Color & RMask) * Weight) 67 | | (static_cast(static_cast(Color & GMask) * Weight) & GMask) 68 | | (static_cast(static_cast(Color & BMask) * Weight) & BMask) 69 | | (static_cast(Color & AMask)); 70 | } 71 | 72 | inline std::int_fast32_t BlendColor(const std::int_fast32_t Color1, const std::int_fast32_t Color2, const float Ratio) 73 | { 74 | const __m128i ResultVec{ _mm_cvttps_epi32(_mm_add_ps( 75 | _mm_mul_ps(_mm_setr_ps(static_cast(Color1 & RMask), static_cast(Color1 & GMask), static_cast(Color1 & BMask), 0.0F), _mm_set_ps1(1.0F - Ratio)), 76 | _mm_mul_ps(_mm_setr_ps(static_cast(Color2 & RMask), static_cast(Color2 & GMask), static_cast(Color2 & BMask), 0.0F), _mm_set_ps1(Ratio)))) }; 77 | 78 | return static_cast(_mm_extract_epi32(ResultVec, 0) | (_mm_extract_epi32(ResultVec, 1) & GMask) | (_mm_extract_epi32(ResultVec, 2) & BMask) | (Color2 & AMask)); 79 | } 80 | 81 | 82 | } // namespace lwmf -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_multithreading.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************** 3 | * * 4 | * lwmf_multithreading - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | *************************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | namespace lwmf 24 | { 25 | 26 | 27 | class Multithreading final 28 | { 29 | public: 30 | Multithreading(); 31 | Multithreading(const Multithreading&) = delete; 32 | Multithreading(Multithreading&&) = delete; 33 | Multithreading& operator = (const Multithreading&) = delete; 34 | Multithreading& operator = (Multithreading&&) = delete; 35 | ~Multithreading(); 36 | 37 | templatevoid AddThread(F&& f, Args&& ... args); 38 | void WaitForThreads(); 39 | 40 | private: 41 | std::vector Workers{}; 42 | std::vector> Results{}; 43 | std::queue> Tasks{}; 44 | std::mutex QueueMutex{}; 45 | std::condition_variable Condition{}; 46 | bool Stop{}; 47 | }; 48 | 49 | inline Multithreading::Multithreading() 50 | { 51 | const std::size_t NumberOfThreads{ static_cast(std::thread::hardware_concurrency()) }; 52 | Workers.reserve(NumberOfThreads); 53 | LWMFSystemLog.AddEntry(LogLevel::Trace, __FILENAME__, __LINE__, "lwmf::Multithreading() (variable name:NumberOfThreads, value: " + std::to_string(NumberOfThreads) + ")"); 54 | 55 | for (std::size_t i{}; i < NumberOfThreads; ++i) 56 | { 57 | Workers.emplace_back([this] 58 | { 59 | while (true) 60 | { 61 | std::packaged_task Task; 62 | { 63 | std::unique_lock lock(QueueMutex); 64 | Condition.wait(lock, [this] { return Stop || !Tasks.empty(); }); 65 | 66 | if (Stop && Tasks.empty()) 67 | { 68 | return; 69 | } 70 | 71 | Task = std::move(Tasks.front()); 72 | Tasks.pop(); 73 | } 74 | 75 | Task(); 76 | } 77 | }); 78 | } 79 | } 80 | 81 | inline Multithreading::~Multithreading() 82 | { 83 | { 84 | const std::unique_lock lock(QueueMutex); 85 | Stop = true; 86 | } 87 | 88 | Condition.notify_all(); 89 | 90 | for (auto&& Worker : Workers) 91 | { 92 | Worker.join(); 93 | } 94 | } 95 | 96 | templatevoid Multithreading::AddThread(F&& f, Args&& ... args) 97 | { 98 | std::packaged_task()> Task([func = std::forward(f), args = std::make_tuple(std::forward(args)...)]() 99 | { 100 | return std::apply(func, std::move(args)); 101 | }); 102 | 103 | Results.emplace_back(Task.get_future()); 104 | const std::unique_lock lock(QueueMutex); 105 | Tasks.emplace(std::move(Task)); 106 | Condition.notify_one(); 107 | } 108 | 109 | inline void Multithreading::WaitForThreads() 110 | { 111 | for (const auto& Result : Results) 112 | { 113 | Result.wait(); 114 | } 115 | 116 | Results.clear(); 117 | Results.shrink_to_fit(); 118 | } 119 | 120 | 121 | } // namespace lwmf -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_rectangles.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | **************************************************** 3 | * * 4 | * lwmf_rectangles - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | **************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include 15 | 16 | #include "lwmf_general.hpp" 17 | #include "lwmf_texture.hpp" 18 | #include "lwmf_pixel.hpp" 19 | #include "lwmf_lines.hpp" 20 | 21 | namespace lwmf 22 | { 23 | 24 | void Rectangle(TextureStruct& Texture, std::int_fast32_t PosX, std::int_fast32_t PosY, std::int_fast32_t Width, std::int_fast32_t Height, std::int_fast32_t Color); 25 | void FilledRectangle(TextureStruct& Texture, std::int_fast32_t PosX, std::int_fast32_t PosY, std::int_fast32_t Width, std::int_fast32_t Height, std::int_fast32_t BorderColor, std::int_fast32_t FillColor); 26 | 27 | // 28 | // Functions 29 | // 30 | 31 | inline void Rectangle(TextureStruct& Texture, const std::int_fast32_t PosX, const std::int_fast32_t PosY, const std::int_fast32_t Width, const std::int_fast32_t Height, const std::int_fast32_t Color) 32 | { 33 | // Exit early if rectangle would not be visible (to small or coords are out of texture boundaries) 34 | if ((Width - 1 <= 0 || Height - 1 <= 0) || (PosX > Texture.Width || PosX + Width - 1 < 0 || PosY > Texture.Height || PosY + Height - 1 < 0)) 35 | { 36 | return; 37 | } 38 | 39 | Line(Texture, PosX, PosY, PosX + Width - 1, PosY, Color); 40 | Line(Texture, PosX, PosY, PosX, PosY + Height - 1, Color); 41 | Line(Texture, PosX, PosY + Height - 1, PosX + Width - 1, PosY + Height - 1, Color); 42 | Line(Texture, PosX + Width - 1, PosY, PosX + Width - 1, PosY + Height - 1, Color); 43 | } 44 | 45 | inline void FilledRectangle(TextureStruct& Texture, std::int_fast32_t PosX, const std::int_fast32_t PosY, const std::int_fast32_t Width, const std::int_fast32_t Height, const std::int_fast32_t BorderColor, const std::int_fast32_t FillColor) 46 | { 47 | // Exit early if rectangle would not be visible (to small or coords are out of texture boundaries) 48 | if ((Width <= 0 || Height <= 0) || (PosX > Texture.Width || PosX + Width - 1 < 0 || PosY > Texture.Height || PosY + Height - 1 < 0)) 49 | { 50 | return; 51 | } 52 | 53 | // First case; Rectangle = Full Screen/Texture 54 | if (PosX == 0 && PosY == 0 && Width == Texture.Width && Height == Texture.Height) 55 | { 56 | ClearTexture(Texture, FillColor); 57 | } 58 | // All the rest; we can use std::fill here... 59 | else 60 | { 61 | const std::int_fast32_t StartX{ (PosX < 0 && (std::abs(0 - PosX) <= Width)) ? std::abs(0 - PosX) : 0 }; 62 | const std::int_fast32_t TargetHeight{ (PosY + Height >= Texture.Height) ? Texture.Height - PosY : Height }; 63 | const std::int_fast32_t TargetWidth{ (PosX + Width >= Texture.Width) ? Texture.Width - PosX : Width }; 64 | 65 | if (PosX < 0) 66 | { 67 | PosX = 0; 68 | } 69 | 70 | for (std::int_fast32_t y{}, TempPosY{ PosY }; y < TargetHeight; ++y, ++TempPosY) 71 | { 72 | if (static_cast(TempPosY) < static_cast(Texture.Height)) 73 | { 74 | const auto Begin{ Texture.Pixels.begin() + TempPosY * Texture.Width + PosX }; 75 | std::fill(Begin, Begin + TargetWidth - StartX, FillColor); 76 | } 77 | } 78 | 79 | // Draw a border if needed... 80 | if (BorderColor != FillColor) 81 | { 82 | Rectangle(Texture, PosX, PosY, Width - StartX, Height, BorderColor); 83 | } 84 | } 85 | } 86 | 87 | 88 | } // namespace lwmf -------------------------------------------------------------------------------- /Sources/Game_WeaponDisplayClass.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * Game_WeaponDisplayClass.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | 15 | #include "Game_GlobalDefinitions.hpp" 16 | #include "Tools_ErrorHandling.hpp" 17 | #include "GFX_ImageHandling.hpp" 18 | #include "GFX_TextClass.hpp" 19 | #include "Game_DataStructures.hpp" 20 | 21 | class Game_WeaponDisplayClass final 22 | { 23 | public: 24 | void Init(); 25 | void Display(); 26 | 27 | private: 28 | GFX_TextClass AmmoText{}; 29 | GFX_TextClass CarriedAmmoText{}; 30 | GFX_TextClass WeaponText{}; 31 | 32 | lwmf::ShaderClass WeaponHUDShader{}; 33 | lwmf::IntRectStruct WeaponHUDRect{}; 34 | lwmf::ShaderClass CrosshairShader{}; 35 | }; 36 | 37 | inline void Game_WeaponDisplayClass::Init() 38 | { 39 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Init weapon hud..."); 40 | 41 | if (const std::string INIFile{ GameConfigFolder + "HUDWeaponDisplayConfig.ini" }; Tools_ErrorHandling::CheckFileExistence(INIFile, StopOnError)) 42 | { 43 | // Crosshair settings 44 | const lwmf::TextureStruct TempTextureCrosshair{ GFX_ImageHandling::ImportImage(lwmf::ReadINIValue(INIFile, "HUD", "CrosshairFileName")) }; 45 | 46 | CrosshairShader.LoadShader("Default", Canvas); 47 | CrosshairShader.LoadStaticTextureInGPU(TempTextureCrosshair, &CrosshairShader.OGLTextureID, Canvas.WidthMid - (TempTextureCrosshair.Width >> 1), Canvas.HeightMid - (TempTextureCrosshair.Height >> 1), TempTextureCrosshair.Width, TempTextureCrosshair.Height); 48 | 49 | // Weapon HUD settings 50 | const lwmf::TextureStruct TempTextureWeaponHUD{ GFX_ImageHandling::ImportImage(lwmf::ReadINIValue(INIFile, "HUD", "WeaponHUDFileName")) }; 51 | 52 | WeaponHUDRect.X = lwmf::ReadINIValue(INIFile, "HUD", "WeaponHUDPosX"); 53 | WeaponHUDRect.Y = lwmf::ReadINIValue(INIFile, "HUD", "WeaponHUDPosY"); 54 | WeaponHUDRect.Width = TempTextureWeaponHUD.Width; 55 | WeaponHUDRect.Height = TempTextureWeaponHUD.Height; 56 | 57 | WeaponHUDShader.LoadShader("Default", Canvas); 58 | WeaponHUDShader.LoadStaticTextureInGPU(TempTextureWeaponHUD, &WeaponHUDShader.OGLTextureID, WeaponHUDRect.X, WeaponHUDRect.Y, WeaponHUDRect.Width, WeaponHUDRect.Height); 59 | 60 | AmmoText.InitFont(GameConfigFolder + "HUDWeaponDisplayConfig.ini", "HUDAMMOFONT"); 61 | CarriedAmmoText.InitFont(GameConfigFolder + "HUDWeaponDisplayConfig.ini", "HUDCARRIEDAMMOFONT"); 62 | WeaponText.InitFont(GameConfigFolder + "HUDWeaponDisplayConfig.ini", "HUDWEAPONFONT"); 63 | } 64 | } 65 | 66 | inline void Game_WeaponDisplayClass::Display() 67 | { 68 | const lwmf::IntPointStruct WeaponTextPos{ WeaponHUDRect.X + WeaponText.GetOffset().X, WeaponHUDRect.Y + WeaponText.GetOffset().Y }; 69 | const lwmf::IntPointStruct CarriedAmmoTextPos{ WeaponHUDRect.X + CarriedAmmoText.GetOffset().X, WeaponHUDRect.Y + CarriedAmmoText.GetOffset().Y }; 70 | const lwmf::IntPointStruct AmmoTextPos{ WeaponHUDRect.X + AmmoText.GetOffset().X, WeaponHUDRect.Y + AmmoText.GetOffset().Y }; 71 | 72 | CrosshairShader.RenderStaticTexture(&CrosshairShader.OGLTextureID, true, 1.0F); 73 | WeaponHUDShader.RenderStaticTexture(&WeaponHUDShader.OGLTextureID, true, 1.0F); 74 | 75 | WeaponText.RenderText(Weapons[Player.SelectedWeapon].Name, WeaponTextPos.X, WeaponTextPos.Y); 76 | CarriedAmmoText.RenderText(Weapons[Player.SelectedWeapon].HUDCarriedAmmoInfo, CarriedAmmoTextPos.X, CarriedAmmoTextPos.Y); 77 | AmmoText.RenderText(Weapons[Player.SelectedWeapon].HUDAmmoInfo, AmmoTextPos.X, AmmoTextPos.Y); 78 | } -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_rawinput.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************** 3 | * * 4 | * lwmf_rawinput - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | *************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #define NOMINMAX 14 | #include 15 | #include 16 | #include 17 | 18 | #include "lwmf_logging.hpp" 19 | 20 | namespace lwmf 21 | { 22 | 23 | 24 | // Device identifier 25 | enum class DeviceIdentifier : USHORT 26 | { 27 | HID_MOUSE = 2, 28 | HID_KEYBOARD = 6 29 | }; 30 | 31 | std::string DeviceString(DeviceIdentifier Device); 32 | void RegisterRawInputDevice(HWND hWnd, DeviceIdentifier Device); 33 | void UnregisterRawInputDevice(DeviceIdentifier Device); 34 | void CatchMouse(HWND hWnd); 35 | 36 | // 37 | // Functions 38 | // 39 | 40 | inline std::string DeviceString(const DeviceIdentifier Device) 41 | { 42 | std::map DeviceTable 43 | { 44 | { DeviceIdentifier::HID_MOUSE, "HID_MOUSE (DeviceIdentifier 2)" }, 45 | { DeviceIdentifier::HID_KEYBOARD, "HID_KEYBOARD (DeviceIdentifier 6)" }, 46 | }; 47 | 48 | const std::map::iterator ItDeviceTable{ DeviceTable.find(Device) }; 49 | std::string DevString; 50 | 51 | if (ItDeviceTable == DeviceTable.end()) 52 | { 53 | LWMFSystemLog.AddEntry(LogLevel::Error, __FILENAME__, __LINE__, "lwmf::DeviceString(): Unknown HID device identifier!"); 54 | } 55 | else 56 | { 57 | DevString = ItDeviceTable->second; 58 | } 59 | 60 | return DevString; 61 | } 62 | 63 | inline void RegisterRawInputDevice(HWND hWnd, const DeviceIdentifier Device) 64 | { 65 | LWMFSystemLog.AddEntry(LogLevel::Info, __FILENAME__, __LINE__, "Register device " + DeviceString(Device) + "..."); 66 | 67 | RAWINPUTDEVICE RawInputDevice{}; 68 | RawInputDevice.usUsagePage = 1; 69 | RawInputDevice.usUsage = static_cast(Device); 70 | RawInputDevice.dwFlags = RIDEV_DEVNOTIFY; 71 | RawInputDevice.hwndTarget = hWnd; 72 | 73 | RegisterRawInputDevices(&RawInputDevice, 1, sizeof(RAWINPUTDEVICE)) == 0 ? LWMFSystemLog.AddEntry(LogLevel::Critical, __FILENAME__, __LINE__, "lwmf::RegisterRawInputDevice(): Error registering raw input device " + DeviceString(Device) + "!") : 74 | LWMFSystemLog.AddEntry(LogLevel::Info, __FILENAME__, __LINE__, "Successfully registered device " + DeviceString(Device)); 75 | } 76 | 77 | inline void UnregisterRawInputDevice(const DeviceIdentifier Device) 78 | { 79 | LWMFSystemLog.AddEntry(LogLevel::Info, __FILENAME__, __LINE__, "Unregister device " + DeviceString(Device) + "..."); 80 | 81 | RAWINPUTDEVICE RawInputDevice{}; 82 | RawInputDevice.usUsagePage = 1; 83 | RawInputDevice.usUsage = static_cast(Device); 84 | RawInputDevice.dwFlags = RIDEV_REMOVE; 85 | RawInputDevice.hwndTarget = nullptr; 86 | 87 | RegisterRawInputDevices(&RawInputDevice, 1, sizeof(RAWINPUTDEVICE)) == 0 ? LWMFSystemLog.AddEntry(LogLevel::Warn, __FILENAME__, __LINE__, "lwmf::UnregisterRawInputDevice(): Error unregistering raw input device " + DeviceString(Device) + "!") : 88 | LWMFSystemLog.AddEntry(LogLevel::Info, __FILENAME__, __LINE__, "Successfully unregistered device " + DeviceString(Device)); 89 | } 90 | 91 | inline void CatchMouse(HWND hWnd) 92 | { 93 | RECT WindowRect{}; 94 | GetClientRect(hWnd, &WindowRect); 95 | MapWindowPoints(hWnd, nullptr, reinterpret_cast(&WindowRect), 2); 96 | ClipCursor(&WindowRect); 97 | } 98 | 99 | 100 | } // namespace lwmf -------------------------------------------------------------------------------- /Sources/Game_PlayerClass.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * Game_PlayerClass.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "Game_GlobalDefinitions.hpp" 17 | #include "Tools_ErrorHandling.hpp" 18 | #include "Game_Effects.hpp" 19 | 20 | class Game_PlayerClass final 21 | { 22 | public: 23 | enum class PlayerSounds : std::int_fast32_t 24 | { 25 | FootSteps, 26 | Hurt, 27 | DeathScream 28 | }; 29 | 30 | void InitConfig(); 31 | void InitAudio(); 32 | void HurtPlayer(std::int_fast32_t DamageDealt); 33 | void PlayAudio(PlayerSounds Sound); 34 | void CloseAudio(); 35 | 36 | std::vector Sounds{}; 37 | lwmf::IntPointStruct FuturePos{}; 38 | lwmf::FloatPointStruct Pos{}; 39 | lwmf::FloatPointStruct Dir{}; 40 | lwmf::FloatPointStruct StepWidth{}; 41 | std::int_fast32_t SelectedWeapon{}; 42 | std::int_fast32_t Hitpoints{}; 43 | float MoveSpeed{}; 44 | float CollisionDetectionFactor{}; 45 | bool IsDead{}; 46 | }; 47 | 48 | 49 | inline void Game_PlayerClass::InitConfig() 50 | { 51 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Init player config..."); 52 | 53 | std::string INIFile{ LevelFolder }; 54 | INIFile += std::to_string(SelectedLevel); 55 | INIFile += "/PlayerData/Config.ini"; 56 | 57 | if (Tools_ErrorHandling::CheckFileExistence(INIFile, StopOnError)) 58 | { 59 | MoveSpeed = lwmf::ReadINIValue(INIFile, "GENERAL", "MoveSpeed"); 60 | Hitpoints = lwmf::ReadINIValue(INIFile, "GENERAL", "Hitpoints"); 61 | CollisionDetectionFactor = MoveSpeed + lwmf::ReadINIValue(INIFile, "GENERAL", "CollisionDetectionWallDist"); 62 | 63 | Pos = { lwmf::ReadINIValue(INIFile, "POSITION", "PosX"), lwmf::ReadINIValue(INIFile, "POSITION", "PosY") }; 64 | Dir = { lwmf::ReadINIValue(INIFile, "POSITION", "DirX"), lwmf::ReadINIValue(INIFile, "POSITION", "DirY") }; 65 | SelectedWeapon = lwmf::ReadINIValue(INIFile, "WEAPON", "SelectedWeapon"); 66 | } 67 | } 68 | 69 | inline void Game_PlayerClass::InitAudio() 70 | { 71 | CloseAudio(); 72 | 73 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Load player audio..."); 74 | 75 | Sounds.clear(); 76 | Sounds.shrink_to_fit(); 77 | 78 | std::string INIFile{ LevelFolder }; 79 | INIFile += std::to_string(SelectedLevel); 80 | INIFile += "/PlayerData/Config.ini"; 81 | 82 | if (Tools_ErrorHandling::CheckFileExistence(INIFile, StopOnError)) 83 | { 84 | // Get Footsteps audio 85 | Sounds.emplace_back(); 86 | Sounds[static_cast(PlayerSounds::FootSteps)].Load(lwmf::ReadINIValue(INIFile, "AUDIO", "FootStepsAudio")); 87 | 88 | // Get Hurt audio 89 | Sounds.emplace_back(); 90 | Sounds[static_cast(PlayerSounds::Hurt)].Load(lwmf::ReadINIValue(INIFile, "AUDIO", "HurtAudio")); 91 | 92 | // Get DeathScream audio 93 | Sounds.emplace_back(); 94 | Sounds[static_cast(PlayerSounds::DeathScream)].Load(lwmf::ReadINIValue(INIFile, "AUDIO", "DeathScreamAudio")); 95 | } 96 | } 97 | 98 | inline void Game_PlayerClass::HurtPlayer(const std::int_fast32_t DamageDealt) 99 | { 100 | Hitpoints -= DamageDealt; 101 | 102 | if (Hitpoints > 0) 103 | { 104 | PlayAudio(PlayerSounds::Hurt); 105 | Game_Effects::StartBloodstainDrawing(); 106 | } 107 | 108 | if (Hitpoints <= 0) 109 | { 110 | IsDead = true; 111 | PlayAudio(PlayerSounds::DeathScream); 112 | } 113 | } 114 | 115 | inline void Game_PlayerClass::PlayAudio(const PlayerSounds Sound) 116 | { 117 | Sounds[static_cast(Sound)].Play(); 118 | } 119 | 120 | inline void Game_PlayerClass::CloseAudio() 121 | { 122 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Close player audio..."); 123 | 124 | for (auto&& Sound : Sounds) 125 | { 126 | Sound.Close(); 127 | } 128 | } -------------------------------------------------------------------------------- /Sources/Tools_ErrorHandling.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * Tools_ErrorHandling.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | inline constexpr bool ContinueOnError{ true }; 21 | inline constexpr bool StopOnError{}; 22 | 23 | namespace Tools_ErrorHandling 24 | { 25 | 26 | 27 | bool CheckFileExistence(const std::string& FileName, bool ActionFlag); 28 | bool CheckFolderExistence(const std::string& FolderName, bool ActionFlag); 29 | bool CheckTextureSize(std::int_fast32_t Width, std::int_fast32_t Height, std::int_fast32_t Size, bool ActionFlag); 30 | templatevoid CheckAndClampRange(T& Value, T Min, T Max, const std::string& File, const std::string& VariableName); 31 | 32 | // 33 | // Functions 34 | // 35 | 36 | inline bool CheckFileExistence(const std::string& FileName, const bool ActionFlag) 37 | { 38 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Checking for file existence " + FileName + "..."); 39 | 40 | bool Result{ true }; 41 | 42 | if (const std::ifstream File(FileName, std::ios::in); File.fail()) 43 | { 44 | std::array ErrorMessage{}; 45 | strerror_s(ErrorMessage.data(), 100, errno); 46 | 47 | if (ActionFlag == StopOnError) 48 | { 49 | NARCLog.AddEntry(lwmf::LogLevel::Error, __FILENAME__, __LINE__, "CheckFileExistence(): Error loading " + FileName + ": " + std::string(ErrorMessage.data())); 50 | } 51 | else 52 | { 53 | NARCLog.AddEntry(lwmf::LogLevel::Warn, __FILENAME__, __LINE__, "CheckFileExistence(): Error loading " + FileName + ": " + std::string(ErrorMessage.data())); 54 | Result = false; 55 | } 56 | } 57 | 58 | return Result; 59 | } 60 | 61 | inline bool CheckFolderExistence(const std::string& FolderName, const bool ActionFlag) 62 | { 63 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Checking for folder existence " + FolderName + "..."); 64 | 65 | bool Result{ true }; 66 | 67 | struct stat Info{}; 68 | stat(FolderName.c_str(), &Info); 69 | 70 | if ((Info.st_mode & S_IFDIR) == 0) 71 | { 72 | if (ActionFlag == StopOnError) 73 | { 74 | NARCLog.AddEntry(lwmf::LogLevel::Error, __FILENAME__, __LINE__, "CheckFolderExistence(): Folder not found!"); 75 | } 76 | else 77 | { 78 | NARCLog.AddEntry(lwmf::LogLevel::Warn, __FILENAME__, __LINE__, "CheckFolderExistence(): Folder not found!"); 79 | Result = false; 80 | } 81 | } 82 | 83 | return Result; 84 | } 85 | 86 | inline bool CheckTextureSize(const std::int_fast32_t Width, const std::int_fast32_t Height, const std::int_fast32_t Size, const bool ActionFlag) 87 | { 88 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Checking texture for correct size..."); 89 | 90 | bool Result{ true }; 91 | 92 | if (Width != Size || Height != Size) 93 | { 94 | if (ActionFlag == StopOnError) 95 | { 96 | NARCLog.AddEntry(lwmf::LogLevel::Error, __FILENAME__, __LINE__, "CheckTextureSize(): TextureSize is " + std::to_string(Width) + " * " + std::to_string(Height) + " pixel!"); 97 | } 98 | else 99 | { 100 | NARCLog.AddEntry(lwmf::LogLevel::Warn, __FILENAME__, __LINE__, "CheckTextureSize(): TextureSize is " + std::to_string(Width) + " * " + std::to_string(Height) + " pixel!"); 101 | Result = false; 102 | } 103 | } 104 | 105 | return Result; 106 | } 107 | 108 | templatevoid CheckAndClampRange(T& Value, const T Min, const T Max, const std::string& File, const std::string& VariableName) 109 | { 110 | if (Value < Min || Value > Max) 111 | { 112 | Value = std::clamp(Value, Min, Max); 113 | NARCLog.AddEntry(lwmf::LogLevel::Warn, File.c_str(), __LINE__, VariableName + " needs to be between " + std::to_string(Min) + " and " + std::to_string(Max) + ". Value was clamped to given range."); 114 | } 115 | } 116 | 117 | 118 | } // namespace Tools_ErrorHandling 119 | -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_circles.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | **************************************************** 3 | * * 4 | * lwmf_circles - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | **************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | 15 | #include "lwmf_general.hpp" 16 | #include "lwmf_texture.hpp" 17 | #include "lwmf_pixel.hpp" 18 | #include "lwmf_lines.hpp" 19 | 20 | namespace lwmf 21 | { 22 | 23 | 24 | void Circle(TextureStruct& Texture, std::int_fast32_t CenterX, std::int_fast32_t CenterY, std::int_fast32_t Radius, std::int_fast32_t Color); 25 | void FilledCircle(TextureStruct& Texture, std::int_fast32_t CenterX, std::int_fast32_t CenterY, std::int_fast32_t Radius, std::int_fast32_t BorderColor, std::int_fast32_t FillColor); 26 | 27 | // 28 | // Functions 29 | // 30 | 31 | inline void Circle(TextureStruct& Texture, const std::int_fast32_t CenterX, const std::int_fast32_t CenterY, std::int_fast32_t Radius, const std::int_fast32_t Color) 32 | { 33 | // Exit early if circle would not be visible (to small or coords are out of texture boundaries) 34 | if (Radius <= 0 || (CenterX + Radius < 0 || CenterX - Radius > Texture.Width || CenterY + Radius < 0 || CenterY - Radius > Texture.Height)) 35 | { 36 | return; 37 | } 38 | 39 | IntPointStruct Point{ -Radius, 0 }; 40 | std::int_fast32_t Error{ 2 - (Radius << 1) }; 41 | 42 | // if complete circle is within texture boundaries, there is no reason to use SetPixelSafe... 43 | if ((CenterX - Radius >= 0 && CenterX + Radius < Texture.Width) && (CenterY - Radius >= 0 && CenterY + Radius < Texture.Height)) 44 | { 45 | do 46 | { 47 | Texture.Pixels[((CenterY + Point.Y) * Texture.Width) + (CenterX - Point.X)] = Color; 48 | Texture.Pixels[((CenterY - Point.X) * Texture.Width) + (CenterX - Point.Y)] = Color; 49 | Texture.Pixels[((CenterY - Point.Y) * Texture.Width) + (CenterX + Point.X)] = Color; 50 | Texture.Pixels[((CenterY + Point.X) * Texture.Width) + (CenterX + Point.Y)] = Color; 51 | 52 | Radius = Error; 53 | 54 | if (Radius <= Point.Y) 55 | { 56 | Error += (++Point.Y << 1) + 1; 57 | } 58 | 59 | if (Radius > Point.X || Error > Point.Y) 60 | { 61 | Error += (++Point.X << 1) + 1; 62 | } 63 | } while (Point.X < 0); 64 | } 65 | else 66 | { 67 | do 68 | { 69 | SetPixelSafe(Texture, CenterX - Point.X, CenterY + Point.Y, Color); 70 | SetPixelSafe(Texture, CenterX - Point.Y, CenterY - Point.X, Color); 71 | SetPixelSafe(Texture, CenterX + Point.X, CenterY - Point.Y, Color); 72 | SetPixelSafe(Texture, CenterX + Point.Y, CenterY + Point.X, Color); 73 | 74 | Radius = Error; 75 | 76 | if (Radius <= Point.Y) 77 | { 78 | Error += (++Point.Y << 1) + 1; 79 | } 80 | 81 | if (Radius > Point.X || Error > Point.Y) 82 | { 83 | Error += (++Point.X << 1) + 1; 84 | } 85 | } while (Point.X < 0); 86 | } 87 | } 88 | 89 | inline void FilledCircle(TextureStruct& Texture, const std::int_fast32_t CenterX, const std::int_fast32_t CenterY, const std::int_fast32_t Radius, const std::int_fast32_t BorderColor, const std::int_fast32_t FillColor) 90 | { 91 | // Exit early if circle would not be visible (to small or coords out of texture boundaries) 92 | if (Radius <= 0 || (CenterX + Radius < 0 || CenterX - Radius > Texture.Width || CenterY + Radius < 0 || CenterY - Radius > Texture.Height)) 93 | { 94 | return; 95 | } 96 | 97 | std::int_fast32_t LargestX{ Radius }; 98 | const std::int_fast32_t POWRadius{ Radius * Radius }; 99 | 100 | for (std::int_fast32_t y{}; y <= Radius; ++y) 101 | { 102 | const std::int_fast32_t POWY{ y * y }; 103 | 104 | for (std::int_fast32_t x{ LargestX }; x >= 0; --x) 105 | { 106 | if ((x * x) + POWY <= POWRadius) 107 | { 108 | Line(Texture, CenterX - x, CenterY + y, CenterX + x, CenterY + y, FillColor); 109 | Line(Texture, CenterX - x, CenterY - y, CenterX + x, CenterY - y, FillColor); 110 | LargestX = x; 111 | break; 112 | } 113 | } 114 | } 115 | 116 | if (BorderColor != FillColor) 117 | { 118 | Circle(Texture, CenterX, CenterY, Radius, BorderColor); 119 | } 120 | } 121 | 122 | 123 | } // namespace lwmf -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_math.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************** 3 | * * 4 | * lwmf_math - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | ****************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "lwmf_general.hpp" 18 | 19 | namespace lwmf 20 | { 21 | 22 | 23 | templateT Lerp(T t, T a, T b); 24 | templateT CalcEuclidianDistance(T x1, T x2, T y1, T y2); 25 | templateT CalcChebyshevDistance(T x1, T x2, T y1, T y2); 26 | templateT CalcChebyshevDistance(std::int_fast32_t x1, std::int_fast32_t x2, std::int_fast32_t y1, std::int_fast32_t y2); 27 | templateT CalcManhattanDistance(T x1, T x2, T y1, T y2); 28 | templateT CalcManhattanDistance(std::int_fast32_t x1, std::int_fast32_t x2, std::int_fast32_t y1, std::int_fast32_t y2); 29 | float FastAtan2Approx(float y, float x); 30 | std::uint32_t XorShift32(); 31 | 32 | // 33 | // Variables and constants 34 | // 35 | 36 | inline constexpr float PI{ 3.14159265358979F }; 37 | inline constexpr float DoublePI{ PI * 2.0F }; 38 | inline constexpr float HalfPI{ PI / 2.0F }; 39 | inline constexpr float OneQrtPI{ PI / 4.0F }; 40 | inline constexpr float RAD2DEG{ PI / 180.0F }; 41 | inline constexpr float ThreeQrtPI{ 3.0F * (PI / 4.0F) }; 42 | inline const float SQRT1_2{ 1.0F / std::sqrtf(2.0F) }; 43 | 44 | // 45 | // Functions 46 | // 47 | 48 | templateT Lerp(const T t, const T a, const T b) 49 | { 50 | return a + t * (b - a); 51 | } 52 | 53 | templateT CalcEuclidianDistance(const T x1, const T x2, const T y1, const T y2) 54 | { 55 | return std::hypot(x1 - x2, y1 - y2); 56 | } 57 | 58 | templateT CalcChebyshevDistance(T x1, T x2, T y1, T y2) 59 | { 60 | return std::max(std::abs(x1 - x2), std::abs(y1 - y2)); 61 | } 62 | 63 | templateT CalcChebyshevDistance(const std::int_fast32_t x1, const std::int_fast32_t x2, const std::int_fast32_t y1, const std::int_fast32_t y2) 64 | { 65 | return static_cast(std::max(std::abs(x1 - x2), std::abs(y1 - y2))); 66 | } 67 | 68 | templateT CalcManhattanDistance(T x1, T x2, T y1, T y2) 69 | { 70 | return (std::abs(x1 - x2) + std::abs(y1 - y2)); 71 | } 72 | 73 | templateT CalcManhattanDistance(const std::int_fast32_t x1, const std::int_fast32_t x2, const std::int_fast32_t y1, const std::int_fast32_t y2) 74 | { 75 | return static_cast(std::abs(x1 - x2) + std::abs(y1 - y2)); 76 | } 77 | 78 | // atan2 approximation 79 | // https://www.dsprelated.com/showarticle/1052.php 80 | // Modified and optimized in some details 81 | 82 | inline float FastAtan2Approx(const float y, const float x) 83 | { 84 | constexpr float n1{ 0.97239411F }; 85 | constexpr float n2{ -0.19194795F }; 86 | float Result{}; 87 | 88 | if (std::fabsf(x) > FLT_EPSILON) 89 | { 90 | const union { float flVal; std::uint_fast32_t nVal; } tYSign = { y }; 91 | 92 | if (std::fabsf(x) >= std::fabsf(y)) 93 | { 94 | union { float flVal; std::uint_fast32_t nVal; } tOffset = { lwmf::PI }; 95 | const union { float flVal; std::uint_fast32_t nVal; } tXSign = { x }; 96 | tOffset.nVal |= tYSign.nVal & 0x80000000U; 97 | tOffset.nVal *= tXSign.nVal >> 31; 98 | Result = tOffset.flVal; 99 | const float z{ y / x }; 100 | Result += (n1 + n2 * z * z) * z; 101 | } 102 | else 103 | { 104 | union { float flVal; std::uint_fast32_t nVal; } tOffset = { lwmf::HalfPI }; 105 | tOffset.nVal |= tYSign.nVal & 0x80000000U; 106 | Result = tOffset.flVal; 107 | const float z{ x / y }; 108 | Result -= (n1 + n2 * z * z) * z; 109 | } 110 | } 111 | else if (y > 0.0F) 112 | { 113 | Result = lwmf::HalfPI; 114 | } 115 | else if (y < 0.0F) 116 | { 117 | Result = -lwmf::HalfPI; 118 | } 119 | 120 | return Result; 121 | } 122 | 123 | // Simple random number generator based on XorShift 124 | // https://en.wikipedia.org/wiki/Xorshift 125 | 126 | inline std::uint32_t XorShift32() 127 | { 128 | static std::uint32_t Seed{ 7 }; 129 | 130 | Seed ^= Seed << 13; 131 | Seed ^= Seed >> 17; 132 | return Seed ^= Seed << 5; 133 | } 134 | 135 | 136 | } // namespace lwmf 137 | -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_perlinnoise.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************************** 3 | * * 4 | * lwmf_perlinnoise - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | ****************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include 15 | 16 | #include "lwmf_math.hpp" 17 | 18 | namespace lwmf 19 | { 20 | 21 | // Perlin noise, based on Ken Perlin´s famous and brilliant work 22 | // 23 | // https://cs.nyu.edu/~perlin/noise/ 24 | 25 | class PerlinNoise 26 | { 27 | public: 28 | PerlinNoise(); 29 | float Noise(float x, float y, float z); 30 | 31 | private: 32 | std::vector Permutation 33 | { 34 | 151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142, 35 | 8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117, 36 | 35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71, 37 | 134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41, 38 | 55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89, 39 | 18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226, 40 | 250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182, 41 | 189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167, 42 | 43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246, 43 | 97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239, 44 | 107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254, 45 | 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180 46 | }; 47 | 48 | static float Fade(float t); 49 | static float Gradient(std::int_fast32_t Hash, float x, float y, float z); 50 | }; 51 | 52 | PerlinNoise::PerlinNoise() 53 | { 54 | Permutation.insert(Permutation.end(), Permutation.begin(), Permutation.end()); 55 | } 56 | 57 | inline float PerlinNoise::Fade(const float t) 58 | { 59 | return t * t * t * (t * (t * 6.0F - 15.0F) + 10.0F); 60 | } 61 | 62 | inline float PerlinNoise::Gradient(const std::int_fast32_t Hash, const float x, const float y, const float z) 63 | { 64 | switch (Hash & 15) 65 | { 66 | case 0: return x + y; 67 | case 1: return -x + y; 68 | case 2: return x - y; 69 | case 3: return -x - y; 70 | case 4: return x + z; 71 | case 5: return -x + z; 72 | case 6: return x - z; 73 | case 7: return -x - z; 74 | case 8: return y + z; 75 | case 9: return -y + z; //-V1037 76 | case 10: return y - z; 77 | case 11: return -y - z; //-V1037 78 | case 12: return y + x; 79 | case 13: return -y + z; 80 | case 14: return y - x; 81 | case 15: return -y - z; 82 | default: return 0.0F; 83 | } 84 | } 85 | 86 | inline float PerlinNoise::Noise(float x, float y, float z) 87 | { 88 | const std::int_fast32_t X{ static_cast(x) & 255 }; 89 | const std::int_fast32_t Y{ static_cast(y) & 255 }; 90 | const std::int_fast32_t Z{ static_cast(z) & 255 }; 91 | 92 | x -= static_cast(x); 93 | y -= static_cast(y); 94 | z -= static_cast(z); 95 | 96 | const float u{ Fade(x) }; 97 | const float v{ Fade(y) }; 98 | 99 | const std::int_fast32_t A{ Permutation[X] + Y }; 100 | const std::int_fast32_t AA{ Permutation[A] + Z }; 101 | const std::int_fast32_t AB{ Permutation[A + 1] + Z }; 102 | const std::int_fast32_t B{ Permutation[X + 1] + Y }; 103 | const std::int_fast32_t BA{ Permutation[B] + Z }; 104 | const std::int_fast32_t BB{ Permutation[B + 1] + Z }; 105 | 106 | return (Lerp(Fade(z), Lerp(v, 107 | Lerp(u, Gradient(Permutation[AA], x, y, z), Gradient(Permutation[BA], x - 1.0F, y, z)), 108 | Lerp(u, Gradient(Permutation[AB], x, y - 1.0F, z), Gradient(Permutation[BB], x - 1.0F, y - 1.0F, z))), 109 | Lerp(v, Lerp(u, Gradient(Permutation[AA + 1], x, y, z - 1.0F), Gradient(Permutation[BA + 1], x - 1.0F, y, z - 1.0F)), 110 | Lerp(u, Gradient(Permutation[AB + 1], x, y - 1.0F, z - 1.0F), Gradient(Permutation[BB + 1], x - 1.0F, y - 1.0F, z - 1.0F)))) + 1.0F) * 0.5F; 111 | } 112 | 113 | 114 | } // namespace lwmf 115 | -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_ellipses.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | **************************************************** 3 | * * 4 | * lwmf_ellipses - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | **************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | 15 | #include "lwmf_general.hpp" 16 | #include "lwmf_texture.hpp" 17 | #include "lwmf_pixel.hpp" 18 | 19 | namespace lwmf 20 | { 21 | 22 | 23 | void DrawEllipsePoints(TextureStruct& Texture, const IntPointStruct& Point, const IntPointStruct& Center, std::int_fast32_t Color, bool SafeFlag); 24 | void Ellipse(TextureStruct& Texture, std::int_fast32_t CenterX, std::int_fast32_t CenterY, std::int_fast32_t RadiusX, std::int_fast32_t RadiusY, std::int_fast32_t Color); 25 | 26 | // 27 | // Functions 28 | // 29 | 30 | inline void DrawEllipsePoints(TextureStruct& Texture, const IntPointStruct& Point, const IntPointStruct& Center, const std::int_fast32_t Color, const bool SafeFlag) 31 | { 32 | if (SafeFlag) 33 | { 34 | Texture.Pixels[((Center.Y + Point.Y) * Texture.Width) + (Center.X + Point.X)] = Color; 35 | Texture.Pixels[((Center.Y + Point.Y) * Texture.Width) + (Center.X - Point.X)] = Color; 36 | Texture.Pixels[((Center.Y - Point.Y) * Texture.Width) + (Center.X + Point.X)] = Color; 37 | Texture.Pixels[((Center.Y - Point.Y) * Texture.Width) + (Center.X - Point.X)] = Color; 38 | } 39 | else 40 | { 41 | SetPixelSafe(Texture, Center.X + Point.X, Center.Y + Point.Y, Color); 42 | SetPixelSafe(Texture, Center.X - Point.X, Center.Y + Point.Y, Color); 43 | SetPixelSafe(Texture, Center.X + Point.X, Center.Y - Point.Y, Color); 44 | SetPixelSafe(Texture, Center.X - Point.X, Center.Y - Point.Y, Color); 45 | } 46 | } 47 | 48 | inline void Ellipse(TextureStruct& Texture, const std::int_fast32_t CenterX, const std::int_fast32_t CenterY, const std::int_fast32_t RadiusX, const std::int_fast32_t RadiusY, const std::int_fast32_t Color) 49 | { 50 | // Exit early if ellipse would not be visible (to small or coords out of texture boundaries) 51 | if ((RadiusX <= 0 && RadiusY <= 0) || CenterX + RadiusX < 0 || CenterX - RadiusX > Texture.Width || CenterY + RadiusY < 0 || CenterY - RadiusY > Texture.Height) 52 | { 53 | return; 54 | } 55 | 56 | // if complete ellipse is within texture boundaries, there is no reason to use SetPixelSafe... 57 | const bool SafeFlag{ ((CenterX - RadiusX >= 0 && CenterX + RadiusX < Texture.Width) && (CenterY - RadiusY >= 0 && CenterY + RadiusY < Texture.Height)) }; 58 | 59 | const IntPointStruct RadiusTemp{ RadiusX * RadiusX , RadiusY * RadiusY }; 60 | const IntPointStruct TwoRadiusTemp{ RadiusTemp.X << 1, RadiusTemp.Y << 1 }; 61 | IntPointStruct Point{ 0, RadiusY }; 62 | IntPointStruct Temp{ TwoRadiusTemp.Y * Point.X, TwoRadiusTemp.X * Point.Y }; 63 | float p1{ static_cast(RadiusTemp.Y - (RadiusTemp.X * RadiusY) + (RadiusTemp.X >> 2)) }; 64 | 65 | while (Temp.X <= Temp.Y) 66 | { 67 | DrawEllipsePoints(Texture, Point, { CenterX, CenterY }, Color, SafeFlag); 68 | 69 | ++Point.X; 70 | 71 | if (p1 < 0.0F) 72 | { 73 | Temp.X = TwoRadiusTemp.Y * Point.X; 74 | p1 += static_cast(Temp.X + RadiusTemp.Y); 75 | } 76 | else 77 | { 78 | --Point.Y; 79 | Temp = { TwoRadiusTemp.Y * Point.X, TwoRadiusTemp.X * Point.Y }; 80 | p1 += static_cast(Temp.X - Temp.Y + RadiusTemp.Y); 81 | } 82 | 83 | DrawEllipsePoints(Texture, Point, { CenterX, CenterY }, Color, SafeFlag); 84 | } 85 | 86 | float p2{ (static_cast(RadiusTemp.Y) * (static_cast(Point.X) + 0.5F) * (static_cast(Point.X) + 0.5F)) + static_cast((RadiusTemp.X * (Point.Y - 1) * (Point.Y - 1)) - (RadiusTemp.X * RadiusTemp.Y)) }; 87 | Temp = { 0, 0 }; 88 | 89 | while (Point.Y >= 0) 90 | { 91 | DrawEllipsePoints(Texture, Point, { CenterX, CenterY }, Color, SafeFlag); 92 | 93 | --Point.Y; 94 | 95 | if (p2 < 0.0F) 96 | { 97 | ++Point.X; 98 | Temp = { TwoRadiusTemp.Y * Point.X, TwoRadiusTemp.X * Point.Y };; 99 | p2 += static_cast(Temp.X - Temp.Y + RadiusTemp.X); 100 | } 101 | else 102 | { 103 | Temp.Y = TwoRadiusTemp.X * Point.Y; 104 | p2 -= static_cast(Temp.Y + RadiusTemp.X); 105 | } 106 | 107 | DrawEllipsePoints(Texture, Point, { CenterX, CenterY }, Color, SafeFlag); 108 | } 109 | } 110 | 111 | 112 | } // namespace lwmf -------------------------------------------------------------------------------- /NARC.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Headerdateien 20 | 21 | 22 | Headerdateien 23 | 24 | 25 | Headerdateien 26 | 27 | 28 | Headerdateien 29 | 30 | 31 | Headerdateien 32 | 33 | 34 | Headerdateien 35 | 36 | 37 | Headerdateien 38 | 39 | 40 | Headerdateien 41 | 42 | 43 | Headerdateien 44 | 45 | 46 | Headerdateien 47 | 48 | 49 | Headerdateien 50 | 51 | 52 | Headerdateien 53 | 54 | 55 | Headerdateien 56 | 57 | 58 | Headerdateien 59 | 60 | 61 | Headerdateien 62 | 63 | 64 | Headerdateien 65 | 66 | 67 | Headerdateien 68 | 69 | 70 | Headerdateien 71 | 72 | 73 | Headerdateien 74 | 75 | 76 | Headerdateien 77 | 78 | 79 | Headerdateien 80 | 81 | 82 | Headerdateien 83 | 84 | 85 | Headerdateien 86 | 87 | 88 | Headerdateien 89 | 90 | 91 | Headerdateien 92 | 93 | 94 | Headerdateien 95 | 96 | 97 | Headerdateien 98 | 99 | 100 | Headerdateien 101 | 102 | 103 | Headerdateien 104 | 105 | 106 | 107 | 108 | Quelldateien 109 | 110 | 111 | -------------------------------------------------------------------------------- /Sources/Game_DataStructures.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ****************************************** 3 | * * 4 | * Game_DataStructures.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ****************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include "Game_PlayerClass.hpp" 18 | 19 | // Tried tp "pad" the elements by their size.. 20 | 21 | // 22 | // Structure for entity asset data (textures, sounds etc.) 23 | // 24 | 25 | struct EntityAssetStruct final 26 | { 27 | std::vector> WalkingTextures{}; 28 | std::vector AttackTextures{}; 29 | std::vector KillTextures{}; 30 | std::vector Sounds{}; 31 | std::string Name; 32 | std::int_fast32_t Number{}; 33 | }; 34 | 35 | // 36 | // Structure for entities 37 | // 38 | 39 | enum class EntityTypes : std::int_fast32_t 40 | { 41 | Clear, 42 | Neutral, 43 | Enemy, 44 | Player, 45 | AmmoBox, 46 | Turret 47 | }; 48 | 49 | struct EntityStruct final 50 | { 51 | std::list PathFindingWayPoints{}; 52 | std::map ContainedItem{}; 53 | EntityTypes Type{}; 54 | lwmf::FloatPointStruct Pos{}; 55 | lwmf::FloatPointStruct Dir{}; 56 | std::string TypeName; 57 | std::int_fast32_t Number{}; 58 | std::int_fast32_t TypeNumber{}; 59 | std::int_fast32_t WaitTimer{}; 60 | std::int_fast32_t Hitpoints{}; 61 | std::int_fast32_t WalkAnimCounter{}; 62 | std::int_fast32_t WalkAnimStep{}; 63 | std::int_fast32_t WalkAnimStepWidth{}; 64 | std::int_fast32_t AttackMode{}; 65 | std::int_fast32_t AttackAnimCounter{}; 66 | std::int_fast32_t AttackAnimStep{}; 67 | std::int_fast32_t AttackAnimStepWidth{}; 68 | std::int_fast32_t HitAnimDuration{}; 69 | std::int_fast32_t HitAnimCounter{}; 70 | std::int_fast32_t KillAnimStep{}; 71 | std::int_fast32_t KillAnimStepWidth{}; 72 | std::int_fast32_t KillAnimCounter{}; 73 | std::int_fast32_t MovementBehaviour{}; 74 | std::int_fast32_t RotationFactor{}; 75 | std::int_fast32_t DamagePoints{}; 76 | std::int_fast32_t DamageHitrate{}; 77 | std::int_fast32_t DamageHitrateCounter{}; 78 | std::int_fast32_t PathFindingStart{}; 79 | std::int_fast32_t PathFindingTarget{}; 80 | float MoveSpeed{}; 81 | float MoveV{}; 82 | char Direction{ '\0' }; 83 | bool AttackFinished{}; 84 | bool AttackAnimEnabled{}; 85 | bool KillAnimEnabled{}; 86 | bool IsPickedUp{}; 87 | bool IsDead{}; 88 | bool IsHit{}; 89 | bool ValidPathFound{}; 90 | }; 91 | 92 | // 93 | // Structure for weapons 94 | // 95 | 96 | struct WeaponStruct final 97 | { 98 | lwmf::ShaderClass WeaponShader{}; 99 | lwmf::ShaderClass MuzzleFlashShader{}; 100 | std::vector Sounds{}; 101 | lwmf::IntRectStruct WeaponRect{}; 102 | lwmf::IntRectStruct MuzzleFlashRect{}; 103 | std::string HUDAmmoInfo; 104 | std::string HUDCarriedAmmoInfo; 105 | std::string Name; 106 | std::int_fast32_t Type{}; 107 | std::int_fast32_t ReloadDuration{}; 108 | std::int_fast32_t ReloadCounter{}; 109 | std::int_fast32_t FadeInOutSpeed{}; 110 | std::int_fast32_t CarriedAmmo{}; 111 | std::int_fast32_t Number{}; 112 | std::int_fast32_t MuzzleFlashDuration{}; 113 | std::int_fast32_t MuzzleFlashCounter{}; 114 | std::int_fast32_t Capacity{}; 115 | std::int_fast32_t LoadedRounds{}; 116 | std::int_fast32_t Damage{}; 117 | std::int_fast32_t Cadence{}; 118 | std::int_fast32_t CadenceCounter{}; 119 | float Weight{}; 120 | float PaceFactor{}; 121 | }; 122 | 123 | // 124 | // Structures for doors 125 | // 126 | 127 | struct DoorTypeStruct final 128 | { 129 | lwmf::TextureStruct OriginalTexture{}; 130 | std::vector Sounds{}; 131 | std::int_fast32_t OpenCloseSpeed{}; 132 | std::int_fast32_t StayOpenTime{}; 133 | float MaximumOpenPercent{}; 134 | float MinimumOpenPercent{}; 135 | }; 136 | 137 | struct DoorStruct final 138 | { 139 | enum class States : std::int_fast32_t 140 | { 141 | Closed, 142 | Triggered, 143 | Open 144 | }; 145 | 146 | lwmf::TextureStruct AnimTexture{}; 147 | lwmf::FloatPointStruct Pos{}; 148 | States State{}; 149 | std::int_fast32_t DoorType{}; 150 | std::int_fast32_t Number{}; 151 | std::int_fast32_t StayOpenCounter{}; 152 | float CurrentOpenPercent{}; 153 | bool CloseAudioFlag{}; 154 | }; 155 | 156 | // 157 | // Init all needed objects 158 | // 159 | 160 | inline std::vector EntityAssets{}; 161 | inline std::vector Entities{}; 162 | inline std::vector Weapons{}; 163 | inline std::vector DoorTypes{}; 164 | inline std::vector Doors{}; 165 | inline Game_PlayerClass Player; -------------------------------------------------------------------------------- /Tools/7Zip/readme.txt: -------------------------------------------------------------------------------- 1 | 7-Zip Extra 24.08 2 | ----------------- 3 | 4 | 7-Zip Extra is package of extra modules of 7-Zip. 5 | 6 | 7-Zip Copyright (C) 1999-2024 Igor Pavlov. 7 | 8 | 7-Zip is free software. Read License.txt for more information about license. 9 | 10 | Source code of binaries can be found at: 11 | http://www.7-zip.org/ 12 | 13 | This package contains the following files: 14 | 15 | 7za.exe - standalone console version of 7-Zip with reduced formats support. 16 | 7za.dll - library for working with 7z archives 17 | 7zxa.dll - library for extracting from 7z archives 18 | License.txt - license information 19 | readme.txt - this file 20 | 21 | Far\ - plugin for Far Manager 22 | x64\ - binaries for x64 23 | arm64\ - binaries for arm64 24 | 25 | 26 | All 32-bit binaries can work in: 27 | Windows 2000 / 2003 / 2008 / XP / Vista / 7 / 8 / 10 28 | and in any Windows x64 version with WoW64 support. 29 | All x64 binaries can work in any Windows x64 version. 30 | 31 | All x86 and x64 binaries use msvcrt.dll. 32 | 33 | 7za.exe 34 | ------- 35 | 36 | 7za.exe - is a standalone console version of 7-Zip with reduced formats support. 37 | 38 | Extra: 7za.exe : support for only some formats of 7-Zip. 39 | 7-Zip: 7z.exe with 7z.dll : support for all formats of 7-Zip. 40 | 41 | 7za.exe and 7z.exe from 7-Zip have same command line interface. 42 | 7za.exe doesn't use external DLL files. 43 | 44 | You can read Help File (7-zip.chm) from 7-Zip package for description 45 | of all commands and switches for 7za.exe and 7z.exe. 46 | 47 | 7za.exe features: 48 | 49 | - High compression ratio in 7z format 50 | - Supported formats: 51 | - Packing / unpacking: 7z, xz, ZIP, GZIP, BZIP2 and TAR 52 | - Unpacking only: lzma, CAB, ZSTD. 53 | - Highest compression ratio for ZIP and GZIP formats. 54 | - Fast compression and decompression 55 | - Strong AES-256 encryption in 7z and ZIP formats. 56 | 57 | Note: another package "LZMA SDK" contains 7zr.exe - that is reduced version of 7za.exe. 58 | But you can use 7zr.exe as "public domain" code. 59 | 60 | 61 | 62 | DLL files 63 | --------- 64 | 65 | 7za.dll and 7zxa.dll are reduced versions of 7z.dll from 7-Zip. 66 | 7za.dll and 7zxa.dll support only 7z format. 67 | Note: 7z.dll is main DLL file that works with all archive types in 7-Zip. 68 | 69 | 7za.dll and 7zxa.dll support the following decoding methods: 70 | - LZMA, LZMA2, PPMD, BCJ, BCJ2, COPY, 7zAES, BZip2, Deflate. 71 | 72 | 7za.dll also supports 7z encoding with the following encoding methods: 73 | - LZMA, LZMA2, PPMD, BCJ, BCJ2, COPY, 7zAES. 74 | 75 | 7za.dll and 7zxa.dll work via COM interfaces. 76 | But these DLLs don't use standard COM interfaces for objects creating. 77 | 78 | Look also example code that calls DLL functions (in source code of 7-Zip): 79 | 80 | 7zip\UI\Client7z 81 | 82 | Another example of binary that uses these interface is 7-Zip itself. 83 | The following binaries from 7-Zip use 7z.dll: 84 | - 7z.exe (console version) 85 | - 7zG.exe (GUI version) 86 | - 7zFM.exe (7-Zip File Manager) 87 | 88 | Note: The source code of LZMA SDK also contains the code for similar DLLs 89 | (DLLs without BZip2, Deflate support). And these files from LZMA SDK can be 90 | used as "public domain" code. If you use LZMA SDK files, you don't need to 91 | follow GNU LGPL rules, if you want to change the code. 92 | 93 | 94 | 95 | 96 | License FAQ 97 | ----------- 98 | 99 | Can I use the EXE or DLL files from 7-Zip in a commercial application? 100 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101 | Yes, but you are required to specify in documentation for your application: 102 | (1) that you used parts of the 7-Zip program, 103 | (2) that 7-Zip is licensed under the GNU LGPL license and 104 | (3) you must give a link to www.7-zip.org, where the source code can be found. 105 | 106 | 107 | Can I use the source code of 7-Zip in a commercial application? 108 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 109 | Since 7-Zip is licensed under the GNU LGPL you must follow the rules of that license. 110 | In brief, it means that any LGPL'ed code must remain licensed under the LGPL. 111 | For instance, you can change the code from 7-Zip or write a wrapper for some 112 | code from 7-Zip and compile it into a DLL; but, the source code of that DLL 113 | (including your modifications / additions / wrapper) must be licensed under 114 | the LGPL or GPL. 115 | Any other code in your application can be licensed as you wish. This scheme allows 116 | users and developers to change LGPL'ed code and recompile that DLL. That is the 117 | idea of free software. Read more here: http://www.gnu.org/. 118 | 119 | 120 | 121 | Note: You can look also LZMA SDK, which is available under a more liberal license. 122 | 123 | 124 | --- 125 | End of document 126 | -------------------------------------------------------------------------------- /Sources/lwmf/lwmf_inifile.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | **************************************************** 3 | * * 4 | * lwmf_inifile - lightweight media framework * 5 | * * 6 | * (C) 2019 - present by Stefan Kubsch * 7 | * * 8 | **************************************************** 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #include "lwmf_logging.hpp" 22 | 23 | namespace lwmf 24 | { 25 | 26 | 27 | templateT ReadINIValue(const std::string& INIFileName, const std::string& Section, const std::string& Key); 28 | templatevoid WriteINIValue(const std::string& Section, const std::string& Key, T Value, const std::string& INIFileName); 29 | std::int_fast32_t ReadINIValueRGBA(const std::string& INIFileName, const std::string& Section); 30 | 31 | // 32 | // Functions 33 | // 34 | 35 | templateT ReadINIValue(const std::string& INIFileName, const std::string& Section, const std::string& Key) 36 | { 37 | LWMFSystemLog.AddEntry(LogLevel::Info, __FILENAME__, __LINE__, "Reading value from INI file " + INIFileName + ": [" + Section + "] / " + Key + "..."); 38 | 39 | const std::regex SectionTest(R"(\[(.*?)\])", std::regex::optimize | std::regex::icase); 40 | const std::regex ValueTest(R"((\w+)=([^\#]+(?!\+{3})))", std::regex::optimize | std::regex::icase); 41 | 42 | T OutputVar{}; 43 | std::ifstream INIFile(INIFileName, std::ios::in); 44 | std::smatch Match{}; 45 | std::string CurrentSection; 46 | std::string Line; 47 | bool ValueFound{}; 48 | 49 | while (std::getline(INIFile, Line)) 50 | { 51 | // Remove all spaces from line 52 | Line.erase(std::remove(Line.begin(), Line.end(), ' '), Line.end()); 53 | 54 | if (Line.length() > 0) 55 | { 56 | if (std::regex_search(Line, Match, SectionTest)) 57 | { 58 | CurrentSection = Match[1]; 59 | } 60 | else if (std::regex_search(Line, Match, ValueTest) && (CurrentSection == Section && Match[1] == Key)) 61 | { 62 | LWMFSystemLog.AddEntry(LogLevel::Info, __FILENAME__, __LINE__, " Value : " + std::string(Match[2])); 63 | 64 | // Convert Value to proper type 65 | std::istringstream Stream(Match[2]); 66 | std::string(typeid(T).name()) == "bool" ? Stream >> std::boolalpha >> OutputVar : Stream >> OutputVar; 67 | ValueFound = true; 68 | break; 69 | } 70 | } 71 | } 72 | 73 | if (!ValueFound) 74 | { 75 | LWMFSystemLog.AddEntry(LogLevel::Error, __FILENAME__, __LINE__, "Value [" + Section + "] / " + Key + " not found!"); 76 | } 77 | 78 | return OutputVar; 79 | } 80 | 81 | templatevoid WriteINIValue(const std::string& Section, const std::string& Key, const T Value, const std::string& INIFileName) 82 | { 83 | LWMFSystemLog.AddEntry(LogLevel::Info, __FILENAME__, __LINE__, "Writing value to INI file " + INIFileName + " [" + Section + "] / " + Key); 84 | 85 | // Read INI file into vector of strings 86 | 87 | std::vector VectorOfStrings{}; 88 | std::ifstream InputINIFile(INIFileName, std::ios::in); 89 | std::string InputLine; 90 | 91 | while (std::getline(InputINIFile, InputLine)) 92 | { 93 | VectorOfStrings.emplace_back(InputLine); 94 | } 95 | 96 | InputINIFile.close(); 97 | 98 | // Modify proper line and write back INI file 99 | 100 | const std::regex SectionTest(R"(\[(.*?)\])", std::regex::optimize | std::regex::icase); 101 | const std::regex ValueTest(R"((\w+)=([^\#]+(?!\+{3})))", std::regex::optimize | std::regex::icase); 102 | 103 | std::string CurrentSection; 104 | std::ofstream OutputINIFile(INIFileName, std::ios::in); 105 | std::smatch Match{}; 106 | 107 | for (auto&& Line : VectorOfStrings) 108 | { 109 | // Remove all spaces from line 110 | Line.erase(std::remove(Line.begin(), Line.end(), ' '), Line.end()); 111 | 112 | if (std::regex_search(Line, Match, SectionTest)) 113 | { 114 | CurrentSection = Match[1]; 115 | } 116 | else if (std::regex_search(Line, Match, ValueTest) && (CurrentSection == Section && Match[1] == Key)) 117 | { 118 | Line << Key << "=" << Value << "\n"; 119 | } 120 | 121 | OutputINIFile << Line; 122 | } 123 | 124 | OutputINIFile.close(); 125 | } 126 | 127 | inline std::int_fast32_t ReadINIValueRGBA(const std::string& INIFileName, const std::string& Section) 128 | { 129 | return RGBAtoINT(std::clamp(ReadINIValue(INIFileName, Section, "Red"), 0, 255), 130 | std::clamp(ReadINIValue(INIFileName, Section, "Green"), 0, 255), 131 | std::clamp(ReadINIValue(INIFileName, Section, "Blue"), 0, 255), 132 | std::clamp(ReadINIValue(INIFileName, Section, "Alpha"), 0, 255)); 133 | } 134 | 135 | 136 | } // namespace lwmf -------------------------------------------------------------------------------- /Fonts/Ubuntu_Mono/UFL.txt: -------------------------------------------------------------------------------- 1 | ------------------------------- 2 | UBUNTU FONT LICENCE Version 1.0 3 | ------------------------------- 4 | 5 | PREAMBLE 6 | This licence allows the licensed fonts to be used, studied, modified and 7 | redistributed freely. The fonts, including any derivative works, can be 8 | bundled, embedded, and redistributed provided the terms of this licence 9 | are met. The fonts and derivatives, however, cannot be released under 10 | any other licence. The requirement for fonts to remain under this 11 | licence does not require any document created using the fonts or their 12 | derivatives to be published under this licence, as long as the primary 13 | purpose of the document is not to be a vehicle for the distribution of 14 | the fonts. 15 | 16 | DEFINITIONS 17 | "Font Software" refers to the set of files released by the Copyright 18 | Holder(s) under this licence and clearly marked as such. This may 19 | include source files, build scripts and documentation. 20 | 21 | "Original Version" refers to the collection of Font Software components 22 | as received under this licence. 23 | 24 | "Modified Version" refers to any derivative made by adding to, deleting, 25 | or substituting -- in part or in whole -- any of the components of the 26 | Original Version, by changing formats or by porting the Font Software to 27 | a new environment. 28 | 29 | "Copyright Holder(s)" refers to all individuals and companies who have a 30 | copyright ownership of the Font Software. 31 | 32 | "Substantially Changed" refers to Modified Versions which can be easily 33 | identified as dissimilar to the Font Software by users of the Font 34 | Software comparing the Original Version with the Modified Version. 35 | 36 | To "Propagate" a work means to do anything with it that, without 37 | permission, would make you directly or secondarily liable for 38 | infringement under applicable copyright law, except executing it on a 39 | computer or modifying a private copy. Propagation includes copying, 40 | distribution (with or without modification and with or without charging 41 | a redistribution fee), making available to the public, and in some 42 | countries other activities as well. 43 | 44 | PERMISSION & CONDITIONS 45 | This licence does not grant any rights under trademark law and all such 46 | rights are reserved. 47 | 48 | Permission is hereby granted, free of charge, to any person obtaining a 49 | copy of the Font Software, to propagate the Font Software, subject to 50 | the below conditions: 51 | 52 | 1) Each copy of the Font Software must contain the above copyright 53 | notice and this licence. These can be included either as stand-alone 54 | text files, human-readable headers or in the appropriate machine- 55 | readable metadata fields within text or binary files as long as those 56 | fields can be easily viewed by the user. 57 | 58 | 2) The font name complies with the following: 59 | (a) The Original Version must retain its name, unmodified. 60 | (b) Modified Versions which are Substantially Changed must be renamed to 61 | avoid use of the name of the Original Version or similar names entirely. 62 | (c) Modified Versions which are not Substantially Changed must be 63 | renamed to both (i) retain the name of the Original Version and (ii) add 64 | additional naming elements to distinguish the Modified Version from the 65 | Original Version. The name of such Modified Versions must be the name of 66 | the Original Version, with "derivative X" where X represents the name of 67 | the new work, appended to that name. 68 | 69 | 3) The name(s) of the Copyright Holder(s) and any contributor to the 70 | Font Software shall not be used to promote, endorse or advertise any 71 | Modified Version, except (i) as required by this licence, (ii) to 72 | acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with 73 | their explicit written permission. 74 | 75 | 4) The Font Software, modified or unmodified, in part or in whole, must 76 | be distributed entirely under this licence, and must not be distributed 77 | under any other licence. The requirement for fonts to remain under this 78 | licence does not affect any document created using the Font Software, 79 | except any version of the Font Software extracted from a document 80 | created using the Font Software may only be distributed under this 81 | licence. 82 | 83 | TERMINATION 84 | This licence becomes null and void if any of the above conditions are 85 | not met. 86 | 87 | DISCLAIMER 88 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 89 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 90 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 91 | COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 92 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 93 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 94 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 95 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER 96 | DEALINGS IN THE FONT SOFTWARE. 97 | -------------------------------------------------------------------------------- /DATA/Levels/2/LevelData/MapDoorData.conf: -------------------------------------------------------------------------------- 1 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 2 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 3 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 4 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 5 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 6 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 7 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0 40 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 41 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 42 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -------------------------------------------------------------------------------- /DATA/Levels/2/LevelData/MapCeilingData.conf: -------------------------------------------------------------------------------- 1 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 2 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 3 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 4 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 5 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 39 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 40 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 41 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 42 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -------------------------------------------------------------------------------- /DATA/Levels/2/LevelData/MapFloorData.conf: -------------------------------------------------------------------------------- 1 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 2 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 3 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 37 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 38 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 39 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 40 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 41 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 42 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -------------------------------------------------------------------------------- /DATA/Levels/2/LevelData/MapWallData.conf: -------------------------------------------------------------------------------- 1 | 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1 -------------------------------------------------------------------------------- /Sources/HID_Keyboard.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *********************************************** 3 | * * 4 | * HID_Keyboard.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | *********************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #define NOMINMAX 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "Tools_ErrorHandling.hpp" 19 | 20 | namespace HID_Keyboard 21 | { 22 | 23 | 24 | void Init(); 25 | bool WaitForKeypress(std::int_fast32_t Key); 26 | bool GetKeyState(std::int_fast32_t Key); 27 | void SetKeyState(std::int_fast32_t Key, bool State); 28 | 29 | // 30 | // Variables and constants 31 | // 32 | 33 | inline std::map KeyMap{}; 34 | 35 | // for Microsoft virtual keycodes, have a look here: 36 | // https://docs.microsoft.com/en-us/uwp/api/windows.system.virtualkey 37 | // Values are decimal 38 | 39 | // Default values are: 40 | // 41 | // Forward = W = 87 42 | // Backward = S = 83 43 | // Strafe left = A = 65 44 | // Strafe right = D = 68 45 | // Reload weapon = R = 82 46 | // HUD = H = 72 47 | // Minimap = M = 77 48 | // Action/Open door = Space = 32 49 | // Increase mouse = + = 107 50 | // Decrease mouse = - = 109 51 | // Next level = N = 78 52 | // Switch lighting = L = 76 53 | // Pause/menu = ESC = 27 54 | // Menu item down = VK_DOWN = 40 55 | // Menu item up = VK_UP = 38 56 | // Select menu item = ENTER = 13 57 | 58 | inline std::int_fast32_t MovePlayerForwardKey{}; 59 | inline std::int_fast32_t MovePlayerBackwardKey{}; 60 | inline std::int_fast32_t MovePlayerStrafeLeftKey{}; 61 | inline std::int_fast32_t MovePlayerStrafeRightKey{}; 62 | inline std::int_fast32_t ReloadWeaponKey{}; 63 | inline std::int_fast32_t HUDKey{}; 64 | inline std::int_fast32_t MiniMapKey{}; 65 | inline std::int_fast32_t ActionKey{}; 66 | inline std::int_fast32_t IncreaseMouseSensitivityKey{}; 67 | inline std::int_fast32_t DecreaseMouseSensitivityKey{}; 68 | inline std::int_fast32_t SelectNextLevelKey{}; 69 | inline std::int_fast32_t SwitchLightingKey{}; 70 | inline std::int_fast32_t PauseKey{}; 71 | inline std::int_fast32_t MenuItemDownKey{}; 72 | inline std::int_fast32_t MenuItemUpKey{}; 73 | inline std::int_fast32_t MenuItemSelectKey{}; 74 | 75 | // 76 | // Functions 77 | // 78 | 79 | inline void Init() 80 | { 81 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Init keyboard config..."); 82 | 83 | if (const std::string INIFile{ GameConfigFolder + "InputConfig.ini" }; Tools_ErrorHandling::CheckFileExistence(INIFile, StopOnError)) 84 | { 85 | MovePlayerForwardKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "MoveForwardKey"); 86 | MovePlayerBackwardKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "MoveBackwardKey"); 87 | MovePlayerStrafeLeftKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "StrafeLeftKey"); 88 | MovePlayerStrafeRightKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "StrafeRightKey"); 89 | ReloadWeaponKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "ReloadWeaponKey"); 90 | HUDKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "HUDKey"); 91 | MiniMapKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "MiniMapKey"); 92 | ActionKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "ActionKey"); 93 | IncreaseMouseSensitivityKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "IncreaseMouseSensitivityKey"); 94 | DecreaseMouseSensitivityKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "DecreaseMouseSensitivityKey"); 95 | SelectNextLevelKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "SelectNextLevelKey"); 96 | SwitchLightingKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "SwitchLightingKey"); 97 | PauseKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "PauseKey"); 98 | MenuItemDownKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "MenuItemDownKey"); 99 | MenuItemUpKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "MenuItemUpKey"); 100 | MenuItemSelectKey = lwmf::ReadINIValue(INIFile, "KEYBOARD", "MenuItemSelectKey"); 101 | 102 | lwmf::RegisterRawInputDevice(lwmf::MainWindow, lwmf::DeviceIdentifier::HID_KEYBOARD); 103 | } 104 | } 105 | 106 | inline bool WaitForKeypress(const std::int_fast32_t Key) 107 | { 108 | while (true) 109 | { 110 | if (GetAsyncKeyState(Key) != 0) 111 | { 112 | break; 113 | } 114 | } 115 | 116 | return true; 117 | } 118 | 119 | inline bool GetKeyState(const std::int_fast32_t Key) 120 | { 121 | const auto State{ KeyMap.find(Key) }; 122 | 123 | if (State == KeyMap.end()) 124 | { 125 | return false; 126 | } 127 | 128 | return State->second; 129 | } 130 | 131 | inline void SetKeyState(const std::int_fast32_t Key, const bool State) 132 | { 133 | KeyMap[Key] = State; 134 | } 135 | 136 | 137 | } // namespace HID_Keyboard -------------------------------------------------------------------------------- /Sources/Game_Transitions.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ***************************************** 3 | * * 4 | * Game_Transitions.hpp * 5 | * * 6 | * (c) 2017 - 2020 Stefan Kubsch * 7 | ***************************************** 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "Game_GlobalDefinitions.hpp" 17 | #include "GFX_Window.hpp" 18 | #include "GFX_TextClass.hpp" 19 | #include "HID_Keyboard.hpp" 20 | 21 | namespace Game_Transitions 22 | { 23 | 24 | 25 | void Init(); 26 | void LevelTransition(); 27 | void FizzleFade(std::int_fast32_t FadeColor, std::int_fast32_t Speed); 28 | void DeathSequence(); 29 | 30 | // 31 | // Variables and constants 32 | // 33 | 34 | inline GFX_TextClass GeneralText{}; 35 | inline GFX_TextClass GameOverText{}; 36 | inline GFX_TextClass GameOverText1{}; 37 | 38 | // 39 | // Functions 40 | // 41 | 42 | inline void Init() 43 | { 44 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "Init level transitions..."); 45 | 46 | GeneralText.InitFont(GameConfigFolder + "TransitionsConfig.ini", "GENERALFONT"); 47 | GameOverText.InitFont(GameConfigFolder + "TransitionsConfig.ini", "GAMEOVERFONT"); 48 | GameOverText1.InitFont(GameConfigFolder + "TransitionsConfig.ini", "GAMEOVERFONT1"); 49 | } 50 | 51 | inline void LevelTransition() 52 | { 53 | const std::int_fast32_t BlackNoAlpha{ lwmf::RGBAtoINT(0, 0, 0, 0) }; 54 | const std::string NextLevelText{ "...loading level number " + std::to_string(SelectedLevel) + "..." }; 55 | NARCLog.AddEntry(lwmf::LogLevel::Info, __FILENAME__, __LINE__, "\n\n" + NextLevelText + "\n\n"); 56 | 57 | lwmf::ClearBuffer(); 58 | lwmf::ClearTexture(Canvas, BlackNoAlpha); 59 | GeneralText.RenderTextCentered(NextLevelText, Canvas.Height - GeneralText.GetFontHeight() - 50); 60 | CanvasShader.RenderLWMFTexture(Canvas, true, 1.0F); 61 | lwmf::SwapBuffer(); 62 | } 63 | 64 | inline void FizzleFade(const std::int_fast32_t FadeColor, const std::int_fast32_t Speed) 65 | { 66 | // 67 | // This is my implementation of the famous "fizzle fade" as known from Wolfenstein 3D 68 | // 69 | // See explanation here: 70 | // 71 | // http://fabiensanglard.net/fizzlefade/index.php 72 | // 73 | // I use a Feistel Network algorithm, get a basic idea here: 74 | // 75 | // https://jacopretorius.net/2017/09/fizzlefade-using-a-feistel-network.html 76 | // 77 | // My version is screensize & framerate-independent since I calculate the neccessary bits and use a gameloop... 78 | // 79 | 80 | const std::int_fast32_t Bits{ static_cast(std::ceilf(std::log2f(static_cast(Canvas.Width * Canvas.Height)) * 0.5F)) << 1 }; 81 | const std::int_fast32_t LastFrame{ static_cast(std::pow(2, Bits)) }; 82 | const std::int_fast32_t HalfBits{ Bits >> 1 }; 83 | const std::int_fast32_t HalfMask{ static_cast(std::pow(2, HalfBits)) - 1 }; 84 | std::int_fast32_t Frame{}; 85 | std::uint_fast32_t Lag{}; 86 | auto EndTime{ std::chrono::steady_clock::now() }; 87 | 88 | while (Frame < LastFrame) 89 | { 90 | const auto StartTime{ std::chrono::steady_clock::now() }; 91 | const auto ElapsedTime(std::chrono::duration_cast(StartTime - EndTime)); 92 | EndTime = StartTime; 93 | Lag += static_cast(ElapsedTime.count()); 94 | 95 | while (Lag >= LengthOfFrame) 96 | { 97 | for (std::int_fast32_t j{}; j < LastFrame / Speed; ++j, ++Frame) 98 | { 99 | std::int_fast32_t Left{ Frame & HalfMask }; 100 | std::int_fast32_t Right{ Frame >> HalfBits }; 101 | 102 | for (std::int_fast32_t i{}; i < 5; ++i) 103 | { 104 | const std::int_fast32_t NewLeft{ Right }; 105 | const std::int_fast32_t Fn{ (Right * 19 + (Right >> 1) ^ Right) & HalfMask }; 106 | Right = Left ^ Fn; 107 | Left = NewLeft; 108 | } 109 | 110 | const std::int_fast32_t FnResult{ Right << HalfBits | (Left & (LastFrame - 1)) }; 111 | lwmf::SetPixelSafe(Canvas, FnResult % Canvas.Width, static_cast(FnResult / Canvas.Width), FadeColor); 112 | } 113 | 114 | Lag -= LengthOfFrame; 115 | } 116 | 117 | lwmf::ClearBuffer(); 118 | CanvasShader.RenderLWMFTexture(Canvas, true, 1.0F); 119 | lwmf::SwapBuffer(); 120 | } 121 | } 122 | 123 | inline void DeathSequence() 124 | { 125 | const std::int_fast32_t Red{ lwmf::RGBAtoINT(255, 0, 0, 255) }; 126 | const std::int_fast32_t Black{ lwmf::RGBAtoINT(0, 0, 0, 255) }; 127 | 128 | lwmf::SetVSync(-1); 129 | FizzleFade(Red, 50); 130 | VSync ? lwmf::SetVSync(-1) : lwmf::SetVSync(0); 131 | 132 | GameOverText.RenderTextCentered("You are dead. Game over...", Canvas.HeightMid - (GameOverText.GetFontHeight() >> 1)); 133 | GameOverText1.RenderTextCentered("Press [SPACE] to continue", Canvas.Height - GameOverText1.GetFontHeight() - 50); 134 | 135 | lwmf::SwapBuffer(); 136 | 137 | if (HID_Keyboard::WaitForKeypress(VK_SPACE)) 138 | { 139 | GamePausedFlag = true; 140 | lwmf::ClearTexture(Canvas, Black); 141 | } 142 | } 143 | 144 | 145 | } // namespace Game_Transitions 146 | 147 | --------------------------------------------------------------------------------