├── fxdata-save.bin ├── Package ├── fxdata-save.bin ├── banner.png ├── screen1.png ├── screen2.png ├── Wolfenduino.bin ├── banner-small.png ├── Wolfenduino.arduboy └── info.json ├── Assets ├── RawAudio │ ├── audio42.raw │ ├── audio01.raw │ ├── audio02.raw │ ├── audio05.raw │ ├── audio26.raw │ ├── audio13.raw │ ├── audio18.raw │ ├── audio06.raw │ ├── audio19.raw │ ├── audio16.raw │ ├── audio31.raw │ ├── audio60.raw │ ├── audio33.raw │ ├── audio56.raw │ ├── audio00.raw │ ├── audio03.raw │ ├── audio04.raw │ ├── audio07.raw │ ├── audio08.raw │ ├── audio09.raw │ ├── audio10.raw │ ├── audio11.raw │ ├── audio14.raw │ ├── audio15.raw │ ├── audio17.raw │ ├── audio20.raw │ ├── audio21.raw │ ├── audio22.raw │ ├── audio23.raw │ ├── audio24.raw │ ├── audio27.raw │ ├── audio28.raw │ ├── audio29.raw │ ├── audio30.raw │ ├── audio32.raw │ ├── audio36.raw │ ├── audio37.raw │ ├── audio38.raw │ ├── audio39.raw │ ├── audio40.raw │ ├── audio41.raw │ ├── audio43.raw │ ├── audio44.raw │ ├── audio45.raw │ ├── audio46.raw │ ├── audio47.raw │ ├── audio48.raw │ ├── audio49.raw │ ├── audio51.raw │ ├── audio53.raw │ ├── audio54.raw │ ├── audio55.raw │ ├── audio57.raw │ ├── audio58.raw │ ├── audio59.raw │ ├── audio61.raw │ ├── audio62.raw │ ├── audio63.raw │ ├── audio64.raw │ ├── audio65.raw │ ├── audio66.raw │ ├── audio67.raw │ ├── audio68.raw │ ├── audio69.raw │ ├── audio70.raw │ ├── audio71.raw │ ├── audio73.raw │ ├── audio74.raw │ ├── audio75.raw │ ├── audio76.raw │ ├── audio77.raw │ ├── audio78.raw │ ├── audio79.raw │ ├── audio80.raw │ ├── audio81.raw │ ├── audio82.raw │ ├── audio83.raw │ ├── audio84.raw │ ├── audio85.raw │ ├── audio86.raw │ ├── audio34.raw │ ├── audio12.raw │ ├── audio25.raw │ ├── audio52.raw │ ├── audio35.raw │ ├── audio72.raw │ └── audio50.raw ├── boss.png ├── dog.png ├── font.png ├── guns.png ├── help.png ├── ss.png ├── ui.png ├── win.png ├── assets.png ├── guard.png ├── items.png ├── knife.png ├── pistol.png ├── title.png ├── walls.png ├── chaingun.png ├── cover-old.png ├── textures.png ├── decorations.png ├── machinegun.png ├── floorComplete.png ├── floorComplete1.png ├── floorComplete2.png ├── RawMaps │ ├── rawmap0.dat │ ├── rawmap1.dat │ ├── rawmap2.dat │ ├── rawmap3.dat │ ├── rawmap4.dat │ ├── rawmap5.dat │ ├── rawmap6.dat │ ├── rawmap7.dat │ ├── rawmap8.dat │ └── rawmap9.dat ├── blockingDecorations.png └── blockingDecorationsComplete.png ├── fxdata.bin ├── fxdata-data.bin ├── Wolf ├── Generated │ ├── maps.bin │ ├── Data_Audio.bin │ ├── Data_HelpBG.bin │ ├── Data_WinBG.bin │ ├── Data_TitleBG.bin │ ├── Data_FloorCompleteBG.bin │ ├── Data_FloorCompleteBG1.bin │ ├── Data_FloorCompleteBG2.bin │ ├── Data_Knife.h │ ├── Data_Pistol.h │ ├── Data_Chaingun.h │ ├── Data_Machinegun.h │ ├── Data_Decorations.h │ ├── Data_UI.h │ ├── Data_Boss.h │ ├── Data_BlockingDecorations.h │ ├── Data_Items.h │ ├── Data_Dog.h │ ├── Data_SS.h │ ├── Data_Guard.h │ ├── Data_Font.h │ ├── Data_Audio.h │ ├── Data_Knife.bin │ ├── fxdata.h │ ├── Data_Items.bin │ ├── Data_Machinegun.bin │ ├── Data_Pistol.bin │ ├── Data_Decorations.bin │ ├── Data_BlockingDecorations.bin │ └── Data_Dog.bin ├── SpriteFrame.h ├── TrigLUT.h ├── Platform.h ├── Save.h ├── FixedMath.h ├── ArduboyPlatform.cpp ├── Menu.h ├── FixedMath.cpp ├── Actor.h ├── Engine.h ├── Vector2.h ├── Player.h ├── Wolf.ino ├── Save.cpp ├── TileTypes.h ├── Sounds.h ├── ArduboyPlatform.h ├── Defines.h └── Renderer.h ├── Windows ├── SDL2 │ ├── lib │ │ ├── x64 │ │ │ ├── SDL2.dll │ │ │ ├── SDL2.lib │ │ │ ├── SDL2main.lib │ │ │ └── SDL2test.lib │ │ └── x86 │ │ │ ├── SDL2.dll │ │ │ ├── SDL2.lib │ │ │ ├── SDL2main.lib │ │ │ └── SDL2test.lib │ ├── docs │ │ ├── README-hg.md │ │ ├── README-platforms.md │ │ ├── README-wince.md │ │ ├── README-git.md │ │ ├── README-pandora.md │ │ ├── README-psp.md │ │ ├── release_checklist.md │ │ ├── README-n3ds.md │ │ ├── README-kmsbsd.md │ │ ├── README-ngage.md │ │ ├── README-vita.md │ │ ├── README-ps2.md │ │ ├── README-riscos.md │ │ ├── README-porting.md │ │ ├── README.md │ │ ├── README-windows.md │ │ ├── README-versions.md │ │ ├── README-emscripten.md │ │ ├── README-directfb.md │ │ ├── README-os2.md │ │ └── README-gesture.md │ ├── include │ │ ├── SDL_revision.h │ │ ├── SDL_opengles2_gl2platform.h │ │ ├── SDL_types.h │ │ ├── SDL_name.h │ │ ├── SDL_opengles.h │ │ ├── close_code.h │ │ ├── SDL_opengles2.h │ │ ├── SDL_test_memory.h │ │ ├── SDL_test_log.h │ │ ├── SDL_test.h │ │ ├── SDL_quit.h │ │ ├── SDL_test_compare.h │ │ ├── SDL_test_images.h │ │ ├── SDL_misc.h │ │ ├── SDL_power.h │ │ ├── SDL_guid.h │ │ ├── SDL_test_random.h │ │ ├── SDL_test_assert.h │ │ ├── SDL_bits.h │ │ ├── SDL_metal.h │ │ ├── SDL_gesture.h │ │ └── SDL_test_crc32.h │ ├── README-SDL.txt │ ├── BUGS.txt │ ├── README.txt │ ├── COPYING.txt │ └── cmake │ │ └── sdl2-config-version.cmake └── SDLPlatform.h ├── .gitignore ├── BuildSketch.bat ├── Tools ├── TrigLUT │ ├── TrigLUT.h │ └── GenerateTrigLUT.cpp ├── AudioEncoder │ ├── AudioEncoder.vcxproj.filters │ └── AudioEncoder.vcxproj └── ImageEncoder │ └── ImageEncoder.vcxproj.filters ├── fxdata.txt ├── README.md ├── Wolf.sln ├── BuildAssets.bat └── Wolf.vcxproj.filters /fxdata-save.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Package/fxdata-save.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Assets/RawAudio/audio42.raw: -------------------------------------------------------------------------------- 1 | ( -------------------------------------------------------------------------------- /Assets/RawAudio/audio01.raw: -------------------------------------------------------------------------------- 1 | 2////// -------------------------------------------------------------------------------- /Assets/RawAudio/audio02.raw: -------------------------------------------------------------------------------- 1 | 2TTUUUUOOO -------------------------------------------------------------------------------- /Assets/RawAudio/audio05.raw: -------------------------------------------------------------------------------- 1 | r<r -------------------------------------------------------------------------------- /Assets/RawAudio/audio26.raw: -------------------------------------------------------------------------------- 1 | 2h[[kh]eee{ -------------------------------------------------------------------------------- /Assets/RawAudio/audio13.raw: -------------------------------------------------------------------------------- 1 | !F//-,+*((')+,-./03345678:<< -------------------------------------------------------------------------------- /Assets/RawAudio/audio18.raw: -------------------------------------------------------------------------------- 1 | "wwwvvvvutttsrqqonlkiheda_\[YVTSQNM -------------------------------------------------------------------------------- /Assets/RawAudio/audio06.raw: -------------------------------------------------------------------------------- 1 | $210/.-+)"%&(*+,.0123345 -------------------------------------------------------------------------------- /Assets/RawAudio/audio19.raw: -------------------------------------------------------------------------------- 1 | #OQRSSTUUWWXYZ[]]^_`bdefghiijklmnopq -------------------------------------------------------------------------------- /fxdata.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/fxdata.bin -------------------------------------------------------------------------------- /Assets/boss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/boss.png -------------------------------------------------------------------------------- /Assets/dog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/dog.png -------------------------------------------------------------------------------- /Assets/font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/font.png -------------------------------------------------------------------------------- /Assets/guns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/guns.png -------------------------------------------------------------------------------- /Assets/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/help.png -------------------------------------------------------------------------------- /Assets/ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/ss.png -------------------------------------------------------------------------------- /Assets/ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/ui.png -------------------------------------------------------------------------------- /Assets/win.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/win.png -------------------------------------------------------------------------------- /fxdata-data.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/fxdata-data.bin -------------------------------------------------------------------------------- /Assets/RawAudio/audio16.raw: -------------------------------------------------------------------------------- 1 | 8Z>=<;:9765432139?EKKJGPOHEB?NKDASPMJGDB@><:87MJGECA?=;97B -------------------------------------------------------------------------------- /Assets/assets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/assets.png -------------------------------------------------------------------------------- /Assets/guard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/guard.png -------------------------------------------------------------------------------- /Assets/items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/items.png -------------------------------------------------------------------------------- /Assets/knife.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/knife.png -------------------------------------------------------------------------------- /Assets/pistol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/pistol.png -------------------------------------------------------------------------------- /Assets/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/title.png -------------------------------------------------------------------------------- /Assets/walls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/walls.png -------------------------------------------------------------------------------- /Assets/RawAudio/audio31.raw: -------------------------------------------------------------------------------- 1 | ?P""""""""""""""""" -------------------------------------------------------------------------------- /Assets/RawAudio/audio60.raw: -------------------------------------------------------------------------------- 1 | @2?D0381)(: 34#*/3;,E622-)4G* '#1E112&&+H -------------------------------------------------------------------------------- /Assets/chaingun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/chaingun.png -------------------------------------------------------------------------------- /Assets/cover-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/cover-old.png -------------------------------------------------------------------------------- /Assets/textures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/textures.png -------------------------------------------------------------------------------- /Package/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Package/banner.png -------------------------------------------------------------------------------- /Package/screen1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Package/screen1.png -------------------------------------------------------------------------------- /Package/screen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Package/screen2.png -------------------------------------------------------------------------------- /Assets/RawAudio/audio33.raw: -------------------------------------------------------------------------------- 1 | EU:::3333&&& -------------------------------------------------------------------------------- /Assets/decorations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/decorations.png -------------------------------------------------------------------------------- /Assets/machinegun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/machinegun.png -------------------------------------------------------------------------------- /Assets/RawAudio/audio56.raw: -------------------------------------------------------------------------------- 1 | H2 !!"########""""""""""!:>@ACEFGIJKLLMNOPQSTUWY -------------------------------------------------------------------------------- /Assets/floorComplete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/floorComplete.png -------------------------------------------------------------------------------- /Assets/floorComplete1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/floorComplete1.png -------------------------------------------------------------------------------- /Assets/floorComplete2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/floorComplete2.png -------------------------------------------------------------------------------- /Package/Wolfenduino.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Package/Wolfenduino.bin -------------------------------------------------------------------------------- /Package/banner-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Package/banner-small.png -------------------------------------------------------------------------------- /Wolf/Generated/maps.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Wolf/Generated/maps.bin -------------------------------------------------------------------------------- /Assets/RawAudio/audio00.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio00.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio03.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio03.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio04.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio04.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio07.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio07.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio08.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio08.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio09.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio09.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio10.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio10.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio11.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio11.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio14.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio14.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio15.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio15.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio17.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio17.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio20.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio20.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio21.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio21.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio22.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio22.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio23.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio23.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio24.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio24.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio27.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio27.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio28.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio28.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio29.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio29.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio30.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio30.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio32.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio32.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio36.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio36.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio37.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio37.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio38.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio38.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio39.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio39.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio40.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio40.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio41.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio41.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio43.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio43.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio44.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio44.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio45.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio45.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio46.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio46.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio47.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio47.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio48.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio48.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio49.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio49.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio51.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio51.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio53.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio53.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio54.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio54.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio55.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio55.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio57.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio57.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio58.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio58.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio59.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio59.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio61.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio61.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio62.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio62.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio63.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio63.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio64.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio64.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio65.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio65.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio66.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio66.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio67.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio67.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio68.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio68.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio69.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio69.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio70.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio70.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio71.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio71.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio73.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio73.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio74.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio74.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio75.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio75.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio76.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio76.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio77.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio77.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio78.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio78.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio79.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio79.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio80.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio80.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio81.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio81.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio82.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio82.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio83.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio83.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio84.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio84.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio85.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio85.raw -------------------------------------------------------------------------------- /Assets/RawAudio/audio86.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawAudio/audio86.raw -------------------------------------------------------------------------------- /Assets/RawMaps/rawmap0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawMaps/rawmap0.dat -------------------------------------------------------------------------------- /Assets/RawMaps/rawmap1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawMaps/rawmap1.dat -------------------------------------------------------------------------------- /Assets/RawMaps/rawmap2.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawMaps/rawmap2.dat -------------------------------------------------------------------------------- /Assets/RawMaps/rawmap3.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawMaps/rawmap3.dat -------------------------------------------------------------------------------- /Assets/RawMaps/rawmap4.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawMaps/rawmap4.dat -------------------------------------------------------------------------------- /Assets/RawMaps/rawmap5.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawMaps/rawmap5.dat -------------------------------------------------------------------------------- /Assets/RawMaps/rawmap6.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawMaps/rawmap6.dat -------------------------------------------------------------------------------- /Assets/RawMaps/rawmap7.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawMaps/rawmap7.dat -------------------------------------------------------------------------------- /Assets/RawMaps/rawmap8.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawMaps/rawmap8.dat -------------------------------------------------------------------------------- /Assets/RawMaps/rawmap9.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/RawMaps/rawmap9.dat -------------------------------------------------------------------------------- /Package/Wolfenduino.arduboy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Package/Wolfenduino.arduboy -------------------------------------------------------------------------------- /Assets/blockingDecorations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/blockingDecorations.png -------------------------------------------------------------------------------- /Windows/SDL2/lib/x64/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Windows/SDL2/lib/x64/SDL2.dll -------------------------------------------------------------------------------- /Windows/SDL2/lib/x64/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Windows/SDL2/lib/x64/SDL2.lib -------------------------------------------------------------------------------- /Windows/SDL2/lib/x86/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Windows/SDL2/lib/x86/SDL2.dll -------------------------------------------------------------------------------- /Windows/SDL2/lib/x86/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Windows/SDL2/lib/x86/SDL2.lib -------------------------------------------------------------------------------- /Wolf/Generated/Data_Audio.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Wolf/Generated/Data_Audio.bin -------------------------------------------------------------------------------- /Wolf/Generated/Data_HelpBG.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Wolf/Generated/Data_HelpBG.bin -------------------------------------------------------------------------------- /Wolf/Generated/Data_WinBG.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Wolf/Generated/Data_WinBG.bin -------------------------------------------------------------------------------- /Assets/RawAudio/audio34.raw: -------------------------------------------------------------------------------- 1 | YU\\\\QQQQQHHHHHH;;;////// -------------------------------------------------------------------------------- /Wolf/Generated/Data_TitleBG.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Wolf/Generated/Data_TitleBG.bin -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Debug/ 2 | WolfSketch/ 3 | *.opensdf 4 | *.sdf 5 | *.o 6 | Uzebox/dep/ 7 | .vs/ 8 | *.user 9 | Capture/ 10 | -------------------------------------------------------------------------------- /Assets/RawAudio/audio12.raw: -------------------------------------------------------------------------------- 1 | ZZ$$$$$$$$$$$$$$$$$$$$$$$777777777777777777777777777777 -------------------------------------------------------------------------------- /Windows/SDL2/lib/x64/SDL2main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Windows/SDL2/lib/x64/SDL2main.lib -------------------------------------------------------------------------------- /Windows/SDL2/lib/x64/SDL2test.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Windows/SDL2/lib/x64/SDL2test.lib -------------------------------------------------------------------------------- /Windows/SDL2/lib/x86/SDL2main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Windows/SDL2/lib/x86/SDL2main.lib -------------------------------------------------------------------------------- /Windows/SDL2/lib/x86/SDL2test.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Windows/SDL2/lib/x86/SDL2test.lib -------------------------------------------------------------------------------- /Assets/RawAudio/audio25.raw: -------------------------------------------------------------------------------- 1 | `2#!  &)ACEJKMNPRRRRRRRRRRRRRQPPOONNMMMMMLLLLMMOOPQTWZ\]__````___^]]]]]^_`beknpqttvwy| -------------------------------------------------------------------------------- /Assets/RawAudio/audio52.raw: -------------------------------------------------------------------------------- 1 | c2HHHHIIIIIIIIJIIIIIIIHHHHHHHGGGGGGGGFFFFFFFFEEDDDCCCBBBAAA@@@?>>==<;;::98877543210/.-,+*)('&%$##"!! -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-hg.md: -------------------------------------------------------------------------------- 1 | We are no longer hosted in Mercurial. Please see README-git.md for details. 2 | 3 | Thanks! 4 | 5 | -------------------------------------------------------------------------------- /Assets/blockingDecorationsComplete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Assets/blockingDecorationsComplete.png -------------------------------------------------------------------------------- /Wolf/Generated/Data_FloorCompleteBG.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Wolf/Generated/Data_FloorCompleteBG.bin -------------------------------------------------------------------------------- /Wolf/Generated/Data_FloorCompleteBG1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Wolf/Generated/Data_FloorCompleteBG1.bin -------------------------------------------------------------------------------- /Wolf/Generated/Data_FloorCompleteBG2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhhoward/WolfenduinoFX/HEAD/Wolf/Generated/Data_FloorCompleteBG2.bin -------------------------------------------------------------------------------- /Assets/RawAudio/audio35.raw: -------------------------------------------------------------------------------- 1 | wF=:754210/..---13579;>@CEGHJJKKIHGECA:3,)&#!  "#%'),-.0010//-+)&# -------------------------------------------------------------------------------- /BuildSketch.bat: -------------------------------------------------------------------------------- 1 | mkdir WolfSketch 2 | copy /y Game\*.cpp WolfSketch\*.cpp 3 | copy /y Game\*.h WolfSketch\*.h 4 | copy /y Gamebuino\*.* WolfSketch\*.* 5 | copy /y DataHeaders\*.h WolfSketch\*.h 6 | -------------------------------------------------------------------------------- /Wolf/SpriteFrame.h: -------------------------------------------------------------------------------- 1 | #ifndef SPRITE_FRAME_H_ 2 | #define SPRITE_FRAME_H_ 3 | 4 | struct SpriteFrame 5 | { 6 | uint16_t offset; 7 | uint8_t width, height; 8 | uint8_t xOffset; 9 | }; 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-platforms.md: -------------------------------------------------------------------------------- 1 | Platforms 2 | ========= 3 | 4 | We maintain the list of supported platforms on our wiki now, and how to 5 | build and install SDL for those platforms: 6 | 7 | https://wiki.libsdl.org/Installation 8 | 9 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Knife.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_knifeSprite_frames[] PROGMEM = { 4 | { 0, 10, 9, 43 }, 5 | { 90, 17, 15, 36 }, 6 | { 345, 18, 19, 32 }, 7 | { 687, 25, 24, 28 }, 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Pistol.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_pistolSprite_frames[] PROGMEM = { 4 | { 0, 15, 18, 25 }, 5 | { 270, 25, 24, 21 }, 6 | { 870, 25, 29, 21 }, 7 | { 1595, 25, 30, 20 }, 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Chaingun.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_chaingunSprite_frames[] PROGMEM = { 4 | { 0, 21, 11, 22 }, 5 | { 231, 35, 22, 15 }, 6 | { 1001, 52, 34, 7 }, 7 | { 2769, 45, 38, 10 }, 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Machinegun.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_machinegunSprite_frames[] PROGMEM = { 4 | { 0, 9, 12, 28 }, 5 | { 108, 25, 18, 15 }, 6 | { 558, 38, 31, 14 }, 7 | { 1736, 27, 21, 13 }, 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Decorations.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_decorations_frames[] PROGMEM = { 4 | { 0, 30, 32, 2 }, 5 | { 960, 21, 7, 7 }, 6 | { 1107, 20, 7, 6 }, 7 | { 1247, 30, 32, 1 }, 8 | { 2207, 30, 32, 2 }, 9 | }; 10 | 11 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-wince.md: -------------------------------------------------------------------------------- 1 | WinCE 2 | ===== 3 | 4 | Windows CE is no longer supported by SDL. 5 | 6 | We have left the CE support in SDL 1.2 for those that must have it, and we 7 | have support for Windows Phone 8 and WinRT in SDL2, as of SDL 2.0.3. 8 | 9 | --ryan. 10 | 11 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_revision.h: -------------------------------------------------------------------------------- 1 | /* Generated by updaterev.sh, do not edit */ 2 | #ifdef SDL_VENDOR_INFO 3 | #define SDL_REVISION "SDL-release-2.28.4-0-gcc016b004 (" SDL_VENDOR_INFO ")" 4 | #else 5 | #define SDL_REVISION "SDL-release-2.28.4-0-gcc016b004" 6 | #endif 7 | #define SDL_REVISION_NUMBER 0 8 | -------------------------------------------------------------------------------- /Assets/RawAudio/audio72.raw: -------------------------------------------------------------------------------- 1 | .ciiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiibbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiibbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ -------------------------------------------------------------------------------- /Assets/RawAudio/audio50.raw: -------------------------------------------------------------------------------- 1 | 2c -------------------------------------------------------------------------------- /Wolf/Generated/Data_UI.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_uiSprite_frames[] PROGMEM = { 4 | { 0, 7, 32, 0 }, 5 | { 224, 7, 32, 0 }, 6 | { 448, 23, 32, 0 }, 7 | { 1184, 23, 32, 0 }, 8 | { 1920, 23, 32, 0 }, 9 | { 2656, 23, 32, 0 }, 10 | { 3392, 23, 32, 0 }, 11 | { 4128, 23, 32, 0 }, 12 | { 4864, 10, 32, 0 }, 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /Wolf/TrigLUT.h: -------------------------------------------------------------------------------- 1 | const uint8_t TrigLUT[] PROGMEM = { 2 | 0x0,0x3,0x6,0x9,0xd,0x10,0x13,0x16,0x19,0x1c,0x1f,0x22,0x25,0x28,0x2b,0x2e,0x31,0x34,0x37,0x3a,0x3c,0x3f,0x42,0x44,0x47,0x4a,0x4c,0x4f,0x51,0x54,0x56,0x58,0x5b,0x5d,0x5f,0x61,0x63,0x65,0x67,0x69,0x6a,0x6c,0x6e,0x6f,0x71,0x72,0x74,0x75,0x76,0x77,0x79,0x7a,0x7a,0x7b,0x7c,0x7d,0x7e,0x7e,0x7f,0x7f,0x7f,0x80,0x80,0x80,0x80 3 | }; 4 | -------------------------------------------------------------------------------- /Tools/TrigLUT/TrigLUT.h: -------------------------------------------------------------------------------- 1 | uint8_t TrigLUT[] PROGMEM = { 2 | 0x0,0x3,0x6,0x9,0xd,0x10,0x13,0x16,0x19,0x1c,0x1f,0x22,0x25,0x28,0x2b,0x2e,0x31,0x34,0x37,0x3a,0x3c,0x3f,0x42,0x44,0x47,0x4a,0x4c,0x4f,0x51,0x54,0x56,0x58,0x5b,0x5d,0x5f,0x61,0x63,0x65,0x67,0x69,0x6a,0x6c,0x6e,0x6f,0x71,0x72,0x74,0x75,0x76,0x77,0x79,0x7a,0x7a,0x7b,0x7c,0x7d,0x7e,0x7e,0x7f,0x7f,0x7f,0x80,0x80,0x80,0x80 3 | }; 4 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Boss.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_bossSprite_frames[] PROGMEM = { 4 | { 0, 27, 32, 3 }, 5 | { 864, 31, 32, 1 }, 6 | { 1856, 27, 31, 3 }, 7 | { 2693, 30, 32, 1 }, 8 | { 3653, 32, 32, 0 }, 9 | { 4677, 27, 31, 3 }, 10 | { 5514, 29, 28, 3 }, 11 | { 6326, 29, 21, 3 }, 12 | { 6935, 29, 10, 3 }, 13 | { 7225, 29, 10, 3 }, 14 | }; 15 | 16 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_BlockingDecorations.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_blockingDecorations_frames[] PROGMEM = { 4 | { 0, 22, 14, 5 }, 5 | { 308, 24, 16, 5 }, 6 | { 692, 18, 21, 8 }, 7 | { 1070, 13, 16, 9 }, 8 | { 1278, 16, 32, 9 }, 9 | { 1790, 9, 16, 12 }, 10 | { 1934, 16, 26, 8 }, 11 | { 2350, 7, 32, 13 }, 12 | { 2574, 9, 27, 12 }, 13 | { 2817, 12, 14, 10 }, 14 | { 2985, 20, 32, 7 }, 15 | }; 16 | 17 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Items.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_itemSprites_frames[] PROGMEM = { 4 | { 0, 6, 7, 13 }, 5 | { 42, 18, 7, 7 }, 6 | { 168, 9, 5, 13 }, 7 | { 213, 14, 8, 8 }, 8 | { 325, 9, 13, 11 }, 9 | { 442, 9, 11, 12 }, 10 | { 541, 16, 8, 6 }, 11 | { 669, 13, 12, 10 }, 12 | { 825, 13, 18, 10 }, 13 | { 1059, 21, 9, 7 }, 14 | { 1248, 26, 10, 2 }, 15 | { 1508, 18, 11, 8 }, 16 | { 1706, 18, 11, 8 }, 17 | }; 18 | 19 | -------------------------------------------------------------------------------- /Windows/SDL2/README-SDL.txt: -------------------------------------------------------------------------------- 1 | 2 | Please distribute this file with the SDL runtime environment: 3 | 4 | The Simple DirectMedia Layer (SDL for short) is a cross-platform library 5 | designed to make it easy to write multi-media software, such as games 6 | and emulators. 7 | 8 | The Simple DirectMedia Layer library source code is available from: 9 | https://www.libsdl.org/ 10 | 11 | This library is distributed under the terms of the zlib license: 12 | http://www.zlib.net/zlib_license.html 13 | 14 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Dog.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_dogSprite_frames[] PROGMEM = { 4 | { 0, 7, 17, 13 }, 5 | { 119, 7, 15, 13 }, 6 | { 224, 8, 16, 12 }, 7 | { 352, 9, 21, 11 }, 8 | { 541, 10, 22, 10 }, 9 | { 761, 19, 16, 8 }, 10 | { 1065, 19, 16, 8 }, 11 | { 1369, 23, 20, 6 }, 12 | { 1829, 28, 16, 3 }, 13 | { 2277, 27, 7, 3 }, 14 | { 2466, 16, 16, 9 }, 15 | { 2722, 18, 15, 8 }, 16 | { 2992, 18, 14, 7 }, 17 | { 3244, 16, 16, 7 }, 18 | { 3500, 18, 15, 6 }, 19 | { 3770, 18, 13, 7 }, 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_SS.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_ssSprite_frames[] PROGMEM = { 4 | { 0, 14, 28, 9 }, 5 | { 392, 14, 29, 8 }, 6 | { 798, 12, 27, 9 }, 7 | { 1122, 12, 28, 9 }, 8 | { 1458, 12, 28, 9 }, 9 | { 1794, 15, 27, 8 }, 10 | { 2199, 16, 23, 10 }, 11 | { 2567, 20, 19, 8 }, 12 | { 2947, 20, 14, 8 }, 13 | { 3227, 24, 8, 4 }, 14 | { 3419, 13, 28, 9 }, 15 | { 3783, 13, 27, 9 }, 16 | { 4134, 17, 28, 7 }, 17 | { 4610, 13, 28, 10 }, 18 | { 4974, 12, 28, 12 }, 19 | { 5310, 14, 27, 10 }, 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /Windows/SDL2/BUGS.txt: -------------------------------------------------------------------------------- 1 | 2 | Bugs are now managed in the SDL issue tracker, here: 3 | 4 | https://github.com/libsdl-org/SDL/issues 5 | 6 | You may report bugs there, and search to see if a given issue has already 7 | been reported, discussed, and maybe even fixed. 8 | 9 | 10 | You may also find help at the SDL forums/mailing list: 11 | 12 | https://discourse.libsdl.org/ 13 | 14 | Bug reports are welcome here, but we really appreciate if you use the issue 15 | tracker, as bugs discussed on the mailing list may be forgotten or missed. 16 | 17 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Guard.h: -------------------------------------------------------------------------------- 1 | #include "../SpriteFrame.h" 2 | 3 | const SpriteFrame Data_guardSprite_frames[] PROGMEM = { 4 | { 0, 9, 23, 12 }, 5 | { 207, 11, 24, 11 }, 6 | { 471, 9, 23, 12 }, 7 | { 678, 12, 23, 10 }, 8 | { 954, 12, 23, 10 }, 9 | { 1230, 12, 23, 11 }, 10 | { 1506, 17, 26, 12 }, 11 | { 1948, 19, 22, 13 }, 12 | { 2366, 19, 18, 13 }, 13 | { 2708, 24, 7, 8 }, 14 | { 2876, 12, 24, 10 }, 15 | { 3164, 11, 24, 10 }, 16 | { 3428, 13, 23, 10 }, 17 | { 3727, 11, 23, 12 }, 18 | { 3980, 11, 24, 12 }, 19 | { 4244, 13, 23, 11 }, 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /Tools/TrigLUT/GenerateTrigLUT.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define FIXED_SHIFT 7 5 | #define FIXED_ONE (1 << FIXED_SHIFT) 6 | #define OUTPUT_FILE "TrigLUT.h" 7 | #define M_PI 3.141592654 8 | 9 | int main(int argc, char* argv[]) 10 | { 11 | FILE* fs = fopen(OUTPUT_FILE, "w"); 12 | 13 | if(fs) 14 | { 15 | fprintf(fs, "uint8_t TrigLUT[] PROGMEM = {\n\t"); 16 | for(int i = 0; i <= 64; i++) 17 | { 18 | int value = (int)((sin((double)i * M_PI / 128.0) * FIXED_ONE) + 0.5); 19 | fprintf(fs, "0x%x", value); 20 | if(i < 64) 21 | { 22 | fprintf(fs, ","); 23 | } 24 | } 25 | fprintf(fs, "\n};\n"); 26 | fclose(fs); 27 | } 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /Wolf/Platform.h: -------------------------------------------------------------------------------- 1 | #ifndef PLATFORM_H_ 2 | #define PLATFORM_H_ 3 | 4 | #include 5 | 6 | #include "Defines.h" 7 | 8 | #define INPUT_BIT(x) (1 << (x)) 9 | 10 | enum 11 | { 12 | Input_Dpad_Up = INPUT_BIT(0), 13 | Input_Dpad_Right = INPUT_BIT(1), 14 | Input_Dpad_Down = INPUT_BIT(2), 15 | Input_Dpad_Left = INPUT_BIT(3), 16 | Input_Btn_A = INPUT_BIT(4), 17 | Input_Btn_B = INPUT_BIT(5), 18 | Input_Btn_C = INPUT_BIT(6), 19 | }; 20 | 21 | class PlatformBase 22 | { 23 | public: 24 | uint8_t readInput() { return inputState; } 25 | bool isMuted() { return m_isMuted; } 26 | void setMuted(bool muted) { m_isMuted = muted; } 27 | 28 | uint8_t inputState; 29 | bool m_isMuted : 1; 30 | }; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Windows/SDL2/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer 3 | 4 | (SDL) 5 | 6 | Version 2.0 7 | 8 | --- 9 | https://www.libsdl.org/ 10 | 11 | Simple DirectMedia Layer is a cross-platform development library designed 12 | to provide low level access to audio, keyboard, mouse, joystick, and graphics 13 | hardware via OpenGL and Direct3D. It is used by video playback software, 14 | emulators, and popular games including Valve's award winning catalog 15 | and many Humble Bundle games. 16 | 17 | More extensive documentation is available in the docs directory, starting 18 | with README.md 19 | 20 | Enjoy! 21 | Sam Lantinga (slouken@libsdl.org) 22 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Font.h: -------------------------------------------------------------------------------- 1 | const uint8_t Data_font[] PROGMEM = { 2 | 0x00,0x00,0xe0,0x02,0x03,0x0c,0x5f,0x7d,0xf6,0x6a,0x99,0x4c,0xaa,0x6a,0x60,0x00,0xc0,0x45,0xd1,0x01,0x08, 3 | 0x23,0x62,0x08,0x10,0x01,0x84,0x10,0x00,0x02,0x98,0x0c,0x3f,0x7e,0xf2,0x43,0xbd,0x5e,0xb1,0x7e,0x87, 4 | 0x7c,0xb7,0x76,0xbf,0x76,0x21,0x7c,0xbf,0x7e,0xb7,0x7e,0x40,0x01,0x50,0x01,0x44,0x45,0x4a,0x29,0x51, 5 | 0x11,0xa1,0x0a,0x2e,0x5e,0xbe,0x78,0xbf,0x2a,0x2e,0x2a,0x3f,0x3a,0xbf,0x46,0xbf,0x04,0x2e,0x76,0x9f, 6 | 0x7c,0xf1,0x47,0x08,0x3e,0x9f,0x6c,0x1f,0x42,0xdf,0x7c,0x9e,0x3c,0x2e,0x3a,0x3f,0x19,0x2e,0x5b,0xbf, 7 | 0x68,0xb2,0x26,0xe1,0x07,0x1f,0x7e,0x0f,0x3f,0x9f,0x7d,0x9b,0x6c,0x83,0x0f,0xb9,0x4e,0xe0,0x47,0x83, 8 | 0x60,0xf1,0x03,0x22,0x08,0x00,0x00 9 | }; 10 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-git.md: -------------------------------------------------------------------------------- 1 | git 2 | ========= 3 | 4 | The latest development version of SDL is available via git. 5 | Git allows you to get up-to-the-minute fixes and enhancements; 6 | as a developer works on a source tree, you can use "git" to mirror that 7 | source tree instead of waiting for an official release. Please look 8 | at the Git website ( https://git-scm.com/ ) for more 9 | information on using git, where you can also download software for 10 | macOS, Windows, and Unix systems. 11 | 12 | git clone https://github.com/libsdl-org/SDL 13 | 14 | If you are building SDL via configure, you will need to run autogen.sh 15 | before running configure. 16 | 17 | There is a web interface to the Git repository at: 18 | http://github.com/libsdl-org/SDL/ 19 | 20 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright 2017-2020 The Khronos Group Inc. 6 | ** SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 10 | * 11 | * Adopters may modify khrplatform.h and this file to suit their platform. 12 | * Please contribute modifications back to Khronos as pull requests on the 13 | * public github repository: 14 | * https://github.com/KhronosGroup/OpenGL-Registry 15 | */ 16 | 17 | /*#include */ 18 | 19 | #ifndef GL_APICALL 20 | #define GL_APICALL KHRONOS_APICALL 21 | #endif 22 | 23 | #ifndef GL_APIENTRY 24 | #define GL_APIENTRY KHRONOS_APIENTRY 25 | #endif 26 | 27 | #endif /* __gl2platform_h_ */ 28 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-pandora.md: -------------------------------------------------------------------------------- 1 | Pandora 2 | ===================================================================== 3 | 4 | ( http://openpandora.org/ ) 5 | - A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES 6 | support to work on the pandora under the framebuffer. This driver do not have 7 | input support for now, so if you use it you will have to add your own control code. 8 | The video driver name is "pandora" so if you have problem running it from 9 | the framebuffer, try to set the following variable before starting your application : 10 | "export SDL_VIDEODRIVER=pandora" 11 | 12 | - OpenGL ES support was added to the x11 driver, so it's working like the normal 13 | x11 driver one with OpenGLX support, with SDL input event's etc.. 14 | 15 | 16 | David Carré (Cpasjuste) 17 | cpasjuste@gmail.com 18 | -------------------------------------------------------------------------------- /Wolf/Save.h: -------------------------------------------------------------------------------- 1 | #ifndef SAVE_H_ 2 | #define SAVE_H_ 3 | 4 | #include 5 | #include "Defines.h" 6 | 7 | #define NUM_SAVE_SLOTS 3 8 | #define NUM_HIGH_SCORES 3 9 | 10 | struct SaveSlot 11 | { 12 | uint8_t hp; 13 | uint8_t level; 14 | uint8_t difficulty; 15 | uint8_t ammo; 16 | uint8_t inventoryFlags; 17 | uint8_t lives; 18 | int32_t score; 19 | }; 20 | 21 | struct HighScore 22 | { 23 | char name[3]; 24 | int32_t score; 25 | }; 26 | 27 | struct SaveFile 28 | { 29 | SaveSlot slots[NUM_SAVE_SLOTS]; 30 | HighScore scores[NUM_HIGH_SCORES]; 31 | }; 32 | 33 | class SaveSystem 34 | { 35 | public: 36 | void init(); 37 | 38 | void saveStateToActiveSlot(); 39 | void restoreStateFromActiveSlot(); 40 | void clearActiveSlot(); 41 | 42 | bool trySubmitHighScore(int32_t score); 43 | 44 | void save(); 45 | 46 | SaveFile saveFile; 47 | int8_t activeSlot; 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /Wolf/FixedMath.h: -------------------------------------------------------------------------------- 1 | #ifndef FIXED_MATH_H_ 2 | #define FIXED_MATH_H_ 3 | 4 | #include 5 | 6 | #define FIXED_SHIFT 7 7 | #define FIXED_ONE (1 << FIXED_SHIFT) 8 | #define FIXED_HALF (1 << (FIXED_SHIFT - 1)) 9 | #define FIXED_TO_INT(x) ((x) >> FIXED_SHIFT) 10 | #define FIXED_TO_INT_ROUNDED(x) (((x) + FIXED_HALF) >> FIXED_SHIFT) 11 | #define INT_TO_FIXED(x) ((x) << FIXED_SHIFT) 12 | #define DEGREES_90 64 13 | #define DEGREES_180 128 14 | #define DEGREES_270 192 15 | #define DEGREES_360 256 16 | 17 | typedef int16_t fixed_t; 18 | typedef uint8_t angle_t; 19 | 20 | class FixedMath 21 | { 22 | public: 23 | static fixed_t Sin(angle_t x); 24 | static inline fixed_t Cos(angle_t x) 25 | { 26 | return Sin((angle_t)(DEGREES_90 + (int16_t)x)); 27 | } 28 | }; 29 | 30 | int8_t clamp(int8_t x, int8_t lower, int8_t upper); 31 | uint8_t getRandomNumber(); 32 | uint16_t getRandomNumber16(); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Wolf/ArduboyPlatform.cpp: -------------------------------------------------------------------------------- 1 | #include "ArduboyPlatform.h" 2 | //#include "Generated/Data_Audio.h" 3 | 4 | ArduboyPlatform Platform; 5 | 6 | void ArduboyPlatform::update() 7 | { 8 | inputState = 0; 9 | 10 | if(arduboy.pressed(A_BUTTON)) 11 | { 12 | inputState |= Input_Btn_A; 13 | } 14 | if(arduboy.pressed(B_BUTTON)) 15 | { 16 | inputState |= Input_Btn_B; 17 | } 18 | if(arduboy.pressed(UP_BUTTON)) 19 | { 20 | inputState |= Input_Dpad_Up; 21 | } 22 | if(arduboy.pressed(DOWN_BUTTON)) 23 | { 24 | inputState |= Input_Dpad_Down; 25 | } 26 | if(arduboy.pressed(LEFT_BUTTON)) 27 | { 28 | inputState |= Input_Dpad_Left; 29 | } 30 | if(arduboy.pressed(RIGHT_BUTTON)) 31 | { 32 | inputState |= Input_Dpad_Right; 33 | } 34 | 35 | if(arduboy.audio.enabled() != !m_isMuted) 36 | { 37 | if(m_isMuted) 38 | { 39 | arduboy.audio.off(); 40 | } 41 | else 42 | { 43 | arduboy.audio.on(); 44 | } 45 | } 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /Wolf/Menu.h: -------------------------------------------------------------------------------- 1 | #ifndef MENU_H_ 2 | #define MENU_H_ 3 | 4 | typedef const void* MenuData; 5 | 6 | class Menu 7 | { 8 | public: 9 | void init(); 10 | void draw(); 11 | void update(); 12 | 13 | const MenuData* currentMenu; 14 | int8_t currentSelection; 15 | int8_t debounceInput; 16 | int8_t selectionDelta; 17 | 18 | int8_t numMenuItems(); 19 | 20 | void switchMenu(const MenuData* newMenu); 21 | 22 | static void chooseNewSlot(); 23 | static void chooseDifficulty(); 24 | static void loadGame(); 25 | static void loadSelectedSave(); 26 | static void setDifficulty(); 27 | static void viewScores(); 28 | static void toggleSound(); 29 | static void showHelp(); 30 | 31 | void printStat(const char* name, uint8_t num, uint8_t count, int x, int y, uint8_t startTime); 32 | 33 | }; 34 | 35 | extern const void* const Menu_GameOver[] PROGMEM; 36 | extern const void* const Menu_YouWin[] PROGMEM; 37 | extern const void* const Menu_FloorComplete[] PROGMEM; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Windows/SDL2/COPYING.txt: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2020 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-psp.md: -------------------------------------------------------------------------------- 1 | PSP 2 | ====== 3 | SDL2 port for the Sony PSP contributed by: 4 | - Captian Lex 5 | - Francisco Javier Trujillo Mata 6 | - Wouter Wijsman 7 | 8 | 9 | Credit to 10 | Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP 11 | Geecko for his PSP GU lib "Glib2d" 12 | 13 | ## Building 14 | To build SDL2 library for the PSP, make sure you have the latest PSPDev status and run: 15 | ```bash 16 | cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake 17 | cmake --build build 18 | cmake --install build 19 | ``` 20 | 21 | 22 | ## Getting PSP Dev 23 | [Installing PSP Dev](https://github.com/pspdev/pspdev) 24 | 25 | ## Running on PPSSPP Emulator 26 | [PPSSPP](https://github.com/hrydgard/ppsspp) 27 | 28 | [Build Instructions](https://github.com/hrydgard/ppsspp/wiki/Build-instructions) 29 | 30 | 31 | ## Compiling a HelloWorld 32 | [PSP Hello World](https://psp-dev.org/doku.php?id=tutorial:hello_world) 33 | 34 | ## To Do 35 | - PSP Screen Keyboard 36 | - Dialogs 37 | -------------------------------------------------------------------------------- /Tools/AudioEncoder/AudioEncoder.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 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /Wolf/FixedMath.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | #include "Defines.h" 3 | #include "FixedMath.h" 4 | #include "TrigLUT.h" 5 | 6 | fixed_t FixedMath::Sin(angle_t x) 7 | { 8 | if(x <= DEGREES_90) 9 | { 10 | return (fixed_t)(pgm_read_byte(&TrigLUT[x])); 11 | } 12 | else if(x <= DEGREES_180) 13 | { 14 | return (fixed_t)(pgm_read_byte(&TrigLUT[DEGREES_180 - x])); 15 | } 16 | else if(x <= DEGREES_270) 17 | { 18 | return -1 * (fixed_t)(pgm_read_byte(&TrigLUT[x - DEGREES_180])); 19 | } 20 | else 21 | { 22 | return -1 * (fixed_t)(pgm_read_byte(&TrigLUT[DEGREES_360 - x])); 23 | } 24 | } 25 | 26 | int8_t clamp(int8_t x, int8_t lower, int8_t upper) 27 | { 28 | if(x < lower) return lower; 29 | if(x > upper) return upper; 30 | return x; 31 | } 32 | 33 | uint8_t getRandomNumber() 34 | { 35 | return getRandomNumber16() & 0xff; 36 | } 37 | 38 | uint16_t getRandomNumber16() 39 | { 40 | static uint16_t randVal = 0xABC; 41 | 42 | uint16_t lsb = randVal & 1; 43 | randVal >>= 1; 44 | if (lsb == 1) 45 | randVal ^= 0xB400u; 46 | 47 | return (randVal - 1); 48 | } 49 | -------------------------------------------------------------------------------- /Package/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 3, 3 | "title": "Wolfenduino 3D", 4 | "description": "Wolfenduino 3D is a first person shooter demake of the popular id game Wolfenstein 3D", 5 | "author": "James Howard", 6 | "version": "1.0", 7 | "date": "2023-11-29", 8 | "genre": "Action", 9 | "publisher": "", 10 | "idea": "", 11 | "code": "", 12 | "art": "", 13 | "sound": "", 14 | "url": "https://github.com/jhhoward/WolfenduinoFX", 15 | "sourceUrl": "https://github.com/jhhoward/WolfenduinoFX", 16 | "email": "", 17 | "companion": "", 18 | "banner": "banner.png", 19 | "screenshots": [ 20 | { 21 | "title": "", 22 | "filename": "screen1.png" 23 | }, 24 | { 25 | "title": "", 26 | "filename": "screen2.png" 27 | } 28 | ], 29 | "binaries": [ 30 | { 31 | "title": "Wolfenduino 3D", 32 | "filename": "Wolfenduino.hex", 33 | "flashdata": "Wolfenduino.bin", 34 | "device": "ArduboyFX" 35 | } 36 | ], 37 | "buttons": [ 38 | { 39 | "control": "", 40 | "action": "" 41 | } 42 | ] 43 | } -------------------------------------------------------------------------------- /Tools/ImageEncoder/ImageEncoder.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 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Audio.h: -------------------------------------------------------------------------------- 1 | #define NUM_AUDIO_PATTERNS 87 2 | const uint16_t Data_AudioPatterns[] PROGMEM = { 3 | 0, 4 | 42, 5 | 68, 6 | 102, 7 | 180, 8 | 206, 9 | 240, 10 | 346, 11 | 536, 12 | 622, 13 | 776, 14 | 950, 15 | 1016, 16 | 1074, 17 | 1188, 18 | 1214, 19 | 1244, 20 | 1486, 21 | 1664, 22 | 1790, 23 | 1932, 24 | 1982, 25 | 2188, 26 | 2406, 27 | 2572, 28 | 2774, 29 | 3032, 30 | 3086, 31 | 3188, 32 | 3254, 33 | 3480, 34 | 3630, 35 | 3680, 36 | 3774, 37 | 3840, 38 | 3922, 39 | 4240, 40 | 4538, 41 | 4948, 42 | 5190, 43 | 5304, 44 | 5390, 45 | 5596, 46 | 5618, 47 | 5880, 48 | 6186, 49 | 6488, 50 | 6578, 51 | 6956, 52 | 7518, 53 | 8052, 54 | 8126, 55 | 8388, 56 | 8582, 57 | 9080, 58 | 9798, 59 | 10244, 60 | 10414, 61 | 11204, 62 | 11378, 63 | 11520, 64 | 11738, 65 | 11944, 66 | 12394, 67 | 12856, 68 | 13370, 69 | 13616, 70 | 13954, 71 | 14172, 72 | 14274, 73 | 14420, 74 | 14566, 75 | 14632, 76 | 14722, 77 | 14904, 78 | 15070, 79 | 15240, 80 | 15466, 81 | 15692, 82 | 15842, 83 | 16424, 84 | 16994, 85 | 17564, 86 | 18138, 87 | 18668, 88 | 19206, 89 | 19324, 90 | 19670, 91 | }; 92 | 93 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_types.h 24 | * 25 | * \deprecated 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_stdinc.h" 30 | -------------------------------------------------------------------------------- /Windows/SDLPlatform.h: -------------------------------------------------------------------------------- 1 | #ifndef SDLPLATFORM_H_ 2 | #define SDLPLATFORM_H_ 3 | 4 | #include 5 | #include "Platform.h" 6 | 7 | class SDLPlatform : public PlatformBase 8 | { 9 | public: 10 | void init(); 11 | void run(); 12 | void drawPixel(uint8_t x, uint8_t y, uint8_t colour); 13 | void playSound(uint8_t id); 14 | 15 | private: 16 | void drawPixel(SDL_Surface *surface, int x, int y, Uint32 pixel); 17 | 18 | void updateInputState(); 19 | 20 | SDL_Window* m_appWindow; 21 | SDL_Renderer* m_appRenderer; 22 | SDL_Surface* m_screenSurface; 23 | SDL_Texture* m_screenTexture; 24 | bool m_isRunning; 25 | }; 26 | 27 | extern SDLPlatform Platform; 28 | 29 | inline void drawPixel(uint8_t x, uint8_t y, uint8_t colour) 30 | { 31 | Platform.drawPixel(x, y, colour); 32 | } 33 | inline void setPixel(uint8_t x, uint8_t y) 34 | { 35 | Platform.drawPixel(x, y, 0); 36 | } 37 | inline void clearPixel(uint8_t x, uint8_t y) 38 | { 39 | Platform.drawPixel(x, y, 1); 40 | } 41 | void clearDisplay(uint8_t colour); 42 | 43 | void diskRead(uint24_t address, uint8_t* buffer, int length); 44 | 45 | void writeSaveFile(uint8_t* buffer, int length); 46 | bool readSaveFile(uint8_t* buffer, int length); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Knife.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_name.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDLname_h_ 23 | #define SDLname_h_ 24 | 25 | #if defined(__STDC__) || defined(__cplusplus) 26 | #define NeedFunctionPrototypes 1 27 | #endif 28 | 29 | #define SDL_NAME(X) SDL_##X 30 | 31 | #endif /* SDLname_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /fxdata.txt: -------------------------------------------------------------------------------- 1 | raw_t MapData = "Wolf/Generated/maps.bin" 2 | raw_t Data_audio = "Wolf/Generated/Data_Audio.bin" 3 | raw_t Data_pistolSprite = "Wolf/Generated/Data_Pistol.bin" 4 | raw_t Data_machinegunSprite = "Wolf/Generated/Data_Machinegun.bin" 5 | raw_t Data_chaingunSprite = "Wolf/Generated/Data_Chaingun.bin" 6 | raw_t Data_knifeSprite = "Wolf/Generated/Data_Knife.bin" 7 | raw_t Data_itemSprites = "Wolf/Generated/Data_Items.bin" 8 | raw_t Data_guardSprite = "Wolf/Generated/Data_Guard.bin" 9 | raw_t Data_dogSprite = "Wolf/Generated/Data_Dog.bin" 10 | raw_t Data_ssSprite = "Wolf/Generated/Data_SS.bin" 11 | raw_t Data_bossSprite = "Wolf/Generated/Data_Boss.bin" 12 | raw_t Data_decorations = "Wolf/Generated/Data_Decorations.bin" 13 | raw_t Data_blockingDecorations = "Wolf/Generated/Data_BlockingDecorations.bin" 14 | raw_t Data_wallTextures = "Wolf/Generated/Data_Walls.bin" 15 | raw_t Data_uiSprite = "Wolf/Generated/Data_UI.bin" 16 | raw_t Data_titleBG = "Wolf/Generated/Data_TitleBG.bin" 17 | raw_t Data_helpBG = "Wolf/Generated/Data_HelpBG.bin" 18 | raw_t Data_winBG = "Wolf/Generated/Data_WinBG.bin" 19 | raw_t Data_floorComplete1BG = "Wolf/Generated/Data_FloorCompleteBG1.bin" 20 | raw_t Data_floorComplete2BG = "Wolf/Generated/Data_FloorCompleteBG2.bin" 21 | 22 | savesection 23 | 24 | uint16_t 0x0000 //game state end marker / start of unused space 25 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/release_checklist.md: -------------------------------------------------------------------------------- 1 | # Release checklist 2 | 3 | When changing the version, run `build-scripts/update-version.sh X Y Z`, 4 | where `X Y Z` are the major version, minor version, and patch level. So 5 | `2 28 1` means "change the version to 2.28.1". This script does much of the 6 | mechanical work. 7 | 8 | 9 | ## New feature release 10 | 11 | * Update `WhatsNew.txt` 12 | 13 | * Bump version number to 2.EVEN.0: 14 | 15 | * `./build-scripts/update-version.sh 2 EVEN 0` 16 | 17 | * Do the release 18 | 19 | * Update the website file include/header.inc.php to reflect the new version 20 | 21 | ## New bugfix release 22 | 23 | * Check that no new API/ABI was added 24 | 25 | * If it was, do a new feature release (see above) instead 26 | 27 | * Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is even) 28 | 29 | * `./build-scripts/update-version.sh 2 Y Z+1` 30 | 31 | * Do the release 32 | 33 | * Update the website file include/header.inc.php to reflect the new version 34 | 35 | ## After a feature release 36 | 37 | * Create a branch like `release-2.24.x` 38 | 39 | * Bump version number to 2.ODD.0 for next development branch 40 | 41 | * `./build-scripts/update-version.sh 2 ODD 0` 42 | 43 | ## New development prerelease 44 | 45 | * Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is odd) 46 | 47 | * `./build-scripts/update-version.sh 2 Y Z+1` 48 | 49 | * Do the release 50 | -------------------------------------------------------------------------------- /Wolf/Actor.h: -------------------------------------------------------------------------------- 1 | #ifndef ACTOR_H_ 2 | #define ACTOR_H_ 3 | 4 | #include 5 | 6 | enum ActorType 7 | { 8 | ActorType_Empty, 9 | ActorType_Guard, 10 | ActorType_Dog, 11 | ActorType_SS, 12 | ActorType_Boss 13 | }; 14 | 15 | enum ActorState 16 | { 17 | ActorState_Idle, 18 | ActorState_Waking, 19 | ActorState_Active, 20 | ActorState_Injured, 21 | ActorState_Aiming, 22 | ActorState_Shooting, 23 | ActorState_Recoiling, 24 | ActorState_Dying, 25 | ActorState_Dead 26 | }; 27 | 28 | class Actor 29 | { 30 | public: 31 | void init(uint8_t spawnId, uint8_t actorType, uint8_t cellX, uint8_t cellZ); 32 | void update(); 33 | void draw(); 34 | void damage(int amount); 35 | 36 | void switchState(uint8_t newState); 37 | void updateFrozenState(); 38 | 39 | bool tryMove(); 40 | void pickNewTargetCell(); 41 | bool tryPickCell(int8_t x, int8_t z); 42 | bool tryPickCells(int8_t deltaX, int8_t deltaZ); 43 | 44 | void dropItem(uint8_t itemType); 45 | bool tryDropItem(uint8_t itemType, int cellX, int cellZ); 46 | 47 | bool isPlayerColliding(); 48 | 49 | void shootPlayer(); 50 | bool shouldShootPlayer(bool movementSucceeded); 51 | int8_t getPlayerCellDistance(); 52 | 53 | uint8_t spawnId; 54 | uint8_t type; 55 | int16_t x, z; 56 | uint8_t state; 57 | uint8_t frame; 58 | int16_t hp; 59 | 60 | uint8_t targetCellX, targetCellZ; 61 | 62 | struct 63 | { 64 | bool frozen : 1; 65 | } flags; 66 | }; 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #ifdef __IPHONEOS__ 30 | #include 31 | #include 32 | #else 33 | #include 34 | #include 35 | #endif 36 | 37 | #ifndef APIENTRY 38 | #define APIENTRY 39 | #endif 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Wolfenduino 2 | Wolfenduino is a demake of id software's Wolfenstein 3D for the Arduboy FX. 3 | 4 | ![output](https://github.com/jhhoward/WolfenduinoFX/assets/1665740/50906f2e-36a5-462a-9e71-3bccf1e7c3c8) 5 | 6 | ## Features 7 | * 10 Levels based on the shareware episode 'Escape from Wolfenstein' 8 | * Enemies, weapons and secret push walls, all based on the original game 9 | * Four difficulty levels 10 | * An auto-save system that saves your progress at the end of each level 11 | * A high score table 12 | 13 | ## Controls 14 | ![image](https://github.com/jhhoward/WolfenduinoFX/assets/1665740/c890d597-0de5-4cfd-bd5a-8d0697776a30) 15 | * Use directional pad to move 16 | * Press B to shoot 17 | * Hold A to strafe 18 | * Double tap A to switch between weapons 19 | 20 | ## Building 21 | You can build from source using the Arduino IDE. To build you will also need the following libraries: 22 | * [Arduboy2](https://github.com/MLXXXp/Arduboy2) 23 | * [ArduboyFX](https://github.com/MrBlinky/ArduboyFX) 24 | 25 | ## Playing 26 | Check the [releases](https://github.com/jhhoward/WolfenduinoFX/releases) page for the latest binaries. You will need to install both the HEX code file and BIN data file to play. 27 | 28 | ## Video demo 29 | You can watch a video of Wolfenduino running on actual hardware here: 30 | 31 | [![Video demo](https://img.youtube.com/vi/gl89uwLA_j8/0.jpg)](https://www.youtube.com/watch?v=gl89uwLA_j8 "Video demo") 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Wolf/Engine.h: -------------------------------------------------------------------------------- 1 | #ifndef ENGINE_H_ 2 | #define ENGINE_H_ 3 | 4 | #ifdef _WIN32 5 | #include "../Windows/SDLPlatform.h" 6 | #else 7 | #include "ArduboyPlatform.h" 8 | #endif 9 | 10 | #include "Platform.h" 11 | #include "Renderer.h" 12 | #include "Player.h" 13 | #include "Map.h" 14 | #include "Actor.h" 15 | #include "Menu.h" 16 | #include "Save.h" 17 | 18 | enum 19 | { 20 | GameState_Menu, 21 | GameState_PauseMenu, 22 | GameState_Loading, 23 | GameState_Playing, 24 | GameState_Dead, 25 | GameState_EnterNextLevel, 26 | GameState_StartingLevel 27 | }; 28 | 29 | enum Difficulty 30 | { 31 | Difficulty_Baby, 32 | Difficulty_Easy, 33 | Difficulty_Medium, 34 | Difficulty_Hard 35 | }; 36 | 37 | class Engine 38 | { 39 | public: 40 | void init(); 41 | void update(); 42 | void draw(); 43 | void startNewGame(); 44 | void startLevel(bool resetPlayer = true); 45 | void startingLevel(); 46 | void finishLevel(); 47 | void loadGame(); 48 | void enterNextLevel(); 49 | Actor* spawnActor(uint8_t spawnId, uint8_t actorType, int8_t cellX, int8_t cellZ); 50 | void fadeTransition(); 51 | 52 | Renderer renderer; 53 | Player player; 54 | Map map; 55 | Menu menu; 56 | SaveSystem save; 57 | 58 | Actor actors[MAX_ACTIVE_ACTORS]; 59 | 60 | int16_t frameCount; 61 | uint8_t gameState; 62 | uint8_t difficulty; 63 | 64 | uint8_t streamBuffer[STREAM_BUFFER_SIZE]; 65 | 66 | int8_t screenFade; 67 | }; 68 | 69 | extern Engine engine; 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /Wolf/Vector2.h: -------------------------------------------------------------------------------- 1 | #ifndef VECTOR2_H_ 2 | #define VECTOR2_H_ 3 | 4 | #include 5 | 6 | class Vector2 7 | { 8 | public: 9 | inline Vector2() : x(0), y(0) {} 10 | inline Vector2(int16_t _x, int16_t _y) : x(_x), y(_y) {} 11 | inline Vector2 operator + (const Vector2& v) 12 | { 13 | return Vector2(x + v.x, y + v.y); 14 | } 15 | inline Vector2 operator - (const Vector2& v) 16 | { 17 | return Vector2(x - v.x, y - v.y); 18 | } 19 | inline Vector2 operator * (int16_t scale) 20 | { 21 | return Vector2(x * scale, y * scale); 22 | } 23 | inline Vector2 operator / (int16_t scale) 24 | { 25 | return Vector2(x / scale, y / scale); 26 | } 27 | inline bool operator == (const Vector2& v) 28 | { 29 | return v.x == x && v.y == y; 30 | } 31 | inline bool operator != (const Vector2& v) 32 | { 33 | return !(*this == v); 34 | } 35 | inline Vector2 operator - () const 36 | { 37 | return Vector2(-x, -y); 38 | } 39 | inline Vector2 operator += (const Vector2& v) 40 | { 41 | x += v.x; 42 | y += v.y; 43 | return *this; 44 | } 45 | inline Vector2 operator -= (const Vector2& v) 46 | { 47 | x -= v.x; 48 | y -= v.y; 49 | return *this; 50 | } 51 | inline Vector2 operator *= (int16_t scale) 52 | { 53 | x *= scale; 54 | y *= scale; 55 | return *this; 56 | } 57 | inline Vector2 operator /= (int16_t scale) 58 | { 59 | x /= scale; 60 | y /= scale; 61 | return *this; 62 | } 63 | 64 | int16_t x, y; 65 | }; 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /Wolf/Generated/fxdata.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /**** FX data header generated by fxdata-build.py tool version 1.15 ****/ 4 | 5 | using uint24_t = __uint24; 6 | 7 | // Initialize FX hardware using FX::begin(FX_DATA_PAGE); in the setup() function. 8 | 9 | constexpr uint16_t FX_DATA_PAGE = 0xfbf3; 10 | constexpr uint24_t FX_DATA_BYTES = 261298; 11 | 12 | constexpr uint16_t FX_SAVE_PAGE = 0xfff0; 13 | constexpr uint24_t FX_SAVE_BYTES = 2; 14 | 15 | constexpr uint24_t MapData = 0x000000; 16 | constexpr uint24_t Data_audio = 0x028000; 17 | constexpr uint24_t Data_pistolSprite = 0x02CCD6; 18 | constexpr uint24_t Data_machinegunSprite = 0x02D5FF; 19 | constexpr uint24_t Data_chaingunSprite = 0x02DEFE; 20 | constexpr uint24_t Data_knifeSprite = 0x02F07D; 21 | constexpr uint24_t Data_itemSprites = 0x02F584; 22 | constexpr uint24_t Data_guardSprite = 0x02FCF4; 23 | constexpr uint24_t Data_dogSprite = 0x030EB3; 24 | constexpr uint24_t Data_ssSprite = 0x031E57; 25 | constexpr uint24_t Data_bossSprite = 0x03348F; 26 | constexpr uint24_t Data_decorations = 0x0351EA; 27 | constexpr uint24_t Data_blockingDecorations = 0x035E49; 28 | constexpr uint24_t Data_wallTextures = 0x036C72; 29 | constexpr uint24_t Data_uiSprite = 0x03D472; 30 | constexpr uint24_t Data_titleBG = 0x03E8B2; 31 | constexpr uint24_t Data_helpBG = 0x03ECB2; 32 | constexpr uint24_t Data_winBG = 0x03F0B2; 33 | constexpr uint24_t Data_floorComplete1BG = 0x03F4B2; 34 | constexpr uint24_t Data_floorComplete2BG = 0x03F8B2; 35 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-n3ds.md: -------------------------------------------------------------------------------- 1 | # Nintendo 3DS 2 | 3 | SDL port for the Nintendo 3DS [Homebrew toolchain](https://devkitpro.org/) contributed by: 4 | 5 | - [Pierre Wendling](https://github.com/FtZPetruska) 6 | 7 | Credits to: 8 | 9 | - The awesome people who ported SDL to other homebrew platforms. 10 | - The Devkitpro team for making all the tools necessary to achieve this. 11 | 12 | ## Building 13 | 14 | To build for the Nintendo 3DS, make sure you have devkitARM and cmake installed and run: 15 | 16 | ```bash 17 | cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/3DS.cmake" -DCMAKE_BUILD_TYPE=Release 18 | cmake --build build 19 | cmake --install build 20 | ``` 21 | 22 | ## Notes 23 | 24 | - Currently only software rendering is supported. 25 | - SDL2main should be used to ensure ROMFS is enabled. 26 | - By default, the extra L2 cache and higher clock speeds of the New 2/3DS lineup are enabled. If you wish to turn it off, use `osSetSpeedupEnable(false)` in your main function. 27 | - `SDL_GetBasePath` returns the romfs root instead of the executable's directory. 28 | - The Nintendo 3DS uses a cooperative threading model on a single core, meaning a thread will never yield unless done manually through the `SDL_Delay` functions, or blocking waits (`SDL_LockMutex`, `SDL_SemWait`, `SDL_CondWait`, `SDL_WaitThread`). To avoid starving other threads, `SDL_SemTryWait` and `SDL_SemWaitTimeout` will yield if they fail to acquire the semaphore, see https://github.com/libsdl-org/SDL/pull/6776 for more information. 29 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-kmsbsd.md: -------------------------------------------------------------------------------- 1 | KMSDRM on *BSD 2 | ================================================== 3 | 4 | KMSDRM is supported on FreeBSD and OpenBSD. DragonFlyBSD works but requires being a root user. NetBSD isn't supported yet because the application will crash when creating the KMSDRM screen. 5 | 6 | WSCONS support has been brought back, but only as an input backend. It will not be brought back as a video backend to ease maintenance. 7 | 8 | OpenBSD note: Note that the video backend assumes that the user has read/write permissions to the /dev/drm* devices. 9 | 10 | 11 | SDL2 WSCONS input backend features 12 | =================================================== 13 | 1. It is keymap-aware; it will work properly with different keymaps. 14 | 2. It has mouse support. 15 | 3. Accent input is supported. 16 | 4. Compose keys are supported. 17 | 5. AltGr and Meta Shift keys work as intended. 18 | 19 | Partially working or no input on OpenBSD/NetBSD. 20 | ================================================== 21 | 22 | The WSCONS input backend needs read/write access to the /dev/wskbd* devices, without which it will not work properly. /dev/wsmouse must also be read/write accessible, otherwise mouse input will not work. 23 | 24 | Partially working or no input on FreeBSD. 25 | ================================================== 26 | 27 | The evdev devices are only accessible to the root user by default. Edit devfs rules to allow access to such devices. The /dev/kbd* devices are also only accessible to the root user by default. Edit devfs rules to allow access to such devices. 28 | -------------------------------------------------------------------------------- /Wolf/Player.h: -------------------------------------------------------------------------------- 1 | #ifndef PLAYER_H_ 2 | #define PLAYER_H_ 3 | 4 | #include "FixedMath.h" 5 | 6 | enum WeaponType 7 | { 8 | WeaponType_Knife, 9 | WeaponType_Pistol, 10 | WeaponType_MachineGun, 11 | WeaponType_ChainGun 12 | }; 13 | 14 | class Player 15 | { 16 | public: 17 | Player(); 18 | void init(); 19 | void update(); 20 | void move(int16_t deltaX, int16_t deltaZ); 21 | void damage(uint8_t amount); 22 | void givePoints(int16_t amount); 23 | void giveLife(); 24 | void onLoad(); 25 | 26 | int16_t x, z; 27 | angle_t direction; 28 | uint8_t hp; 29 | uint8_t killer; 30 | int8_t turnVelocity; 31 | 32 | uint8_t ticksSinceStrafePressed; 33 | uint32_t score; 34 | uint8_t lives; 35 | int8_t blinkKeyTimer; 36 | 37 | uint8_t enemiesKilled; 38 | uint8_t treasureCollected; 39 | uint8_t secretsFound; 40 | 41 | union 42 | { 43 | struct 44 | { 45 | uint8_t hasMachineGun : 1; 46 | uint8_t hasChainGun : 1; 47 | uint8_t hasKey1 : 1; 48 | uint8_t hasKey2 : 1; 49 | } inventory; 50 | uint8_t inventoryFlags; 51 | }; 52 | 53 | struct 54 | { 55 | uint8_t type; 56 | uint8_t ammo; 57 | uint8_t frame; 58 | uint8_t time; 59 | uint8_t debounce : 1; 60 | uint8_t shooting : 1; 61 | } weapon; 62 | 63 | private: 64 | void updateWeapon(); 65 | void shootWeapon(); 66 | void collectItems(int8_t cellX, int8_t cellZ); 67 | bool collectItem(uint8_t itemType); 68 | void giveAmmo(uint8_t amount); 69 | void heal(uint8_t amount); 70 | 71 | #ifdef USE_SIMPLE_COLLISIONS 72 | bool isPlayerColliding(); 73 | bool isPointColliding(int16_t x, int16_t z); 74 | #endif 75 | }; 76 | 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /Windows/SDL2/include/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file close_code.h 24 | * 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #ifndef SDL_begin_code_h 30 | #error close_code.h included without matching begin_code.h 31 | #endif 32 | #undef SDL_begin_code_h 33 | 34 | /* Reset structure packing at previous byte alignment */ 35 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) 36 | #ifdef __BORLANDC__ 37 | #pragma nopackwarning 38 | #endif 39 | #pragma pack(pop) 40 | #endif /* Compiler needs structure packing set */ 41 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-ngage.md: -------------------------------------------------------------------------------- 1 | Nokia N-Gage 2 | ============ 3 | 4 | SDL2 port for Symbian S60v1 and v2 with a main focus on the Nokia N-Gage 5 | (Classic and QD) by [Michael Fitzmayer](https://github.com/mupfdev). 6 | 7 | Compiling 8 | --------- 9 | 10 | SDL is part of the [N-Gage SDK.](https://github.com/ngagesdk) project. 11 | The library is included in the 12 | [toolchain](https://github.com/ngagesdk/ngage-toolchain) as a 13 | sub-module. 14 | 15 | A complete example project based on SDL2 can be found in the GitHub 16 | account of the SDK: [Wordle](https://github.com/ngagesdk/wordle). 17 | 18 | Current level of implementation 19 | ------------------------------- 20 | 21 | The video driver currently provides full screen video support with 22 | keyboard input. 23 | 24 | At the moment only the software renderer works. 25 | 26 | Audio is not yet implemented. 27 | 28 | Acknowledgements 29 | ---------------- 30 | 31 | Thanks to Hannu Viitala, Kimmo Kinnunen and Markus Mertama for the 32 | valuable insight into Symbian programming. Without the SDL 1.2 port 33 | which was specially developed for CDoom (Doom for the Nokia 9210), this 34 | adaptation would not have been possible. 35 | 36 | I would like to thank my friends 37 | [Razvan](https://twitter.com/bewarerazvan) and [Dan 38 | Whelan](https://danwhelan.ie/), for their continuous support. Without 39 | you and the [N-Gage community](https://discord.gg/dbUzqJ26vs), I would 40 | have lost my patience long ago. 41 | 42 | Last but not least, I would like to thank the development team of 43 | [EKA2L1](https://12z1.com/) (an experimental Symbian OS emulator). Your 44 | patience and support in troubleshooting helped me a lot. 45 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_opengles2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles2.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS) 30 | 31 | #ifdef __IPHONEOS__ 32 | #include 33 | #include 34 | #else 35 | #include 36 | #include 37 | #include 38 | #endif 39 | 40 | #else /* _MSC_VER */ 41 | 42 | /* OpenGL ES2 headers for Visual Studio */ 43 | #include "SDL_opengles2_khrplatform.h" 44 | #include "SDL_opengles2_gl2platform.h" 45 | #include "SDL_opengles2_gl2.h" 46 | #include "SDL_opengles2_gl2ext.h" 47 | 48 | #endif /* _MSC_VER */ 49 | 50 | #ifndef APIENTRY 51 | #define APIENTRY GL_APIENTRY 52 | #endif 53 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Items.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-vita.md: -------------------------------------------------------------------------------- 1 | PS Vita 2 | ======= 3 | SDL port for the Sony Playstation Vita and Sony Playstation TV 4 | 5 | Credit to 6 | * xerpi, cpasjuste and rsn8887 for initial (vita2d) port 7 | * vitasdk/dolcesdk devs 8 | * CBPS discord (Namely Graphene and SonicMastr) 9 | 10 | Building 11 | -------- 12 | To build for the PSVita, make sure you have vitasdk and cmake installed and run: 13 | ``` 14 | cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DCMAKE_BUILD_TYPE=Release 15 | cmake --build build 16 | cmake --install build 17 | ``` 18 | 19 | 20 | Notes 21 | ----- 22 | * gles1/gles2 support and renderers are disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PVR=ON` 23 | These renderers support 720p and 1080i resolutions. These can be specified with: 24 | `SDL_setenv("VITA_RESOLUTION", "720", 1);` and `SDL_setenv("VITA_RESOLUTION", "1080", 1);` 25 | * Desktop GL 1.X and 2.X support and renderers are also disabled by default and also can be enabled with `-DVIDEO_VITA_PVR=ON` as long as gl4es4vita is present in your SDK. 26 | They support the same resolutions as the gles1/gles2 backends and require specifying `SDL_setenv("VITA_PVR_OGL", "1", 1);` 27 | anytime before video subsystem initialization. 28 | * gles2 support via PIB is disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PIB=ON` 29 | * By default SDL emits mouse events for touch events on every touchscreen. 30 | Vita has two touchscreens, so it's recommended to use `SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");` and handle touch events instead. 31 | Individual touchscreens can be disabled with: 32 | `SDL_setenv("VITA_DISABLE_TOUCH_FRONT", "1", 1);` and `SDL_setenv("VITA_DISABLE_TOUCH_BACK", "1", 1);` 33 | * Support for L2/R2/R3/R3 buttons, haptic feedback and gamepad led only available on PSTV, or when using external ds4 gamepad on vita. 34 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-ps2.md: -------------------------------------------------------------------------------- 1 | PS2 2 | ====== 3 | SDL2 port for the Sony Playstation 2 contributed by: 4 | - Francisco Javier Trujillo Mata 5 | 6 | 7 | Credit to 8 | - The guys that ported SDL to PSP & Vita because I'm taking them as reference. 9 | - David G. F. for helping me with several issues and tests. 10 | 11 | ## Building 12 | To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run: 13 | ```bash 14 | cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake 15 | cmake --build build 16 | cmake --install build 17 | ``` 18 | 19 | ## Hints 20 | The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_PS2_DYNAMIC_VSYNC`. 21 | If you enabled the dynamic vsync having as well `SDL_RENDERER_PRESENTVSYNC` enabled, then if the app is not able to run at 60 FPS, automatically the `vsync` will be disabled having a better performance, instead of droping FPS to 30. 22 | 23 | ## Notes 24 | If you trying to debug a SDL app through [ps2client](https://github.com/ps2dev/ps2client) you need to avoid the IOP reset, otherwise you will lose the conection with your computer. 25 | So to avoid the reset of the IOP CPU, you need to call to the macro `SDL_PS2_SKIP_IOP_RESET();`. 26 | It could be something similar as: 27 | ```c 28 | ..... 29 | 30 | SDL_PS2_SKIP_IOP_RESET(); 31 | 32 | int main(int argc, char *argv[]) 33 | { 34 | ..... 35 | ``` 36 | For a release binary is recommendable to reset the IOP always. 37 | 38 | Remember to do a clean compilation everytime you enable or disable the `SDL_PS2_SKIP_IOP_RESET` otherwise the change won't be reflected. 39 | 40 | ## Getting PS2 Dev 41 | [Installing PS2 Dev](https://github.com/ps2dev/ps2dev) 42 | 43 | ## Running on PCSX2 Emulator 44 | [PCSX2](https://github.com/PCSX2/pcsx2) 45 | 46 | [More PCSX2 information](https://pcsx2.net/) 47 | 48 | ## To Do 49 | - PS2 Screen Keyboard 50 | - Dialogs 51 | - Others 52 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-riscos.md: -------------------------------------------------------------------------------- 1 | RISC OS 2 | ======= 3 | 4 | Requirements: 5 | 6 | * RISC OS 3.5 or later. 7 | * [SharedUnixLibrary](http://www.riscos.info/packages/LibraryDetails.html#SharedUnixLibraryarm). 8 | * [DigitalRenderer](http://www.riscos.info/packages/LibraryDetails.html#DRendererarm), for audio support. 9 | * [Iconv](http://www.netsurf-browser.org/projects/iconv/), for `SDL_iconv` and related functions. 10 | 11 | 12 | Compiling: 13 | ---------- 14 | 15 | Currently, SDL2 for RISC OS only supports compiling with GCCSDK under Linux. Both the autoconf and CMake build systems are supported. 16 | 17 | The following commands can be used to build SDL2 for RISC OS using autoconf: 18 | 19 | ./configure --host=arm-unknown-riscos --prefix=$GCCSDK_INSTALL_ENV --disable-gcc-atomics 20 | make 21 | make install 22 | 23 | The following commands can be used to build SDL2 for RISC OS using CMake: 24 | 25 | cmake -Bbuild-riscos -DCMAKE_TOOLCHAIN_FILE=$GCCSDK_INSTALL_ENV/toolchain-riscos.cmake -DRISCOS=ON -DCMAKE_INSTALL_PREFIX=$GCCSDK_INSTALL_ENV -DCMAKE_BUILD_TYPE=Release -DSDL_GCC_ATOMICS=OFF 26 | cmake --build build-riscos 27 | cmake --build build-riscos --target install 28 | 29 | 30 | Current level of implementation 31 | ------------------------------- 32 | 33 | The video driver currently provides full screen video support with keyboard and mouse input. Windowed mode is not yet supported, but is planned in the future. Only software rendering is supported. 34 | 35 | The filesystem APIs return either Unix-style paths or RISC OS-style paths based on the value of the `__riscosify_control` symbol, as is standard for UnixLib functions. 36 | 37 | The audio, loadso, thread and timer APIs are currently provided by UnixLib. 38 | 39 | GCC atomics are currently broken on some platforms, meaning it's currently necessary to compile with `--disable-gcc-atomics` using autotools or `-DSDL_GCC_ATOMICS=OFF` using CMake. 40 | 41 | The joystick, locale and power APIs are not yet implemented. 42 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_test_memory.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_memory.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_memory_h_ 31 | #define SDL_test_memory_h_ 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | 40 | /** 41 | * \brief Start tracking SDL memory allocations 42 | * 43 | * \note This should be called before any other SDL functions for complete tracking coverage 44 | */ 45 | int SDLTest_TrackAllocations(void); 46 | 47 | /** 48 | * \brief Print a log of any outstanding allocations 49 | * 50 | * \note This can be called after SDL_Quit() 51 | */ 52 | void SDLTest_LogAllocations(void); 53 | 54 | 55 | /* Ends C function definitions when using C++ */ 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #include "close_code.h" 60 | 61 | #endif /* SDL_test_memory_h_ */ 62 | 63 | /* vi: set ts=4 sw=4 expandtab: */ 64 | -------------------------------------------------------------------------------- /Wolf/Wolf.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "ArduboyTonesFX.h" 4 | 5 | #include "Engine.h" 6 | #include "Generated/fxdata.h" 7 | #include "ArduboyPlatform.h" 8 | #include "Generated/Data_Audio.h" 9 | 10 | Arduboy2Base arduboy; 11 | 12 | uint16_t audioBuffer[32]; 13 | ArduboyTonesFX sound(arduboy.audio.enabled, audioBuffer, 32); 14 | 15 | unsigned long lastTimingSample; 16 | 17 | void ArduboyPlatform::playSound(uint8_t id) 18 | { 19 | sound.tonesFromFX((uint24_t)((uint32_t) Data_audio + (uint32_t)(pgm_read_word(&Data_AudioPatterns[id])))); 20 | } 21 | 22 | void setup() { 23 | arduboy.boot(); 24 | //arduboy.flashlight(); 25 | //arduboy.systemButtons(); 26 | //arduboy.bootLogo(); 27 | arduboy.setFrameRate(TARGET_FRAMERATE); 28 | arduboy.audio.begin(); 29 | arduboy.audio.on(); 30 | 31 | FX::begin(FX_DATA_PAGE, FX_SAVE_PAGE); 32 | engine.init(); 33 | } 34 | 35 | void loop() { 36 | static int16_t tickAccum = 0; 37 | unsigned long timingSample = millis(); 38 | tickAccum += (timingSample - lastTimingSample); 39 | lastTimingSample = timingSample; 40 | 41 | if (!arduboy.nextFrame()) return; 42 | 43 | sound.fillBufferFromFX(); 44 | Platform.update(); 45 | 46 | constexpr int16_t frameDuration = 1000 / TARGET_FRAMERATE; 47 | while(tickAccum > frameDuration) 48 | { 49 | engine.update(); 50 | tickAccum -= frameDuration; 51 | } 52 | 53 | engine.draw(); 54 | 55 | if(engine.gameState == GameState_Playing && engine.renderer.damageIndicator < 0) 56 | { 57 | uint8_t brightness = -engine.renderer.damageIndicator * 5; 58 | arduboy.setRGBled(brightness, brightness, brightness); 59 | } 60 | else if(engine.gameState == GameState_Playing && engine.renderer.damageIndicator > 0) 61 | { 62 | uint8_t brightness = engine.renderer.damageIndicator * 51; 63 | arduboy.setRGBled(brightness, 0, 0); 64 | } 65 | else 66 | { 67 | arduboy.setRGBled(0, 0, 0); 68 | } 69 | 70 | FX::display(); 71 | //FX::display(CLEAR_BUFFER); // Using CLEAR_BUFFER will clear the display buffer after it is displayed 72 | } 73 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_test_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_log.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Wrapper to log in the TEST category 33 | * 34 | */ 35 | 36 | #ifndef SDL_test_log_h_ 37 | #define SDL_test_log_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Prints given message with a timestamp in the TEST category and INFO priority. 47 | * 48 | * \param fmt Message to be logged 49 | */ 50 | void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 51 | 52 | /** 53 | * \brief Prints given message with a timestamp in the TEST category and the ERROR priority. 54 | * 55 | * \param fmt Message to be logged 56 | */ 57 | void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 58 | 59 | /* Ends C function definitions when using C++ */ 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | #include "close_code.h" 64 | 65 | #endif /* SDL_test_log_h_ */ 66 | 67 | /* vi: set ts=4 sw=4 expandtab: */ 68 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-porting.md: -------------------------------------------------------------------------------- 1 | Porting 2 | ======= 3 | 4 | * Porting To A New Platform 5 | 6 | The first thing you have to do when porting to a new platform, is look at 7 | include/SDL_platform.h and create an entry there for your operating system. 8 | The standard format is "__PLATFORM__", where PLATFORM is the name of the OS. 9 | Ideally SDL_platform.h will be able to auto-detect the system it's building 10 | on based on C preprocessor symbols. 11 | 12 | There are two basic ways of building SDL at the moment: 13 | 14 | 1. The "UNIX" way: ./configure; make; make install 15 | 16 | If you have a GNUish system, then you might try this. Edit configure.ac, 17 | take a look at the large section labelled: 18 | 19 | "Set up the configuration based on the host platform!" 20 | 21 | Add a section for your platform, and then re-run autogen.sh and build! 22 | 23 | 2. Using an IDE: 24 | 25 | If you're using an IDE or other non-configure build system, you'll probably 26 | want to create a custom SDL_config.h for your platform. Edit SDL_config.h, 27 | add a section for your platform, and create a custom SDL_config_{platform}.h, 28 | based on SDL_config_minimal.h and SDL_config.h.in 29 | 30 | Add the top level include directory to the header search path, and then add 31 | the following sources to the project: 32 | 33 | src/*.c 34 | src/atomic/*.c 35 | src/audio/*.c 36 | src/cpuinfo/*.c 37 | src/events/*.c 38 | src/file/*.c 39 | src/haptic/*.c 40 | src/joystick/*.c 41 | src/power/*.c 42 | src/render/*.c 43 | src/render/software/*.c 44 | src/stdlib/*.c 45 | src/thread/*.c 46 | src/timer/*.c 47 | src/video/*.c 48 | src/audio/disk/*.c 49 | src/audio/dummy/*.c 50 | src/filesystem/dummy/*.c 51 | src/video/dummy/*.c 52 | src/haptic/dummy/*.c 53 | src/joystick/dummy/*.c 54 | src/main/dummy/*.c 55 | src/thread/generic/*.c 56 | src/timer/dummy/*.c 57 | src/loadso/dummy/*.c 58 | 59 | 60 | Once you have a working library without any drivers, you can go back to each 61 | of the major subsystems and start implementing drivers for your platform. 62 | 63 | If you have any questions, don't hesitate to ask on the SDL mailing list: 64 | http://www.libsdl.org/mailing-list.php 65 | 66 | Enjoy! 67 | Sam Lantinga (slouken@libsdl.org) 68 | 69 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Machinegun.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_h_ 31 | #define SDL_test_h_ 32 | 33 | #include "SDL.h" 34 | #include "SDL_test_assert.h" 35 | #include "SDL_test_common.h" 36 | #include "SDL_test_compare.h" 37 | #include "SDL_test_crc32.h" 38 | #include "SDL_test_font.h" 39 | #include "SDL_test_fuzzer.h" 40 | #include "SDL_test_harness.h" 41 | #include "SDL_test_images.h" 42 | #include "SDL_test_log.h" 43 | #include "SDL_test_md5.h" 44 | #include "SDL_test_memory.h" 45 | #include "SDL_test_random.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /* Global definitions */ 54 | 55 | /* 56 | * Note: Maximum size of SDLTest log message is less than SDL's limit 57 | * to ensure we can fit additional information such as the timestamp. 58 | */ 59 | #define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* SDL_test_h_ */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Pistol.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_quit.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_quit.h 24 | * 25 | * Include file for SDL quit event handling. 26 | */ 27 | 28 | #ifndef SDL_quit_h_ 29 | #define SDL_quit_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | /** 35 | * \file SDL_quit.h 36 | * 37 | * An ::SDL_QUIT event is generated when the user tries to close the application 38 | * window. If it is ignored or filtered out, the window will remain open. 39 | * If it is not ignored or filtered, it is queued normally and the window 40 | * is allowed to close. When the window is closed, screen updates will 41 | * complete, but have no effect. 42 | * 43 | * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) 44 | * and SIGTERM (system termination request), if handlers do not already 45 | * exist, that generate ::SDL_QUIT events as well. There is no way 46 | * to determine the cause of an ::SDL_QUIT event, but setting a signal 47 | * handler in your application will override the default generation of 48 | * quit events for that signal. 49 | * 50 | * \sa SDL_Quit() 51 | */ 52 | 53 | /* There are no functions directly affecting the quit event */ 54 | 55 | #define SDL_QuitRequested() \ 56 | (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) 57 | 58 | #endif /* SDL_quit_h_ */ 59 | -------------------------------------------------------------------------------- /Wolf/Save.cpp: -------------------------------------------------------------------------------- 1 | #include "Save.h" 2 | #include "Engine.h" 3 | 4 | void SaveSystem::init() 5 | { 6 | readSaveFile((uint8_t*) &saveFile, sizeof(SaveFile)); 7 | 8 | if (saveFile.scores[0].name[0] == 0) 9 | { 10 | saveFile.scores[0].name[0] = 'J'; 11 | saveFile.scores[0].name[1] = 'H'; 12 | saveFile.scores[0].name[2] = 'H'; 13 | saveFile.scores[0].score = 10000; 14 | 15 | saveFile.scores[1].name[0] = 'K'; 16 | saveFile.scores[1].name[1] = 'E'; 17 | saveFile.scores[1].name[2] = 'V'; 18 | saveFile.scores[1].score = 9000; 19 | 20 | saveFile.scores[2].name[0] = 'M'; 21 | saveFile.scores[2].name[1] = 'R'; 22 | saveFile.scores[2].name[2] = 'B'; 23 | saveFile.scores[2].score = 8000; 24 | } 25 | } 26 | 27 | void SaveSystem::save() 28 | { 29 | writeSaveFile((uint8_t*) &saveFile, sizeof(SaveFile)); 30 | } 31 | 32 | void SaveSystem::saveStateToActiveSlot() 33 | { 34 | SaveSlot* slot = &saveFile.slots[activeSlot]; 35 | slot->hp = engine.player.hp; 36 | slot->level = engine.map.currentLevel; 37 | slot->difficulty = engine.difficulty; 38 | slot->ammo = engine.player.weapon.ammo; 39 | slot->inventoryFlags = engine.player.inventoryFlags; 40 | slot->score = engine.player.score; 41 | slot->lives = engine.player.lives; 42 | save(); 43 | } 44 | 45 | void SaveSystem::restoreStateFromActiveSlot() 46 | { 47 | SaveSlot* slot = &saveFile.slots[activeSlot]; 48 | engine.player.hp = slot->hp; 49 | engine.map.currentLevel = slot->level; 50 | engine.difficulty = slot->difficulty; 51 | engine.player.weapon.ammo = slot->ammo; 52 | engine.player.inventoryFlags = slot->inventoryFlags; 53 | engine.player.score = slot->score; 54 | engine.player.lives = slot->lives; 55 | } 56 | 57 | void SaveSystem::clearActiveSlot() 58 | { 59 | saveFile.slots[activeSlot].hp = 0; 60 | save(); 61 | } 62 | 63 | bool SaveSystem::trySubmitHighScore(int32_t score) 64 | { 65 | int insertIndex = -1; 66 | 67 | for (int n = 0; n < 3; n++) 68 | { 69 | if (score >= saveFile.scores[n].score) 70 | { 71 | insertIndex = n; 72 | break; 73 | } 74 | } 75 | 76 | if (insertIndex == -1) 77 | { 78 | return false; 79 | } 80 | 81 | for (int n = 2; n > insertIndex; n--) 82 | { 83 | saveFile.scores[n] = saveFile.scores[n - 1]; 84 | } 85 | 86 | activeSlot = insertIndex; 87 | 88 | for (int n = 0; n < 3; n++) 89 | { 90 | saveFile.scores[insertIndex].name[n] = 'A'; 91 | } 92 | saveFile.scores[insertIndex].score = score; 93 | 94 | return true; 95 | } 96 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_test_compare.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_compare.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines comparison functions (i.e. for surfaces). 33 | 34 | */ 35 | 36 | #ifndef SDL_test_compare_h_ 37 | #define SDL_test_compare_h_ 38 | 39 | #include "SDL.h" 40 | 41 | #include "SDL_test_images.h" 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /** 50 | * \brief Compares a surface and with reference image data for equality 51 | * 52 | * \param surface Surface used in comparison 53 | * \param referenceSurface Test Surface used in comparison 54 | * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy. 55 | * 56 | * \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. 57 | */ 58 | int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); 59 | 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* SDL_test_compare_h_ */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /Wolf.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Wolf", "Wolf.vcxproj", "{C8815259-2E14-47A3-9727-567FAE19FC48}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MapCompressor", "Tools\MapCompressor\MapCompressor.vcxproj", "{81B7DFB4-37D9-4102-9A17-7A2CF86CABC8}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageEncoder", "Tools\ImageEncoder\ImageEncoder.vcxproj", "{D7DF0A68-0C89-4908-8E6E-12BD0B0D7838}" 11 | EndProject 12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioEncoder", "Tools\AudioEncoder\AudioEncoder.vcxproj", "{F235DD72-0508-4A1D-AF9D-3FB8841BB4F8}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Win32 = Debug|Win32 17 | Release|Win32 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {C8815259-2E14-47A3-9727-567FAE19FC48}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {C8815259-2E14-47A3-9727-567FAE19FC48}.Debug|Win32.Build.0 = Debug|Win32 22 | {C8815259-2E14-47A3-9727-567FAE19FC48}.Release|Win32.ActiveCfg = Release|Win32 23 | {C8815259-2E14-47A3-9727-567FAE19FC48}.Release|Win32.Build.0 = Release|Win32 24 | {81B7DFB4-37D9-4102-9A17-7A2CF86CABC8}.Debug|Win32.ActiveCfg = Debug|Win32 25 | {81B7DFB4-37D9-4102-9A17-7A2CF86CABC8}.Debug|Win32.Build.0 = Debug|Win32 26 | {81B7DFB4-37D9-4102-9A17-7A2CF86CABC8}.Release|Win32.ActiveCfg = Release|Win32 27 | {81B7DFB4-37D9-4102-9A17-7A2CF86CABC8}.Release|Win32.Build.0 = Release|Win32 28 | {D7DF0A68-0C89-4908-8E6E-12BD0B0D7838}.Debug|Win32.ActiveCfg = Debug|Win32 29 | {D7DF0A68-0C89-4908-8E6E-12BD0B0D7838}.Debug|Win32.Build.0 = Debug|Win32 30 | {D7DF0A68-0C89-4908-8E6E-12BD0B0D7838}.Release|Win32.ActiveCfg = Release|Win32 31 | {D7DF0A68-0C89-4908-8E6E-12BD0B0D7838}.Release|Win32.Build.0 = Release|Win32 32 | {F235DD72-0508-4A1D-AF9D-3FB8841BB4F8}.Debug|Win32.ActiveCfg = Debug|Win32 33 | {F235DD72-0508-4A1D-AF9D-3FB8841BB4F8}.Debug|Win32.Build.0 = Debug|Win32 34 | {F235DD72-0508-4A1D-AF9D-3FB8841BB4F8}.Release|Win32.ActiveCfg = Release|Win32 35 | {F235DD72-0508-4A1D-AF9D-3FB8841BB4F8}.Release|Win32.Build.0 = Release|Win32 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | EndGlobal 41 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README.md: -------------------------------------------------------------------------------- 1 | # Simple DirectMedia Layer 2 | 3 | https://www.libsdl.org/ 4 | 5 | Simple DirectMedia Layer is a cross-platform development library designed 6 | to provide low level access to audio, keyboard, mouse, joystick, and graphics 7 | hardware via OpenGL and Direct3D. It is used by video playback software, 8 | emulators, and popular games including Valve's award winning catalog 9 | and many Humble Bundle games. 10 | 11 | SDL officially supports Windows, macOS, Linux, iOS, and Android. 12 | Support for other platforms may be found in the source code. 13 | 14 | SDL is written in C, works natively with C++, and there are bindings 15 | available for several other languages, including C# and Python. 16 | 17 | This library is distributed under the zlib license, which can be found 18 | in the file "LICENSE.txt". 19 | 20 | The best way to learn how to use SDL is to check out the header files in 21 | the "include" subdirectory and the programs in the "test" subdirectory. 22 | The header files and test programs are well commented and always up to date. 23 | 24 | More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/) 25 | 26 | - [Android](README-android.md) 27 | - [CMake](README-cmake.md) 28 | - [DirectFB](README-directfb.md) 29 | - [DynAPI](README-dynapi.md) 30 | - [Emscripten](README-emscripten.md) 31 | - [GDK](README-gdk.md) 32 | - [Gesture](README-gesture.md) 33 | - [Git](README-git.md) 34 | - [iOS](README-ios.md) 35 | - [Linux](README-linux.md) 36 | - [macOS](README-macos.md) 37 | - [OS/2](README-os2.md) 38 | - [Native Client](README-nacl.md) 39 | - [Pandora](README-pandora.md) 40 | - [Supported Platforms](README-platforms.md) 41 | - [Porting information](README-porting.md) 42 | - [PSP](README-psp.md) 43 | - [PS2](README-ps2.md) 44 | - [Raspberry Pi](README-raspberrypi.md) 45 | - [Touch](README-touch.md) 46 | - [Versions](README-versions.md) 47 | - [WinCE](README-wince.md) 48 | - [Windows](README-windows.md) 49 | - [WinRT](README-winrt.md) 50 | - [PSVita](README-vita.md) 51 | - [Nokia N-Gage](README-ngage.md) 52 | 53 | If you need help with the library, or just want to discuss SDL related 54 | issues, you can join the [SDL Discourse](https://discourse.libsdl.org/), 55 | which can be used as a web forum or a mailing list, at your preference. 56 | 57 | If you want to report bugs or contribute patches, please submit them to 58 | [our bug tracker](https://github.com/libsdl-org/SDL/issues) 59 | 60 | Enjoy! 61 | 62 | 63 | Sam Lantinga 64 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_test_images.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_images.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines some images for tests. 33 | 34 | */ 35 | 36 | #ifndef SDL_test_images_h_ 37 | #define SDL_test_images_h_ 38 | 39 | #include "SDL.h" 40 | 41 | #include "begin_code.h" 42 | /* Set up for C function definitions, even when using C++ */ 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /** 48 | *Type for test images. 49 | */ 50 | typedef struct SDLTest_SurfaceImage_s { 51 | int width; 52 | int height; 53 | unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ 54 | const char *pixel_data; 55 | } SDLTest_SurfaceImage_t; 56 | 57 | /* Test images */ 58 | SDL_Surface *SDLTest_ImageBlit(void); 59 | SDL_Surface *SDLTest_ImageBlitColor(void); 60 | SDL_Surface *SDLTest_ImageBlitAlpha(void); 61 | SDL_Surface *SDLTest_ImageBlitBlendAdd(void); 62 | SDL_Surface *SDLTest_ImageBlitBlend(void); 63 | SDL_Surface *SDLTest_ImageBlitBlendMod(void); 64 | SDL_Surface *SDLTest_ImageBlitBlendNone(void); 65 | SDL_Surface *SDLTest_ImageBlitBlendAll(void); 66 | SDL_Surface *SDLTest_ImageFace(void); 67 | SDL_Surface *SDLTest_ImagePrimitives(void); 68 | SDL_Surface *SDLTest_ImagePrimitivesBlend(void); 69 | 70 | /* Ends C function definitions when using C++ */ 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | #include "close_code.h" 75 | 76 | #endif /* SDL_test_images_h_ */ 77 | 78 | /* vi: set ts=4 sw=4 expandtab: */ 79 | -------------------------------------------------------------------------------- /BuildAssets.bat: -------------------------------------------------------------------------------- 1 | set IMAGE_ENCODER=Debug\ImageEncoder.exe 2 | set OUTPUT_FOLDER=Wolf\Generated 3 | 4 | %IMAGE_ENCODER% Assets\pistol.png %OUTPUT_FOLDER%\Data_Pistol Data_pistolSprite sprite 5 | %IMAGE_ENCODER% Assets\machinegun.png %OUTPUT_FOLDER%\Data_Machinegun Data_machinegunSprite sprite 6 | %IMAGE_ENCODER% Assets\chaingun.png %OUTPUT_FOLDER%\Data_Chaingun Data_chaingunSprite sprite 7 | %IMAGE_ENCODER% Assets\knife.png %OUTPUT_FOLDER%\Data_Knife Data_knifeSprite sprite 8 | %IMAGE_ENCODER% Assets\items.png %OUTPUT_FOLDER%\Data_Items Data_itemSprites sprite 9 | %IMAGE_ENCODER% Assets\guard.png %OUTPUT_FOLDER%\Data_Guard Data_guardSprite sprite 10 | %IMAGE_ENCODER% Assets\dog.png %OUTPUT_FOLDER%\Data_Dog Data_dogSprite sprite 11 | %IMAGE_ENCODER% Assets\ss.png %OUTPUT_FOLDER%\Data_SS Data_ssSprite sprite 12 | %IMAGE_ENCODER% Assets\boss.png %OUTPUT_FOLDER%\Data_Boss Data_bossSprite sprite 13 | %IMAGE_ENCODER% Assets\walls.png %OUTPUT_FOLDER%\Data_Walls Data_wallTextures texture 14 | %IMAGE_ENCODER% Assets\decorations.png %OUTPUT_FOLDER%\Data_Decorations Data_decorations sprite 15 | %IMAGE_ENCODER% Assets\blockingDecorations.png %OUTPUT_FOLDER%\Data_BlockingDecorations Data_blockingDecorations sprite 16 | %IMAGE_ENCODER% Assets\font.png %OUTPUT_FOLDER%\Data_Font Data_font font 17 | %IMAGE_ENCODER% Assets\ui.png %OUTPUT_FOLDER%\Data_UI Data_uiSprite sprite 18 | %IMAGE_ENCODER% Assets\title.png %OUTPUT_FOLDER%\Data_TitleBG Data_titleBG background 19 | %IMAGE_ENCODER% Assets\help.png %OUTPUT_FOLDER%\Data_HelpBG Data_helpBG background 20 | %IMAGE_ENCODER% Assets\win.png %OUTPUT_FOLDER%\Data_WinBG Data_winBG background 21 | %IMAGE_ENCODER% Assets\floorComplete1.png %OUTPUT_FOLDER%\Data_FloorCompleteBG1 Data_floorCompleteBG1 background 22 | %IMAGE_ENCODER% Assets\floorComplete2.png %OUTPUT_FOLDER%\Data_FloorCompleteBG2 Data_floorCompleteBG2 background 23 | 24 | set AUDIO_ENCODER=Debug\AudioEncoder.exe 25 | set AUD=Assets\RawAudio\audio 26 | 27 | rem %AUDIO_ENCODER% %OUTPUT_FOLDER%\Data_Audio %AUD%04.raw %AUD%05.raw %AUD%06.raw %AUD%09.raw %AUD%10.raw %AUD%11.raw %AUD%12.raw %AUD%16.raw %AUD%18.raw %AUD%19.raw %AUD%21.raw %AUD%22.raw %AUD%23.raw %AUD%24.raw %AUD%25.raw %AUD%26.raw %AUD%30.raw %AUD%31.raw %AUD%32.raw %AUD%33.raw %AUD%34.raw %AUD%35.raw %AUD%36.raw %AUD%37.raw %AUD%38.raw %AUD%39.raw %AUD%41.raw %AUD%42.raw %AUD%43.raw %AUD%44.raw %AUD%45.raw %AUD%46.raw %AUD%49.raw %AUD%50.raw %AUD%51.raw %AUD%56.raw %AUD%58.raw %AUD%59.raw %AUD%60.raw %AUD%68.raw 28 | %AUDIO_ENCODER% %OUTPUT_FOLDER%\Data_Audio %AUD% 29 | 30 | python fxdata-build.py fxdata.txt 31 | move fxdata.h Wolf\Generated\fxdata.h 32 | 33 | pause -------------------------------------------------------------------------------- /Windows/SDL2/cmake/sdl2-config-version.cmake: -------------------------------------------------------------------------------- 1 | # based on the files generated by CMake's write_basic_package_version_file 2 | 3 | # SDL2 CMake version configuration file: 4 | # This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC 5 | 6 | if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_version.h") 7 | message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the root of SDL2-devel-2.x.y-VC") 8 | return() 9 | endif() 10 | 11 | file(READ "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_version.h" _sdl_version_h) 12 | string(REGEX MATCH "#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_version_h}") 13 | set(_sdl_major "${CMAKE_MATCH_1}") 14 | string(REGEX MATCH "#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_version_h}") 15 | set(_sdl_minor "${CMAKE_MATCH_1}") 16 | string(REGEX MATCH "#define[ \t]+SDL_PATCHLEVEL[ \t]+([0-9]+)" _sdl_patch_re "${_sdl_version_h}") 17 | set(_sdl_patch "${CMAKE_MATCH_1}") 18 | if(_sdl_major_re AND _sdl_minor_re AND _sdl_patch_re) 19 | set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_patch}") 20 | else() 21 | message(AUTHOR_WARNING "Could not extract version from SDL_version.h.") 22 | return() 23 | endif() 24 | 25 | if(PACKAGE_FIND_VERSION_RANGE) 26 | # Package version must be in the requested version range 27 | if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN) 28 | OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX) 29 | OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX))) 30 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 31 | else() 32 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 33 | endif() 34 | else() 35 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 36 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 37 | else() 38 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 39 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 40 | set(PACKAGE_VERSION_EXACT TRUE) 41 | endif() 42 | endif() 43 | endif() 44 | 45 | # if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail. 46 | if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "") 47 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 48 | endif() 49 | 50 | # check that the installed version has the same 32/64bit-ness as the one which is currently searching: 51 | if(NOT (CMAKE_SIZEOF_VOID_P STREQUAL "8" OR CMAKE_SIZEOF_VOID_P STREQUAL "4")) 52 | set(PACKAGE_VERSION "${PACKAGE_VERSION} (32+64bit)") 53 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 54 | endif() 55 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-windows.md: -------------------------------------------------------------------------------- 1 | # Windows 2 | 3 | ## LLVM and Intel C++ compiler support 4 | 5 | SDL will build with the Visual Studio project files with LLVM-based compilers, such as the Intel oneAPI C++ 6 | compiler, but you'll have to manually add the "-msse3" command line option 7 | to at least the SDL_audiocvt.c source file, and possibly others. This may 8 | not be necessary if you build SDL with CMake instead of the included Visual 9 | Studio solution. 10 | 11 | Details are here: https://github.com/libsdl-org/SDL/issues/5186 12 | 13 | 14 | ## OpenGL ES 2.x support 15 | 16 | SDL has support for OpenGL ES 2.x under Windows via two alternative 17 | implementations. 18 | 19 | The most straightforward method consists in running your app in a system with 20 | a graphic card paired with a relatively recent (as of November of 2013) driver 21 | which supports the WGL_EXT_create_context_es2_profile extension. Vendors known 22 | to ship said extension on Windows currently include nVidia and Intel. 23 | 24 | The other method involves using the 25 | [ANGLE library](https://code.google.com/p/angleproject/). If an OpenGL ES 2.x 26 | context is requested and no WGL_EXT_create_context_es2_profile extension is 27 | found, SDL will try to load the libEGL.dll library provided by ANGLE. 28 | 29 | To obtain the ANGLE binaries, you can either compile from source from 30 | https://chromium.googlesource.com/angle/angle or copy the relevant binaries 31 | from a recent Chrome/Chromium install for Windows. The files you need are: 32 | 33 | - libEGL.dll 34 | - libGLESv2.dll 35 | - d3dcompiler_46.dll (supports Windows Vista or later, better shader 36 | compiler) *or* d3dcompiler_43.dll (supports Windows XP or later) 37 | 38 | If you compile ANGLE from source, you can configure it so it does not need the 39 | d3dcompiler_* DLL at all (for details on this, see their documentation). 40 | However, by default SDL will try to preload the d3dcompiler_46.dll to 41 | comply with ANGLE's requirements. If you wish SDL to preload 42 | d3dcompiler_43.dll (to support Windows XP) or to skip this step at all, you 43 | can use the SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more 44 | details). 45 | 46 | Known Bugs: 47 | 48 | - SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears 49 | that there's a bug in the library which prevents the window contents from 50 | refreshing if this is set to anything other than the default value. 51 | 52 | ## Vulkan Surface Support 53 | 54 | Support for creating Vulkan surfaces is configured on by default. To disable 55 | it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You 56 | must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to 57 | use Vulkan graphics in your application. 58 | 59 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-versions.md: -------------------------------------------------------------------------------- 1 | # Versioning 2 | 3 | ## Since 2.23.0 4 | 5 | SDL follows an "odd/even" versioning policy, similar to GLib, GTK, Flatpak 6 | and older versions of the Linux kernel: 7 | 8 | * The major version (first part) increases when backwards compatibility 9 | is broken, which will happen infrequently. 10 | 11 | * If the minor version (second part) is divisible by 2 12 | (for example 2.24.x, 2.26.x), this indicates a version of SDL that 13 | is believed to be stable and suitable for production use. 14 | 15 | * In stable releases, the patchlevel or micro version (third part) 16 | indicates bugfix releases. Bugfix releases should not add or 17 | remove ABI, so the ".0" release (for example 2.24.0) should be 18 | forwards-compatible with all the bugfix releases from the 19 | same cycle (for example 2.24.1). 20 | 21 | * The minor version increases when new API or ABI is added, or when 22 | other significant changes are made. Newer minor versions are 23 | backwards-compatible, but not fully forwards-compatible. 24 | For example, programs built against SDL 2.24.x should work fine 25 | with SDL 2.26.x, but programs built against SDL 2.26.x will not 26 | necessarily work with 2.24.x. 27 | 28 | * If the minor version (second part) is not divisible by 2 29 | (for example 2.23.x, 2.25.x), this indicates a development prerelease 30 | of SDL that is not suitable for stable software distributions. 31 | Use with caution. 32 | 33 | * The patchlevel or micro version (third part) increases with 34 | each prerelease. 35 | 36 | * Each prerelease might add new API and/or ABI. 37 | 38 | * Prereleases are backwards-compatible with older stable branches. 39 | For example, 2.25.x will be backwards-compatible with 2.24.x. 40 | 41 | * Prereleases are not guaranteed to be backwards-compatible with 42 | each other. For example, new API or ABI added in 2.25.1 43 | might be removed or changed in 2.25.2. 44 | If this would be a problem for you, please do not use prereleases. 45 | 46 | * Only upgrade to a prerelease if you can guarantee that you will 47 | promptly upgrade to the stable release that follows it. 48 | For example, do not upgrade to 2.23.x unless you will be able to 49 | upgrade to 2.24.0 when it becomes available. 50 | 51 | * Software distributions that have a freeze policy (in particular Linux 52 | distributions with a release cycle, such as Debian and Fedora) 53 | should usually only package stable releases, and not prereleases. 54 | 55 | ## Before 2.23.0 56 | 57 | Older versions of SDL followed a similar policy, but instead of the 58 | odd/even rule applying to the minor version, it applied to the patchlevel 59 | (micro version, third part). For example, 2.0.22 was a stable release 60 | and 2.0.21 was a prerelease. 61 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Decorations.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-emscripten.md: -------------------------------------------------------------------------------- 1 | # Emscripten 2 | 3 | (This documentation is not very robust; we will update and expand this later.) 4 | 5 | ## A quick note about audio 6 | 7 | Modern web browsers will not permit web pages to produce sound before the 8 | user has interacted with them; this is for several reasons, not the least 9 | of which being that no one likes when a random browser tab suddenly starts 10 | making noise and the user has to scramble to figure out which and silence 11 | it. 12 | 13 | To solve this, most browsers will refuse to let a web app use the audio 14 | subsystem at all before the user has interacted with (clicked on) the page 15 | in a meaningful way. SDL-based apps also have to deal with this problem; if 16 | the user hasn't interacted with the page, SDL_OpenAudioDevice will fail. 17 | 18 | There are two reasonable ways to deal with this: if you are writing some 19 | sort of media player thing, where the user expects there to be a volume 20 | control when you mouseover the canvas, just default that control to a muted 21 | state; if the user clicks on the control to unmute it, on this first click, 22 | open the audio device. This allows the media to play at start, the user can 23 | reasonably opt-in to listening, and you never get access denied to the audio 24 | device. 25 | 26 | Many games do not have this sort of UI, and are more rigid about starting 27 | audio along with everything else at the start of the process. For these, your 28 | best bet is to write a little Javascript that puts up a "Click here to play!" 29 | UI, and upon the user clicking, remove that UI and then call the Emscripten 30 | app's main() function. As far as the application knows, the audio device was 31 | available to be opened as soon as the program started, and since this magic 32 | happens in a little Javascript, you don't have to change your C/C++ code at 33 | all to make it happen. 34 | 35 | Please see the discussion at https://github.com/libsdl-org/SDL/issues/6385 36 | for some Javascript code to steal for this approach. 37 | 38 | 39 | ## Building SDL/emscripten 40 | 41 | SDL currently requires at least Emscripten 3.1.35 to build. Newer versions 42 | are likely to work, as well. 43 | 44 | 45 | Build: 46 | 47 | $ mkdir build 48 | $ cd build 49 | $ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2" 50 | $ emmake make 51 | 52 | Or with cmake: 53 | 54 | $ mkdir build 55 | $ cd build 56 | $ emcmake cmake .. 57 | $ emmake make 58 | 59 | To build one of the tests: 60 | 61 | $ cd test/ 62 | $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html 63 | 64 | Uses GLES2 renderer or software 65 | 66 | Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere): 67 | 68 | SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/): 69 | 70 | $ EMCONFIGURE_JS=1 emconfigure ../configure 71 | build as usual... 72 | 73 | SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx): 74 | 75 | $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx 76 | build as usual... 77 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-directfb.md: -------------------------------------------------------------------------------- 1 | DirectFB 2 | ======== 3 | 4 | Supports: 5 | 6 | - Hardware YUV overlays 7 | - OpenGL - software only 8 | - 2D/3D accelerations (depends on directfb driver) 9 | - multiple displays 10 | - windows 11 | 12 | What you need: 13 | 14 | * DirectFB 1.0.1, 1.2.x, 1.3.0 15 | * Kernel-Framebuffer support: required: vesafb, radeonfb .... 16 | * Mesa 7.0.x - optional for OpenGL 17 | 18 | The `/etc/directfbrc` file should contain the following lines to make 19 | your joystick work and avoid crashes: 20 | 21 | ``` 22 | disable-module=joystick 23 | disable-module=cle266 24 | disable-module=cyber5k 25 | no-linux-input-grab 26 | ``` 27 | 28 | To disable to use x11 backend when DISPLAY variable is found use 29 | 30 | ``` 31 | export SDL_DIRECTFB_X11_CHECK=0 32 | ``` 33 | 34 | To disable the use of linux input devices, i.e. multimice/multikeyboard support, 35 | use 36 | 37 | ``` 38 | export SDL_DIRECTFB_LINUX_INPUT=0 39 | ``` 40 | 41 | To use hardware accelerated YUV-overlays for YUV-textures, use: 42 | 43 | ``` 44 | export SDL_DIRECTFB_YUV_DIRECT=1 45 | ``` 46 | 47 | This is disabled by default. It will only support one 48 | YUV texture, namely the first. Every other YUV texture will be 49 | rendered in software. 50 | 51 | In addition, you may use (directfb-1.2.x) 52 | 53 | ``` 54 | export SDL_DIRECTFB_YUV_UNDERLAY=1 55 | ``` 56 | 57 | to make the YUV texture an underlay. This will make the cursor to 58 | be shown. 59 | 60 | Simple Window Manager 61 | ===================== 62 | 63 | The driver has support for a very, very basic window manager you may 64 | want to use when running with `wm=default`. Use 65 | 66 | ``` 67 | export SDL_DIRECTFB_WM=1 68 | ``` 69 | 70 | to enable basic window borders. In order to have the window title rendered, 71 | you need to have the following font installed: 72 | 73 | ``` 74 | /usr/share/fonts/truetype/freefont/FreeSans.ttf 75 | ``` 76 | 77 | OpenGL Support 78 | ============== 79 | 80 | The following instructions will give you *software* OpenGL. However this 81 | works at least on all directfb supported platforms. 82 | 83 | As of this writing 20100802 you need to pull Mesa from git and do the following: 84 | 85 | ``` 86 | git clone git://anongit.freedesktop.org/git/mesa/mesa 87 | cd mesa 88 | git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a 89 | ``` 90 | 91 | Edit `configs/linux-directfb` so that the Directories-section looks like this: 92 | 93 | ``` 94 | # Directories 95 | SRC_DIRS = mesa glu 96 | GLU_DIRS = sgi 97 | DRIVER_DIRS = directfb 98 | PROGRAM_DIRS = 99 | ``` 100 | 101 | Then do the following: 102 | 103 | ``` 104 | make linux-directfb 105 | make 106 | 107 | echo Installing - please enter sudo pw. 108 | 109 | sudo make install INSTALL_DIR=/usr/local/dfb_GL 110 | cd src/mesa/drivers/directfb 111 | make 112 | sudo make install INSTALL_DIR=/usr/local/dfb_GL 113 | ``` 114 | 115 | To run the SDL - testprograms: 116 | 117 | ``` 118 | export SDL_VIDEODRIVER=directfb 119 | export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib 120 | export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7 121 | 122 | ./testgl 123 | ``` 124 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_misc.h 24 | * 25 | * \brief Include file for SDL API functions that don't fit elsewhere. 26 | */ 27 | 28 | #ifndef SDL_misc_h_ 29 | #define SDL_misc_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** 41 | * Open a URL/URI in the browser or other appropriate external application. 42 | * 43 | * Open a URL in a separate, system-provided application. How this works will 44 | * vary wildly depending on the platform. This will likely launch what makes 45 | * sense to handle a specific URL's protocol (a web browser for `http://`, 46 | * etc), but it might also be able to launch file managers for directories and 47 | * other things. 48 | * 49 | * What happens when you open a URL varies wildly as well: your game window 50 | * may lose focus (and may or may not lose focus if your game was fullscreen 51 | * or grabbing input at the time). On mobile devices, your app will likely 52 | * move to the background or your process might be paused. Any given platform 53 | * may or may not handle a given URL. 54 | * 55 | * If this is unimplemented (or simply unavailable) for a platform, this will 56 | * fail with an error. A successful result does not mean the URL loaded, just 57 | * that we launched _something_ to handle it (or at least believe we did). 58 | * 59 | * All this to say: this function can be useful, but you should definitely 60 | * test it on every platform you target. 61 | * 62 | * \param url A valid URL/URI to open. Use `file:///full/path/to/file` for 63 | * local files, if supported. 64 | * \returns 0 on success, or -1 on error; call SDL_GetError() for more 65 | * information. 66 | * 67 | * \since This function is available since SDL 2.0.14. 68 | */ 69 | extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url); 70 | 71 | /* Ends C function definitions when using C++ */ 72 | #ifdef __cplusplus 73 | } 74 | #endif 75 | #include "close_code.h" 76 | 77 | #endif /* SDL_misc_h_ */ 78 | 79 | /* vi: set ts=4 sw=4 expandtab: */ 80 | -------------------------------------------------------------------------------- /Wolf/TileTypes.h: -------------------------------------------------------------------------------- 1 | #ifndef TILE_TYPES_H_ 2 | #define TILE_TYPES_H_ 3 | 4 | enum TileType 5 | { 6 | Tile_Empty = 0, 7 | 8 | // Walls 9 | Tile_FirstWall, 10 | Tile_Wall01 = Tile_FirstWall, 11 | Tile_Wall02, 12 | Tile_Wall03, 13 | Tile_Wall04, 14 | Tile_Wall05, 15 | Tile_Wall06, 16 | Tile_Wall07, 17 | Tile_Wall08, 18 | Tile_Wall09, 19 | Tile_Wall10, 20 | Tile_Wall11, 21 | Tile_Wall12, 22 | Tile_Wall13, 23 | Tile_Wall14, 24 | Tile_Wall15, 25 | Tile_Wall16, 26 | Tile_Wall17, 27 | Tile_Wall18, 28 | Tile_Wall19, 29 | Tile_Wall20, 30 | Tile_ExitSwitchWall, 31 | Tile_Wall22, 32 | Tile_LastWall = Tile_Wall22, 33 | 34 | // Doors 35 | Tile_FirstDoor, 36 | Tile_Door_Generic_Horizontal = Tile_FirstDoor, 37 | Tile_Door_Generic_Vertical, 38 | Tile_Door_Locked1_Horizontal, 39 | Tile_Door_Locked1_Vertical, 40 | Tile_Door_Locked2_Horizontal, 41 | Tile_Door_Locked2_Vertical, 42 | Tile_Door_Elevator_Horizontal, 43 | Tile_Door_Elevator_Vertical, 44 | Tile_LastDoor = Tile_Door_Elevator_Vertical, 45 | 46 | // Actors 47 | Tile_FirstActor, 48 | Tile_Actor_Guard_Easy = Tile_FirstActor, 49 | Tile_Actor_Guard_Medium, 50 | Tile_Actor_Guard_Hard, 51 | Tile_Actor_SS_Easy, 52 | Tile_Actor_SS_Medium, 53 | Tile_Actor_SS_Hard, 54 | Tile_Actor_Dog_Easy, 55 | Tile_Actor_Dog_Medium, 56 | Tile_Actor_Dog_Hard, 57 | Tile_Actor_Boss, 58 | Tile_LastActor = Tile_Actor_Boss, 59 | 60 | // Player starts 61 | Tile_PlayerStart_North, 62 | Tile_PlayerStart_East, 63 | Tile_PlayerStart_South, 64 | Tile_PlayerStart_West, 65 | 66 | // Items 67 | Tile_FirstItem, 68 | Tile_Item_Clip = Tile_FirstItem, 69 | Tile_Item_FirstAid, 70 | Tile_Item_BadFood, 71 | Tile_Item_Food, 72 | Tile_FirstTreasure, 73 | Tile_Item_Cross = Tile_FirstTreasure, 74 | Tile_Item_Chalice, 75 | Tile_Item_Bible, 76 | Tile_Item_Crown, 77 | Tile_Item_1UP, 78 | Tile_LastTreasure = Tile_Item_1UP, 79 | Tile_Item_MachineGun, 80 | Tile_Item_ChainGun, 81 | Tile_Item_Key1, 82 | Tile_Item_Key2, 83 | Tile_LastItem = Tile_Item_Key2, 84 | 85 | // Blocking decoration 86 | Tile_FirstBlockingDecoration, 87 | Tile_BlockingDecoration_Table = Tile_FirstBlockingDecoration, 88 | Tile_BlockingDecoration_TableChairs, 89 | Tile_BlockingDecoration_FloorLamp, 90 | Tile_BlockingDecoration_Barrel, 91 | Tile_BlockingDecoration_Pillar, 92 | Tile_BlockingDecoration_Vase, 93 | Tile_BlockingDecoration_Tree, 94 | Tile_BlockingDecoration_HangingSkeleton, 95 | Tile_BlockingDecoration_Plant, 96 | Tile_BlockingDecoration_Sink, 97 | //Tile_BlockingDecoration_Well, 98 | Tile_BlockingDecoration_SuitOfArmour, 99 | Tile_LastBlockingDecoration = Tile_BlockingDecoration_SuitOfArmour, 100 | 101 | // Non blocking decoration 102 | Tile_FirstDecoration, 103 | Tile_Decoration_OverheadLamp = Tile_FirstDecoration, 104 | Tile_Decoration_DeadGuard, 105 | Tile_Decoration_Skeleton, 106 | Tile_Decoration_KitchenStuff, 107 | Tile_Decoration_Chandelier, 108 | Tile_LastDecoration = Tile_Decoration_Chandelier, 109 | 110 | Tile_SecretPushWall, 111 | Tile_SecretExit, 112 | Tile_CastleExit, 113 | 114 | NUM_TILE_TYPES 115 | }; 116 | 117 | #endif 118 | -------------------------------------------------------------------------------- /Wolf/Sounds.h: -------------------------------------------------------------------------------- 1 | #ifndef SOUNDS_H_ 2 | #define SOUNDS_H_ 3 | 4 | enum 5 | { 6 | HITWALLSND, // 0 7 | SELECTWPNSND, // 1 8 | SELECTITEMSND, // 2 9 | HEARTBEATSND, // 3 10 | MOVEGUN2SND, // 4 11 | MOVEGUN1SND, // 5 12 | NOWAYSND, // 6 13 | NAZIHITPLAYERSND, // 7 14 | SCHABBSTHROWSND, // 8 15 | PLAYERDEATHSND, // 9 16 | DOGDEATHSND, // 10 17 | ATKGATLINGSND, // 11 18 | GETKEYSND, // 12 19 | NOITEMSND, // 13 20 | WALK1SND, // 14 21 | WALK2SND, // 15 22 | TAKEDAMAGESND, // 16 23 | GAMEOVERSND, // 17 24 | OPENDOORSND, // 18 25 | CLOSEDOORSND, // 19 26 | DONOTHINGSND, // 20 27 | HALTSND, // 21 28 | DEATHSCREAM2SND, // 22 29 | ATKKNIFESND, // 23 30 | ATKPISTOLSND, // 24 31 | DEATHSCREAM3SND, // 25 32 | ATKMACHINEGUNSND, // 26 33 | HITENEMYSND, // 27 34 | SHOOTDOORSND, // 28 35 | DEATHSCREAM1SND, // 29 36 | GETMACHINESND, // 30 37 | GETAMMOSND, // 31 38 | SHOOTSND, // 32 39 | HEALTH1SND, // 33 40 | HEALTH2SND, // 34 41 | BONUS1SND, // 35 42 | BONUS2SND, // 36 43 | BONUS3SND, // 37 44 | GETGATLINGSND, // 38 45 | ESCPRESSEDSND, // 39 46 | LEVELDONESND, // 40 47 | DOGBARKSND, // 41 48 | ENDBONUS1SND, // 42 49 | ENDBONUS2SND, // 43 50 | BONUS1UPSND, // 44 51 | BONUS4SND, // 45 52 | PUSHWALLSND, // 46 53 | NOBONUSSND, // 47 54 | PERCENT100SND, // 48 55 | BOSSACTIVESND, // 49 56 | MUTTISND, // 50 57 | SCHUTZADSND, // 51 58 | AHHHGSND, // 52 59 | DIESND, // 53 60 | EVASND, // 54 61 | GUTENTAGSND, // 55 62 | LEBENSND, // 56 63 | SCHEISTSND, // 57 64 | NAZIFIRESND, // 58 65 | BOSSFIRESND, // 59 66 | SSFIRESND, // 60 67 | SLURPIESND, // 61 68 | TOT_HUNDSND, // 62 69 | MEINGOTTSND, // 63 70 | SCHABBSHASND, // 64 71 | HITLERHASND, // 65 72 | SPIONSND, // 66 73 | NEINSOVASSND, // 67 74 | DOGATTACKSND, // 68 75 | FLAMETHROWERSND, // 69 76 | MECHSTEPSND, // 70 77 | GOOBSSND, // 71 78 | YEAHSND, // 72 79 | DEATHSCREAM4SND, // 73 80 | DEATHSCREAM5SND, // 74 81 | DEATHSCREAM6SND, // 75 82 | DEATHSCREAM7SND, // 76 83 | DEATHSCREAM8SND, // 77 84 | DEATHSCREAM9SND, // 78 85 | DONNERSND, // 79 86 | EINESND, // 80 87 | ERLAUBENSND, // 81 88 | KEINSND, // 82 89 | MEINSND, // 83 90 | ROSESND, // 84 91 | MISSILEFIRESND, // 85 92 | MISSILEHITSND, // 86 93 | }; 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-os2.md: -------------------------------------------------------------------------------- 1 | Simple DirectMedia Layer 2 for OS/2 & eComStation 2 | ================================================================================ 3 | SDL port for OS/2, authored by Andrey Vasilkin , 2016 4 | 5 | 6 | OpenGL not supported by this port. 7 | 8 | Additional optional environment variables: 9 | 10 | SDL_AUDIO_SHARE 11 | Values: 0 or 1, default is 0 12 | Initializes the device as shareable or exclusively acquired. 13 | 14 | SDL_VIDEODRIVER 15 | Values: DIVE or VMAN, default is DIVE 16 | Use video subsystem: Direct interface video extensions (DIVE) or 17 | Video Manager (VMAN). 18 | 19 | You may significantly increase video output speed with OS4 kernel and patched 20 | files vman.dll and dive.dll or with latest versions of ACPI support and video 21 | driver Panorama. 22 | 23 | Latest versions of OS/4 kernel: 24 | http://gus.biysk.ru/os4/ 25 | (Info: https://www.os2world.com/wiki/index.php/Phoenix_OS/4) 26 | 27 | Patched files vman.dll and dive.dll: 28 | http://gus.biysk.ru/os4/test/pached_dll/PATCHED_DLL.RAR 29 | 30 | 31 | Compiling: 32 | ---------- 33 | 34 | Open Watcom 1.9 or newer is tested. For the new Open Watcom V2 fork, see: 35 | https://github.com/open-watcom/ and https://open-watcom.github.io 36 | WATCOM environment variable must to be set to the Open Watcom install 37 | directory. To compile, run: wmake -f Makefile.os2 38 | 39 | 40 | Installing: 41 | ----------- 42 | 43 | - eComStation: 44 | 45 | If you have previously installed SDL2, make a Backup copy of SDL2.dll 46 | located in D:\ecs\dll (where D: is disk on which installed eComStation). 47 | Stop all programs running with SDL2. Copy SDL2.dll to D:\ecs\dll 48 | 49 | - OS/2: 50 | 51 | Copy SDL2.dll to any directory on your LIBPATH. If you have a previous 52 | version installed, close all SDL2 applications before replacing the old 53 | copy. Also make sure that any other older versions of DLLs are removed 54 | from your system. 55 | 56 | 57 | Joysticks in SDL2: 58 | ------------------ 59 | 60 | The joystick code in SDL2 is a direct forward-port from the SDL-1.2 version. 61 | Here is the original documentation from SDL-1.2: 62 | 63 | The Joystick detection only works for standard joysticks (2 buttons, 2 axes 64 | and the like). Therefore, if you use a non-standard joystick, you should 65 | specify its features in the SDL_OS2_JOYSTICK environment variable in a batch 66 | file or CONFIG.SYS, so SDL applications can provide full capability to your 67 | device. The syntax is: 68 | 69 | SET SDL_OS2_JOYSTICK=[JOYSTICK_NAME] [AXES] [BUTTONS] [HATS] [BALLS] 70 | 71 | So, it you have a Gravis GamePad with 4 axes, 2 buttons, 2 hats and 0 balls, 72 | the line should be: 73 | 74 | SET SDL_OS2_JOYSTICK=Gravis_GamePad 4 2 2 0 75 | 76 | If you want to add spaces in your joystick name, just surround it with 77 | quotes or double-quotes: 78 | 79 | SET SDL_OS2_JOYSTICK='Gravis GamePad' 4 2 2 0 80 | 81 | or 82 | 83 | SET SDL_OS2_JOYSTICK="Gravis GamePad" 4 2 2 0 84 | 85 | Note however that Balls and Hats are not supported under OS/2, and the 86 | value will be ignored... but it is wise to define these correctly because 87 | in the future those can be supported. 88 | 89 | Also the number of buttons is limited to 2 when using two joysticks, 90 | 4 when using one joystick with 4 axes, 6 when using a joystick with 3 axes 91 | and 8 when using a joystick with 2 axes. Notice however these are limitations 92 | of the Joystick Port hardware, not OS/2. 93 | -------------------------------------------------------------------------------- /Wolf/ArduboyPlatform.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "Platform.h" 7 | 8 | extern Arduboy2Base arduboy; 9 | 10 | extern int y_lut[]; 11 | 12 | inline uint8_t* GetScreenBuffer() { return arduboy.sBuffer; } 13 | 14 | [[gnu::always_inline]] 15 | inline void drawPixel(uint8_t x, uint8_t y, uint8_t color) 16 | { 17 | uint16_t row_offset; 18 | uint8_t bit; 19 | 20 | asm volatile 21 | ( 22 | // bit = 1 << (y & 7) 23 | "ldi %[bit], 1 \n" //bit = 1; 24 | "sbrc %[y], 1 \n" //if (y & _BV(1)) bit = 4; 25 | "ldi %[bit], 4 \n" 26 | "sbrc %[y], 0 \n" //if (y & _BV(0)) bit = bit << 1; 27 | "lsl %[bit] \n" 28 | "sbrc %[y], 2 \n" //if (y & _BV(2)) bit = (bit << 4) | (bit >> 4); 29 | "swap %[bit] \n" 30 | //row_offset = y / 8 * WIDTH + x; 31 | "andi %A[y], 0xf8 \n" //row_offset = (y & 0xF8) * WIDTH / 8 32 | "mul %[width_offset], %A[y] \n" 33 | "movw %[row_offset], r0 \n" 34 | "clr __zero_reg__ \n" 35 | "add %A[row_offset], %[x] \n" //row_offset += x 36 | #if WIDTH != 128 37 | "adc %B[row_offset], __zero_reg__ \n" // only non 128 width can overflow 38 | #endif 39 | : [row_offset] "=&x" (row_offset), // upper register (ANDI) 40 | [bit] "=&d" (bit), // upper register (LDI) 41 | [y] "+d" (y) // upper register (ANDI), must be writable 42 | : [width_offset] "r" ((uint8_t)(WIDTH/8)), 43 | [x] "r" ((uint8_t)x) 44 | : 45 | ); 46 | uint8_t data = arduboy.sBuffer[row_offset] | bit; 47 | if (!(color & _BV(0))) data ^= bit; 48 | arduboy.sBuffer[row_offset] = data; 49 | 50 | //arduboy.drawPixel(x, y, colour); 51 | 52 | //if(colour) 53 | //{ 54 | // _displayBuffer[y_lut[y] + x] &= ~(0x01 << (y & 7)); 55 | //} 56 | //else 57 | //{ 58 | // _displayBuffer[y_lut[y] + x] |= (0x01 << (y & 7)); 59 | //} 60 | } 61 | 62 | [[gnu::always_inline]] 63 | inline void setPixel(uint8_t x, uint8_t y) 64 | { 65 | drawPixel(x, y, BLACK); 66 | //_displayBuffer[y_lut[y] + x] |= (0x01 << (y & 7)); 67 | } 68 | 69 | [[gnu::always_inline]] 70 | inline void clearPixel(uint8_t x, uint8_t y) 71 | { 72 | drawPixel(x, y, WHITE); 73 | //_displayBuffer[y_lut[y] + x] &= ~(0x01 << (y & 7)); 74 | } 75 | 76 | 77 | inline void clearDisplay(uint8_t colour) 78 | { 79 | uint8_t data = colour ? 0xff : 0; 80 | uint8_t* ptr = arduboy.sBuffer; 81 | int count = 128 * 64 / 8; 82 | while(count--) 83 | *ptr++ = data; 84 | //memset(_displayBuffer, data, LCDWIDTH * LCDHEIGHT / 8); 85 | } 86 | 87 | class ArduboyPlatform : public PlatformBase 88 | { 89 | public: 90 | void playSound(uint8_t id); 91 | 92 | void update(); 93 | }; 94 | 95 | void ERROR(const char* msg); 96 | 97 | extern ArduboyPlatform Platform; 98 | 99 | inline void diskRead(uint24_t address, uint8_t* buffer, int length) 100 | { 101 | FX::readDataBytes(address, buffer, length); 102 | } 103 | 104 | inline void writeSaveFile(uint8_t* buffer, int length) 105 | { 106 | FX::saveGameState(buffer, length); 107 | } 108 | 109 | inline bool readSaveFile(uint8_t* buffer, int length) 110 | { 111 | return FX::loadGameState(buffer, length) != 0; 112 | } 113 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_BlockingDecorations.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_power.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_power_h_ 23 | #define SDL_power_h_ 24 | 25 | /** 26 | * \file SDL_power.h 27 | * 28 | * Header for the SDL power management routines. 29 | */ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * The basic state for the system's power supply. 41 | */ 42 | typedef enum 43 | { 44 | SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */ 45 | SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ 46 | SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ 47 | SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */ 48 | SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ 49 | } SDL_PowerState; 50 | 51 | /** 52 | * Get the current power supply details. 53 | * 54 | * You should never take a battery status as absolute truth. Batteries 55 | * (especially failing batteries) are delicate hardware, and the values 56 | * reported here are best estimates based on what that hardware reports. It's 57 | * not uncommon for older batteries to lose stored power much faster than it 58 | * reports, or completely drain when reporting it has 20 percent left, etc. 59 | * 60 | * Battery status can change at any time; if you are concerned with power 61 | * state, you should call this function frequently, and perhaps ignore changes 62 | * until they seem to be stable for a few seconds. 63 | * 64 | * It's possible a platform can only report battery percentage or time left 65 | * but not both. 66 | * 67 | * \param seconds seconds of battery life left, you can pass a NULL here if 68 | * you don't care, will return -1 if we can't determine a 69 | * value, or we're not running on a battery 70 | * \param percent percentage of battery life left, between 0 and 100, you can 71 | * pass a NULL here if you don't care, will return -1 if we 72 | * can't determine a value, or we're not running on a battery 73 | * \returns an SDL_PowerState enum representing the current battery state. 74 | * 75 | * \since This function is available since SDL 2.0.0. 76 | */ 77 | extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent); 78 | 79 | /* Ends C function definitions when using C++ */ 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #include "close_code.h" 84 | 85 | #endif /* SDL_power_h_ */ 86 | 87 | /* vi: set ts=4 sw=4 expandtab: */ 88 | -------------------------------------------------------------------------------- /Tools/AudioEncoder/AudioEncoder.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {F235DD72-0508-4A1D-AF9D-3FB8841BB4F8} 15 | AudioEncoder 16 | 17 | 18 | 19 | Application 20 | true 21 | MultiByte 22 | v142 23 | 24 | 25 | Application 26 | false 27 | v142 28 | true 29 | MultiByte 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | Level3 45 | Disabled 46 | true 47 | 48 | 49 | true 50 | 51 | 52 | 53 | 54 | Level3 55 | MaxSpeed 56 | true 57 | true 58 | true 59 | 60 | 61 | true 62 | true 63 | true 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Wolf/Defines.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFINES_H_ 2 | #define DEFINES_H_ 3 | 4 | #define USE_SIMPLE_COLLISIONS 5 | 6 | #define FXDATA_STREAMING 7 | 8 | #if defined (_WIN32) 9 | //#define STANDARD_FILE_STREAMING 10 | //#define PROGMEM_MAP_STREAMING 11 | //#define EMULATE_GAMEBUINO 1 12 | #define EMULATE_ARDUBOY 1 13 | //#define EMULATE_HACKVISION 1 14 | //#define EMULATE_UZEBOX 1 15 | 16 | #if defined(EMULATE_ARDUBOY) 17 | // Arduboy 18 | #define DISPLAYWIDTH 128 19 | #define DISPLAYHEIGHT 64 20 | #endif 21 | 22 | #else // Arduboy 23 | //#define PETIT_FATFS_FILE_STREAMING 24 | //#define PROGMEM_MAP_STREAMING 25 | #define DISPLAYWIDTH 128 26 | #define DISPLAYHEIGHT 64 27 | #endif 28 | 29 | #define HALF_DISPLAYWIDTH (DISPLAYWIDTH >> 1) 30 | #define HALF_DISPLAYHEIGHT (DISPLAYHEIGHT >> 1) 31 | 32 | // WIN32 specific 33 | #ifdef _WIN32 34 | #define ZOOM_SCALE 3 35 | 36 | #define PROGMEM 37 | #define PSTR 38 | #define pgm_read_byte(x) (*((uint8_t*)x)) 39 | #define pgm_read_word(x) (*((uint16_t*)x)) 40 | 41 | #define pgm_read_ptr(x) (*((uintptr_t*)x)) 42 | #define strlen_P(x) strlen(x) 43 | 44 | #include 45 | typedef uint32_t __uint24; 46 | using uint24_t = __uint24; 47 | 48 | #include 49 | #define WARNING(msg, ...) printf((msg), __VA_ARGS__) 50 | #define ERROR(msg) printf(msg) 51 | #else 52 | #include 53 | #define WARNING(msg, ...) 54 | #define pgm_read_ptr(x) pgm_read_word(x) 55 | 56 | #endif 57 | // end 58 | 59 | #if !defined(max) && !defined(min) 60 | #define max(a, b) ((a) > (b) ? (a) : (b)) 61 | #define min(a, b) ((a) < (b) ? (a) : (b)) 62 | #endif 63 | 64 | #define min3(a, b, c) (min(min(a, b), c)) 65 | #define max3(a, b, c) (max(max(a, b), c)) 66 | #define sign(x) ((x) < 0 ? -1 : 1) 67 | #define mabs(x) ((x) < 0 ? -(x) : (x)) 68 | 69 | #define CELL_SIZE 32 70 | #define CELL_SIZE_SHIFT 5 71 | 72 | #if 0 73 | #define CELL_TO_WORLD(x) ((x) * CELL_SIZE) 74 | #define WORLD_TO_CELL(x) ((x) / CELL_SIZE) 75 | #else 76 | #define CELL_TO_WORLD(x) ((x) << CELL_SIZE_SHIFT) 77 | #define WORLD_TO_CELL(x) ((x) >> CELL_SIZE_SHIFT) 78 | #endif 79 | 80 | #define MAP_SIZE 64 81 | #define MAP_BUFFER_SIZE 16 82 | //#define MAP_SIZE 16 83 | 84 | #define TEXTURE_SIZE 32 85 | #define TEXTURE_STRIDE 32 //8 86 | 87 | // ~60 degree field of view (these values in wacky 256 unit format) 88 | #define FOV 44 89 | #define HALF_FOV 22 90 | #define CULLING_FOV 35 91 | #define DRAW_DISTANCE (CELL_SIZE * 20) 92 | 93 | //#define NEAR_PLANE 73 94 | //#define NEAR_PLANE 104 95 | //#define NEAR_PLANE (LCDWIDTH * (0.5/tan(PI*(FOV / 2)/180))) 96 | #define NEAR_PLANE_MULTIPLIER 222 97 | #define NEAR_PLANE (DISPLAYWIDTH * NEAR_PLANE_MULTIPLIER / 256) 98 | 99 | #define CLIP_PLANE 5 100 | #define SPRITE_CLIP_PLANE 16 101 | #define CAMERA_SCALE 1 102 | //#define WALL_HEIGHT 1.0f 103 | #define MOVEMENT 7 104 | #define TURN 8 105 | #define MIN_WALL_DISTANCE 8 106 | #define MAX_DOORS 16 107 | 108 | #define DOOR_FRAME_TEXTURE 23 109 | #define DOOR_GENERIC_TEXTURE 22 110 | #define DOOR_ELEVATOR_TEXTURE 12 111 | #define DOOR_LOCKED1_TEXTURE 24 112 | #define DOOR_LOCKED2_TEXTURE 25 113 | 114 | #define MAX_ACTIVE_ACTORS 8 115 | #define MAX_ACTIVE_ITEMS 6 116 | 117 | #define EMPTY_ITEM_SLOT 0xff 118 | #define DYNAMIC_ITEM_ID 0xfe 119 | 120 | #define ACTOR_HITBOX_SIZE 16 121 | #define MIN_ACTOR_DISTANCE 32 122 | 123 | #define FIRST_FONT_GLYPH 32 124 | #define LAST_FONT_GLYPH 95 125 | #define FONT_WIDTH 3 126 | #define FONT_HEIGHT 5 127 | #define FONT_GLYPH_BYTE_SIZE 2 128 | 129 | #define STREAM_BUFFER_SIZE 64 130 | #define TARGET_FRAMERATE 25 131 | 132 | #endif 133 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_guid.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_guid.h 24 | * 25 | * Include file for handling ::SDL_GUID values. 26 | */ 27 | 28 | #ifndef SDL_guid_h_ 29 | #define SDL_guid_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | #include "begin_code.h" 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** 41 | * An SDL_GUID is a 128-bit identifier for an input device that 42 | * identifies that device across runs of SDL programs on the same 43 | * platform. If the device is detached and then re-attached to a 44 | * different port, or if the base system is rebooted, the device 45 | * should still report the same GUID. 46 | * 47 | * GUIDs are as precise as possible but are not guaranteed to 48 | * distinguish physically distinct but equivalent devices. For 49 | * example, two game controllers from the same vendor with the same 50 | * product ID and revision may have the same GUID. 51 | * 52 | * GUIDs may be platform-dependent (i.e., the same device may report 53 | * different GUIDs on different operating systems). 54 | */ 55 | typedef struct { 56 | Uint8 data[16]; 57 | } SDL_GUID; 58 | 59 | /* Function prototypes */ 60 | 61 | /** 62 | * Get an ASCII string representation for a given ::SDL_GUID. 63 | * 64 | * You should supply at least 33 bytes for pszGUID. 65 | * 66 | * \param guid the ::SDL_GUID you wish to convert to string 67 | * \param pszGUID buffer in which to write the ASCII string 68 | * \param cbGUID the size of pszGUID 69 | * 70 | * \since This function is available since SDL 2.24.0. 71 | * 72 | * \sa SDL_GUIDFromString 73 | */ 74 | extern DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID); 75 | 76 | /** 77 | * Convert a GUID string into a ::SDL_GUID structure. 78 | * 79 | * Performs no error checking. If this function is given a string containing 80 | * an invalid GUID, the function will silently succeed, but the GUID generated 81 | * will not be useful. 82 | * 83 | * \param pchGUID string containing an ASCII representation of a GUID 84 | * \returns a ::SDL_GUID structure. 85 | * 86 | * \since This function is available since SDL 2.24.0. 87 | * 88 | * \sa SDL_GUIDToString 89 | */ 90 | extern DECLSPEC SDL_GUID SDLCALL SDL_GUIDFromString(const char *pchGUID); 91 | 92 | /* Ends C function definitions when using C++ */ 93 | #ifdef __cplusplus 94 | } 95 | #endif 96 | #include "close_code.h" 97 | 98 | #endif /* SDL_guid_h_ */ 99 | 100 | /* vi: set ts=4 sw=4 expandtab: */ 101 | -------------------------------------------------------------------------------- /Wolf/Renderer.h: -------------------------------------------------------------------------------- 1 | #ifndef RENDERER_H_ 2 | #define RENDERER_H_ 3 | 4 | #include 5 | #include "Engine.h" 6 | #include "Defines.h" 7 | #include "FixedMath.h" 8 | #include "SpriteFrame.h" 9 | 10 | #define NULL_QUEUE_ITEM 0xff 11 | #define RENDER_QUEUE_CAPACITY 16 12 | 13 | enum 14 | { 15 | UI_Key1, 16 | UI_Key2, 17 | UI_BJFace, 18 | UI_BJFace_Dead, 19 | UI_BJFace_Baby, 20 | UI_BJFace_Easy, 21 | UI_BJFace_Medium, 22 | UI_BJFace_Hard, 23 | UI_Gun, 24 | }; 25 | 26 | struct RenderQueueItem 27 | { 28 | SpriteFrame* frame; 29 | uint24_t spriteAddress; 30 | uint8_t x, w; 31 | uint8_t next; 32 | }; 33 | 34 | class Renderer 35 | { 36 | public: 37 | void init(); 38 | void drawFrame(); 39 | void queueSprite(SpriteFrame* frame, uint24_t spriteAddress, int16_t x, int16_t z); 40 | 41 | void drawGlyph(char glyph, uint8_t x, uint8_t y, uint8_t colour = 0); 42 | void drawString(const char* str, uint8_t x, uint8_t y, uint8_t colour = 0); 43 | void drawInt(int8_t val, uint8_t x, uint8_t y, uint8_t colour = 0); 44 | void drawLong(int32_t val, uint8_t x, uint8_t y, uint8_t colour = 0); 45 | void drawBox(int16_t x, int16_t y, int16_t w, int16_t h, uint8_t colour); 46 | void drawSprite2D(uint8_t spriteId, int16_t x, int16_t y); 47 | void drawLevelLoadScreen(); 48 | void drawBackground(uint24_t address); 49 | void fadeScreen(int8_t amount); 50 | 51 | #ifdef DEFER_RENDER 52 | void drawDeferredFrame(); 53 | #endif 54 | 55 | int8_t damageIndicator; 56 | 57 | inline bool isFrustrumClipped(int16_t x, int16_t z) 58 | { 59 | if((view.clipCos * (x - view.cellX) - view.clipSin * (z - view.cellZ)) < -FIXED_ONE) 60 | return true; 61 | if((view.clipSin * (x - view.cellX) + view.clipCos * (z - view.cellZ)) < -FIXED_ONE) 62 | return true; 63 | 64 | return false; 65 | } 66 | 67 | struct 68 | { 69 | int16_t x, z; 70 | int16_t cellX, cellZ; 71 | int16_t rotCos, rotSin; 72 | int16_t clipCos, clipSin; 73 | } view; 74 | 75 | private: 76 | void initWBuffer(); 77 | void drawFloorAndCeiling(); 78 | void drawCell(int8_t cellX, int8_t cellZ); 79 | /*inline*/ void drawStrip(int16_t x, int16_t w, int8_t u, uint8_t textureId); 80 | void drawWall(int16_t _x1, int16_t _z1, int16_t _x2, int16_t _z2, uint8_t textureId = 0, int8_t _u1 = 0, int8_t _u2 = TEXTURE_SIZE - 1); 81 | void drawFrustumCells(); 82 | void drawBufferedCells(); 83 | void drawDoors(); 84 | 85 | void drawQueuedSprite(uint8_t id); 86 | void drawWeapon(); 87 | void drawDamage(); 88 | void drawHUD(); 89 | 90 | /* int16_t xpos, zpos; 91 | int16_t cos_dir; 92 | int16_t sin_dir; 93 | int8_t xcell, zcell; 94 | int8_t numColumns;*/ 95 | uint8_t wbuffer[DISPLAYWIDTH]; 96 | 97 | #ifdef DEFER_RENDER 98 | uint8_t texbuffer[DISPLAYWIDTH]; 99 | uint8_t ubuffer[DISPLAYWIDTH]; 100 | #endif 101 | 102 | uint8_t renderQueueHead; 103 | RenderQueueItem renderQueue[RENDER_QUEUE_CAPACITY]; 104 | int numBufferSlicesFilled; 105 | }; 106 | 107 | class BitPairReader 108 | { 109 | public: 110 | BitPairReader(uint8_t* ptr, uint16_t offset = 0) 111 | { 112 | uint16_t byteOffset = offset >> 2; 113 | m_readOffset = (offset - (byteOffset << 2)) << 1; 114 | m_ptr = ptr + byteOffset; 115 | m_lastRead = pgm_read_byte(m_ptr); 116 | } 117 | 118 | uint8_t read() 119 | { 120 | uint8_t result = (m_lastRead & (3 << m_readOffset)) >> m_readOffset; 121 | m_readOffset += 2; 122 | if(m_readOffset == 8) 123 | { 124 | m_ptr++; 125 | m_lastRead = pgm_read_byte(m_ptr); 126 | m_readOffset = 0; 127 | } 128 | 129 | return result; 130 | } 131 | private: 132 | uint8_t* m_ptr; 133 | uint8_t m_lastRead; 134 | uint8_t m_readOffset; 135 | }; 136 | 137 | 138 | #endif 139 | -------------------------------------------------------------------------------- /Wolf.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 | Source Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | Header Files 38 | 39 | 40 | Header Files 41 | 42 | 43 | Header Files 44 | 45 | 46 | Header Files 47 | 48 | 49 | Header Files 50 | 51 | 52 | Header Files 53 | 54 | 55 | Header Files 56 | 57 | 58 | Header Files 59 | 60 | 61 | Header Files 62 | 63 | 64 | Header Files 65 | 66 | 67 | 68 | 69 | Source Files 70 | 71 | 72 | Source Files 73 | 74 | 75 | Source Files 76 | 77 | 78 | Source Files 79 | 80 | 81 | Source Files 82 | 83 | 84 | Source Files 85 | 86 | 87 | Source Files 88 | 89 | 90 | Source Files 91 | 92 | 93 | Source Files 94 | 95 | 96 | Source Files 97 | 98 | 99 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_test_random.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_random.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | A "32-bit Multiply with carry random number generator. Very fast. 33 | Includes a list of recommended multipliers. 34 | 35 | multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32. 36 | period: (a*2^31)-1 37 | 38 | */ 39 | 40 | #ifndef SDL_test_random_h_ 41 | #define SDL_test_random_h_ 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /* --- Definitions */ 50 | 51 | /* 52 | * Macros that return a random number in a specific format. 53 | */ 54 | #define SDLTest_RandomInt(c) ((int)SDLTest_Random(c)) 55 | 56 | /* 57 | * Context structure for the random number generator state. 58 | */ 59 | typedef struct { 60 | unsigned int a; 61 | unsigned int x; 62 | unsigned int c; 63 | unsigned int ah; 64 | unsigned int al; 65 | } SDLTest_RandomContext; 66 | 67 | 68 | /* --- Function prototypes */ 69 | 70 | /** 71 | * \brief Initialize random number generator with two integers. 72 | * 73 | * Note: The random sequence of numbers returned by ...Random() is the 74 | * same for the same two integers and has a period of 2^31. 75 | * 76 | * \param rndContext pointer to context structure 77 | * \param xi integer that defines the random sequence 78 | * \param ci integer that defines the random sequence 79 | * 80 | */ 81 | void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, 82 | unsigned int ci); 83 | 84 | /** 85 | * \brief Initialize random number generator based on current system time. 86 | * 87 | * \param rndContext pointer to context structure 88 | * 89 | */ 90 | void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext); 91 | 92 | 93 | /** 94 | * \brief Initialize random number generator based on current system time. 95 | * 96 | * Note: ...RandomInit() or ...RandomInitTime() must have been called 97 | * before using this function. 98 | * 99 | * \param rndContext pointer to context structure 100 | * 101 | * \returns a random number (32bit unsigned integer) 102 | * 103 | */ 104 | unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext); 105 | 106 | 107 | /* Ends C function definitions when using C++ */ 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | #include "close_code.h" 112 | 113 | #endif /* SDL_test_random_h_ */ 114 | 115 | /* vi: set ts=4 sw=4 expandtab: */ 116 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_test_assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_assert.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Assert API for test code and test cases 33 | * 34 | */ 35 | 36 | #ifndef SDL_test_assert_h_ 37 | #define SDL_test_assert_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Fails the assert. 47 | */ 48 | #define ASSERT_FAIL 0 49 | 50 | /** 51 | * \brief Passes the assert. 52 | */ 53 | #define ASSERT_PASS 1 54 | 55 | /** 56 | * \brief Assert that logs and break execution flow on failures. 57 | * 58 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 59 | * \param assertDescription Message to log with the assert describing it. 60 | */ 61 | void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2); 62 | 63 | /** 64 | * \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters. 65 | * 66 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 67 | * \param assertDescription Message to log with the assert describing it. 68 | * 69 | * \returns the assertCondition so it can be used to externally to break execution flow if desired. 70 | */ 71 | int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2); 72 | 73 | /** 74 | * \brief Explicitly pass without checking an assertion condition. Updates assertion counter. 75 | * 76 | * \param assertDescription Message to log with the assert describing it. 77 | */ 78 | void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1); 79 | 80 | /** 81 | * \brief Resets the assert summary counters to zero. 82 | */ 83 | void SDLTest_ResetAssertSummary(void); 84 | 85 | /** 86 | * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. 87 | */ 88 | void SDLTest_LogAssertSummary(void); 89 | 90 | 91 | /** 92 | * \brief Converts the current assert summary state to a test result. 93 | * 94 | * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT 95 | */ 96 | int SDLTest_AssertSummaryToTestResult(void); 97 | 98 | #ifdef __cplusplus 99 | } 100 | #endif 101 | #include "close_code.h" 102 | 103 | #endif /* SDL_test_assert_h_ */ 104 | 105 | /* vi: set ts=4 sw=4 expandtab: */ 106 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_bits.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_bits.h 24 | * 25 | * Functions for fiddling with bits and bitmasks. 26 | */ 27 | 28 | #ifndef SDL_bits_h_ 29 | #define SDL_bits_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \file SDL_bits.h 41 | */ 42 | 43 | /** 44 | * Get the index of the most significant bit. Result is undefined when called 45 | * with 0. This operation can also be stated as "count leading zeroes" and 46 | * "log base 2". 47 | * 48 | * \return the index of the most significant bit, or -1 if the value is 0. 49 | */ 50 | #if defined(__WATCOMC__) && defined(__386__) 51 | extern __inline int _SDL_bsr_watcom(Uint32); 52 | #pragma aux _SDL_bsr_watcom = \ 53 | "bsr eax, eax" \ 54 | parm [eax] nomemory \ 55 | value [eax] \ 56 | modify exact [eax] nomemory; 57 | #endif 58 | 59 | SDL_FORCE_INLINE int 60 | SDL_MostSignificantBitIndex32(Uint32 x) 61 | { 62 | #if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 63 | /* Count Leading Zeroes builtin in GCC. 64 | * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html 65 | */ 66 | if (x == 0) { 67 | return -1; 68 | } 69 | return 31 - __builtin_clz(x); 70 | #elif defined(__WATCOMC__) && defined(__386__) 71 | if (x == 0) { 72 | return -1; 73 | } 74 | return _SDL_bsr_watcom(x); 75 | #elif defined(_MSC_VER) 76 | unsigned long index; 77 | if (_BitScanReverse(&index, x)) { 78 | return index; 79 | } 80 | return -1; 81 | #else 82 | /* Based off of Bit Twiddling Hacks by Sean Eron Anderson 83 | * , released in the public domain. 84 | * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog 85 | */ 86 | const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000}; 87 | const int S[] = {1, 2, 4, 8, 16}; 88 | 89 | int msbIndex = 0; 90 | int i; 91 | 92 | if (x == 0) { 93 | return -1; 94 | } 95 | 96 | for (i = 4; i >= 0; i--) 97 | { 98 | if (x & b[i]) 99 | { 100 | x >>= S[i]; 101 | msbIndex |= S[i]; 102 | } 103 | } 104 | 105 | return msbIndex; 106 | #endif 107 | } 108 | 109 | SDL_FORCE_INLINE SDL_bool 110 | SDL_HasExactlyOneBitSet32(Uint32 x) 111 | { 112 | if (x && !(x & (x - 1))) { 113 | return SDL_TRUE; 114 | } 115 | return SDL_FALSE; 116 | } 117 | 118 | /* Ends C function definitions when using C++ */ 119 | #ifdef __cplusplus 120 | } 121 | #endif 122 | #include "close_code.h" 123 | 124 | #endif /* SDL_bits_h_ */ 125 | 126 | /* vi: set ts=4 sw=4 expandtab: */ 127 | -------------------------------------------------------------------------------- /Wolf/Generated/Data_Dog.bin: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_metal.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_metal.h 24 | * 25 | * Header file for functions to creating Metal layers and views on SDL windows. 26 | */ 27 | 28 | #ifndef SDL_metal_h_ 29 | #define SDL_metal_h_ 30 | 31 | #include "SDL_video.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS). 41 | * 42 | * \note This can be cast directly to an NSView or UIView. 43 | */ 44 | typedef void *SDL_MetalView; 45 | 46 | /** 47 | * \name Metal support functions 48 | */ 49 | /* @{ */ 50 | 51 | /** 52 | * Create a CAMetalLayer-backed NSView/UIView and attach it to the specified 53 | * window. 54 | * 55 | * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on 56 | * its own. It is up to user code to do that. 57 | * 58 | * The returned handle can be casted directly to a NSView or UIView. To access 59 | * the backing CAMetalLayer, call SDL_Metal_GetLayer(). 60 | * 61 | * \since This function is available since SDL 2.0.12. 62 | * 63 | * \sa SDL_Metal_DestroyView 64 | * \sa SDL_Metal_GetLayer 65 | */ 66 | extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window); 67 | 68 | /** 69 | * Destroy an existing SDL_MetalView object. 70 | * 71 | * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was 72 | * called after SDL_CreateWindow. 73 | * 74 | * \since This function is available since SDL 2.0.12. 75 | * 76 | * \sa SDL_Metal_CreateView 77 | */ 78 | extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view); 79 | 80 | /** 81 | * Get a pointer to the backing CAMetalLayer for the given view. 82 | * 83 | * \since This function is available since SDL 2.0.14. 84 | * 85 | * \sa SDL_Metal_CreateView 86 | */ 87 | extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view); 88 | 89 | /** 90 | * Get the size of a window's underlying drawable in pixels (for use with 91 | * setting viewport, scissor & etc). 92 | * 93 | * \param window SDL_Window from which the drawable size should be queried 94 | * \param w Pointer to variable for storing the width in pixels, may be NULL 95 | * \param h Pointer to variable for storing the height in pixels, may be NULL 96 | * 97 | * \since This function is available since SDL 2.0.14. 98 | * 99 | * \sa SDL_GetWindowSize 100 | * \sa SDL_CreateWindow 101 | */ 102 | extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w, 103 | int *h); 104 | 105 | /* @} *//* Metal support functions */ 106 | 107 | /* Ends C function definitions when using C++ */ 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | #include "close_code.h" 112 | 113 | #endif /* SDL_metal_h_ */ 114 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_gesture.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_gesture.h 24 | * 25 | * Include file for SDL gesture event handling. 26 | */ 27 | 28 | #ifndef SDL_gesture_h_ 29 | #define SDL_gesture_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "SDL_touch.h" 36 | 37 | 38 | #include "begin_code.h" 39 | /* Set up for C function definitions, even when using C++ */ 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef Sint64 SDL_GestureID; 45 | 46 | /* Function prototypes */ 47 | 48 | /** 49 | * Begin recording a gesture on a specified touch device or all touch devices. 50 | * 51 | * If the parameter `touchId` is -1 (i.e., all devices), this function will 52 | * always return 1, regardless of whether there actually are any devices. 53 | * 54 | * \param touchId the touch device id, or -1 for all touch devices 55 | * \returns 1 on success or 0 if the specified device could not be found. 56 | * 57 | * \since This function is available since SDL 2.0.0. 58 | * 59 | * \sa SDL_GetTouchDevice 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId); 62 | 63 | 64 | /** 65 | * Save all currently loaded Dollar Gesture templates. 66 | * 67 | * \param dst a SDL_RWops to save to 68 | * \returns the number of saved templates on success or 0 on failure; call 69 | * SDL_GetError() for more information. 70 | * 71 | * \since This function is available since SDL 2.0.0. 72 | * 73 | * \sa SDL_LoadDollarTemplates 74 | * \sa SDL_SaveDollarTemplate 75 | */ 76 | extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst); 77 | 78 | /** 79 | * Save a currently loaded Dollar Gesture template. 80 | * 81 | * \param gestureId a gesture id 82 | * \param dst a SDL_RWops to save to 83 | * \returns 1 on success or 0 on failure; call SDL_GetError() for more 84 | * information. 85 | * 86 | * \since This function is available since SDL 2.0.0. 87 | * 88 | * \sa SDL_LoadDollarTemplates 89 | * \sa SDL_SaveAllDollarTemplates 90 | */ 91 | extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst); 92 | 93 | 94 | /** 95 | * Load Dollar Gesture templates from a file. 96 | * 97 | * \param touchId a touch id 98 | * \param src a SDL_RWops to load from 99 | * \returns the number of loaded templates on success or a negative error code 100 | * (or 0) on failure; call SDL_GetError() for more information. 101 | * 102 | * \since This function is available since SDL 2.0.0. 103 | * 104 | * \sa SDL_SaveAllDollarTemplates 105 | * \sa SDL_SaveDollarTemplate 106 | */ 107 | extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src); 108 | 109 | /* Ends C function definitions when using C++ */ 110 | #ifdef __cplusplus 111 | } 112 | #endif 113 | #include "close_code.h" 114 | 115 | #endif /* SDL_gesture_h_ */ 116 | 117 | /* vi: set ts=4 sw=4 expandtab: */ 118 | -------------------------------------------------------------------------------- /Windows/SDL2/include/SDL_test_crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_crc32.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Implements CRC32 calculations (default output is Perl String::CRC32 compatible). 33 | 34 | */ 35 | 36 | #ifndef SDL_test_crc32_h_ 37 | #define SDL_test_crc32_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | 46 | /* ------------ Definitions --------- */ 47 | 48 | /* Definition shared by all CRC routines */ 49 | 50 | #ifndef CrcUint32 51 | #define CrcUint32 unsigned int 52 | #endif 53 | #ifndef CrcUint8 54 | #define CrcUint8 unsigned char 55 | #endif 56 | 57 | #ifdef ORIGINAL_METHOD 58 | #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */ 59 | #else 60 | #define CRC32_POLY 0xEDB88320 /* Perl String::CRC32 compatible */ 61 | #endif 62 | 63 | /** 64 | * Data structure for CRC32 (checksum) computation 65 | */ 66 | typedef struct { 67 | CrcUint32 crc32_table[256]; /* CRC table */ 68 | } SDLTest_Crc32Context; 69 | 70 | /* ---------- Function Prototypes ------------- */ 71 | 72 | /** 73 | * \brief Initialize the CRC context 74 | * 75 | * Note: The function initializes the crc table required for all crc calculations. 76 | * 77 | * \param crcContext pointer to context variable 78 | * 79 | * \returns 0 for OK, -1 on error 80 | * 81 | */ 82 | int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext); 83 | 84 | 85 | /** 86 | * \brief calculate a crc32 from a data block 87 | * 88 | * \param crcContext pointer to context variable 89 | * \param inBuf input buffer to checksum 90 | * \param inLen length of input buffer 91 | * \param crc32 pointer to Uint32 to store the final CRC into 92 | * 93 | * \returns 0 for OK, -1 on error 94 | * 95 | */ 96 | int SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); 97 | 98 | /* Same routine broken down into three steps */ 99 | int SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32); 100 | int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32); 101 | int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); 102 | 103 | 104 | /** 105 | * \brief clean up CRC context 106 | * 107 | * \param crcContext pointer to context variable 108 | * 109 | * \returns 0 for OK, -1 on error 110 | * 111 | */ 112 | 113 | int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext); 114 | 115 | 116 | /* Ends C function definitions when using C++ */ 117 | #ifdef __cplusplus 118 | } 119 | #endif 120 | #include "close_code.h" 121 | 122 | #endif /* SDL_test_crc32_h_ */ 123 | 124 | /* vi: set ts=4 sw=4 expandtab: */ 125 | -------------------------------------------------------------------------------- /Windows/SDL2/docs/README-gesture.md: -------------------------------------------------------------------------------- 1 | Dollar Gestures 2 | =========================================================================== 3 | SDL provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures. 4 | 5 | Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up. 6 | 7 | Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID. 8 | 9 | Recording: 10 | ---------- 11 | To begin recording on a touch device call: 12 | SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices. 13 | 14 | Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event. 15 | A SDL_DOLLARRECORD event is a dgesture with the following fields: 16 | 17 | * event.dgesture.touchId - the Id of the touch used to record the gesture. 18 | * event.dgesture.gestureId - the unique id of the recorded gesture. 19 | 20 | 21 | Performing: 22 | ----------- 23 | As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields: 24 | 25 | * event.dgesture.touchId - the Id of the touch which performed the gesture. 26 | * event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke. 27 | * event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match. 28 | * event.dgesture.numFingers - the number of fingers used to draw the stroke. 29 | 30 | Most programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed). 31 | 32 | 33 | 34 | Saving: 35 | ------- 36 | To save a template, call SDL_SaveDollarTemplate(gestureId, dst) where gestureId is the id of the gesture you want to save, and dst is an SDL_RWops pointer to the file where the gesture will be stored. 37 | 38 | To save all currently loaded templates, call SDL_SaveAllDollarTemplates(dst) where dst is an SDL_RWops pointer to the file where the gesture will be stored. 39 | 40 | Both functions return the number of gestures successfully saved. 41 | 42 | 43 | Loading: 44 | -------- 45 | To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file. 46 | 47 | SDL_LoadDollarTemplates returns the number of templates successfully loaded. 48 | 49 | 50 | 51 | =========================================================================== 52 | Multi Gestures 53 | =========================================================================== 54 | SDL provides simple support for pinch/rotate/swipe gestures. 55 | Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields: 56 | 57 | * event.mgesture.touchId - the Id of the touch on which the gesture was performed. 58 | * event.mgesture.x - the normalized x coordinate of the gesture. (0..1) 59 | * event.mgesture.y - the normalized y coordinate of the gesture. (0..1) 60 | * event.mgesture.dTheta - the amount that the fingers rotated during this motion. 61 | * event.mgesture.dDist - the amount that the fingers pinched during this motion. 62 | * event.mgesture.numFingers - the number of fingers used in the gesture. 63 | 64 | 65 | =========================================================================== 66 | Notes 67 | =========================================================================== 68 | For a complete example see test/testgesture.c 69 | 70 | Please direct questions/comments to: 71 | jim.tla+sdl_touch@gmail.com 72 | --------------------------------------------------------------------------------