├── .gitignore ├── .gitmodules ├── .lvimrc ├── .travis.sh ├── .travis.yml ├── .vscode ├── c_cpp_properties.json └── settings.json ├── AUTHORS ├── CMakeLists.txt ├── CODE_OF_CONDUCT.md ├── COPYING.md ├── ChangeLog ├── HACKING.md ├── Makefile.am ├── NEWS.md ├── NOT-BUGS.md ├── PHILOSOPHY.md ├── README-chocolate.md ├── README.Music.md ├── README.Strife.md ├── README.md ├── TODO.md ├── autogen.sh ├── build.sh ├── cmake ├── FindSDL2.cmake ├── FindSDL2_mixer.cmake ├── FindSDL2_net.cmake ├── Findm.cmake ├── Findsamplerate.cmake └── config.h.cin ├── configure.ac ├── cup.sh ├── data ├── .gitignore ├── Makefile.am ├── README ├── convert-icon ├── doom.ico ├── doom.png ├── doom8.ico ├── setup.ico ├── setup.png └── setup8.ico ├── doom1.whx ├── host_build.sh ├── m_deathmch.png ├── m_game.png ├── m_host.png ├── m_join.png ├── m_name.png ├── m_network.png ├── m_two.png ├── man ├── .gitignore ├── CMDLINE.template ├── CMDLINE.template.md ├── INSTALL.template ├── Makefile.am ├── bash-completion │ ├── .gitignore │ ├── Makefile.am │ ├── doom.template.in │ ├── heretic.template.in │ ├── hexen.template.in │ └── strife.template.in ├── default.cfg.template ├── docgen ├── doom.template ├── environ.man ├── extra.cfg.template ├── heretic.template ├── hexen.template ├── iwad_paths.man ├── server.template ├── setup.template ├── simplecpp ├── strife.template └── wikipages ├── midiproc ├── .gitignore ├── CMakeLists.txt ├── Makefile.am ├── buffer.c ├── buffer.h ├── main.c └── proto.h ├── opl ├── .gitignore ├── CMakeLists.txt ├── Makefile.am ├── emu8950.c ├── emu8950.h ├── examples │ ├── .gitignore │ ├── Makefile.am │ └── droplay.c ├── ioperm_sys.c ├── ioperm_sys.h ├── opl.c ├── opl.h ├── opl3.c ├── opl3.h ├── opl_api.c ├── opl_internal.h ├── opl_linux.c ├── opl_obsd.c ├── opl_pico.c ├── opl_queue.c ├── opl_queue.h ├── opl_sdl.c ├── opl_timer.c ├── opl_timer.h ├── opl_win32.c ├── slot_render.cpp ├── slot_render.h └── slot_render_pico.S ├── pcsound ├── .gitignore ├── CMakeLists.txt ├── Makefile.am ├── pcsound.c ├── pcsound.h ├── pcsound_bsd.c ├── pcsound_internal.h ├── pcsound_linux.c ├── pcsound_sdl.c └── pcsound_win32.c ├── pico_extras_import.cmake ├── pico_sdk_import.cmake ├── pkg ├── .gitignore ├── Makefile.am ├── config.make.in ├── osx │ ├── .gitignore │ ├── AppController.h │ ├── AppController.m │ ├── Execute.h │ ├── Execute.m │ ├── GNUmakefile │ ├── IWADController.h │ ├── IWADController.m │ ├── Info.plist.in │ ├── LauncherManager.h │ ├── LauncherManager.m │ ├── PkgInfo │ ├── Resources │ │ ├── 128x128.png │ │ ├── app.icns │ │ ├── app.png │ │ ├── launcher.nib │ │ │ ├── designable.nib │ │ │ └── keyedobjects.nib │ │ ├── wadfile.icns │ │ └── wadfile.png │ ├── cp-with-libs │ ├── disk │ │ ├── background.png │ │ └── dir.DS_Store │ ├── dmgfix │ └── main.m └── win32 │ ├── .gitignore │ ├── GNUmakefile │ ├── README │ └── cp-with-libs ├── rpm.spec.in ├── src ├── .gitignore ├── CMakeLists.txt ├── Makefile.am ├── adpcm-xq │ ├── CMakeLists.txt │ ├── adpcm-lib.c │ ├── adpcm-lib.h │ ├── adpcm-xq.c │ └── license.txt ├── aes_prng.c ├── aes_prng.h ├── d_dedicated.c ├── d_event.c ├── d_event.h ├── d_iwad.c ├── d_iwad.h ├── d_loop.c ├── d_loop.h ├── d_mode.c ├── d_mode.h ├── d_ticcmd.h ├── deh_defs.h ├── deh_io.c ├── deh_io.h ├── deh_main.c ├── deh_main.h ├── deh_mapping.c ├── deh_mapping.h ├── deh_str.c ├── deh_str.h ├── deh_text.c ├── doom-screensaver.desktop.in ├── doom.appdata.xml.in ├── doom.desktop.in ├── doom │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── am_map.c │ ├── am_map.h │ ├── d_englsh.h │ ├── d_items.c │ ├── d_items.h │ ├── d_main.c │ ├── d_main.h │ ├── d_net.c │ ├── d_player.h │ ├── d_textur.h │ ├── d_think.h │ ├── deh_ammo.c │ ├── deh_bexstr.c │ ├── deh_cheat.c │ ├── deh_doom.c │ ├── deh_frame.c │ ├── deh_misc.c │ ├── deh_misc.h │ ├── deh_ptr.c │ ├── deh_sound.c │ ├── deh_thing.c │ ├── deh_weapon.c │ ├── doomdata.h │ ├── doomdef.c │ ├── doomdef.h │ ├── doomstat.c │ ├── doomstat.h │ ├── dstrings.c │ ├── dstrings.h │ ├── f_finale.c │ ├── f_finale.h │ ├── f_wipe.c │ ├── f_wipe.h │ ├── g_game.c │ ├── g_game.h │ ├── hu_lib.c │ ├── hu_lib.h │ ├── hu_stuff.c │ ├── hu_stuff.h │ ├── info.c │ ├── info.h │ ├── m_menu.c │ ├── m_menu.h │ ├── m_random.c │ ├── m_random.h │ ├── p_ceilng.c │ ├── p_doors.c │ ├── p_enemy.c │ ├── p_floor.c │ ├── p_inter.c │ ├── p_inter.h │ ├── p_lights.c │ ├── p_local.h │ ├── p_map.c │ ├── p_maputl.c │ ├── p_mobj.c │ ├── p_mobj.h │ ├── p_plats.c │ ├── p_pspr.c │ ├── p_pspr.h │ ├── p_saveg.c │ ├── p_saveg.h │ ├── p_setup.c │ ├── p_setup.h │ ├── p_sight.c │ ├── p_spec.c │ ├── p_spec.h │ ├── p_switch.c │ ├── p_telept.c │ ├── p_tick.c │ ├── p_tick.h │ ├── p_user.c │ ├── r_bsp.c │ ├── r_bsp.h │ ├── r_data.c │ ├── r_data.h │ ├── r_data_whd.c │ ├── r_defs.h │ ├── r_draw.c │ ├── r_draw.h │ ├── r_local.h │ ├── r_main.c │ ├── r_main.h │ ├── r_plane.c │ ├── r_plane.h │ ├── r_segs.c │ ├── r_segs.h │ ├── r_sky.c │ ├── r_sky.h │ ├── r_state.h │ ├── r_things.c │ ├── r_things.h │ ├── s_sound.c │ ├── s_sound.h │ ├── sounds.c │ ├── sounds.h │ ├── st_lib.c │ ├── st_lib.h │ ├── st_stuff.c │ ├── st_stuff.h │ ├── statdump.c │ ├── statdump.h │ ├── wi_stuff.c │ └── wi_stuff.h ├── doomkeys.h ├── doomtype.h ├── gusconf.c ├── gusconf.h ├── hagl_hal │ ├── CMakeLists.txt │ ├── LICENSE │ ├── README.md │ ├── cmake │ │ ├── generic-ili9163-128x128.cmake │ │ ├── generic-ili9341-320x240.cmake │ │ ├── generic-st7735-128x128.cmake │ │ ├── pimoroni-pico-display-pack.cmake │ │ ├── pimoroni-picosystem.cmake │ │ ├── waveshare-pico-lcd-096.cmake │ │ ├── waveshare-pico-lcd-130.cmake │ │ ├── waveshare-pico-lcd-144.cmake │ │ └── waveshare-rp2040-lcd-096.cmake │ ├── hagl_hal_double.c │ ├── hagl_hal_single.c │ ├── hagl_hal_triple.c │ ├── include │ │ ├── hagl_hal.h │ │ ├── hagl_hal_color.h │ │ ├── mipi_dcs.h │ │ └── mipi_display.h │ ├── mipi_display.c │ └── times.c ├── heretic.appdata.xml.in ├── heretic.desktop.in ├── heretic │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── am_data.h │ ├── am_map.c │ ├── am_map.h │ ├── ct_chat.c │ ├── ct_chat.h │ ├── d_main.c │ ├── d_net.c │ ├── deh_ammo.c │ ├── deh_frame.c │ ├── deh_htext.c │ ├── deh_htic.c │ ├── deh_htic.h │ ├── deh_sound.c │ ├── deh_thing.c │ ├── deh_weapon.c │ ├── doomdata.h │ ├── doomdef.h │ ├── dstrings.h │ ├── f_finale.c │ ├── g_game.c │ ├── in_lude.c │ ├── info.c │ ├── info.h │ ├── m_random.c │ ├── m_random.h │ ├── mn_menu.c │ ├── p_action.h │ ├── p_ceilng.c │ ├── p_doors.c │ ├── p_enemy.c │ ├── p_floor.c │ ├── p_inter.c │ ├── p_lights.c │ ├── p_local.h │ ├── p_map.c │ ├── p_maputl.c │ ├── p_mobj.c │ ├── p_plats.c │ ├── p_pspr.c │ ├── p_saveg.c │ ├── p_setup.c │ ├── p_sight.c │ ├── p_spec.c │ ├── p_spec.h │ ├── p_switch.c │ ├── p_telept.c │ ├── p_tick.c │ ├── p_user.c │ ├── r_bsp.c │ ├── r_data.c │ ├── r_draw.c │ ├── r_local.h │ ├── r_main.c │ ├── r_plane.c │ ├── r_segs.c │ ├── r_things.c │ ├── s_sound.c │ ├── s_sound.h │ ├── sb_bar.c │ ├── sounds.c │ └── sounds.h ├── hexen.appdata.xml.in ├── hexen.desktop.in ├── hexen │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── a_action.c │ ├── am_data.h │ ├── am_map.c │ ├── am_map.h │ ├── ct_chat.c │ ├── ct_chat.h │ ├── d_net.c │ ├── f_finale.c │ ├── g_game.c │ ├── h2_main.c │ ├── h2def.h │ ├── in_lude.c │ ├── info.c │ ├── info.h │ ├── m_random.c │ ├── m_random.h │ ├── mn_menu.c │ ├── p_acs.c │ ├── p_anim.c │ ├── p_ceilng.c │ ├── p_doors.c │ ├── p_enemy.c │ ├── p_floor.c │ ├── p_inter.c │ ├── p_lights.c │ ├── p_local.h │ ├── p_map.c │ ├── p_maputl.c │ ├── p_mobj.c │ ├── p_plats.c │ ├── p_pspr.c │ ├── p_setup.c │ ├── p_sight.c │ ├── p_spec.c │ ├── p_spec.h │ ├── p_switch.c │ ├── p_telept.c │ ├── p_things.c │ ├── p_tick.c │ ├── p_user.c │ ├── po_man.c │ ├── r_bsp.c │ ├── r_data.c │ ├── r_draw.c │ ├── r_local.h │ ├── r_main.c │ ├── r_plane.c │ ├── r_segs.c │ ├── r_things.c │ ├── s_sound.c │ ├── s_sound.h │ ├── sb_bar.c │ ├── sc_man.c │ ├── sn_sonix.c │ ├── sounds.c │ ├── sounds.h │ ├── st_start.c │ ├── st_start.h │ ├── sv_save.c │ ├── textdefs.h │ └── xddefs.h ├── i_cdmus.c ├── i_cdmus.h ├── i_endoom.c ├── i_endoom.h ├── i_glob.c ├── i_glob.h ├── i_input.c ├── i_input.h ├── i_joystick.c ├── i_joystick.h ├── i_main.c ├── i_midipipe.c ├── i_midipipe.h ├── i_musicpack.c ├── i_oplmusic.c ├── i_pcsound.c ├── i_sdlmusic.c ├── i_sdlsound.c ├── i_sound.c ├── i_sound.h ├── i_swap.h ├── i_system.c ├── i_system.h ├── i_timer.c ├── i_timer.h ├── i_video.c ├── i_video.h ├── i_videohr.c ├── i_videohr.h ├── icon.c ├── image_decoder.c ├── image_decoder.h ├── m_argv.c ├── m_argv.h ├── m_bbox.c ├── m_bbox.h ├── m_cheat.c ├── m_cheat.h ├── m_config.c ├── m_config.h ├── m_controls.c ├── m_controls.h ├── m_fixed.c ├── m_fixed.h ├── m_misc.c ├── m_misc.h ├── manifest.xml ├── memio.c ├── memio.h ├── midifile.c ├── midifile.h ├── mus2mid.c ├── mus2mid.h ├── musx_decoder.c ├── musx_decoder.h ├── net_client.c ├── net_client.h ├── net_common.c ├── net_common.h ├── net_dedicated.c ├── net_dedicated.h ├── net_defs.h ├── net_gui.c ├── net_gui.h ├── net_io.c ├── net_io.h ├── net_loop.c ├── net_loop.h ├── net_packet.c ├── net_packet.h ├── net_query.c ├── net_query.h ├── net_sdl.c ├── net_sdl.h ├── net_server.c ├── net_server.h ├── net_structrw.c ├── net_structrw.h ├── pd_render.cpp ├── pico │ ├── CMakeLists.txt │ ├── blit.S │ ├── i_glob.c │ ├── i_input.c │ ├── i_picosound.c │ ├── i_picosound.h │ ├── i_system.c │ ├── i_timer.c │ ├── i_video.c │ ├── memmap_doom.ld │ ├── pico-screens │ │ ├── downsampler.c │ │ ├── screen.c │ │ ├── screen.h │ │ └── screens │ │ │ ├── lilygo_ttgo.c │ │ │ ├── lilygo_ttgo.h │ │ │ ├── shared.c │ │ │ ├── shared.h │ │ │ ├── ssd1306_70_40.cpp │ │ │ ├── ssd1306_70_40.hpp │ │ │ ├── ssd1306_70_40_i2c.c │ │ │ ├── ssd1306_70_40_i2c.h │ │ │ ├── st7735_128_128.c │ │ │ ├── st7735_128_128.h │ │ │ ├── st7789_240_135.c │ │ │ └── st7789_240_135.h │ ├── picoflash.c │ ├── picoflash.h │ ├── piconet.c │ ├── piconet.h │ ├── stubs.c │ ├── tusb_config.h │ └── w_file_static.c ├── pico_ssd1306 │ ├── CMakeLists.txt │ ├── pico_sdk_import.cmake │ └── src │ │ ├── include │ │ └── pico │ │ │ └── ssd1306.h │ │ └── ssd1306.cpp ├── pico_ssd1306_i2c │ ├── CMakeLists.txt │ ├── pico_sdk_import.cmake │ └── src │ │ ├── font.h │ │ ├── include │ │ └── pico │ │ │ └── ssd1306_i2c.h │ │ └── ssd1306_i2c.c ├── pico_st7789 │ ├── .github │ │ └── stale.yml │ ├── .gitignore │ ├── CMakeLists.txt │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── st7789_blink │ │ │ ├── CMakeLists.txt │ │ │ └── main.c │ │ ├── st7789_random │ │ │ ├── CMakeLists.txt │ │ │ └── main.c │ │ └── st7789_random_rows │ │ │ ├── CMakeLists.txt │ │ │ └── main.c │ ├── pico_sdk_import.cmake │ └── src │ │ ├── include │ │ └── pico │ │ │ └── st7789.h │ │ └── st7789.c ├── picodoom.h ├── resource.rc.in ├── setup-res.rc.in ├── setup │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── compatibility.c │ ├── compatibility.h │ ├── display.c │ ├── display.h │ ├── execute.c │ ├── execute.h │ ├── joystick.c │ ├── joystick.h │ ├── keyboard.c │ ├── keyboard.h │ ├── mainmenu.c │ ├── mode.c │ ├── mode.h │ ├── mouse.c │ ├── mouse.h │ ├── multiplayer.c │ ├── multiplayer.h │ ├── setup-manifest.xml.in │ ├── setup.desktop.in │ ├── setup_icon.c │ ├── sound.c │ ├── sound.h │ ├── txt_joyaxis.c │ ├── txt_joyaxis.h │ ├── txt_joybinput.c │ ├── txt_joybinput.h │ ├── txt_keyinput.c │ ├── txt_keyinput.h │ ├── txt_mouseinput.c │ └── txt_mouseinput.h ├── sha1.c ├── sha1.h ├── strife.appdata.xml.in ├── strife.desktop.in ├── strife │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Makefile.am │ ├── am_map.c │ ├── am_map.h │ ├── d_englsh.h │ ├── d_items.c │ ├── d_items.h │ ├── d_main.c │ ├── d_main.h │ ├── d_net.c │ ├── d_player.h │ ├── d_textur.h │ ├── d_think.h │ ├── deh_ammo.c │ ├── deh_cheat.c │ ├── deh_frame.c │ ├── deh_misc.c │ ├── deh_misc.h │ ├── deh_ptr.c │ ├── deh_sound.c │ ├── deh_strife.c │ ├── deh_thing.c │ ├── deh_weapon.c │ ├── doomdata.h │ ├── doomdef.c │ ├── doomdef.h │ ├── doomstat.c │ ├── doomstat.h │ ├── dstrings.c │ ├── dstrings.h │ ├── f_finale.c │ ├── f_finale.h │ ├── f_wipe.c │ ├── f_wipe.h │ ├── g_game.c │ ├── g_game.h │ ├── hu_lib.c │ ├── hu_lib.h │ ├── hu_stuff.c │ ├── hu_stuff.h │ ├── info.c │ ├── info.h │ ├── m_menu.c │ ├── m_menu.h │ ├── m_random.c │ ├── m_random.h │ ├── m_saves.c │ ├── m_saves.h │ ├── p_ceilng.c │ ├── p_dialog.c │ ├── p_dialog.h │ ├── p_doors.c │ ├── p_enemy.c │ ├── p_floor.c │ ├── p_inter.c │ ├── p_inter.h │ ├── p_lights.c │ ├── p_local.h │ ├── p_map.c │ ├── p_maputl.c │ ├── p_mobj.c │ ├── p_mobj.h │ ├── p_plats.c │ ├── p_pspr.c │ ├── p_pspr.h │ ├── p_saveg.c │ ├── p_saveg.h │ ├── p_setup.c │ ├── p_setup.h │ ├── p_sight.c │ ├── p_spec.c │ ├── p_spec.h │ ├── p_switch.c │ ├── p_telept.c │ ├── p_tick.c │ ├── p_tick.h │ ├── p_user.c │ ├── r_bsp.c │ ├── r_bsp.h │ ├── r_data.c │ ├── r_data.h │ ├── r_defs.h │ ├── r_draw.c │ ├── r_draw.h │ ├── r_local.h │ ├── r_main.c │ ├── r_main.h │ ├── r_plane.c │ ├── r_plane.h │ ├── r_segs.c │ ├── r_segs.h │ ├── r_sky.c │ ├── r_sky.h │ ├── r_state.h │ ├── r_things.c │ ├── r_things.h │ ├── s_sound.c │ ├── s_sound.h │ ├── sounds.c │ ├── sounds.h │ ├── st_lib.c │ ├── st_lib.h │ ├── st_stuff.c │ ├── st_stuff.h │ ├── wi_stuff.c │ └── wi_stuff.h ├── tables.c ├── tables.h ├── tiny.whd.h ├── tiny_huff.c ├── tiny_huff.h ├── v_diskicon.c ├── v_diskicon.h ├── v_patch.h ├── v_video.c ├── v_video.h ├── w_checksum.c ├── w_checksum.h ├── w_file.c ├── w_file.h ├── w_file_memory.c ├── w_file_posix.c ├── w_file_stdc.c ├── w_file_win32.c ├── w_main.c ├── w_main.h ├── w_merge.c ├── w_merge.h ├── w_wad.c ├── w_wad.h ├── whd_gen │ ├── CMakeLists.txt │ ├── compress_mus.cpp │ ├── compress_mus.h │ ├── config.h │ ├── extra_patches.h │ ├── huff.cpp │ ├── huff.h │ ├── huff_sink.h │ ├── huffman.h │ ├── lodepng.cpp │ ├── lodepng.h │ ├── mus2seq.cpp │ ├── mus2seq.h │ ├── statsomizer.h │ ├── wad.cpp │ ├── wad.h │ └── whd_gen.cpp ├── whddata.h ├── z_native.c ├── z_zone.c └── z_zone.h ├── textscreen ├── .gitignore ├── CMakeLists.txt ├── Doxyfile ├── Makefile.am ├── examples │ ├── .gitignore │ ├── Makefile.am │ ├── calculator.c │ └── guitest.c ├── fonts │ ├── Makefile.am │ ├── README │ ├── codepage.h │ ├── convert-font │ ├── large.h │ ├── large.png │ ├── normal.h │ ├── normal.png │ ├── small.h │ └── small.png ├── textscreen.h ├── txt_button.c ├── txt_button.h ├── txt_checkbox.c ├── txt_checkbox.h ├── txt_conditional.c ├── txt_conditional.h ├── txt_desktop.c ├── txt_desktop.h ├── txt_dropdown.c ├── txt_dropdown.h ├── txt_fileselect.c ├── txt_fileselect.h ├── txt_gui.c ├── txt_gui.h ├── txt_inputbox.c ├── txt_inputbox.h ├── txt_io.c ├── txt_io.h ├── txt_label.c ├── txt_label.h ├── txt_main.h ├── txt_radiobutton.c ├── txt_radiobutton.h ├── txt_scrollpane.c ├── txt_scrollpane.h ├── txt_sdl.c ├── txt_sdl.h ├── txt_separator.c ├── txt_separator.h ├── txt_spinctrl.c ├── txt_spinctrl.h ├── txt_strut.c ├── txt_strut.h ├── txt_table.c ├── txt_table.h ├── txt_utf8.c ├── txt_utf8.h ├── txt_widget.c ├── txt_widget.h ├── txt_window.c ├── txt_window.h ├── txt_window_action.c └── txt_window_action.h ├── up.sh └── win32 ├── win_opendir.c └── win_opendir.h /.gitignore: -------------------------------------------------------------------------------- 1 | CMDLINE 2 | INSTALL 3 | Makefile 4 | Makefile.in 5 | TAGS 6 | aclocal.m4 7 | autom4te.cache 8 | autotools 9 | bin 10 | /config.h 11 | config.hin 12 | config.log 13 | config.status 14 | configure 15 | lib 16 | obj 17 | rpm.spec 18 | stamp-h 19 | stamp-h.in 20 | stamp-h1 21 | tags 22 | \#*\# 23 | DOOM*.png 24 | HTIC*.png 25 | HEXEN*.png 26 | STRIFE*.png 27 | DOOM*.pcx 28 | HTIC*.pcx 29 | HEXEN*.pcx 30 | STRIFE*.pcx 31 | build/* 32 | 33 | # These are the default patterns globally ignored by Subversion: 34 | *.o 35 | *.lo 36 | *.la 37 | *.al 38 | .libs 39 | *.so 40 | *.so.[0-9]* 41 | *.a 42 | *.pyc 43 | *.pyo 44 | *.rej 45 | *~ 46 | .#* 47 | .*.swp 48 | .DS_store 49 | 50 | # Ignore GNU Global tags and html files 51 | GPATH 52 | GRTAGS 53 | GTAGS 54 | /HTML/ 55 | *.midx 56 | *.midx.z 57 | *.wad 58 | *.whd 59 | /cmake-*/ 60 | 61 | host-build/* 62 | 3rdparty/* 63 | rp2040-build/* -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "3rdparty/tinyusb"] 2 | path = 3rdparty/tinyusb 3 | url = https://github.com/liamfraser/tinyusb.git 4 | -------------------------------------------------------------------------------- /.lvimrc: -------------------------------------------------------------------------------- 1 | " Local vimrc configuration file. Install the localvimrc.vim vim script. 2 | set expandtab 3 | set tabstop=8 4 | set softtabstop=4 5 | set shiftwidth=4 6 | 7 | " Add all tag files to tags path. 8 | 9 | let topdir = findfile("configure.in", ".;") 10 | let topdir = substitute(topdir, "configure.in", "", "") 11 | 12 | " Check tags file in current dir: 13 | set tags+=tags 14 | 15 | " Add tag files in parent directories: 16 | let tagfiles = findfile("tags", ".;", -1) 17 | 18 | " Add tag files for libraries: 19 | call add(tagfiles, topdir . "opl/tags") 20 | call add(tagfiles, topdir . "pcsound/tags") 21 | call add(tagfiles, topdir . "textscreen/tags") 22 | 23 | for tagfile in tagfiles 24 | " Don't go beyond the project top level when adding parent dirs: 25 | if stridx(tagfile, topdir) >= 0 26 | exec "set tags+=" . tagfile 27 | endif 28 | endfor 29 | 30 | unlet topdir 31 | unlet tagfiles 32 | 33 | -------------------------------------------------------------------------------- /.travis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ "$ANALYZE" = "true" ] ; then 3 | cppcheck --error-exitcode=1 -j2 -UTESTING -Iopl -Isrc -Isrc/setup opl pcsound src textscreen 2> stderr.txt 4 | RET=$? 5 | if [ -s stderr.txt ] 6 | then 7 | cat stderr.txt 8 | fi 9 | exit $RET 10 | else 11 | set -e 12 | ./autogen.sh --enable-werror 13 | make 14 | make install DESTDIR=/tmp/whatever 15 | make dist 16 | fi 17 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | compiler: gcc 4 | 5 | sudo: required 6 | dist: xenial 7 | 8 | env: 9 | - ANALYZE=false 10 | - ANALYZE=true 11 | 12 | addons: 13 | apt: 14 | packages: 15 | - cppcheck 16 | - libpng-dev 17 | - libsdl2-dev 18 | - libsdl2-mixer-dev 19 | - libsdl2-net-dev 20 | - libsdl2-image-dev 21 | - libsamplerate0-dev 22 | 23 | script: ./.travis.sh 24 | 25 | branches: 26 | only: 27 | - master 28 | -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "compilerPath": "/usr/bin/gcc", 10 | "cStandard": "gnu17", 11 | "cppStandard": "gnu++17", 12 | "intelliSenseMode": "linux-gcc-x64", 13 | "configurationProvider": "ms-vscode.makefile-tools" 14 | } 15 | ], 16 | "version": 4 17 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "stdio.h": "c", 4 | "picodoom.h": "c", 5 | "st7789_240_135.h": "c", 6 | "screen.h": "c", 7 | "lilygo_ttgo.h": "c", 8 | "shared.h": "c", 9 | "ssd1306_i2c.h": "c", 10 | "st7735_128_128.h": "c", 11 | "video_doom.pio.h": "c" 12 | } 13 | } -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Simon Howard 2 | James Haley 3 | Samuel Villarreal 4 | Fabian Greffrath 5 | Jonathan Dowland 6 | Alexey Khokholov 7 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | Chocolate Doom's version history is stored in Git. For a full 2 | change log, clone the repository on Github: 3 | 4 | https://github.com/chocolate-doom/chocolate-doom 5 | 6 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | # TODO 2 | 3 | 4 | ## Greyscale Epic 5 | 6 | * reduce duplication in greyscale draw code 7 | * add greyscale to SSD1306 SPI too 8 | * make greyscale flash less 9 | * this might require fully rewinding multithreading 10 | * if interrupts are fast and accurate enough (microseconds) maybe we can just interrupt one of the threads instead? 11 | * make greyscale / monochrome switchable via flag 12 | 13 | ## ST7789 / 7735 Cleanup Epic 14 | 15 | * embed LCD_WIDTH and LCD_HEIGHT as settable variables. If we only refer to them inside the pico-screens directory we can also set defaults 16 | * this allows us to abstract away DOWNSAMPLING_FACTOR 17 | * LCD_X_OFFSET and LCD_Y_OFFSET? 18 | * have st7789 use mipi_display too? 19 | * set up a comparison 20 | * figure out how to generalize weights for area average 21 | 22 | 23 | ## Bugs 24 | 25 | * a portion of the screen freezes onto the greyscale version of doom for some reason... 26 | * honestly this might just be the USB bugging out and thinking it detects a keypress. it's really hard to tell 27 | * fix saving :( 28 | 29 | 30 | ## Misc 31 | 32 | * move screen libraries to external/ 33 | * tighten up any libraries where I position the cursor for each line - we should be able to set memory windows for all of these controllers 34 | * although I remember the st7789 being kind of difficult... 35 | * remove all TODOs 36 | * make some modifications to the readme: 37 | * explain what I changed and why 38 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | autoreconf -fi 4 | ./configure "$@" 5 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | rm -rf rp2040-build 2 | mkdir rp2040-build 3 | cd rp2040-build 4 | 5 | cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DPICO_BOARD=vgaboard -DPICO_SDK_PATH=$PICO_SDK_PATH -DPICO_EXTRAS_PATH=$PICO_EXTRAS_PATH .. 6 | -------------------------------------------------------------------------------- /cmake/config.h.cin: -------------------------------------------------------------------------------- 1 | #cmakedefine PACKAGE_NAME "@PACKAGE_NAME@" 2 | #cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@" 3 | #cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@" 4 | #cmakedefine PACKAGE_STRING "@PACKAGE_STRING@" 5 | #cmakedefine PROGRAM_PREFIX "@PROGRAM_PREFIX@" 6 | 7 | #cmakedefine HAVE_LIBSAMPLERATE 8 | #cmakedefine HAVE_LIBPNG 9 | #cmakedefine HAVE_DIRENT_H 10 | #cmakedefine HAVE_MMAP 11 | #cmakedefine01 HAVE_DECL_STRCASECMP 12 | #cmakedefine01 HAVE_DECL_STRNCASECMP 13 | -------------------------------------------------------------------------------- /cup.sh: -------------------------------------------------------------------------------- 1 | xxd -i $1 | sed "s/unsigned/const unsigned/g" | sed "s/$1/tiny_whd/g" >src/tiny.whd.h 2 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | *-doom.png 4 | *-setup.png 5 | -------------------------------------------------------------------------------- /data/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_DIST= \ 3 | README \ 4 | doom.ico \ 5 | doom8.ico \ 6 | doom.png \ 7 | setup.ico \ 8 | setup8.ico \ 9 | setup.png \ 10 | convert-icon 11 | 12 | iconsdir = $(prefix)/share/icons/hicolor/128x128/apps 13 | icons_DATA = @PROGRAM_PREFIX@doom.png \ 14 | @PROGRAM_PREFIX@setup.png 15 | 16 | @PROGRAM_PREFIX@doom.png : doom.png 17 | cp $(top_srcdir)/data/doom.png $@ 18 | 19 | @PROGRAM_PREFIX@setup.png : setup.png 20 | cp $(top_srcdir)/data/setup.png $@ 21 | 22 | CLEANFILES = $(icons_DATA) 23 | -------------------------------------------------------------------------------- /data/README: -------------------------------------------------------------------------------- 1 | The Chocolate Doom icon is based on an image by Chris Metcalf 2 | (http://www.chrismetcalf.org/) which is copyrighted to him: 3 | 4 | http://www.flickr.com/photos/laffy4k/448920776/ 5 | 6 | Chris has kindly agreed that the Chocolate Doom icon may be used under 7 | the GNU GPL, so the copyright status of the icon is the same as that of 8 | the rest of the project. 9 | 10 | The "foo8.ico" files are 8-bit depth only, while the "foo.ico" files 11 | contain full 32-bit versions, scaled to different sizes and with proper 12 | alpha masks (as well as the 8-bit versions). The 8-bit versions are 13 | used when setting the icon within SDL, as SDL under Windows displays 14 | full color icons in a very poor quality. The full-color versions are 15 | used in the resource files. 16 | 17 | -------------------------------------------------------------------------------- /data/doom.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/data/doom.ico -------------------------------------------------------------------------------- /data/doom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/data/doom.png -------------------------------------------------------------------------------- /data/doom8.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/data/doom8.ico -------------------------------------------------------------------------------- /data/setup.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/data/setup.ico -------------------------------------------------------------------------------- /data/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/data/setup.png -------------------------------------------------------------------------------- /data/setup8.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/data/setup8.ico -------------------------------------------------------------------------------- /doom1.whx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/doom1.whx -------------------------------------------------------------------------------- /host_build.sh: -------------------------------------------------------------------------------- 1 | rm -rf host-build 2 | mkdir host-build 3 | cd host-build 4 | cmake -DPICO_PLATFORM=host -DPICO_SDK_PATH=$PICO_SDK_PATH -DPICO_EXTRAS_PATH=$PICO_EXTRAS_PATH -DPICO_SDK_PRE_LIST_DIRS=$PICO_HOST_SDL_PATH .. --trace-source=CMakeLists.txt -------------------------------------------------------------------------------- /m_deathmch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/m_deathmch.png -------------------------------------------------------------------------------- /m_game.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/m_game.png -------------------------------------------------------------------------------- /m_host.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/m_host.png -------------------------------------------------------------------------------- /m_join.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/m_join.png -------------------------------------------------------------------------------- /m_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/m_name.png -------------------------------------------------------------------------------- /m_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/m_network.png -------------------------------------------------------------------------------- /m_two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/m_two.png -------------------------------------------------------------------------------- /man/.gitignore: -------------------------------------------------------------------------------- 1 | CMDLINE.doom 2 | CMDLINE.doom.md 3 | CMDLINE.heretic 4 | CMDLINE.heretic.md 5 | CMDLINE.hexen 6 | CMDLINE.hexen.md 7 | CMDLINE.strife 8 | CMDLINE.strife.md 9 | INSTALL.doom 10 | INSTALL.heretic 11 | INSTALL.hexen 12 | INSTALL.strife 13 | Makefile.in 14 | Makefile 15 | *.6 16 | *.5 17 | -------------------------------------------------------------------------------- /man/CMDLINE.template: -------------------------------------------------------------------------------- 1 | == Command line parameters == 2 | 3 | This is a full list of the supported command line parameters. A number of 4 | additional parameters are supported in addition to those present in the DOS 5 | version. 6 | 7 | @content 8 | 9 | -------------------------------------------------------------------------------- /man/CMDLINE.template.md: -------------------------------------------------------------------------------- 1 | # Command line parameters 2 | 3 | This is a full list of the supported command line parameters. A number of 4 | additional parameters are supported in addition to those present in the DOS 5 | version. 6 | 7 | @content 8 | 9 | -------------------------------------------------------------------------------- /man/bash-completion/.gitignore: -------------------------------------------------------------------------------- 1 | *doom 2 | *heretic 3 | *hexen 4 | *strife 5 | *.template 6 | -------------------------------------------------------------------------------- /man/bash-completion/doom.template.in: -------------------------------------------------------------------------------- 1 | # bash completion for @PACKAGE_SHORTNAME@ Doom -*- shell-script -*- 2 | 3 | _@PROGRAM_SPREFIX@_doom() 4 | { 5 | local cur prev words cword 6 | _init_completion || return 7 | 8 | # Save the previous switch on the command line in the prevsw variable 9 | local i prevsw="" 10 | for (( i=1; $cword > 1 && i <= $cword; i++ )); do 11 | if [[ ${words[i]} == -* ]]; then 12 | prevsw=${words[i]} 13 | fi 14 | done 15 | 16 | # Allow adding more than one file with the same extension to the same switch 17 | case $prevsw in 18 | -config|-extraconfig) 19 | _filedir cfg 20 | ;; 21 | -file|-iwad|-aa|-af|-as|-merge|-nwtmerge) 22 | _filedir wad 23 | ;; 24 | -playdemo|-timedemo) 25 | _filedir lmp 26 | ;; 27 | -deh) 28 | _filedir '@(bex|deh)' 29 | ;; 30 | esac 31 | 32 | case $prev in 33 | -pack) 34 | COMPREPLY=(doom2 tnt plutonia) 35 | ;; 36 | -gameversion) 37 | COMPREPLY=(1.666 1.7 1.8 1.9 ultimate final final2 hacx chex) 38 | ;; 39 | -setmem) 40 | COMPREPLY=(dos622 dos71 dosbox) 41 | ;; 42 | esac 43 | 44 | if [[ $cur == -* ]]; then 45 | COMPREPLY=( $( compgen -W '@content' -- "$cur" ) ) 46 | fi 47 | } && 48 | 49 | complete -F _@PROGRAM_SPREFIX@_doom @PROGRAM_PREFIX@doom 50 | 51 | # ex: ts=4 sw=4 et filetype=sh 52 | -------------------------------------------------------------------------------- /man/bash-completion/heretic.template.in: -------------------------------------------------------------------------------- 1 | # bash completion for @PACKAGE_SHORTNAME@ Heretic -*- shell-script -*- 2 | 3 | _@PROGRAM_SPREFIX@_heretic() 4 | { 5 | local cur prev words cword 6 | _init_completion || return 7 | 8 | # Save the previous switch on the command line in the prevsw variable 9 | local i prevsw="" 10 | for (( i=1; $cword > 1 && i <= $cword; i++ )); do 11 | if [[ ${words[i]} == -* ]]; then 12 | prevsw=${words[i]} 13 | fi 14 | done 15 | 16 | # Allow adding more than one file with the same extension to the same switch 17 | case $prevsw in 18 | -config|-extraconfig) 19 | _filedir cfg 20 | ;; 21 | -file|-iwad|-aa|-af|-as|-merge|-nwtmerge) 22 | _filedir wad 23 | ;; 24 | -playdemo|-timedemo) 25 | _filedir lmp 26 | ;; 27 | -deh) 28 | _filedir hhe 29 | ;; 30 | esac 31 | 32 | case $prev in 33 | -hhever) 34 | COMPREPLY=(1.0 1.2 1.3) 35 | ;; 36 | -setmem) 37 | COMPREPLY=(dos622 dos71 dosbox) 38 | ;; 39 | esac 40 | 41 | if [[ $cur == -* ]]; then 42 | COMPREPLY=( $( compgen -W '@content' -- "$cur" ) ) 43 | fi 44 | } && 45 | 46 | complete -F _@PROGRAM_SPREFIX@_heretic @PROGRAM_PREFIX@heretic 47 | 48 | # ex: ts=4 sw=4 et filetype=sh 49 | -------------------------------------------------------------------------------- /man/bash-completion/hexen.template.in: -------------------------------------------------------------------------------- 1 | # bash completion for @PACKAGE_SHORTNAME@ Hexen -*- shell-script -*- 2 | 3 | _@PROGRAM_SPREFIX@_hexen() 4 | { 5 | local cur prev words cword 6 | _init_completion || return 7 | 8 | # Save the previous switch on the command line in the prevsw variable 9 | local i prevsw="" 10 | for (( i=1; $cword > 1 && i <= $cword; i++ )); do 11 | if [[ ${words[i]} == -* ]]; then 12 | prevsw=${words[i]} 13 | fi 14 | done 15 | 16 | # Allow adding more than one file with the same extension to the same switch 17 | case $prevsw in 18 | -config|-extraconfig) 19 | _filedir cfg 20 | ;; 21 | -file|-iwad|-aa|-af|-as|-merge|-nwtmerge) 22 | _filedir wad 23 | ;; 24 | -playdemo|-timedemo) 25 | _filedir lmp 26 | ;; 27 | esac 28 | 29 | case $prev in 30 | -setmem) 31 | COMPREPLY=(dos622 dos71 dosbox) 32 | ;; 33 | esac 34 | 35 | if [[ $cur == -* ]]; then 36 | COMPREPLY=( $( compgen -W '@content' -- "$cur" ) ) 37 | fi 38 | } && 39 | 40 | complete -F _@PROGRAM_SPREFIX@_hexen @PROGRAM_PREFIX@hexen 41 | 42 | # ex: ts=4 sw=4 et filetype=sh 43 | -------------------------------------------------------------------------------- /man/bash-completion/strife.template.in: -------------------------------------------------------------------------------- 1 | # bash completion for @PACKAGE_SHORTNAME@ Strife -*- shell-script -*- 2 | 3 | _@PROGRAM_SPREFIX@_strife() 4 | { 5 | local cur prev words cword 6 | _init_completion || return 7 | 8 | # Save the previous switch on the command line in the prevsw variable 9 | local i prevsw="" 10 | for (( i=1; $cword > 1 && i <= $cword; i++ )); do 11 | if [[ ${words[i]} == -* ]]; then 12 | prevsw=${words[i]} 13 | fi 14 | done 15 | 16 | # Allow adding more than one file with the same extension to the same switch 17 | case $prevsw in 18 | -config|-extraconfig) 19 | _filedir cfg 20 | ;; 21 | -file|-iwad|-aa|-af|-as|-merge|-nwtmerge) 22 | _filedir wad 23 | ;; 24 | -playdemo|-timedemo) 25 | _filedir lmp 26 | ;; 27 | -deh) 28 | _filedir seh 29 | ;; 30 | esac 31 | 32 | case $prev in 33 | -gameversion) 34 | COMPREPLY=(1.2 1.31) 35 | ;; 36 | -setmem) 37 | COMPREPLY=(dos622 dos71 dosbox) 38 | ;; 39 | esac 40 | 41 | if [[ $cur == -* ]]; then 42 | COMPREPLY=( $( compgen -W '@content' -- "$cur" ) ) 43 | fi 44 | } && 45 | 46 | complete -F _@PROGRAM_SPREFIX@_strife @PROGRAM_PREFIX@strife 47 | 48 | # ex: ts=4 sw=4 et filetype=sh 49 | -------------------------------------------------------------------------------- /man/environ.man: -------------------------------------------------------------------------------- 1 | .TP 2 | \fBDOOMWADDIR\fR, \fBDOOMWADPATH\fR 3 | See the section, \fBIWAD SEARCH PATHS\fR above. 4 | .TP 5 | \fBPCSOUND_DRIVER\fR 6 | When running in PC speaker sound effect mode, this environment variable 7 | specifies a PC speaker driver to use for sound effect playback. Valid 8 | options are "Linux" for the Linux console mode driver, "BSD" for the 9 | NetBSD/OpenBSD PC speaker driver, and "SDL" for SDL-based emulated PC speaker 10 | playback (using the digital output). 11 | .TP 12 | \fBOPL_DRIVER\fR 13 | When using OPL MIDI playback, this environment variable specifies an 14 | OPL backend driver to use. Valid options are "SDL" for an SDL-based 15 | software emulated OPL chip, "Linux" for the Linux hardware OPL driver, 16 | and "OpenBSD" for the OpenBSD/NetBSD hardware OPL driver. 17 | 18 | Generally speaking, a real hardware OPL chip sounds better than software 19 | emulation; however, modern machines do not often include one. If 20 | present, it may still require extra work to set up and elevated 21 | security privileges to access. 22 | 23 | -------------------------------------------------------------------------------- /man/extra.cfg.template: -------------------------------------------------------------------------------- 1 | .TH @PROGRAM_SPREFIX@\-doom.cfg 5 2 | .SH NAME 3 | @PROGRAM_SPREFIX@\-doom.cfg \- @PACKAGE_NAME@ configuration file 4 | .SH DESCRIPTION 5 | .PP 6 | \fI@PROGRAM_SPREFIX@\-doom.cfg\fR 7 | is a configuration file for \fB@PROGRAM_SPREFIX@\-doom\fR(6). This file acts 8 | as an auxiliary configuration file; the main configuration options 9 | are stored in \fBdefault.cfg\fR, which contains the same configuration 10 | options as Vanilla Doom (for compatibility). \fI@PROGRAM_SPREFIX@\-doom.cfg\fR 11 | contains configuration options that are specific to @PACKAGE_NAME@ 12 | only. 13 | .PP 14 | \fI@PROGRAM_SPREFIX@\-doom.cfg\fR is normally stored in the user's home directory, 15 | as \fI~/.local/share/@PROGRAM_SPREFIX@\-doom/@PROGRAM_SPREFIX@\-doom.cfg\fR. The path can be 16 | overridden using the \fBXDG_DATA_HOME\fR environment variable (see the XDG 17 | Base Directory Specification). 18 | .PP 19 | The \fB@PROGRAM_SPREFIX@\-setup\fR(6) tool provides a simple to use front-end 20 | for editing \fI@PROGRAM_SPREFIX@\-doom.cfg\fR. 21 | .SH FILE FORMAT 22 | .PP 23 | The file format is the same as that used for \fBdefault.cfg\fR(5). 24 | .br 25 | 26 | @content 27 | 28 | .SH SEE ALSO 29 | \fB@PROGRAM_SPREFIX@\-doom\fR(6), 30 | \fBdefault.cfg\fR(5), 31 | \fB@PROGRAM_SPREFIX@\-setup\fR(6) 32 | 33 | -------------------------------------------------------------------------------- /man/setup.template: -------------------------------------------------------------------------------- 1 | .TH @PROGRAM_SPREFIX@\-@GAME@-setup 6 2 | .SH NAME 3 | @PROGRAM_SPREFIX@\-@GAME@-setup \- configuration tool for @PROGRAM_SPREFIX@\-@GAME@ 4 | .SH SYNOPSIS 5 | .B @PROGRAM_SPREFIX@\-@GAME@-setup 6 | [OPTIONS] 7 | .SH DESCRIPTION 8 | .PP 9 | @PACKAGE_SHORTNAME@ @GAME_UPPER@ is a modern @GAME_UPPER@ engine designed to behave 10 | as similar to the original @GAME_UPPER@ game as is possible. 11 | .PP 12 | .B @PROGRAM_SPREFIX@\-@GAME@-setup 13 | is a tool for configuring @PACKAGE_SHORTNAME@ @GAME_UPPER@. It provides a menu\-based 14 | interface for the display, joystick, keyboard, mouse, sound and 15 | compatibility settings. 16 | .PP 17 | .B @PROGRAM_SPREFIX@\-@GAME@-setup 18 | can also be used to start and join network games. 19 | .PP 20 | .SH OPTIONS 21 | .TP 22 | \fB-config \fR 23 | Load configuration from the specified file, instead of @CFGFILE@. 24 | .TP 25 | \fB-extraconfig \fR 26 | Load extra configuration from the specified file, instead of @PROGRAM_SPREFIX@\-@GAME@.cfg. 27 | .SH SEE ALSO 28 | \fB@PROGRAM_SPREFIX@\-@GAME@\fR(6), 29 | \fBdefault.cfg\fR(5), 30 | \fB@PROGRAM_SPREFIX@\-@GAME@.cfg\fR(5) 31 | .SH AUTHOR 32 | Chocolate Doom is written and maintained by Simon Howard. 33 | .PP 34 | This manual was written by Jonathan Dowland. 35 | .SH COPYRIGHT 36 | Copyright \(co id Software Inc. 37 | Copyright \(co 2005-8 Simon Howard. 38 | .br 39 | This is free software. You may redistribute copies of it under the terms of 40 | the GNU General Public License . 41 | There is NO WARRANTY, to the extent permitted by law. 42 | 43 | -------------------------------------------------------------------------------- /man/wikipages: -------------------------------------------------------------------------------- 1 | # This is a list of wiki pages to automatically link to when generating 2 | # wikitext output. 3 | Dehacked 4 | Doom 1.91 5 | Merging 6 | Multiplayer 7 | Three screen mode 8 | -------------------------------------------------------------------------------- /midiproc/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | *.exe 4 | .deps 5 | tags 6 | TAGS 7 | -------------------------------------------------------------------------------- /midiproc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | add_executable("${PROGRAM_PREFIX}midiproc" WIN32 buffer.c buffer.h main.c proto.h) 3 | target_include_directories("${PROGRAM_PREFIX}midiproc" 4 | PRIVATE "../src/" "${CMAKE_CURRENT_BINARY_DIR}/../") 5 | target_link_libraries("${PROGRAM_PREFIX}midiproc" SDL2::SDL2main SDL2::mixer) 6 | endif() 7 | -------------------------------------------------------------------------------- /midiproc/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS=-I$(top_srcdir)/src @SDLMIXER_CFLAGS@ 3 | 4 | EXTRA_DIST=CMakeLists.txt 5 | 6 | if HAVE_WINDRES 7 | 8 | noinst_PROGRAMS = @PROGRAM_PREFIX@midiproc 9 | 10 | @PROGRAM_PREFIX@midiproc_LDADD = @SDLMIXER_LIBS@ 11 | @PROGRAM_PREFIX@midiproc_SOURCES = buffer.c buffer.h main.c proto.h 12 | 13 | endif 14 | -------------------------------------------------------------------------------- /midiproc/proto.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2017 Alex Mayfield 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Headers for all types of midipipe messages. 16 | // 17 | 18 | #ifndef __PROTO__ 19 | #define __PROTO__ 20 | 21 | typedef enum { 22 | MIDIPIPE_PACKET_TYPE_REGISTER_SONG, 23 | MIDIPIPE_PACKET_TYPE_REGISTER_SONG_ACK, 24 | MIDIPIPE_PACKET_TYPE_SET_VOLUME, 25 | MIDIPIPE_PACKET_TYPE_PLAY_SONG, 26 | MIDIPIPE_PACKET_TYPE_STOP_SONG, 27 | MIDIPIPE_PACKET_TYPE_SHUTDOWN 28 | } net_midipipe_packet_type_t; 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /opl/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | libopl.a 5 | *.rc 6 | tags 7 | TAGS 8 | -------------------------------------------------------------------------------- /opl/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS=@SDLMIXER_CFLAGS@ 3 | 4 | EXTRA_DIST=CMakeLists.txt 5 | 6 | SUBDIRS = . examples 7 | 8 | noinst_LIBRARIES=libopl.a 9 | 10 | libopl_a_SOURCES = \ 11 | opl_internal.h \ 12 | opl.c opl.h \ 13 | opl_linux.c \ 14 | opl_obsd.c \ 15 | opl_queue.c opl_queue.h \ 16 | opl_sdl.c \ 17 | opl_timer.c opl_timer.h \ 18 | opl_win32.c \ 19 | ioperm_sys.c ioperm_sys.h \ 20 | opl3.c opl3.h 21 | 22 | -------------------------------------------------------------------------------- /opl/examples/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | droplay 5 | *.exe 6 | tags 7 | TAGS 8 | -------------------------------------------------------------------------------- /opl/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS = -I$(top_srcdir)/opl 3 | 4 | noinst_PROGRAMS=droplay 5 | 6 | droplay_LDADD = ../libopl.a @LDFLAGS@ @SDL_LIBS@ @SDLMIXER_LIBS@ 7 | droplay_SOURCES = droplay.c 8 | 9 | -------------------------------------------------------------------------------- /opl/ioperm_sys.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2002, 2003 Marcel Telka 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Interface to the ioperm.sys driver, based on code from the 17 | // Cygwin ioperm library. 18 | // 19 | 20 | #ifndef IOPERM_SYS_H 21 | #define IOPERM_SYS_H 22 | 23 | int IOperm_EnablePortRange(unsigned int from, unsigned int num, int turn_on); 24 | int IOperm_InstallDriver(void); 25 | int IOperm_UninstallDriver(void); 26 | 27 | #endif /* #ifndef IOPERM_SYS_H */ 28 | 29 | -------------------------------------------------------------------------------- /opl/opl_queue.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // Copyright(C) 2021-2022 Graham Sanderson 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // OPL callback queue. 17 | // 18 | 19 | #ifndef OPL_QUEUE_H 20 | #define OPL_QUEUE_H 21 | 22 | #include "opl.h" 23 | 24 | typedef struct opl_callback_queue_s opl_callback_queue_t; 25 | 26 | opl_callback_queue_t *OPL_Queue_Create(void); 27 | int OPL_Queue_IsEmpty(opl_callback_queue_t *queue); 28 | void OPL_Queue_Clear(opl_callback_queue_t *queue); 29 | void OPL_Queue_Destroy(opl_callback_queue_t *queue); 30 | void OPL_Queue_Push(opl_callback_queue_t *queue, 31 | opl_callback_t callback, void *data, 32 | uint64_t time); 33 | int OPL_Queue_Pop(opl_callback_queue_t *queue, 34 | opl_callback_t *callback, void **data); 35 | uint64_t OPL_Queue_Peek(opl_callback_queue_t *queue); 36 | void OPL_Queue_AdjustCallbacks(opl_callback_queue_t *queue, uint64_t time, 37 | unsigned int old_tempo, unsigned int new_tempo); 38 | 39 | #endif /* #ifndef OPL_QUEUE_H */ 40 | 41 | -------------------------------------------------------------------------------- /opl/opl_timer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // Copyright(C) 2021-2022 Graham Sanderson 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // OPL timer thread. 17 | // 18 | 19 | #ifndef OPL_TIMER_H 20 | #define OPL_TIMER_H 21 | 22 | #include "opl.h" 23 | 24 | int OPL_Timer_StartThread(void); 25 | void OPL_Timer_StopThread(void); 26 | void OPL_Timer_SetCallback(uint64_t us, opl_callback_t callback, void *data); 27 | void OPL_Timer_ClearCallbacks(void); 28 | void OPL_Timer_Lock(void); 29 | void OPL_Timer_Unlock(void); 30 | void OPL_Timer_SetPaused(int paused); 31 | void OPL_Timer_AdjustCallbacks(unsigned int old_tempo, unsigned int new_tempo); 32 | 33 | #endif /* #ifndef OPL_TIMER_H */ 34 | 35 | -------------------------------------------------------------------------------- /pcsound/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | libpcsound.a 5 | *.rc 6 | tags 7 | TAGS 8 | 9 | -------------------------------------------------------------------------------- /pcsound/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (PICO_SDK) 2 | add_library(pcsound INTERFACE) 3 | else() 4 | add_library(pcsound STATIC 5 | pcsound.c pcsound.h 6 | pcsound_bsd.c 7 | pcsound_sdl.c 8 | pcsound_linux.c 9 | pcsound_win32.c 10 | pcsound_internal.h) 11 | target_include_directories(pcsound 12 | INTERFACE "." 13 | PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/../") 14 | target_link_libraries(pcsound SDL2::mixer) 15 | endif() -------------------------------------------------------------------------------- /pcsound/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS=@SDLMIXER_CFLAGS@ 3 | 4 | EXTRA_DIST=CMakeLists.txt 5 | 6 | noinst_LIBRARIES=libpcsound.a 7 | 8 | libpcsound_a_SOURCES = \ 9 | pcsound.c pcsound.h \ 10 | pcsound_bsd.c \ 11 | pcsound_sdl.c \ 12 | pcsound_linux.c \ 13 | pcsound_win32.c \ 14 | pcsound_internal.h 15 | 16 | -------------------------------------------------------------------------------- /pcsound/pcsound.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // PC speaker interface. 16 | // 17 | 18 | #ifndef PCSOUND_H 19 | #define PCSOUND_H 20 | 21 | typedef void (*pcsound_callback_func)(int *duration, int *frequency); 22 | 23 | // Initialise the PC speaker subsystem. The given function is called 24 | // periodically to request more sound data to play. 25 | 26 | int PCSound_Init(pcsound_callback_func callback_func); 27 | 28 | // Shut down the PC speaker subsystem. 29 | 30 | void PCSound_Shutdown(void); 31 | 32 | // Set the preferred output sample rate when emulating a PC speaker. 33 | // This must be called before PCSound_Init. 34 | 35 | void PCSound_SetSampleRate(int rate); 36 | 37 | #endif /* #ifndef PCSOUND_H */ 38 | 39 | -------------------------------------------------------------------------------- /pcsound/pcsound_internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // PC speaker interface. 16 | // 17 | 18 | #ifndef PCSOUND_INTERNAL_H 19 | #define PCSOUND_INTERNAL_H 20 | 21 | #include "pcsound.h" 22 | 23 | #define PCSOUND_8253_FREQUENCY 1193280 24 | 25 | typedef struct pcsound_driver_s pcsound_driver_t; 26 | typedef int (*pcsound_init_func)(pcsound_callback_func callback); 27 | typedef void (*pcsound_shutdown_func)(void); 28 | 29 | struct pcsound_driver_s 30 | { 31 | const char *name; 32 | pcsound_init_func init_func; 33 | pcsound_shutdown_func shutdown_func; 34 | }; 35 | 36 | extern int pcsound_sample_rate; 37 | 38 | #endif /* #ifndef PCSOUND_INTERNAL_H */ 39 | 40 | -------------------------------------------------------------------------------- /pkg/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | config.make 4 | -------------------------------------------------------------------------------- /pkg/config.make.in: -------------------------------------------------------------------------------- 1 | # Shared file included by the makefiles used to build packages. 2 | # This contains various information needed by the makefiles, 3 | # and is autogenerated by configure to include various 4 | # necessary details. 5 | 6 | # Tools needed: 7 | 8 | CC = @CC@ 9 | OBJDUMP = @OBJDUMP@ 10 | STRIP = @STRIP@ 11 | LDFLAGS = @LDFLAGS@ 12 | 13 | # Package name and version number: 14 | 15 | PROGRAM_PREFIX = @PROGRAM_PREFIX@ 16 | PACKAGE = @PACKAGE@ 17 | PACKAGE_NAME = @PACKAGE_NAME@ 18 | PACKAGE_STRING = @PACKAGE_STRING@ 19 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 20 | PACKAGE_VERSION = @PACKAGE_VERSION@ 21 | 22 | # Documentation files to distribute with packages. 23 | 24 | DOC_FILES = README.md \ 25 | README.Music.md \ 26 | COPYING.md \ 27 | NEWS.md 28 | 29 | -------------------------------------------------------------------------------- /pkg/osx/.gitignore: -------------------------------------------------------------------------------- 1 | Info.plist 2 | launcher 3 | *.o 4 | *.d 5 | *.dmg 6 | staging 7 | -------------------------------------------------------------------------------- /pkg/osx/AppController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef LAUNCHER_APPCONTROLLER_H 16 | #define LAUNCHER_APPCONTROLLER_H 17 | 18 | #include 19 | 20 | #include "LauncherManager.h" 21 | 22 | @interface AppController : NSObject 23 | { 24 | LauncherManager *launcherManager; 25 | BOOL filesAdded; 26 | } 27 | 28 | + (void)initialize; 29 | 30 | - (id)init; 31 | - (void)dealloc; 32 | 33 | - (void)awakeFromNib; 34 | 35 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotif; 36 | - (BOOL)applicationShouldTerminate:(id)sender; 37 | - (void)applicationWillTerminate:(NSNotification *)aNotif; 38 | - (BOOL)application:(NSApplication *)application openFile:(NSString *)fileName; 39 | 40 | - (void)showPrefPanel:(id)sender; 41 | 42 | @end 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /pkg/osx/Execute.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef LAUNCHER_EXECUTE_H 16 | #define LAUNCHER_EXECUTE_H 17 | 18 | void SetProgramLocation(const char *path); 19 | void ExecuteProgram(const char *executable, const char *iwad, const char *args); 20 | void OpenTerminalWindow(const char *doomwadpath); 21 | void OpenDocumentation(const char *filename); 22 | 23 | #endif /* #ifndef LAUNCHER_EXECUTE_H */ 24 | 25 | -------------------------------------------------------------------------------- /pkg/osx/IWADController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef LAUNCHER_IWADCONTROLLER_H 16 | #define LAUNCHER_IWADCONTROLLER_H 17 | 18 | #include 19 | #include 20 | 21 | @interface IWADController : NSObject 22 | { 23 | id iwadSelector; 24 | id configWindow; 25 | 26 | id chex; 27 | id doom1; 28 | id doom2; 29 | id plutonia; 30 | id tnt; 31 | id freedm; 32 | 33 | id heretic; 34 | id hexen; 35 | id strife; 36 | } 37 | 38 | - (void) closeConfigWindow: (id)sender; 39 | - (void) openConfigWindow: (id)sender; 40 | - (NSString *) getIWADLocation; 41 | - (NSString *) autoloadPath; 42 | - (void) awakeFromNib; 43 | - (BOOL) setDropdownList; 44 | - (void) setDropdownSelection; 45 | - (void) saveConfig; 46 | - (char *) doomWadPath; 47 | - (void) setEnvironment; 48 | - (const char *) getGameName; 49 | - (BOOL) addIWADPath: (NSString *) path; 50 | - (BOOL) selectGameByName: (const char *) name; 51 | 52 | @end 53 | 54 | #endif /* #ifndef LAUNCHER_IWADCONTROLLER_H */ 55 | 56 | -------------------------------------------------------------------------------- /pkg/osx/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? 2 | -------------------------------------------------------------------------------- /pkg/osx/Resources/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/pkg/osx/Resources/128x128.png -------------------------------------------------------------------------------- /pkg/osx/Resources/app.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/pkg/osx/Resources/app.icns -------------------------------------------------------------------------------- /pkg/osx/Resources/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/pkg/osx/Resources/app.png -------------------------------------------------------------------------------- /pkg/osx/Resources/launcher.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/pkg/osx/Resources/launcher.nib/keyedobjects.nib -------------------------------------------------------------------------------- /pkg/osx/Resources/wadfile.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/pkg/osx/Resources/wadfile.icns -------------------------------------------------------------------------------- /pkg/osx/Resources/wadfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/pkg/osx/Resources/wadfile.png -------------------------------------------------------------------------------- /pkg/osx/disk/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/pkg/osx/disk/background.png -------------------------------------------------------------------------------- /pkg/osx/disk/dir.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/pkg/osx/disk/dir.DS_Store -------------------------------------------------------------------------------- /pkg/osx/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #include 16 | #include "Execute.h" 17 | 18 | int main(int argc, const char *argv[]) 19 | { 20 | SetProgramLocation(argv[0]); 21 | 22 | return NSApplicationMain (argc, argv); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /pkg/win32/.gitignore: -------------------------------------------------------------------------------- 1 | staging-* 2 | *.zip 3 | -------------------------------------------------------------------------------- /pkg/win32/README: -------------------------------------------------------------------------------- 1 | Makefile to build Windows packages. Requires zip and unix2dos 2 | packages to be installed. 3 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | *.rc 5 | chocolate-doom 6 | chocolate-heretic 7 | chocolate-hexen 8 | chocolate-server 9 | chocolate-strife 10 | chocolate-doom-setup 11 | chocolate-heretic-setup 12 | chocolate-hexen-setup 13 | chocolate-strife-setup 14 | chocolate-setup 15 | *.cfg 16 | *.exe 17 | *.desktop 18 | *.txt 19 | !CMakeLists.txt 20 | !license.txt 21 | *.appdata.xml 22 | tags 23 | TAGS 24 | -------------------------------------------------------------------------------- /src/adpcm-xq/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(adpcm-lib INTERFACE) 2 | target_sources(adpcm-lib INTERFACE 3 | ${CMAKE_CURRENT_LIST_DIR}/adpcm-lib.c) 4 | 5 | target_include_directories(adpcm-lib INTERFACE ${CMAKE_CURRENT_LIST_DIR}) 6 | 7 | #if (NOT PICO_ON_DEVICE) 8 | # add_executable(adpcm-xq adpcm-xq.c) 9 | # target_link_libraries(adpcm-xq adpcm-lib) 10 | #endif() 11 | -------------------------------------------------------------------------------- /src/adpcm-xq/adpcm-lib.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // **** ADPCM-XQ **** // 3 | // Xtreme Quality ADPCM Encoder/Decoder // 4 | // Copyright (c) 2015 David Bryant. // 5 | // All Rights Reserved. // 6 | // Distributed under the BSD Software License (see license.txt) // 7 | //////////////////////////////////////////////////////////////////////////// 8 | 9 | #ifndef ADPCMLIB_H_ 10 | #define ADPCMLIB_H_ 11 | 12 | #if defined(_MSC_VER) && _MSC_VER < 1600 13 | typedef unsigned __int64 uint64_t; 14 | typedef unsigned __int32 uint32_t; 15 | typedef unsigned __int16 uint16_t; 16 | typedef unsigned __int8 uint8_t; 17 | typedef __int64 int64_t; 18 | typedef __int32 int32_t; 19 | typedef __int16 int16_t; 20 | typedef __int8 int8_t; 21 | #else 22 | #include 23 | #endif 24 | 25 | void *adpcm_create_context (int num_channels, int lookahead, int noise_shaping, int32_t initial_deltas [2]); 26 | int adpcm_encode_block (void *p, uint8_t *outbuf, size_t *outbufsize, const int16_t *inbuf, int inbufcount); 27 | int adpcm_decode_block (int16_t *outbuf, const uint8_t *inbuf, size_t inbufsize, int channels); 28 | void adpcm_free_context (void *p); 29 | 30 | #define NOISE_SHAPING_OFF 0 // flat noise (no shaping) 31 | #define NOISE_SHAPING_STATIC 1 // first-order highpass shaping 32 | #define NOISE_SHAPING_DYNAMIC 2 // dynamically tilted noise based on signal 33 | 34 | #endif /* ADPCMLIB_H_ */ 35 | 36 | -------------------------------------------------------------------------------- /src/adpcm-xq/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) David Bryant 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of Conifer Software nor the names of its contributors 13 | may be used to endorse or promote products derived from this software 14 | without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | -------------------------------------------------------------------------------- /src/aes_prng.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Pseudo-random number generator for secure demos. 16 | // 17 | 18 | #ifndef __AES_PRNG_H__ 19 | #define __AES_PRNG_H__ 20 | 21 | #include "doomtype.h" 22 | 23 | // Nonce value used as random seed for secure demos. 24 | 25 | typedef byte prng_seed_t[16]; 26 | 27 | void PRNG_Start(prng_seed_t seed); 28 | void PRNG_Stop(void); 29 | unsigned int PRNG_Random(void); 30 | 31 | #endif /* #ifndef __AES_PRNG_H__ */ 32 | 33 | -------------------------------------------------------------------------------- /src/d_dedicated.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // Code specific to the standalone dedicated server. 15 | // 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | #include "config.h" 22 | 23 | #include "m_argv.h" 24 | #include "net_defs.h" 25 | 26 | #include "net_dedicated.h" 27 | #include "net_server.h" 28 | #include "z_zone.h" 29 | 30 | void NET_CL_Run(void) 31 | { 32 | // No client present :-) 33 | // 34 | // This is here because the server code sometimes runs this 35 | // to let the client do some processing if it needs to. 36 | // In a standalone dedicated server, we don't have a client. 37 | } 38 | 39 | void D_DoomMain(void) 40 | { 41 | printf(PACKAGE_NAME " standalone dedicated server\n"); 42 | 43 | Z_Init(); 44 | 45 | NET_DedicatedServer(); 46 | } 47 | 48 | -------------------------------------------------------------------------------- /src/deh_io.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Dehacked I/O code (does all reads from dehacked files) 16 | // 17 | 18 | #ifndef DEH_IO_H 19 | #define DEH_IO_H 20 | 21 | #include "deh_defs.h" 22 | 23 | deh_context_t *DEH_OpenFile(const char *filename); 24 | deh_context_t *DEH_OpenLump(int lumpnum); 25 | void DEH_CloseFile(deh_context_t *context); 26 | int DEH_GetChar(deh_context_t *context); 27 | char *DEH_ReadLine(deh_context_t *context, boolean extended); 28 | void DEH_Error(deh_context_t *context, const char *msg, ...) PRINTF_ATTR(2, 3); 29 | void DEH_Warning(deh_context_t *context, const char *msg, ...) PRINTF_ATTR(2, 3); 30 | boolean DEH_HadError(deh_context_t *context); 31 | 32 | #endif /* #ifndef DEH_IO_H */ 33 | 34 | -------------------------------------------------------------------------------- /src/deh_str.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // Copyright(C) 2021-2022 Graham Sanderson 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // 16 | // Dehacked string replacements 17 | // 18 | 19 | #ifndef DEH_STR_H 20 | #define DEH_STR_H 21 | 22 | #include 23 | 24 | #include "doomtype.h" 25 | 26 | // Used to do dehacked text substitutions throughout the program 27 | 28 | #if !NO_USE_DEH 29 | const char *DEH_String(const char *s) PRINTF_ARG_ATTR(1); 30 | void DEH_printf(const char *fmt, ...) PRINTF_ATTR(1, 2); 31 | void DEH_fprintf(FILE *fstream, const char *fmt, ...) PRINTF_ATTR(2, 3); 32 | void DEH_snprintf(char *buffer, size_t len, const char *fmt, ...) PRINTF_ATTR(3, 4); 33 | void DEH_AddStringReplacement(const char *from_text, const char *to_text); 34 | #else 35 | // Static macro versions of the functions above 36 | 37 | #define DEH_String(x) (x) 38 | #define DEH_printf printf 39 | #define DEH_fprintf(x,...) stderr_print(__VA_ARGS__) 40 | #define DEH_snprintf snprintf 41 | 42 | #endif 43 | 44 | #endif /* #ifndef DEH_STR_H */ 45 | 46 | -------------------------------------------------------------------------------- /src/doom-screensaver.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Doom 3 | Comment=@PACKAGE_SHORTDESC@ 4 | TryExec=@PROGRAM_PREFIX@doom 5 | Exec=@PROGRAM_PREFIX@doom 6 | StartupNotify=false 7 | Terminal=false 8 | Type=Application 9 | OnlyShowIn=GNOME;MATE; 10 | Categories=Screensaver; 11 | -------------------------------------------------------------------------------- /src/doom.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Doom 3 | Exec=@PROGRAM_PREFIX@doom 4 | Icon=@PROGRAM_PREFIX@doom 5 | Type=Application 6 | Comment=@PACKAGE_SHORTDESC@ 7 | Categories=Game;ActionGame; 8 | Keywords=first;person;shooter;vanilla; 9 | -------------------------------------------------------------------------------- /src/doom/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | tags 5 | TAGS 6 | -------------------------------------------------------------------------------- /src/doom/am_map.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // AutoMap module. 17 | // 18 | 19 | #ifndef __AMMAP_H__ 20 | #define __AMMAP_H__ 21 | 22 | #include "d_event.h" 23 | #include "m_cheat.h" 24 | 25 | // Used by ST StatusBar stuff. 26 | #define AM_MSGHEADER (('a'<<24)+('m'<<16)) 27 | #define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8)) 28 | #define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8)) 29 | 30 | 31 | // Called by main loop. 32 | boolean AM_Responder (event_t* ev); 33 | 34 | // Called by main loop. 35 | void AM_Ticker (void); 36 | 37 | // Called by main loop, 38 | // called instead of view drawer if automap active. 39 | void AM_Drawer (void); 40 | 41 | // Called to force the automap to quit 42 | // if the level is completed while it is up. 43 | void AM_Stop (void); 44 | 45 | 46 | extern cheatseq_t cheat_amap; 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/doom/d_items.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Items: key cards, artifacts, weapon, ammunition. 18 | // 19 | 20 | 21 | #ifndef __D_ITEMS__ 22 | #define __D_ITEMS__ 23 | 24 | #include "doomdef.h" 25 | 26 | 27 | 28 | // Weapon info: sprite frames, ammunition use. 29 | typedef struct 30 | { 31 | ammotype_t ammo; 32 | isb_int16_t upstate; 33 | isb_int16_t downstate; 34 | isb_int16_t readystate; 35 | isb_int16_t atkstate; 36 | isb_int16_t flashstate; 37 | 38 | } weaponinfo_t; 39 | 40 | extern should_be_const weaponinfo_t weaponinfo[NUMWEAPONS]; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/doom/d_main.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // System specific interface stuff. 18 | // 19 | 20 | 21 | #ifndef __D_MAIN__ 22 | #define __D_MAIN__ 23 | 24 | #include "doomdef.h" 25 | 26 | 27 | 28 | 29 | // Read events from all input devices 30 | 31 | void D_ProcessEvents (void); 32 | 33 | 34 | // 35 | // BASE LEVEL 36 | // 37 | void D_PageTicker (void); 38 | void D_PageDrawer (void); 39 | void D_AdvanceDemo (void); 40 | void D_DoAdvanceDemo (void); 41 | void D_StartTitle (void); 42 | 43 | // 44 | // GLOBAL VARIABLES 45 | // 46 | 47 | extern gameaction_t gameaction; 48 | extern const char* pagename; 49 | extern boolean advancedemo; 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /src/doom/d_textur.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Typedefs related to to textures etc., 17 | // isolated here to make it easier separating modules. 18 | // 19 | 20 | 21 | #ifndef __D_TEXTUR__ 22 | #define __D_TEXTUR__ 23 | 24 | #include "doomtype.h" 25 | 26 | 27 | 28 | 29 | // 30 | // Flats? 31 | // 32 | // a pic is an unmasked block of pixels 33 | typedef struct 34 | { 35 | byte width; 36 | byte height; 37 | byte data; 38 | } pic_t; 39 | 40 | 41 | 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/doom/doomdef.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // DoomDef - basic defines for DOOM, e.g. Version, game mode 17 | // and skill level, and display parameters. 18 | // 19 | 20 | 21 | 22 | #include "doomdef.h" 23 | 24 | // Location for any defines turned variables. 25 | 26 | // None. 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/doom/doomstat.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Put all global tate variables here. 18 | // 19 | 20 | #include 21 | 22 | #include "doomstat.h" 23 | 24 | 25 | // Game Mode - identify IWAD as shareware, retail etc. 26 | #if !DEMO1_ONLY 27 | GameMode_t gamemode = indetermined; 28 | #endif 29 | GameMission_t gamemission = doom; 30 | GameVersion_t gameversion = exe_final2; 31 | GameVariant_t gamevariant = vanilla; 32 | const char *gamedescription; 33 | 34 | #if !DOOM_TINY 35 | // Set if homebrew PWAD stuff has been added. 36 | boolean modifiedgame; 37 | #endif 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/doom/dstrings.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // 17 | // DESCRIPTION: 18 | // DOOM strings, by language. 19 | // 20 | 21 | 22 | #ifndef __DSTRINGS__ 23 | #define __DSTRINGS__ 24 | 25 | 26 | // All important printed strings. 27 | 28 | #include "d_englsh.h" 29 | 30 | // Misc. other strings. 31 | #define SAVEGAMENAME "doomsav" 32 | 33 | 34 | // QuitDOOM messages 35 | // 8 per each game type 36 | #define NUM_QUITMESSAGES 8 37 | 38 | #include "doomtype.h" 39 | extern const constcharstar doom1_endmsg[NUM_QUITMESSAGES]; 40 | extern const constcharstar doom2_endmsg[NUM_QUITMESSAGES]; 41 | 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/doom/m_random.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // 17 | // 18 | 19 | 20 | #ifndef __M_RANDOM__ 21 | #define __M_RANDOM__ 22 | 23 | 24 | #include "doomtype.h" 25 | 26 | 27 | // Returns a number from 0 to 255, 28 | // from a lookup table. 29 | int M_Random (void); 30 | 31 | // As M_Random, but used only by the play simulation. 32 | int P_Random (void); 33 | 34 | // Fix randoms for demos. 35 | void M_ClearRandom (void); 36 | 37 | // Defined version of P_Random() - P_Random() 38 | int P_SubRandom (void); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/doom/p_inter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // 17 | // 18 | 19 | 20 | #ifndef __P_INTER__ 21 | #define __P_INTER__ 22 | 23 | 24 | 25 | 26 | boolean P_GivePower(player_t*, int); 27 | 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/doom/p_setup.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Setup a game, startup stuff. 18 | // 19 | 20 | 21 | #ifndef __P_SETUP__ 22 | #define __P_SETUP__ 23 | 24 | #include "w_wad.h" 25 | 26 | extern should_be_const lumpinfo_t *maplumpinfo; 27 | 28 | // NOT called by W_Ticker. Fixme. 29 | void 30 | P_SetupLevel 31 | ( int episode, 32 | int map, 33 | int playermask, 34 | skill_t skill); 35 | 36 | // Called by startup code. 37 | void P_Init (void); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/doom/p_tick.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // ? 17 | // 18 | 19 | 20 | #ifndef __P_TICK__ 21 | #define __P_TICK__ 22 | 23 | 24 | 25 | 26 | // Called by C_Ticker, 27 | // can call G_PlayerExited. 28 | // Carries out all thinking of monsters and players. 29 | void P_Ticker (void); 30 | 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/doom/r_local.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh (R_*) module, global header. 17 | // All the rendering/drawing stuff is here. 18 | // 19 | 20 | #ifndef __R_LOCAL__ 21 | #define __R_LOCAL__ 22 | 23 | // Binary Angles, sine/cosine/atan lookups. 24 | #include "tables.h" 25 | 26 | // Screen size related parameters. 27 | #include "doomdef.h" 28 | 29 | // Include the refresh/render data structs. 30 | #include "r_data.h" 31 | 32 | 33 | 34 | // 35 | // Separate header file for each module. 36 | // 37 | #include "r_main.h" 38 | #include "r_bsp.h" 39 | #include "r_segs.h" 40 | #include "r_plane.h" 41 | #include "r_data.h" 42 | #include "r_things.h" 43 | #include "r_draw.h" 44 | 45 | #endif // __R_LOCAL__ 46 | -------------------------------------------------------------------------------- /src/doom/r_segs.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Refresh module, drawing LineSegs from BSP. 18 | // 19 | 20 | 21 | #ifndef __R_SEGS__ 22 | #define __R_SEGS__ 23 | 24 | 25 | 26 | #if !NO_DRAWSEGS 27 | void 28 | R_RenderMaskedSegRange 29 | ( drawseg_t* ds, 30 | int x1, 31 | int x2 ); 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/doom/r_sky.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Sky rendering. The DOOM sky is a texture map like any 18 | // wall, wrapping around. A 1024 columns equal 360 degrees. 19 | // The default sky map is 256 columns and repeats 4 times 20 | // on a 320 screen? 21 | // 22 | // 23 | 24 | 25 | 26 | // Needed for FRACUNIT. 27 | #include "m_fixed.h" 28 | 29 | // Needed for Flat retrieval. 30 | #include "r_data.h" 31 | 32 | 33 | #include "r_sky.h" 34 | 35 | // 36 | // sky mapping 37 | // 38 | flatnum_t skyflatnum; 39 | texnum_t skytexture; 40 | #if DOOM_TINY 41 | lumpindex_t skytexture_patch; 42 | #endif 43 | int skytexturemid; 44 | 45 | 46 | 47 | // 48 | // R_InitSkyMap 49 | // Called whenever the view size changes. 50 | // 51 | void R_InitSkyMap (void) 52 | { 53 | // skyflatnum = R_FlatNumForName ( SKYFLATNAME ); 54 | skytexturemid = SCREENHEIGHT/2*FRACUNIT; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/doom/r_sky.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Sky rendering. 18 | // 19 | 20 | 21 | #ifndef __R_SKY__ 22 | #define __R_SKY__ 23 | 24 | 25 | 26 | // SKY, store the number for name. 27 | #define SKYFLATNAME "F_SKY1" 28 | 29 | // The sky map is 256*128*4 maps. 30 | #define ANGLETOSKYSHIFT 22 31 | 32 | extern texnum_t skytexture; 33 | #if USE_WHD 34 | extern framedrawable_t *skytexture_fd; 35 | #endif 36 | #if DOOM_TINY 37 | extern lumpindex_t skytexture_patch; 38 | #endif 39 | extern int skytexturemid; 40 | 41 | // Called whenever the view size changes. 42 | void R_InitSkyMap (void); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/doom/statdump.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright(C) 2005-2014 Simon Howard 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | */ 16 | 17 | #ifndef DOOM_STATDUMP_H 18 | #define DOOM_STATDUMP_H 19 | 20 | void StatCopy(wbstartstruct_t *stats); 21 | void StatDump(void); 22 | 23 | #endif /* #ifndef DOOM_STATDUMP_H */ 24 | -------------------------------------------------------------------------------- /src/doom/wi_stuff.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Intermission. 18 | // 19 | 20 | #ifndef __WI_STUFF__ 21 | #define __WI_STUFF__ 22 | 23 | //#include "v_video.h" 24 | 25 | #include "doomdef.h" 26 | 27 | // States for the intermission 28 | 29 | typedef enum 30 | { 31 | NoState = -1, 32 | StatCount, 33 | ShowNextLoc, 34 | } stateenum_t; 35 | 36 | // Called by main loop, animate the intermission. 37 | void WI_Ticker (void); 38 | 39 | // Called by main loop, 40 | // draws the intermission directly into the screen buffer. 41 | void WI_Drawer (void); 42 | 43 | // Setup for an intermission screen. 44 | void WI_Start(wbstartstruct_t* wbstartstruct); 45 | 46 | // Shut down the intermission screen 47 | void WI_End(void); 48 | 49 | #if DOOM_TINY 50 | extern lumpindex_t wi_background_patch_num; 51 | #endif 52 | #endif 53 | -------------------------------------------------------------------------------- /src/gusconf.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // Copyright(C) 2021-2022 Graham Sanderson 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // GUS emulation code. 17 | // 18 | 19 | #ifndef __GUSCONF_H__ 20 | #define __GUSCONF_H__ 21 | 22 | #include "doomtype.h" 23 | 24 | extern constcharstar gus_patch_path; 25 | extern int gus_ram_kb; 26 | 27 | boolean GUS_WriteConfig(char *path); 28 | 29 | #endif /* #ifndef __GUSCONF_H__ */ 30 | 31 | -------------------------------------------------------------------------------- /src/hagl_hal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(hagl_hal INTERFACE) 2 | 3 | target_sources(hagl_hal INTERFACE 4 | ${CMAKE_CURRENT_LIST_DIR}/mipi_display.c 5 | ${CMAKE_CURRENT_LIST_DIR}/hagl_hal_single.c 6 | ${CMAKE_CURRENT_LIST_DIR}/hagl_hal_double.c 7 | ${CMAKE_CURRENT_LIST_DIR}/hagl_hal_triple.c 8 | ${CMAKE_CURRENT_LIST_DIR}/times.c 9 | ) 10 | 11 | target_include_directories(hagl_hal INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) 12 | 13 | target_link_libraries(hagl_hal INTERFACE pico_stdlib hardware_spi hardware_gpio hardware_dma) 14 | -------------------------------------------------------------------------------- /src/hagl_hal/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Mika Tuupola 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/hagl_hal/cmake/generic-ili9163-128x128.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generic 128x128 ILI9163 3 | # 4 | target_compile_definitions(firmware PRIVATE 5 | MIPI_DISPLAY_PIN_DC=8 6 | MIPI_DISPLAY_PIN_CS=9 7 | MIPI_DISPLAY_PIN_CLK=10 8 | MIPI_DISPLAY_PIN_MOSI=11 9 | MIPI_DISPLAY_PIN_RST=12 10 | MIPI_DISPLAY_PIN_BL=13 11 | MIPI_DISPLAY_PIN_MISO=-1 12 | 13 | MIPI_DISPLAY_SPI_PORT=spi1 14 | MIPI_DISPLAY_SPI_CLOCK_SPEED_HZ=62500000 15 | MIPI_DISPLAY_PIXEL_FORMAT=MIPI_DCS_PIXEL_FORMAT_16BIT 16 | 17 | MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR|MIPI_DCS_ADDRESS_MODE_MIRROR_Y|MIPI_DCS_ADDRESS_MODE_MIRROR_X 18 | MIPI_DISPLAY_WIDTH=128 19 | MIPI_DISPLAY_HEIGHT=128 20 | MIPI_DISPLAY_OFFSET_X=0 21 | MIPI_DISPLAY_OFFSET_Y=32 22 | 23 | # MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR|MIPI_DCS_ADDRESS_MODE_SWAP_XY|MIPI_DCS_ADDRESS_MODE_MIRROR_Y 24 | # MIPI_DISPLAY_WIDTH=128 25 | # MIPI_DISPLAY_HEIGHT=128 26 | # MIPI_DISPLAY_OFFSET_X=32 27 | # MIPI_DISPLAY_OFFSET_Y=0 28 | 29 | MIPI_DISPLAY_INVERT=0 30 | ) -------------------------------------------------------------------------------- /src/hagl_hal/cmake/generic-ili9341-320x240.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generic 320x240 ILI9341 3 | # 4 | target_compile_definitions(firmware PRIVATE 5 | MIPI_DISPLAY_PIN_DC=8 6 | MIPI_DISPLAY_PIN_CS=9 7 | MIPI_DISPLAY_PIN_CLK=10 8 | MIPI_DISPLAY_PIN_MOSI=11 9 | MIPI_DISPLAY_PIN_RST=12 10 | MIPI_DISPLAY_PIN_BL=13 11 | MIPI_DISPLAY_PIN_MISO=-1 12 | 13 | MIPI_DISPLAY_SPI_PORT=spi1 14 | MIPI_DISPLAY_SPI_CLOCK_SPEED_HZ=62500000 15 | MIPI_DISPLAY_PIXEL_FORMAT=MIPI_DCS_PIXEL_FORMAT_16BIT 16 | 17 | MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR|MIPI_DCS_ADDRESS_MODE_SWAP_XY 18 | MIPI_DISPLAY_WIDTH=320 19 | MIPI_DISPLAY_HEIGHT=240 20 | MIPI_DISPLAY_OFFSET_X=0 21 | MIPI_DISPLAY_OFFSET_Y=0 22 | 23 | # MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR|MIPI_DCS_ADDRESS_MODE_MIRROR_X 24 | # MIPI_DISPLAY_WIDTH=240 25 | # MIPI_DISPLAY_HEIGHT=320 26 | # MIPI_DISPLAY_OFFSET_X=0 27 | # MIPI_DISPLAY_OFFSET_Y=0 28 | 29 | MIPI_DISPLAY_INVERT=0 30 | ) -------------------------------------------------------------------------------- /src/hagl_hal/cmake/generic-st7735-128x128.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generic 128x128 ST7735 3 | # 4 | target_compile_definitions(firmware PRIVATE 5 | MIPI_DISPLAY_PIN_DC=20 6 | MIPI_DISPLAY_PIN_CS=17 7 | MIPI_DISPLAY_PIN_CLK=18 8 | MIPI_DISPLAY_PIN_MOSI=19 9 | MIPI_DISPLAY_PIN_RST=21 10 | MIPI_DISPLAY_PIN_BL=-1 11 | MIPI_DISPLAY_PIN_MISO=-1 12 | 13 | MIPI_DISPLAY_SPI_PORT=spi0 14 | MIPI_DISPLAY_SPI_CLOCK_SPEED_HZ=62500000 15 | MIPI_DISPLAY_PIXEL_FORMAT=MIPI_DCS_PIXEL_FORMAT_16BIT 16 | 17 | MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR|MIPI_DCS_ADDRESS_MODE_MIRROR_Y|MIPI_DCS_ADDRESS_MODE_MIRROR_X 18 | MIPI_DISPLAY_WIDTH=128 19 | MIPI_DISPLAY_HEIGHT=128 20 | MIPI_DISPLAY_OFFSET_X=2 21 | MIPI_DISPLAY_OFFSET_Y=1 22 | 23 | # MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR|MIPI_DCS_ADDRESS_MODE_SWAP_XY|MIPI_DCS_ADDRESS_MODE_MIRROR_Y 24 | # MIPI_DISPLAY_WIDTH=128 25 | # MIPI_DISPLAY_HEIGHT=128 26 | # MIPI_DISPLAY_OFFSET_X=2 27 | # MIPI_DISPLAY_OFFSET_Y=2 28 | 29 | MIPI_DISPLAY_INVERT=1 30 | ) -------------------------------------------------------------------------------- /src/hagl_hal/cmake/pimoroni-pico-display-pack.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Pimoroni Pico Display Pack (135x240 ST7789) 3 | # https://shop.pimoroni.com/products/pico-display-pack 4 | # https://botland.store/search?s=769894017081 5 | # 6 | target_compile_definitions(firmware PRIVATE 7 | MIPI_DISPLAY_PIN_CS=17 8 | MIPI_DISPLAY_PIN_DC=16 9 | MIPI_DISPLAY_PIN_RST=-1 10 | MIPI_DISPLAY_PIN_BL=20 11 | MIPI_DISPLAY_PIN_CLK=18 12 | MIPI_DISPLAY_PIN_MOSI=19 13 | MIPI_DISPLAY_PIN_MISO=-1 14 | 15 | MIPI_DISPLAY_SPI_PORT=spi0 16 | MIPI_DISPLAY_SPI_CLOCK_SPEED_HZ=62500000 17 | 18 | MIPI_DISPLAY_PIXEL_FORMAT=MIPI_DCS_PIXEL_FORMAT_16BIT 19 | MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_RGB 20 | MIPI_DISPLAY_WIDTH=135 21 | MIPI_DISPLAY_HEIGHT=240 22 | MIPI_DISPLAY_OFFSET_X=52 23 | MIPI_DISPLAY_OFFSET_Y=40 24 | # MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_RGB|MIPI_DCS_ADDRESS_MODE_SWAP_XY|MIPI_DCS_ADDRESS_MODE_MIRROR_Y 25 | # MIPI_DISPLAY_WIDTH=240 26 | # MIPI_DISPLAY_HEIGHT=135 27 | # MIPI_DISPLAY_OFFSET_X=40 28 | # MIPI_DISPLAY_OFFSET_Y=52 29 | MIPI_DISPLAY_INVERT=1 30 | ) -------------------------------------------------------------------------------- /src/hagl_hal/cmake/pimoroni-picosystem.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Pimoroni PicoSystem (240x240 ST7789) 3 | # https://shop.pimoroni.com/products/picosystem 4 | # 5 | target_compile_definitions(firmware PRIVATE 6 | MIPI_DISPLAY_PIN_CS=5 7 | MIPI_DISPLAY_PIN_DC=9 8 | MIPI_DISPLAY_PIN_RST=4 9 | MIPI_DISPLAY_PIN_BL=12 10 | MIPI_DISPLAY_PIN_CLK=6 11 | MIPI_DISPLAY_PIN_MOSI=7 12 | MIPI_DISPLAY_PIN_MISO=-1 13 | 14 | MIPI_DISPLAY_SPI_PORT=spi0 15 | MIPI_DISPLAY_SPI_CLOCK_SPEED_HZ=62500000 16 | 17 | MIPI_DISPLAY_PIXEL_FORMAT=MIPI_DCS_PIXEL_FORMAT_16BIT 18 | MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_RGB 19 | MIPI_DISPLAY_WIDTH=240 20 | MIPI_DISPLAY_HEIGHT=240 21 | MIPI_DISPLAY_OFFSET_X=0 22 | MIPI_DISPLAY_OFFSET_Y=0 23 | MIPI_DISPLAY_INVERT=1 24 | ) 25 | -------------------------------------------------------------------------------- /src/hagl_hal/cmake/waveshare-pico-lcd-096.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Waveshare Pico-LCD-0.96 (80x160 ST7735S) 3 | # https://www.waveshare.com/wiki/Pico-LCD-0.96 4 | # https://botland.store/search?s=5904422371869 5 | # 6 | target_compile_definitions(firmware PRIVATE 7 | MIPI_DISPLAY_PIN_CS=9 8 | MIPI_DISPLAY_PIN_DC=8 9 | MIPI_DISPLAY_PIN_RST=12 10 | MIPI_DISPLAY_PIN_BL=13 11 | MIPI_DISPLAY_PIN_CLK=10 12 | MIPI_DISPLAY_PIN_MOSI=11 13 | MIPI_DISPLAY_PIN_MISO=-1 14 | 15 | MIPI_DISPLAY_SPI_PORT=spi1 16 | MIPI_DISPLAY_SPI_CLOCK_SPEED_HZ=62500000 17 | 18 | MIPI_DISPLAY_PIXEL_FORMAT=MIPI_DCS_PIXEL_FORMAT_16BIT 19 | MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR|MIPI_DCS_ADDRESS_MODE_MIRROR_Y|MIPI_DCS_ADDRESS_MODE_MIRROR_X 20 | MIPI_DISPLAY_WIDTH=80 21 | MIPI_DISPLAY_HEIGHT=160 22 | MIPI_DISPLAY_OFFSET_X=26 23 | MIPI_DISPLAY_OFFSET_Y=1 24 | # MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR|MIPI_DCS_ADDRESS_MODE_SWAP_XY|MIPI_DCS_ADDRESS_MODE_MIRROR_Y 25 | # MIPI_DISPLAY_WIDTH=160 26 | # MIPI_DISPLAY_HEIGHT=80 27 | # MIPI_DISPLAY_OFFSET_X=1 28 | # MIPI_DISPLAY_OFFSET_Y=26 29 | MIPI_DISPLAY_INVERT=1 30 | ) -------------------------------------------------------------------------------- /src/hagl_hal/cmake/waveshare-pico-lcd-130.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Waveshare Pico-LCD-1.3 (240x240 ST7789VW) 3 | # https://www.waveshare.com/wiki/Pico-LCD-1.3 4 | # https://botland.store/search?s=5904422371883 5 | # 6 | target_compile_definitions(firmware PRIVATE 7 | MIPI_DISPLAY_PIN_CS=9 8 | MIPI_DISPLAY_PIN_DC=8 9 | MIPI_DISPLAY_PIN_RST=12 10 | MIPI_DISPLAY_PIN_BL=13 11 | MIPI_DISPLAY_PIN_CLK=10 12 | MIPI_DISPLAY_PIN_MOSI=11 13 | MIPI_DISPLAY_PIN_MISO=-1 14 | 15 | MIPI_DISPLAY_SPI_PORT=spi1 16 | MIPI_DISPLAY_SPI_CLOCK_SPEED_HZ=62500000 17 | 18 | MIPI_DISPLAY_PIXEL_FORMAT=MIPI_DCS_PIXEL_FORMAT_16BIT 19 | MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_RGB 20 | # MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_RGB|MIPI_DCS_ADDRESS_MODE_SWAP_XY|MIPI_DCS_ADDRESS_MODE_MIRROR_X 21 | MIPI_DISPLAY_WIDTH=240 22 | MIPI_DISPLAY_HEIGHT=240 23 | MIPI_DISPLAY_OFFSET_X=0 24 | MIPI_DISPLAY_OFFSET_Y=0 25 | MIPI_DISPLAY_INVERT=1 26 | ) -------------------------------------------------------------------------------- /src/hagl_hal/cmake/waveshare-pico-lcd-144.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Waveshare Pico-LCD-1.44 (128x128 ST7735S) 3 | # https://www.waveshare.com/wiki/Pico-LCD-1.44 4 | # https://botland.store/search?s=5904422347284 5 | # 6 | target_compile_definitions(firmware PRIVATE 7 | MIPI_DISPLAY_PIN_CS=9 8 | MIPI_DISPLAY_PIN_DC=8 9 | MIPI_DISPLAY_PIN_RST=12 10 | MIPI_DISPLAY_PIN_BL=13 11 | MIPI_DISPLAY_PIN_CLK=10 12 | MIPI_DISPLAY_PIN_MOSI=11 13 | MIPI_DISPLAY_PIN_MISO=-1 14 | 15 | MIPI_DISPLAY_SPI_PORT=spi1 16 | MIPI_DISPLAY_SPI_CLOCK_SPEED_HZ=62500000 17 | 18 | MIPI_DISPLAY_PIXEL_FORMAT=MIPI_DCS_PIXEL_FORMAT_16BIT 19 | MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR 20 | MIPI_DISPLAY_WIDTH=128 21 | MIPI_DISPLAY_HEIGHT=128 22 | MIPI_DISPLAY_OFFSET_X=2 23 | MIPI_DISPLAY_OFFSET_Y=1 24 | # MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR|MIPI_DCS_ADDRESS_MODE_SWAP_XY|MIPI_DCS_ADDRESS_MODE_MIRROR_X 25 | # MIPI_DISPLAY_WIDTH=128 26 | # MIPI_DISPLAY_HEIGHT=128 27 | # MIPI_DISPLAY_OFFSET_X=1 28 | # MIPI_DISPLAY_OFFSET_Y=2 29 | MIPI_DISPLAY_INVERT=0 30 | ) -------------------------------------------------------------------------------- /src/hagl_hal/cmake/waveshare-rp2040-lcd-096.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Waveshare RP2040-LCD-0.96 (80x160 ST7735S) 3 | # https://www.waveshare.com/wiki/RP2040-LCD-0.96 4 | # https://botland.store/search?s=5904422381578 5 | # 6 | target_compile_definitions(firmware PRIVATE 7 | MIPI_DISPLAY_PIN_CS=9 8 | MIPI_DISPLAY_PIN_DC=8 9 | MIPI_DISPLAY_PIN_RST=12 10 | MIPI_DISPLAY_PIN_BL=13 11 | MIPI_DISPLAY_PIN_CLK=10 12 | MIPI_DISPLAY_PIN_MOSI=11 13 | MIPI_DISPLAY_PIN_MISO=-1 14 | 15 | MIPI_DISPLAY_SPI_PORT=spi1 16 | MIPI_DISPLAY_SPI_CLOCK_SPEED_HZ=62500000 17 | 18 | MIPI_DISPLAY_PIXEL_FORMAT=MIPI_DCS_PIXEL_FORMAT_16BIT 19 | MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR 20 | MIPI_DISPLAY_WIDTH=80 21 | MIPI_DISPLAY_HEIGHT=160 22 | MIPI_DISPLAY_OFFSET_X=26 23 | MIPI_DISPLAY_OFFSET_Y=1 24 | # MIPI_DISPLAY_ADDRESS_MODE=MIPI_DCS_ADDRESS_MODE_BGR|MIPI_DCS_ADDRESS_MODE_SWAP_XY|MIPI_DCS_ADDRESS_MODE_MIRROR_Y 25 | # MIPI_DISPLAY_WIDTH=160 26 | # MIPI_DISPLAY_HEIGHT=80 27 | # MIPI_DISPLAY_OFFSET_X=1 28 | # MIPI_DISPLAY_OFFSET_Y=26 29 | MIPI_DISPLAY_INVERT=1 30 | ) 31 | -------------------------------------------------------------------------------- /src/heretic.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Heretic 3 | Exec=@PROGRAM_PREFIX@heretic 4 | Icon=@PROGRAM_PREFIX@doom 5 | Type=Application 6 | Comment=@PACKAGE_SHORTDESC@ 7 | Categories=Game;ActionGame; 8 | Keywords=first;person;shooter;doom;vanilla; 9 | -------------------------------------------------------------------------------- /src/heretic/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | tags 5 | TAGS 6 | 7 | -------------------------------------------------------------------------------- /src/heretic/ct_chat.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // 17 | // Chat mode stuff 18 | // 19 | 20 | #ifndef HERETIC_CT_CHAT_H 21 | #define HERETIC_CT_CHAT_H 22 | 23 | #define CT_PLR_GREEN 1 24 | #define CT_PLR_YELLOW 2 25 | #define CT_PLR_RED 3 26 | #define CT_PLR_BLUE 4 27 | #define CT_PLR_ALL 5 28 | 29 | #define CT_KEY_GREEN 'g' 30 | #define CT_KEY_YELLOW 'y' 31 | #define CT_KEY_RED 'r' 32 | #define CT_KEY_BLUE 'b' 33 | #define CT_KEY_ALL 't' 34 | 35 | extern char *chat_macros[10]; 36 | 37 | #endif /* #ifndef HERETIC_CT_CHAT_H */ 38 | 39 | -------------------------------------------------------------------------------- /src/heretic/m_random.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | 17 | #ifndef HERETIC_M_RANDOM_H 18 | #define HERETIC_M_RANDOM_H 19 | 20 | // Most damage defined using HITDICE 21 | #define HITDICE(a) ((1+(P_Random()&7))*a) 22 | 23 | int M_Random(void); 24 | // returns a number from 0 to 255 25 | int P_Random(void); 26 | // as M_Random, but used only by the play simulation 27 | 28 | void M_ClearRandom(void); 29 | // fix randoms for demos 30 | 31 | extern int rndindex; 32 | 33 | // Defined version of P_Random() - P_Random() 34 | int P_SubRandom (void); 35 | 36 | #endif // HERETIC_M_RANDOM_H 37 | 38 | -------------------------------------------------------------------------------- /src/heretic/s_sound.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | 17 | // soundst.h 18 | 19 | #ifndef __SOUNDSTH__ 20 | #define __SOUNDSTH__ 21 | 22 | extern int snd_MaxVolume; 23 | extern int snd_MusicVolume; 24 | 25 | void S_Start(void); 26 | void S_StartSound(void *origin, int sound_id); 27 | void S_StartSoundAtVolume(void *origin, int sound_id, int volume); 28 | void S_StopSound(void *origin); 29 | void S_PauseSound(void); 30 | void S_ResumeSound(void); 31 | void S_UpdateSounds(mobj_t * listener); 32 | void S_StartSong(int song, boolean loop); 33 | void S_Init(void); 34 | void S_GetChannelInfo(SoundInfo_t * s); 35 | void S_SetMaxVolume(boolean fullprocess); 36 | void S_SetMusicVolume(void); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/hexen.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Hexen 3 | Exec=@PROGRAM_PREFIX@hexen 4 | Icon=@PROGRAM_PREFIX@doom 5 | Type=Application 6 | Comment=@PACKAGE_SHORTDESC@ 7 | Categories=Game;ActionGame; 8 | Keywords=first;person;shooter;doom;vanilla; 9 | -------------------------------------------------------------------------------- /src/hexen/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | tags 5 | TAGS 6 | -------------------------------------------------------------------------------- /src/hexen/ct_chat.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // 17 | // Chat mode stuff 18 | // 19 | 20 | #ifndef HEXEN_CT_CHAT_H 21 | #define HEXEN_CT_CHAT_H 22 | 23 | #define CT_PLR_GREEN 1 24 | #define CT_PLR_YELLOW 2 25 | #define CT_PLR_RED 3 26 | #define CT_PLR_BLUE 4 27 | #define CT_PLR_ALL 5 28 | 29 | #define CT_KEY_GREEN 'g' 30 | #define CT_KEY_YELLOW 'y' 31 | #define CT_KEY_RED 'r' 32 | #define CT_KEY_BLUE 'b' 33 | #define CT_KEY_ALL 't' 34 | 35 | extern char *chat_macros[10]; 36 | 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /src/hexen/m_random.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | 17 | #ifndef HEXEN_M_RANDOM_H 18 | #define HEXEN_M_RANDOM_H 19 | 20 | // Most damage defined using HITDICE 21 | #define HITDICE(a) ((1+(P_Random()&7))*a) 22 | 23 | int M_Random(void); 24 | // returns a number from 0 to 255 25 | int P_Random(void); 26 | // as M_Random, but used only by the play simulation 27 | 28 | void M_ClearRandom(void); 29 | // fix randoms for demos 30 | 31 | extern int rndindex; 32 | 33 | // Defined version of P_Random() - P_Random() 34 | int P_SubRandom (void); 35 | 36 | #endif // HEXEN_M_RANDOM_H 37 | 38 | -------------------------------------------------------------------------------- /src/hexen/st_start.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | 17 | #ifndef STSTART_H 18 | #define STSTART_H 19 | 20 | #include "doomtype.h" 21 | 22 | // HEADER FILES ------------------------------------------------------------ 23 | 24 | // MACROS ------------------------------------------------------------------ 25 | 26 | // TYPES ------------------------------------------------------------------- 27 | 28 | // PUBLIC FUNCTION PROTOTYPES ---------------------------------------------- 29 | extern void ST_Init(void); 30 | extern void ST_Done(void); 31 | extern void ST_Message(const char *message, ...) PRINTF_ATTR(1, 2); 32 | extern void ST_RealMessage(const char *message, ...) PRINTF_ATTR(1, 2); 33 | extern void ST_Progress(void); 34 | extern void ST_NetProgress(void); 35 | extern void ST_NetDone(void); 36 | 37 | // PUBLIC DATA DECLARATIONS ------------------------------------------------ 38 | 39 | extern int graphical_startup; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/i_cdmus.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | 16 | // i_cdmus.h 17 | 18 | #ifndef __ICDMUS__ 19 | #define __ICDMUS__ 20 | 21 | #define CDERR_NOTINSTALLED 10 // MSCDEX not installed 22 | #define CDERR_NOAUDIOSUPPORT 11 // CD-ROM Doesn't support audio 23 | #define CDERR_NOAUDIOTRACKS 12 // Current CD has no audio tracks 24 | #define CDERR_BADDRIVE 20 // Bad drive number 25 | #define CDERR_BADTRACK 21 // Bad track number 26 | #define CDERR_IOCTLBUFFMEM 22 // Not enough low memory for IOCTL 27 | #define CDERR_DEVREQBASE 100 // DevReq errors 28 | 29 | extern int cd_Error; 30 | 31 | int I_CDMusInit(void); 32 | void I_CDMusPrintStartup(void); 33 | int I_CDMusPlay(int track); 34 | int I_CDMusStop(void); 35 | int I_CDMusResume(void); 36 | int I_CDMusSetVolume(int volume); 37 | int I_CDMusFirstTrack(void); 38 | int I_CDMusLastTrack(void); 39 | int I_CDMusTrackLength(int track); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/i_endoom.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Exit text-mode ENDOOM screen. 18 | // 19 | 20 | 21 | #ifndef __I_ENDOOM__ 22 | #define __I_ENDOOM__ 23 | 24 | // Display the Endoom screen on shutdown. Pass a pointer to the 25 | // ENDOOM lump. 26 | 27 | void I_Endoom(should_be_const byte *data); 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /src/i_glob.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2018 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // System specific file globbing interface. 16 | // 17 | 18 | 19 | #ifndef __I_GLOB__ 20 | #define __I_GLOB__ 21 | 22 | #define GLOB_FLAG_NOCASE 0x01 23 | #define GLOB_FLAG_SORTED 0x02 24 | 25 | typedef struct glob_s glob_t; 26 | 27 | // Start reading a list of file paths from the given directory which match 28 | // the given glob pattern. I_EndGlob() must be called on completion. 29 | glob_t *I_StartGlob(const char *directory, const char *glob, int flags); 30 | 31 | // Same as I_StartGlob but multiple glob patterns can be provided. The list 32 | // of patterns must be terminated with NULL. 33 | glob_t *I_StartMultiGlob(const char *directory, int flags, 34 | const char *glob, ...); 35 | 36 | // Finish reading file list. 37 | void I_EndGlob(glob_t *glob); 38 | 39 | // Read the name of the next globbed filename. NULL is returned if there 40 | // are no more found. 41 | const char *I_NextGlob(glob_t *glob); 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /src/i_input.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // System-specific keyboard/mouse input. 18 | // 19 | 20 | 21 | #ifndef __I_INPUT__ 22 | #define __I_INPUT__ 23 | 24 | #include "doomtype.h" 25 | 26 | #define MAX_MOUSE_BUTTONS 8 27 | 28 | extern float mouse_acceleration; 29 | extern int mouse_threshold; 30 | 31 | void I_BindInputVariables(void); 32 | void I_ReadMouse(void); 33 | 34 | // I_StartTextInput begins text input, activating the on-screen keyboard 35 | // (if one is used). The caller indicates that any entered text will be 36 | // displayed in the rectangle given by the provided set of coordinates. 37 | void I_StartTextInput(int x1, int y1, int x2, int y2); 38 | 39 | // I_StopTextInput finishes text input, deactivating the on-screen keyboard 40 | // (if one is used). 41 | void I_StopTextInput(void); 42 | #if DOOM_TINY 43 | void I_GetEvent(void); 44 | void I_GetEventTimeout(int); 45 | int GetTypedChar(int scancode, boolean shiftdown); 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/i_midipipe.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2013 James Haley et al. 3 | // Copyright(C) 2017 Alex Mayfield 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Client Interface to Midi Server 17 | // 18 | 19 | #ifndef __I_MIDIPIPE__ 20 | #define __I_MIDIPIPE__ 21 | 22 | #if _WIN32 23 | 24 | #include "SDL_mixer.h" 25 | 26 | #include "doomtype.h" 27 | 28 | extern boolean midi_server_initialized; 29 | extern boolean midi_server_registered; 30 | 31 | boolean I_MidiPipe_RegisterSong(char *filename); 32 | void I_MidiPipe_SetVolume(int vol); 33 | void I_MidiPipe_PlaySong(int loops); 34 | void I_MidiPipe_StopSong(); 35 | void I_MidiPipe_ShutdownServer(); 36 | 37 | boolean I_MidiPipe_InitServer(); 38 | 39 | #else 40 | 41 | #include "doomtype.h" 42 | 43 | static const boolean midi_server_registered = false; 44 | 45 | #endif 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /src/i_timer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // System-specific timer interface 17 | // 18 | 19 | 20 | #ifndef __I_TIMER__ 21 | #define __I_TIMER__ 22 | 23 | #define TICRATE 35 24 | 25 | // Called by D_DoomLoop, 26 | // returns current time in tics. 27 | int I_GetTime (void); 28 | 29 | // returns current time in ms 30 | int I_GetTimeMS (void); 31 | 32 | // Pause for a specified number of ms 33 | void I_Sleep(int ms); 34 | 35 | // Initialize timer 36 | void I_InitTimer(void); 37 | 38 | // Wait for vertical retrace or pause a bit. 39 | void I_WaitVBL(int count); 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /src/i_videohr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // SDL emulation of VGA 640x480x4 planar video mode, 16 | // for Hexen startup loading screen. 17 | // 18 | 19 | #ifndef I_VIDEOHR_H 20 | #define I_VIDEOHR_H 21 | 22 | boolean I_SetVideoModeHR(void); 23 | void I_UnsetVideoModeHR(void); 24 | void I_SetWindowTitleHR(const char *title); 25 | void I_ClearScreenHR(void); 26 | void I_SlamBlockHR(int x, int y, int w, int h, const byte *src); 27 | void I_SlamHR(const byte *buffer); 28 | void I_InitPaletteHR(void); 29 | void I_SetPaletteHR(const byte *palette); 30 | void I_FadeToPaletteHR(const byte *palette); 31 | void I_BlackPaletteHR(void); 32 | boolean I_CheckAbortHR(void); 33 | 34 | #endif /* #ifndef I_VIDEOHR_H */ 35 | 36 | -------------------------------------------------------------------------------- /src/image_decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 20222 Graham Sanderson 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | #pragma once 7 | #include "tiny_huff.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #include "assert.h" 14 | 15 | uint16_t *read_raw_pixels_decoder(th_bit_input *bi, uint16_t *buffer, uint buffer_size, uint8_t *tmp_buf, uint tmp_buf_size); 16 | uint16_t *read_raw_pixels_decoder_c3(th_bit_input *bi, uint16_t *buffer, uint buffer_size, uint8_t *tmp_buf, uint tmp_buf_size); 17 | void decode_data(uint8_t *dest, uint len, th_bit_input *bi, uint16_t *buffer, uint buffer_size, uint8_t *tmp_buf, uint tmp_buf_size); 18 | #ifdef __cplusplus 19 | } 20 | #endif -------------------------------------------------------------------------------- /src/m_bbox.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Main loop menu stuff. 17 | // Random number LUT. 18 | // Default Config File. 19 | // PCX Screenshots. 20 | // 21 | 22 | 23 | 24 | #include "m_bbox.h" 25 | 26 | 27 | 28 | 29 | void M_ClearBox (fixed_t *box) 30 | { 31 | box[BOXTOP] = box[BOXRIGHT] = INT_MIN; 32 | box[BOXBOTTOM] = box[BOXLEFT] = INT_MAX; 33 | } 34 | 35 | void 36 | M_AddToBox 37 | ( fixed_t* box, 38 | fixed_t x, 39 | fixed_t y ) 40 | { 41 | if (xbox[BOXRIGHT]) 44 | box[BOXRIGHT] = x; 45 | if (ybox[BOXTOP]) 48 | box[BOXTOP] = y; 49 | } 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/m_bbox.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Nil. 17 | // 18 | 19 | 20 | #ifndef __M_BBOX__ 21 | #define __M_BBOX__ 22 | 23 | #include 24 | 25 | #include "m_fixed.h" 26 | 27 | 28 | // Bounding box coordinate storage. 29 | enum 30 | { 31 | BOXTOP, 32 | BOXBOTTOM, 33 | BOXLEFT, 34 | BOXRIGHT 35 | }; // bbox coordinates 36 | 37 | // Bounding box functions. 38 | void M_ClearBox (fixed_t* box); 39 | 40 | void 41 | M_AddToBox 42 | ( fixed_t* box, 43 | fixed_t x, 44 | fixed_t y ); 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/m_fixed.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Fixed point implementation. 18 | // 19 | 20 | 21 | 22 | #include "stdlib.h" 23 | 24 | #include "doomtype.h" 25 | #include "i_system.h" 26 | 27 | #include "m_fixed.h" 28 | 29 | 30 | 31 | 32 | // Fixme. __USE_C_FIXED__ or something. 33 | 34 | fixed_t 35 | FixedMul 36 | ( fixed_t a, 37 | fixed_t b ) 38 | { 39 | #if !PICO_BUILD 40 | return ((int64_t) a * (int64_t) b) >> FRACBITS; 41 | #else 42 | return FixedMulInline(a,b); 43 | #endif 44 | } 45 | 46 | 47 | 48 | // 49 | // FixedDiv, C version. 50 | // 51 | 52 | fixed_t FixedDiv(fixed_t a, fixed_t b) 53 | { 54 | if ((abs(a) >> 14) >= abs(b)) 55 | { 56 | return (a^b) < 0 ? INT_MIN : INT_MAX; 57 | } 58 | else 59 | { 60 | int64_t result; 61 | 62 | result = ((int64_t) a << FRACBITS) / b; 63 | 64 | return (fixed_t) result; 65 | } 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | true 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/memio.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | 17 | #ifndef MEMIO_H 18 | #define MEMIO_H 19 | 20 | typedef struct _MEMFILE MEMFILE; 21 | 22 | typedef enum 23 | { 24 | MEM_SEEK_SET, 25 | MEM_SEEK_CUR, 26 | MEM_SEEK_END, 27 | } mem_rel_t; 28 | 29 | MEMFILE *mem_fopen_read(const void *buf, size_t buflen); 30 | size_t mem_fread(void *buf, size_t size, size_t nmemb, MEMFILE *stream); 31 | MEMFILE *mem_fopen_write(void); 32 | size_t mem_fwrite(const void *ptr, size_t size, size_t nmemb, MEMFILE *stream); 33 | void mem_get_buf(MEMFILE *stream, void **buf, size_t *buflen); 34 | void mem_fclose(MEMFILE *stream); 35 | long mem_ftell(MEMFILE *stream); 36 | int mem_fseek(MEMFILE *stream, signed long offset, mem_rel_t whence); 37 | 38 | #endif /* #ifndef MEMIO_H */ 39 | 40 | -------------------------------------------------------------------------------- /src/mus2mid.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2006 Ben Ryves 2006 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // 17 | // mus2mid.h - Ben Ryves 2006 - http://benryves.com - benryves@benryves.com 18 | // Use to convert a MUS file into a single track, type 0 MIDI file. 19 | 20 | #ifndef MUS2MID_H 21 | #define MUS2MID_H 22 | 23 | #include "doomtype.h" 24 | #include "memio.h" 25 | 26 | boolean mus2mid(MEMFILE *musinput, MEMFILE *midioutput); 27 | 28 | #endif /* #ifndef MUS2MID_H */ 29 | 30 | -------------------------------------------------------------------------------- /src/net_dedicated.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Dedicated server code. 16 | // 17 | 18 | #ifndef NET_DEDICATED_H 19 | #define NET_DEDICATED_H 20 | 21 | void NET_DedicatedServer(void); 22 | 23 | #endif /* #ifndef NET_DEDICATED_H */ 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/net_gui.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // Graphical stuff related to the networking code: 15 | // 16 | // * The client waiting screen when we are waiting for the server to 17 | // start the game. 18 | // 19 | 20 | 21 | #ifndef NET_GUI_H 22 | #define NET_GUI_H 23 | 24 | #include "doomtype.h" 25 | 26 | extern void NET_WaitForLaunch(void); 27 | 28 | #endif /* #ifndef NET_GUI_H */ 29 | 30 | -------------------------------------------------------------------------------- /src/net_io.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Network packet manipulation (net_packet_t) 16 | // 17 | 18 | #ifndef NET_IO_H 19 | #define NET_IO_H 20 | 21 | #include "net_defs.h" 22 | 23 | extern net_addr_t net_broadcast_addr; 24 | 25 | net_context_t *NET_NewContext(void); 26 | void NET_AddModule(net_context_t *context, net_module_t *module); 27 | void NET_SendPacket(net_addr_t *addr, net_packet_t *packet); 28 | void NET_SendBroadcast(net_context_t *context, net_packet_t *packet); 29 | boolean NET_RecvPacket(net_context_t *context, net_addr_t **addr, 30 | net_packet_t **packet); 31 | char *NET_AddrToString(net_addr_t *addr); 32 | void NET_FreeAddress(net_addr_t *addr); 33 | net_addr_t *NET_ResolveAddress(net_context_t *context, const char *address); 34 | 35 | #endif /* #ifndef NET_IO_H */ 36 | 37 | -------------------------------------------------------------------------------- /src/net_loop.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Loopback network module for server compiled into the client 16 | // 17 | 18 | #ifndef NET_LOOP_H 19 | #define NET_LOOP_H 20 | 21 | #include "net_defs.h" 22 | 23 | extern net_module_t net_loop_client_module; 24 | extern net_module_t net_loop_server_module; 25 | 26 | #endif /* #ifndef NET_LOOP_H */ 27 | 28 | -------------------------------------------------------------------------------- /src/net_sdl.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Networking module which uses SDL_net 16 | // 17 | 18 | #ifndef NET_SDL_H 19 | #define NET_SDL_H 20 | 21 | #include "net_defs.h" 22 | 23 | extern net_module_t net_sdl_module; 24 | 25 | #endif /* #ifndef NET_SDL_H */ 26 | 27 | -------------------------------------------------------------------------------- /src/net_server.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // Network server code 15 | // 16 | 17 | #ifndef NET_SERVER_H 18 | #define NET_SERVER_H 19 | 20 | // initialize server and wait for connections 21 | 22 | void NET_SV_Init(void); 23 | 24 | // run server: check for new packets received etc. 25 | 26 | void NET_SV_Run(void); 27 | 28 | // Shut down the server 29 | // Blocks until all clients disconnect, or until a 5 second timeout 30 | 31 | void NET_SV_Shutdown(void); 32 | 33 | // Add a network module to the context used by the server 34 | 35 | void NET_SV_AddModule(net_module_t *module); 36 | 37 | // Register server with master server. 38 | 39 | void NET_SV_RegisterWithMaster(void); 40 | 41 | #endif /* #ifndef NET_SERVER_H */ 42 | 43 | -------------------------------------------------------------------------------- /src/pico/i_picosound.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2008 David Flater 5 | // Copyright(C) 2021-2022 Graham Sanderson 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // DESCRIPTION: 18 | // System interface for sound. 19 | 20 | #ifndef __I_PICO_SOUND__ 21 | #define __I_PICO_SOUND__ 22 | 23 | #include "pico.h" 24 | typedef struct audio_buffer audio_buffer_t; 25 | 26 | #if USE_EMU8950_OPL 27 | #define PICO_SOUND_SAMPLE_FREQ 49716 28 | #else 29 | #define PICO_SOUND_SAMPLE_FREQ 44100 30 | #endif 31 | 32 | #ifndef NUM_SOUND_CHANNELS 33 | // this is the defaul tin game not 16 34 | #define NUM_SOUND_CHANNELS 8 35 | #endif 36 | 37 | void I_PicoSoundSetMusicGenerator(void (*generator)(audio_buffer_t *buffer)); 38 | bool I_PicoSoundIsInitialized(void); 39 | void I_PicoSoundFade(bool in); 40 | bool I_PicoSoundFading(void); 41 | #endif 42 | -------------------------------------------------------------------------------- /src/pico/i_timer.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Timer functions. 18 | // 19 | 20 | #include "pico/time.h" 21 | 22 | #include "i_timer.h" 23 | #include "doomtype.h" 24 | 25 | // 26 | // I_GetTime 27 | // returns time in 1/35th second tics 28 | // 29 | 30 | int I_GetTime (void) 31 | { 32 | return TICRATE * (uint32_t)(time_us_64() / 1000); 33 | } 34 | 35 | // 36 | // Same as I_GetTime, but returns time in milliseconds 37 | // 38 | 39 | int I_GetTimeMS(void) 40 | { 41 | return (int)(time_us_64() / 1000); 42 | } 43 | 44 | // Sleep for a specified number of ms 45 | 46 | void I_Sleep(int ms) 47 | { 48 | sleep_ms(ms); 49 | } 50 | 51 | void I_WaitVBL(int count) 52 | { 53 | // todo 54 | I_Sleep((count * 1000) / 70); 55 | } 56 | 57 | 58 | void I_InitTimer(void) 59 | { 60 | } 61 | 62 | -------------------------------------------------------------------------------- /src/pico/pico-screens/downsampler.c: -------------------------------------------------------------------------------- 1 | #include "pico.h" 2 | #include "i_video.h" 3 | 4 | // #define DOWNSAMPLING_FACTOR 2.0 5 | const uint8_t DOWNSAMPLED_WIDTH = (uint8_t)(SCREENWIDTH / DOWNSAMPLING_FACTOR); 6 | const uint8_t DOWNSAMPLED_HEIGHT = (uint8_t)(SCREENHEIGHT / DOWNSAMPLING_FACTOR); 7 | 8 | static uint16_t buffer[DOWNSAMPLED_WIDTH]; 9 | 10 | void downsample_scanline(uint16_t *src, uint16_t *dest) { 11 | for (uint8_t x = 0; x < DOWNSAMPLED_WIDTH; x++) { 12 | // Calculate the range of source pixels to average for this destination pixel 13 | uint8_t start = (uint8_t)(x * factor); 14 | uint8_t end = (uint8_t)((x + 1) * factor); 15 | // we don't just use DOWNSAMPLING_FACTOR for this because it might be like 2.6 and right now we only do integer downsampling 16 | uint8_t total = start - end; 17 | 18 | // Accumulate the sum of the source pixels in this range 19 | uint32_t r_sum = 0, g_sum = 0, b_sum = 0; 20 | for (uint8_t current_pixel = start; current_pixel < end; current_pixel++) { 21 | r_sum += src[current_pixel] & 0b1111100000000000 >> 11; 22 | g_sum += src[current_pixel] & 0b0000011111100000 >> 5; 23 | b_sum += src[current_pixel] & 0b0000000000011111; 24 | } 25 | 26 | dest[x] = (r / total) << 11 | (g / total) << 55 | (b / total); 27 | } 28 | } -------------------------------------------------------------------------------- /src/pico/pico-screens/screen.h: -------------------------------------------------------------------------------- 1 | // DESCRIPTION: 2 | // LED / LCD screen-specific logic 3 | 4 | #ifndef __SCREEN__ 5 | #define __SCREEN__ 6 | 7 | #include "pico.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" 11 | #endif 12 | void I_initScreen(void); 13 | 14 | #ifdef __cplusplus 15 | extern "C" 16 | #endif 17 | void I_handleFrameStart(uint8_t frame); 18 | 19 | #ifdef __cplusplus 20 | extern "C" 21 | #endif 22 | void I_handleFrameEnd(uint8_t frame); 23 | 24 | #ifdef __cplusplus 25 | extern "C" 26 | #endif 27 | void I_handleScanline(uint16_t *line, int scanline); 28 | 29 | #endif -------------------------------------------------------------------------------- /src/pico/pico-screens/screens/lilygo_ttgo.c: -------------------------------------------------------------------------------- 1 | #include "lilygo_ttgo.h" 2 | 3 | static const struct st7789_config lcd_config = { 4 | .spi = PICO_DEFAULT_SPI_INSTANCE, 5 | .gpio_din = 3, 6 | .gpio_clk = 2, 7 | .gpio_cs = 5, 8 | .gpio_dc = 1, 9 | .gpio_rst = 0, 10 | .gpio_bl = 4, 11 | }; 12 | 13 | void lilygo_ttgo_initScreen(void) { 14 | // turning on the backlight 15 | gpio_init(22); 16 | gpio_set_dir(22, GPIO_OUT); 17 | gpio_put(22, 1); 18 | // width and height only come into play for fills so let's just pass the memory size instead of LCD size 19 | st7789_init(&lcd_config, MEMORY_WIDTH, MEMORY_HEIGHT); 20 | st7789_fill(0x0000); 21 | } 22 | 23 | void lilygo_ttgo_handleFrameStart(uint8_t frame) { 24 | nearestNeighborHandleFrameStart(); 25 | } 26 | 27 | void lilygo_ttgo_blit(uint16_t *downsampled_line, int scanline) { 28 | // st7789_fill(scanline % 2 == 0 ? 0x0000 : 0xffff); 29 | st7789_set_cursor((MEMORY_WIDTH - LCD_WIDTH) / 2 + SCREEN_WIDTH_OFFSET, (MEMORY_HEIGHT - LCD_HEIGHT) / 2 + (scanline)); 30 | st7789_write(downsampled_line, sizeof(downsampled_line) * DOWNSAMPLED_WIDTH/2); // no idea why /2 31 | 32 | // write() has had some issues... use this instead if you are trying to blit less than a full row 33 | for (uint16_t x = 0; x < DOWNSAMPLED_WIDTH; x++) { 34 | // st7789_put(downsampled_line[x]); 35 | } 36 | } 37 | 38 | void lilygo_ttgo_handleScanline(uint16_t *line, int scanline) { 39 | nearestNeighborHandleDownsampling(line, scanline, lilygo_ttgo_blit); 40 | } -------------------------------------------------------------------------------- /src/pico/pico-screens/screens/lilygo_ttgo.h: -------------------------------------------------------------------------------- 1 | // DESCRIPTION: 2 | // LED / LCD screen-specific logic 3 | 4 | #ifndef __LILYGO_TTGO__ 5 | #define __LILYGO_TTGO__ 6 | 7 | #include "shared.h" 8 | 9 | #include "pico.h" 10 | #include "hardware/gpio.h" 11 | 12 | // #define LILYGO_TTGO 1 13 | 14 | #include 15 | #include "pico/st7789.h" 16 | 17 | #define MEMORY_WIDTH 320 18 | #define MEMORY_HEIGHT 240 19 | 20 | #define LCD_WIDTH 240 21 | #define LCD_HEIGHT 135 22 | 23 | #define SCREEN_WIDTH_OFFSET ((LCD_WIDTH - (SCREENWIDTH * 100 / DOWNSAMPLING_FACTOR_OUT_OF_100)) / 2) 24 | 25 | void lilygo_ttgo_initScreen(void); 26 | void lilygo_ttgo_handleFrameStart(uint8_t frame); 27 | void lilygo_ttgo_handleScanline(uint16_t *line, int scanline); 28 | 29 | #endif -------------------------------------------------------------------------------- /src/pico/pico-screens/screens/shared.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | #ifndef __SCREEN_SHARED__ 6 | #define __SCREEN_SHARED__ 7 | 8 | #include "pico.h" 9 | #include "i_video.h" 10 | 11 | 12 | #define DOOM_WIDTH SCREENWIDTH 13 | #define DOOM_HEIGHT SCREENHEIGHT 14 | 15 | // here be some chicanery to avoid floats 16 | #ifndef DOWNSAMPLING_FACTOR_OUT_OF_100 17 | #define DOWNSAMPLING_FACTOR_OUT_OF_100 243 18 | #endif 19 | 20 | #define DOWNSAMPLED_WIDTH ((SCREENWIDTH * 100 / DOWNSAMPLING_FACTOR_OUT_OF_100)) 21 | #define DOWNSAMPLED_HEIGHT ((SCREENHEIGHT * 100 / DOWNSAMPLING_FACTOR_OUT_OF_100)) 22 | 23 | #define DOWNSAMPLING_OFFSET_WIDTH ((SCREENWIDTH - (SCREENWIDTH * 100 / DOWNSAMPLING_FACTOR_OUT_OF_100)) >> 1) 24 | #define DOWNSAMPLING_OFFSET_HEIGHT ((SCREENHEIGHT - (SCREENHEIGHT * 100 / DOWNSAMPLING_FACTOR_OUT_OF_100)) >> 1) 25 | 26 | void clearDownsampleBuffers(void); 27 | 28 | uint16_t colorToGreyscale(uint16_t pixel); 29 | 30 | void areaAverageHandleDownsampling(uint16_t *src, int scanline, void (*callback)(uint16_t *, int)); 31 | void areaAverageHandleFrameStart(void); 32 | 33 | void nearestNeighborHandleDownsampling(uint16_t *src, int scanline, void (*callback)(uint16_t *, int)); 34 | void nearestNeighborHandleFrameStart(void); 35 | 36 | #endif 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif -------------------------------------------------------------------------------- /src/pico/pico-screens/screens/ssd1306_70_40.hpp: -------------------------------------------------------------------------------- 1 | // DESCRIPTION: 2 | // LED / LCD screen-specific logic 3 | 4 | #ifndef __SSD1306_70_40__ 5 | #define __SSD1306_70_40__ 6 | 7 | #include "shared.h" 8 | #include "pico.h" 9 | 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | void ssd1306_70_40_initScreen(void); 17 | void ssd1306_70_40_handleScanline(uint16_t *line, int scanline); 18 | void ssd1306_70_40_handleFrameStart(uint8_t frame); 19 | void ssd1306_70_40_handleFrameEnd(uint8_t frame); 20 | 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif -------------------------------------------------------------------------------- /src/pico/pico-screens/screens/ssd1306_70_40_i2c.h: -------------------------------------------------------------------------------- 1 | // DESCRIPTION: 2 | // LED / LCD screen-specific logic 3 | 4 | #ifndef __SSD1306_70_40_i2c__ 5 | #define __SSD1306_70_40_i2c__ 6 | 7 | #include "shared.h" 8 | #include "pico.h" 9 | #include "hardware/i2c.h" 10 | #include "pico/binary_info.h" 11 | #include "pico/stdlib.h" 12 | 13 | 14 | #include 15 | 16 | void ssd1306_70_40_i2c_initScreen(void); 17 | void ssd1306_70_40_i2c_handleScanline(uint16_t *line, int scanline); 18 | void ssd1306_70_40_i2c_handleFrameStart(uint8_t frame); 19 | void ssd1306_70_40_i2c_handleFrameEnd(uint8_t frame); 20 | 21 | #endif -------------------------------------------------------------------------------- /src/pico/pico-screens/screens/st7735_128_128.h: -------------------------------------------------------------------------------- 1 | // DESCRIPTION: 2 | // LED / LCD screen-specific logic 3 | 4 | #ifndef __ST7735_128_128__ 5 | #define __ST7735_128_128__ 6 | 7 | #include "shared.h" 8 | 9 | #include "pico.h" 10 | 11 | #include 12 | #include "mipi_display.h" 13 | 14 | #define LCD_WIDTH 160 15 | 16 | #define SCREEN_WIDTH_OFFSET ((LCD_WIDTH - (SCREENWIDTH * 100 / DOWNSAMPLING_FACTOR_OUT_OF_100)) / 2) 17 | 18 | 19 | void st7735_128_128_initScreen(void); 20 | void st7735_128_128_handleFrameStart(uint8_t frame); 21 | void st7735_128_128_handleScanline(uint16_t *line, int scanline); 22 | 23 | #endif -------------------------------------------------------------------------------- /src/pico/pico-screens/screens/st7789_240_135.h: -------------------------------------------------------------------------------- 1 | // DESCRIPTION: 2 | // LED / LCD screen-specific logic 3 | 4 | #ifndef __ST7789_240_135__ 5 | #define __ST7789_240_135__ 6 | 7 | #include "shared.h" 8 | 9 | #include "pico.h" 10 | 11 | #include 12 | #include "pico/st7789.h" 13 | 14 | #define MEMORY_WIDTH 320 15 | #define MEMORY_HEIGHT 240 16 | 17 | #define LCD_WIDTH 240 18 | #define LCD_HEIGHT 135 19 | 20 | #define SCREEN_WIDTH_OFFSET ((LCD_WIDTH - (SCREENWIDTH * 100 / DOWNSAMPLING_FACTOR_OUT_OF_100)) / 2) 21 | 22 | 23 | void st7789_240_135_initScreen(void); 24 | void st7789_240_135_handleFrameStart(uint8_t frame); 25 | void st7789_240_135_handleScanline(uint16_t *line, int scanline); 26 | 27 | #endif -------------------------------------------------------------------------------- /src/pico/picoflash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 20222 Graham Sanderson 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | #pragma once 7 | 8 | #include "pico.h" 9 | 10 | #define FLASH_SECTOR_SIZE (1u << 12) 11 | 12 | // erase and write a 4K sector 13 | void picoflash_sector_program(uint32_t flash_offs, const uint8_t *data); 14 | -------------------------------------------------------------------------------- /src/pico/piconet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 20222 Graham Sanderson 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | 7 | #pragma once 8 | 9 | #include "pico.h" 10 | #include "net_defs.h" 11 | 12 | typedef struct { 13 | uint32_t client_id; 14 | char name[MAXPLAYERNAME]; 15 | } lobby_player_t; 16 | 17 | typedef enum { 18 | lobby_no_connection, 19 | lobby_waiting_for_start, 20 | lobby_game_started, 21 | lobby_game_not_compatible, 22 | } piconet_lobby_status_t; 23 | 24 | typedef struct { 25 | uint32_t compat_hash; // version and whd hash 26 | uint32_t seq; 27 | piconet_lobby_status_t status; 28 | uint8_t nplayers; 29 | int8_t deathmatch; 30 | int8_t epi; 31 | int8_t skill; 32 | lobby_player_t players[NET_MAXPLAYERS]; 33 | } lobby_state_t; 34 | 35 | // one time initialization (set pulls etc) 36 | void piconet_init(); 37 | void piconet_start_host(int8_t deathmatch, int8_t epi, int8_t skill); 38 | void piconet_start_client(); 39 | void piconet_stop(); 40 | // periodically poll to check connection hasn't dropped 41 | bool piconet_client_check_for_dropped_connection(); 42 | void piconet_start_game(); 43 | // returns which player you are 44 | int piconet_get_lobby_state(lobby_state_t *state); 45 | void piconet_new_local_tic(int tic); 46 | int piconet_maybe_recv_tic(int fromtic); 47 | 48 | extern char player_name[MAXPLAYERNAME]; 49 | 50 | #if USE_PICO_NET 51 | // same var as used by regular networking 52 | extern boolean net_client_connected; // basically whether events are sync-ing amongst the players 53 | #endif -------------------------------------------------------------------------------- /src/pico/stubs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 20222 Graham Sanderson 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | #include "pico.h" 7 | 8 | #include 9 | 10 | #if PICO_ON_DEVICE 11 | static inline char to_lower(char c) { 12 | if (c >= 'A' && c <= 'Z') c += 'a' - 'A'; 13 | return c; 14 | } 15 | 16 | int strnicmp(const char *a, const char *b, size_t len) { 17 | int diff = 0; 18 | for(uint i=0; i 14 | This issue has been automatically marked as stale because it has not had 15 | recent activity. It will be closed if no further activity occurs. Thank you 16 | for your contributions. 17 | # Comment to post when closing a stale issue. Set to `false` to disable 18 | closeComment: false 19 | # Never stale pull requests 20 | only: issues -------------------------------------------------------------------------------- /src/pico_st7789/.gitignore: -------------------------------------------------------------------------------- 1 | CMakeLists.txt.user 2 | CMakeCache.txt 3 | CMakeFiles 4 | CMakeScripts 5 | Testing 6 | Makefile 7 | cmake_install.cmake 8 | install_manifest.txt 9 | compile_commands.json 10 | CTestTestfile.cmake 11 | _deps 12 | 13 | build/ 14 | 15 | -------------------------------------------------------------------------------- /src/pico_st7789/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12) 2 | 3 | # initialize pico_sdk from GIT 4 | # (note this can come from environment, CMake cache etc) 5 | # set(PICO_SDK_FETCH_FROM_GIT on) 6 | 7 | # pico_sdk_import.cmake is a single file copied from this SDK 8 | # note: this must happen before project() 9 | include(pico_sdk_import.cmake) 10 | 11 | project(pico_st7789) 12 | 13 | # initialize the Pico SDK 14 | pico_sdk_init() 15 | 16 | add_library(pico_st7789 INTERFACE) 17 | 18 | target_sources(pico_st7789 INTERFACE 19 | ${CMAKE_CURRENT_LIST_DIR}/src/st7789.c 20 | ) 21 | 22 | target_include_directories(pico_st7789 INTERFACE 23 | ${CMAKE_CURRENT_LIST_DIR}/src/include 24 | ) 25 | 26 | target_link_libraries(pico_st7789 INTERFACE pico_stdlib hardware_spi) 27 | 28 | add_subdirectory("examples/st7789_blink") 29 | add_subdirectory("examples/st7789_random") 30 | add_subdirectory("examples/st7789_random_rows") 31 | -------------------------------------------------------------------------------- /src/pico_st7789/examples/st7789_blink/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12) 2 | 3 | # rest of your project 4 | add_executable(st7789_blink 5 | main.c 6 | ) 7 | 8 | target_link_libraries(st7789_blink PRIVATE pico_st7789) 9 | 10 | # create map/bin/hex/uf2 file in addition to ELF. 11 | pico_add_extra_outputs(st7789_blink) 12 | -------------------------------------------------------------------------------- /src/pico_st7789/examples/st7789_blink/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Arm Limited and Contributors. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | */ 7 | 8 | #include "pico/stdlib.h" 9 | #include "pico/st7789.h" 10 | 11 | // lcd configuration 12 | const struct st7789_config lcd_config = { 13 | .spi = PICO_DEFAULT_SPI_INSTANCE, 14 | .gpio_din = PICO_DEFAULT_SPI_TX_PIN, 15 | .gpio_clk = PICO_DEFAULT_SPI_SCK_PIN, 16 | .gpio_cs = PICO_DEFAULT_SPI_CSN_PIN, 17 | .gpio_dc = 20, 18 | .gpio_rst = 21, 19 | .gpio_bl = 22, 20 | }; 21 | 22 | const int lcd_width = 240; 23 | const int lcd_height = 320; 24 | 25 | int main() 26 | { 27 | // initialize the lcd 28 | st7789_init(&lcd_config, lcd_width, lcd_height); 29 | 30 | while (1) { 31 | // make screen black 32 | st7789_fill(0x0000); 33 | 34 | // wait 1 second 35 | sleep_ms(1000); 36 | 37 | // make screen white 38 | st7789_fill(0xffff); 39 | 40 | // wait 1 second 41 | sleep_ms(1000); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/pico_st7789/examples/st7789_random/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12) 2 | 3 | # rest of your project 4 | add_executable(st7789_random 5 | main.c 6 | ) 7 | 8 | target_link_libraries(st7789_random PRIVATE pico_st7789) 9 | 10 | # create map/bin/hex/uf2 file in addition to ELF. 11 | pico_add_extra_outputs(st7789_random) 12 | -------------------------------------------------------------------------------- /src/pico_st7789/examples/st7789_random/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Arm Limited and Contributors. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | */ 7 | 8 | #include 9 | 10 | #include "pico/stdlib.h" 11 | #include "pico/st7789.h" 12 | 13 | // lcd configuration 14 | const struct st7789_config lcd_config = { 15 | .spi = PICO_DEFAULT_SPI_INSTANCE, 16 | .gpio_din = PICO_DEFAULT_SPI_TX_PIN, 17 | .gpio_clk = PICO_DEFAULT_SPI_SCK_PIN, 18 | .gpio_cs = PICO_DEFAULT_SPI_CSN_PIN, 19 | .gpio_dc = 20, 20 | .gpio_rst = 21, 21 | .gpio_bl = 22, 22 | }; 23 | 24 | const int LCD_WIDTH = 240; 25 | const int LCD_HEIGHT = 320; 26 | 27 | int main() 28 | { 29 | // initialize the lcd 30 | st7789_init(&lcd_config, LCD_WIDTH, LCD_HEIGHT); 31 | 32 | // make screen black 33 | st7789_fill(0x0000); 34 | 35 | while (1) { 36 | // create a random x, y, and color value 37 | int rand_x = rand() % LCD_WIDTH; 38 | int rand_y = rand() % LCD_HEIGHT; 39 | uint16_t rand_color = rand() % 0xffff; 40 | 41 | // move the cursor to the random x and y position 42 | st7789_set_cursor(rand_x, rand_y); 43 | 44 | // put the random color as the pixel value 45 | st7789_put(rand_color); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/pico_st7789/examples/st7789_random_rows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12) 2 | 3 | # rest of your project 4 | add_executable(st7789_random_rows 5 | main.c 6 | ) 7 | 8 | target_link_libraries(st7789_random_rows PRIVATE pico_st7789) 9 | 10 | # create map/bin/hex/uf2 file in addition to ELF. 11 | pico_add_extra_outputs(st7789_random_rows) 12 | -------------------------------------------------------------------------------- /src/pico_st7789/examples/st7789_random_rows/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Arm Limited and Contributors. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | */ 7 | 8 | #include 9 | 10 | #include "pico/stdlib.h" 11 | #include "pico/st7789.h" 12 | 13 | // lcd configuration 14 | const struct st7789_config lcd_config = { 15 | .spi = PICO_DEFAULT_SPI_INSTANCE, 16 | .gpio_din = PICO_DEFAULT_SPI_TX_PIN, 17 | .gpio_clk = PICO_DEFAULT_SPI_SCK_PIN, 18 | .gpio_cs = PICO_DEFAULT_SPI_CSN_PIN, 19 | .gpio_dc = 20, 20 | .gpio_rst = 21, 21 | .gpio_bl = 22, 22 | }; 23 | 24 | #define LCD_WIDTH 240 25 | #define LCD_HEIGHT 320 26 | 27 | uint16_t row_pixels[LCD_WIDTH]; 28 | 29 | int main() 30 | { 31 | // initialize the lcd 32 | st7789_init(&lcd_config, LCD_WIDTH, LCD_HEIGHT); 33 | 34 | // make screen black 35 | st7789_fill(0x0000); 36 | 37 | while (1) { 38 | // create a random y and color value 39 | int rand_y = rand() % LCD_HEIGHT; 40 | uint16_t rand_color = rand() % 0xffff; 41 | 42 | // move the cursor to the y position 43 | st7789_set_cursor(0, rand_y); 44 | 45 | // set the row pixels buffer to the color value 46 | for (int i = 0; i < LCD_WIDTH; i++) { 47 | row_pixels[i] = rand_color; 48 | } 49 | 50 | // write the row pixel values 51 | st7789_write(row_pixels, sizeof(row_pixels)); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/pico_st7789/src/include/pico/st7789.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Arm Limited and Contributors. All rights reserved. 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | */ 7 | 8 | #ifndef _PICO_ST7789_H_ 9 | #define _PICO_ST7789_H_ 10 | 11 | #include "hardware/spi.h" 12 | 13 | struct st7789_config { 14 | spi_inst_t* spi; 15 | uint gpio_din; 16 | uint gpio_clk; 17 | int gpio_cs; 18 | uint gpio_dc; 19 | uint gpio_rst; 20 | uint gpio_bl; 21 | }; 22 | 23 | void st7789_init(const struct st7789_config* config, uint16_t width, uint16_t height); 24 | void st7789_write(const void* data, size_t len); 25 | void st7789_put(uint16_t pixel); 26 | void st7789_fill(uint16_t pixel); 27 | void st7789_set_cursor(uint16_t x, uint16_t y); 28 | void st7789_vertical_scroll(uint16_t row); 29 | void st7789_partial_area(uint16_t start, uint16_t end); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/picodoom.h: -------------------------------------------------------------------------------- 1 | #ifndef _PICODOOM_H 2 | #define _PICODOOM_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "m_fixed.h" 9 | 10 | typedef enum { 11 | PDCOL_NONE = 0, 12 | PDCOL_TOP, 13 | PDCOL_MID, 14 | PDCOL_BOTTOM, 15 | PDCOL_SKY, 16 | PDCOL_MASKED, 17 | PDCOL_FLOOR, 18 | PDCOL_CEILING, 19 | } pd_column_type; 20 | 21 | extern volatile uint8_t interp_in_use; 22 | void pd_init(); 23 | void pd_core1_loop(); 24 | void pd_begin_frame(); 25 | void pd_add_column(pd_column_type type); 26 | void pd_add_masked_columns(uint8_t *ys, int seg_count); 27 | void pd_add_plane_column(int x, int yl, int yh, fixed_t scale, int floor, int fd_num); 28 | void pd_end_frame(int wipe_start); 29 | uint8_t *pd_get_work_area(uint32_t *size); 30 | #if PICO_ON_DEVICE 31 | void pd_start_save_pause(void); 32 | void pd_end_save_pause(void); 33 | const uint8_t *get_end_of_flash(void); 34 | #endif 35 | extern int pd_flag; 36 | extern fixed_t pd_scale; 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif -------------------------------------------------------------------------------- /src/resource.rc.in: -------------------------------------------------------------------------------- 1 | 1 ICON "@top_srcdir@/data/doom.ico" 2 | 3 | #include 4 | 5 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "@top_srcdir@/src/manifest.xml" 6 | 7 | 1 VERSIONINFO 8 | PRODUCTVERSION @WINDOWS_RC_VERSION@ 9 | FILEVERSION @WINDOWS_RC_VERSION@ 10 | FILETYPE 1 11 | { 12 | BLOCK "StringFileInfo" 13 | { 14 | BLOCK "040904E4" 15 | { 16 | VALUE "FileVersion", "@PACKAGE_VERSION@.0" 17 | VALUE "FileDescription", "@PACKAGE_STRING@" 18 | VALUE "InternalName", "@PACKAGE_TARNAME@" 19 | VALUE "CompanyName", "@PACKAGE_BUGREPORT@" 20 | VALUE "LegalCopyright", "@PACKAGE_COPYRIGHT@. Licensed under @PACKAGE_LICENSE@" 21 | VALUE "ProductName", "@PACKAGE_NAME@" 22 | VALUE "ProductVersion", "@PACKAGE_VERSION@" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x409, 1252 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/setup-res.rc.in: -------------------------------------------------------------------------------- 1 | 1 ICON "@top_srcdir@/data/setup.ico" 2 | 3 | 1 24 MOVEABLE PURE "@top_builddir@/src/setup/setup-manifest.xml" 4 | 5 | 1 VERSIONINFO 6 | PRODUCTVERSION @WINDOWS_RC_VERSION@ 7 | FILEVERSION @WINDOWS_RC_VERSION@ 8 | FILETYPE 1 9 | { 10 | BLOCK "StringFileInfo" 11 | { 12 | BLOCK "040904E4" 13 | { 14 | VALUE "FileVersion", "@PACKAGE_VERSION@.0" 15 | VALUE "FileDescription", "@PACKAGE_STRING@ Setup" 16 | VALUE "InternalName", "@PACKAGE_TARNAME@" 17 | VALUE "CompanyName", "@PACKAGE_BUGREPORT@" 18 | VALUE "LegalCopyright", "GNU General Public License" 19 | VALUE "ProductName", "@PACKAGE_NAME@ Setup" 20 | VALUE "ProductVersion", "@PACKAGE_VERSION@" 21 | } 22 | } 23 | BLOCK "VarFileInfo" 24 | { 25 | VALUE "Translation", 0x409, 1252 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/setup/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | setup-manifest.xml 5 | *.rc 6 | tags 7 | TAGS 8 | -------------------------------------------------------------------------------- /src/setup/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(setup STATIC 2 | compatibility.c compatibility.h 3 | display.c display.h 4 | joystick.c joystick.h 5 | keyboard.c keyboard.h 6 | mainmenu.c 7 | mode.c mode.h 8 | mouse.c mouse.h 9 | multiplayer.c multiplayer.h 10 | sound.c sound.h 11 | execute.c execute.h 12 | txt_joyaxis.c txt_joyaxis.h 13 | txt_joybinput.c txt_joybinput.h 14 | txt_keyinput.c txt_keyinput.h 15 | txt_mouseinput.c txt_mouseinput.h) 16 | 17 | target_include_directories(setup PRIVATE "../" "${CMAKE_CURRENT_BINARY_DIR}/../../") 18 | target_link_libraries(setup textscreen SDL2::SDL2 SDL2::mixer) 19 | -------------------------------------------------------------------------------- /src/setup/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS = @SDL_CFLAGS@ \ 3 | @SDLMIXER_CFLAGS@ \ 4 | -I$(top_srcdir)/textscreen -I$(top_srcdir)/src 5 | 6 | noinst_LIBRARIES = libsetup.a 7 | 8 | libsetup_a_SOURCES = \ 9 | compatibility.c compatibility.h \ 10 | display.c display.h \ 11 | joystick.c joystick.h \ 12 | keyboard.c keyboard.h \ 13 | mainmenu.c \ 14 | mode.c mode.h \ 15 | mouse.c mouse.h \ 16 | multiplayer.c multiplayer.h \ 17 | sound.c sound.h \ 18 | execute.c execute.h \ 19 | txt_joyaxis.c txt_joyaxis.h \ 20 | txt_joybinput.c txt_joybinput.h \ 21 | txt_keyinput.c txt_keyinput.h \ 22 | txt_mouseinput.c txt_mouseinput.h 23 | 24 | EXTRA_DIST= \ 25 | CMakeLists.txt \ 26 | setup_icon.c 27 | 28 | appdir = $(prefix)/share/applications 29 | app_DATA = @PROGRAM_PREFIX@setup.desktop 30 | 31 | CLEANFILES = $(app_DATA) 32 | 33 | @PROGRAM_PREFIX@setup.desktop : setup.desktop 34 | cp setup.desktop $@ 35 | 36 | if HAVE_PYTHON 37 | 38 | setup_icon.c : $(top_builddir)/data/setup.png 39 | $(top_builddir)/data/convert-icon $(top_builddir)/data/setup.png $@ 40 | 41 | endif 42 | 43 | -------------------------------------------------------------------------------- /src/setup/compatibility.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_COMPATIBILITY_H 16 | #define SETUP_COMPATIBILITY_H 17 | 18 | void CompatibilitySettings(void *widget, void *user_data); 19 | void BindCompatibilityVariables(void); 20 | 21 | extern int vanilla_savegame_limit; 22 | extern int vanilla_demo_limit; 23 | 24 | #endif /* #ifndef SETUP_COMPATIBILITY_H */ 25 | -------------------------------------------------------------------------------- /src/setup/display.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // Copyright(C) 2021-2022 Graham Sanderson 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | 16 | #ifndef SETUP_DISPLAY_H 17 | #define SETUP_DISPLAY_H 18 | 19 | void ConfigDisplay(void *widget, void *user_data); 20 | void SetDisplayDriver(void); 21 | void BindDisplayVariables(void); 22 | 23 | extern isb_int8_t show_endoom; 24 | extern int graphical_startup; 25 | extern int png_screenshots; 26 | 27 | #endif /* #ifndef SETUP_DISPLAY_H */ 28 | -------------------------------------------------------------------------------- /src/setup/execute.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TESTCONFIG_H 16 | #define TESTCONFIG_H 17 | 18 | #include "doomtype.h" 19 | #include "textscreen.h" 20 | 21 | typedef struct execute_context_s execute_context_t; 22 | 23 | #define IWAD_DOOM2 (1 << 0) /* doom2.wad */ 24 | #define IWAD_PLUTONIA (1 << 1) /* plutonia.wad */ 25 | #define IWAD_TNT (1 << 2) /* tnt.wad */ 26 | #define IWAD_DOOM (1 << 3) /* doom.wad */ 27 | #define IWAD_DOOM1 (1 << 4) /* doom1.wad */ 28 | #define IWAD_CHEX (1 << 5) /* chex.wad */ 29 | 30 | execute_context_t *NewExecuteContext(void); 31 | void AddCmdLineParameter(execute_context_t *context, const char *s, ...) PRINTF_ATTR(2, 3); 32 | void PassThroughArguments(execute_context_t *context); 33 | int ExecuteDoom(execute_context_t *context); 34 | int FindInstalledIWADs(void); 35 | boolean OpenFolder(const char *path); 36 | 37 | txt_window_action_t *TestConfigAction(void); 38 | 39 | #endif /* #ifndef TESTCONFIG_H */ 40 | 41 | -------------------------------------------------------------------------------- /src/setup/joystick.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_JOYSTICK_H 16 | #define SETUP_JOYSTICK_H 17 | 18 | extern int joystick_index; 19 | 20 | void ConfigJoystick(void *widget, void *user_data); 21 | void BindJoystickVariables(void); 22 | 23 | #endif /* #ifndef SETUP_JOYSTICK_H */ 24 | 25 | -------------------------------------------------------------------------------- /src/setup/keyboard.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_KEYBOARD_H 16 | #define SETUP_KEYBOARD_H 17 | 18 | void ConfigKeyboard(void *widget, void *user_data); 19 | void BindKeyboardVariables(void); 20 | 21 | extern int vanilla_keyboard_mapping; 22 | 23 | #endif /* #ifndef SETUP_KEYBOARD_H */ 24 | -------------------------------------------------------------------------------- /src/setup/mode.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_MODE_H 16 | #define SETUP_MODE_H 17 | 18 | #include "d_mode.h" 19 | #include "d_iwad.h" 20 | 21 | typedef void (*GameSelectCallback)(void); 22 | extern GameMission_t gamemission; 23 | 24 | void SetupMission(GameSelectCallback callback); 25 | void InitBindings(void); 26 | const char *GetExecutableName(void); 27 | const char *GetGameTitle(void); 28 | const iwad_t **GetIwads(void); 29 | 30 | #endif /* #ifndef SETUP_MODE_H */ 31 | 32 | -------------------------------------------------------------------------------- /src/setup/mouse.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_MOUSE_H 16 | #define SETUP_MOUSE_H 17 | 18 | void ConfigMouse(void *widget, void *user_data); 19 | void BindMouseVariables(void); 20 | 21 | extern int novert; 22 | 23 | #endif /* #ifndef SETUP_MOUSE_H */ 24 | -------------------------------------------------------------------------------- /src/setup/multiplayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_MULTIPLAYER_H 16 | #define SETUP_MULTIPLAYER_H 17 | 18 | void StartMultiGame(void *widget, void *user_data); 19 | void WarpMenu(void *widget, void *user_data); 20 | void JoinMultiGame(void *widget, void *user_data); 21 | void MultiplayerConfig(void *widget, void *user_data); 22 | 23 | void SetChatMacroDefaults(void); 24 | void SetPlayerNameDefault(void); 25 | 26 | void BindMultiplayerVariables(void); 27 | 28 | #endif /* #ifndef SETUP_MULTIPLAYER_H */ 29 | 30 | -------------------------------------------------------------------------------- /src/setup/setup.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Setup 3 | Exec=@PROGRAM_PREFIX@setup 4 | Icon=@PROGRAM_PREFIX@setup 5 | Type=Application 6 | Comment=Setup tool for @PACKAGE_SHORTNAME@ 7 | Categories=Settings; 8 | Keywords=first;person;shooter;doom;heretic;hexen;strife;vanilla; 9 | -------------------------------------------------------------------------------- /src/setup/sound.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // Copyright(C) 2021-2022 Graham Sanderson 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | 16 | #ifndef SETUP_SOUND_H 17 | #define SETUP_SOUND_H 18 | 19 | #include "i_sound.h" 20 | 21 | void ConfigSound(void *widget, void *user_data); 22 | void BindSoundVariables(void); 23 | 24 | extern const char *snd_dmxoption; 25 | 26 | #endif /* #ifndef SETUP_SOUND_H */ 27 | -------------------------------------------------------------------------------- /src/setup/txt_joybinput.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TXT_JOYB_INPUT_H 16 | #define TXT_JOYB_INPUT_H 17 | 18 | typedef struct txt_joystick_input_s txt_joystick_input_t; 19 | 20 | #include "txt_widget.h" 21 | #include "txt_window.h" 22 | 23 | // 24 | // A joystick input is like an input box. When selected, a box pops up 25 | // allowing a joystick button to be pressed to select it. 26 | // 27 | 28 | struct txt_joystick_input_s 29 | { 30 | txt_widget_t widget; 31 | int *variable; 32 | txt_window_t *prompt_window; 33 | int check_conflicts; 34 | }; 35 | 36 | txt_joystick_input_t *TXT_NewJoystickInput(int *variable); 37 | 38 | #endif /* #ifndef TXT_JOYB_INPUT_H */ 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/setup/txt_keyinput.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TXT_KEY_INPUT_H 16 | #define TXT_KEY_INPUT_H 17 | 18 | typedef struct txt_key_input_s txt_key_input_t; 19 | 20 | #include "txt_widget.h" 21 | 22 | // 23 | // A key input is like an input box. When selected, a box pops up 24 | // allowing a key to be selected. 25 | // 26 | 27 | struct txt_key_input_s 28 | { 29 | txt_widget_t widget; 30 | int *variable; 31 | int check_conflicts; 32 | }; 33 | 34 | txt_key_input_t *TXT_NewKeyInput(int *variable); 35 | 36 | #endif /* #ifndef TXT_KEY_INPUT_H */ 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/setup/txt_mouseinput.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TXT_MOUSE_INPUT_H 16 | #define TXT_MOUSE_INPUT_H 17 | 18 | typedef struct txt_mouse_input_s txt_mouse_input_t; 19 | 20 | #include "txt_widget.h" 21 | 22 | // 23 | // A mouse input is like an input box. When selected, a box pops up 24 | // allowing a mouse to be selected. 25 | // 26 | 27 | struct txt_mouse_input_s 28 | { 29 | txt_widget_t widget; 30 | int *variable; 31 | int check_conflicts; 32 | }; 33 | 34 | txt_mouse_input_t *TXT_NewMouseInput(int *variable); 35 | 36 | #endif /* #ifndef TXT_MOUSE_INPUT_H */ 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/sha1.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // SHA-1 digest. 16 | // 17 | 18 | #ifndef __SHA1_H__ 19 | #define __SHA1_H__ 20 | 21 | #include "doomtype.h" 22 | 23 | typedef struct sha1_context_s sha1_context_t; 24 | typedef byte sha1_digest_t[20]; 25 | 26 | struct sha1_context_s { 27 | uint32_t h0,h1,h2,h3,h4; 28 | uint32_t nblocks; 29 | byte buf[64]; 30 | int count; 31 | }; 32 | 33 | void SHA1_Init(sha1_context_t *context); 34 | void SHA1_Update(sha1_context_t *context, should_be_const byte *buf, size_t len); 35 | void SHA1_Final(sha1_digest_t digest, sha1_context_t *context); 36 | void SHA1_UpdateInt32(sha1_context_t *context, unsigned int val); 37 | void SHA1_UpdateString(sha1_context_t *context, char *str); 38 | 39 | #endif /* #ifndef __SHA1_H__ */ 40 | 41 | -------------------------------------------------------------------------------- /src/strife.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Strife 3 | Exec=@PROGRAM_PREFIX@strife 4 | Icon=@PROGRAM_PREFIX@doom 5 | Type=Application 6 | Comment=@PACKAGE_SHORTDESC@ 7 | Categories=Game;ActionGame; 8 | Keywords=first;person;shooter;doom;vanilla; 9 | -------------------------------------------------------------------------------- /src/strife/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | tags 5 | TAGS 6 | -------------------------------------------------------------------------------- /src/strife/am_map.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // AutoMap module. 17 | // 18 | 19 | #ifndef __AMMAP_H__ 20 | #define __AMMAP_H__ 21 | 22 | #include "d_event.h" 23 | #include "m_cheat.h" 24 | 25 | // Used by ST StatusBar stuff. 26 | #define AM_MSGHEADER (('a'<<24)+('m'<<16)) 27 | #define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8)) 28 | #define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8)) 29 | 30 | 31 | // Called by main loop. 32 | boolean AM_Responder (event_t* ev); 33 | 34 | // Called by main loop. 35 | void AM_Ticker (void); 36 | 37 | // Called by main loop, 38 | // called instead of view drawer if automap active. 39 | void AM_Drawer (void); 40 | 41 | // Called to force the automap to quit 42 | // if the level is completed while it is up. 43 | void AM_Stop (void); 44 | 45 | 46 | extern cheatseq_t cheat_amap; 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/strife/d_items.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Items: key cards, artifacts, weapon, ammunition. 17 | // 18 | 19 | 20 | #ifndef __D_ITEMS__ 21 | #define __D_ITEMS__ 22 | 23 | #include "doomdef.h" 24 | 25 | 26 | 27 | // Weapon info: sprite frames, ammunition use. 28 | typedef struct 29 | { 30 | ammotype_t ammo; 31 | int upstate; 32 | int downstate; 33 | int readystate; 34 | int atkstate; 35 | int flashstate; 36 | boolean availabledemo; // villsa [STRIFE] 37 | 38 | } weaponinfo_t; 39 | 40 | extern weaponinfo_t weaponinfo[NUMWEAPONS]; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/strife/d_main.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // System specific interface stuff. 17 | // 18 | 19 | 20 | #ifndef __D_MAIN__ 21 | #define __D_MAIN__ 22 | 23 | #include "doomdef.h" 24 | 25 | 26 | 27 | 28 | // Read events from all input devices 29 | 30 | void D_ProcessEvents (void); 31 | 32 | 33 | // 34 | // BASE LEVEL 35 | // 36 | void D_PageTicker (void); 37 | void D_PageDrawer (void); 38 | void D_AdvanceDemo (void); 39 | void D_DoAdvanceDemo (void); 40 | void D_StartTitle (void); 41 | void D_QuitGame (void); // [STRIFE] 42 | 43 | void D_IntroTick(void); // [STRIFE] 44 | 45 | // 46 | // GLOBAL VARIABLES 47 | // 48 | 49 | extern gameaction_t gameaction; 50 | extern boolean isregistered; // villsa [STRIFE] 51 | extern boolean isdemoversion; // haleyjd [STRIFE] 52 | extern boolean stonecold; // villsa [STRIFE] 53 | extern boolean workparm; // villsa [STRIFE] 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /src/strife/d_textur.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Typedefs related to to textures etc., 17 | // isolated here to make it easier separating modules. 18 | // 19 | 20 | 21 | #ifndef __D_TEXTUR__ 22 | #define __D_TEXTUR__ 23 | 24 | #include "doomtype.h" 25 | 26 | 27 | 28 | 29 | // 30 | // Flats? 31 | // 32 | // a pic is an unmasked block of pixels 33 | typedef struct 34 | { 35 | byte width; 36 | byte height; 37 | byte data; 38 | } pic_t; 39 | 40 | 41 | 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/strife/doomdef.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // DoomDef - basic defines for DOOM, e.g. Version, game mode 17 | // and skill level, and display parameters. 18 | // 19 | 20 | 21 | 22 | #include "doomdef.h" 23 | 24 | // Location for any defines turned variables. 25 | 26 | // None. 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/strife/doomstat.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Put all global tate variables here. 17 | // 18 | 19 | #include 20 | 21 | #include "doomstat.h" 22 | 23 | 24 | // Game Mode - identify IWAD as shareware, retail etc. 25 | GameMode_t gamemode = indetermined; 26 | GameMission_t gamemission = doom; 27 | GameVersion_t gameversion = exe_strife_1_31; 28 | char *gamedescription; 29 | 30 | // Set if homebrew PWAD stuff has been added. 31 | boolean modifiedgame; 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/strife/dstrings.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // 16 | // DESCRIPTION: 17 | // DOOM strings, by language. 18 | // 19 | 20 | 21 | #ifndef __DSTRINGS__ 22 | #define __DSTRINGS__ 23 | 24 | 25 | // All important printed strings. 26 | 27 | #include "d_englsh.h" 28 | 29 | // Misc. other strings. 30 | #define SAVEGAMENAME "doomsav" 31 | 32 | 33 | // QuitDOOM messages 34 | // 8 per each game type 35 | #define NUM_QUITMESSAGES 8 36 | 37 | extern char *doom1_endmsg[]; 38 | extern char *doom2_endmsg[]; 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/strife/f_finale.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // 17 | // 18 | 19 | 20 | #ifndef __F_FINALE__ 21 | #define __F_FINALE__ 22 | 23 | 24 | #include "doomtype.h" 25 | #include "d_event.h" 26 | // 27 | // FINALE 28 | // 29 | 30 | // Called by main loop. 31 | boolean F_Responder (event_t* ev); 32 | 33 | // Called by main loop. 34 | void F_Ticker (void); 35 | 36 | // haleyjd: [STRIFE] Called from G_Ticker as well... 37 | void F_WaitTicker(void); 38 | 39 | // Called by main loop. 40 | void F_Drawer (void); 41 | 42 | 43 | void F_StartFinale (void); 44 | 45 | 46 | 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/strife/f_wipe.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Mission start screen wipe/melt, special effects. 17 | // 18 | 19 | 20 | #ifndef __F_WIPE_H__ 21 | #define __F_WIPE_H__ 22 | 23 | // 24 | // SCREEN WIPE PACKAGE 25 | // 26 | 27 | enum 28 | { 29 | // [STRIFE]: ColorXForm reimplemented as a proper crossfade 30 | wipe_ColorXForm, 31 | 32 | // weird screen melt 33 | wipe_Melt, 34 | 35 | wipe_NUMWIPES 36 | }; 37 | 38 | int 39 | wipe_StartScreen 40 | ( int x, 41 | int y, 42 | int width, 43 | int height ); 44 | 45 | 46 | int 47 | wipe_EndScreen 48 | ( int x, 49 | int y, 50 | int width, 51 | int height ); 52 | 53 | 54 | int 55 | wipe_ScreenWipe 56 | ( int wipeno, 57 | int x, 58 | int y, 59 | int width, 60 | int height, 61 | int ticks ); 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /src/strife/m_random.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // 17 | // 18 | 19 | 20 | #ifndef __M_RANDOM__ 21 | #define __M_RANDOM__ 22 | 23 | 24 | #include "doomtype.h" 25 | 26 | 27 | 28 | // Returns a number from 0 to 255, 29 | // from a lookup table. 30 | int M_Random (void); 31 | 32 | // As M_Random, but used only by the play simulation. 33 | int P_Random (void); 34 | 35 | // Fix randoms for demos. 36 | void M_ClearRandom (void); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/strife/p_inter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // 17 | // 18 | 19 | 20 | #ifndef __P_INTER__ 21 | #define __P_INTER__ 22 | 23 | // haleyjd [STRIFE]: Multiple externals added 24 | boolean P_GiveCard(player_t* player, card_t card); 25 | boolean P_GiveBody(player_t* player, int num); 26 | boolean P_GiveArmor(player_t* player, int armortype); 27 | boolean P_GivePower(player_t* player, powertype_t power); 28 | boolean P_GiveAmmo(player_t* player, ammotype_t ammo, int num); 29 | boolean P_GiveWeapon(player_t* player, weapontype_t weapon, boolean dropped); 30 | void P_KillMobj(mobj_t* source, mobj_t* target); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/strife/p_setup.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Setup a game, startup stuff. 17 | // 18 | 19 | 20 | #ifndef __P_SETUP__ 21 | #define __P_SETUP__ 22 | 23 | 24 | 25 | 26 | // NOT called by W_Ticker. Fixme. 27 | // [STRIFE] Removed episode parameter 28 | void 29 | P_SetupLevel 30 | ( int map, 31 | int playermask, 32 | skill_t skill); 33 | 34 | // Called by startup code. 35 | void P_Init (void); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/strife/p_tick.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // ? 17 | // 18 | 19 | 20 | #ifndef __P_TICK__ 21 | #define __P_TICK__ 22 | 23 | 24 | 25 | 26 | // Called by C_Ticker, 27 | // can call G_PlayerExited. 28 | // Carries out all thinking of monsters and players. 29 | void P_Ticker (void); 30 | 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/strife/r_bsp.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh module, BSP traversal and handling. 17 | // 18 | 19 | 20 | #ifndef __R_BSP__ 21 | #define __R_BSP__ 22 | 23 | 24 | 25 | extern seg_t* curline; 26 | extern side_t* sidedef; 27 | extern line_t* linedef; 28 | extern sector_t* frontsector; 29 | extern sector_t* backsector; 30 | 31 | extern int rw_x; 32 | extern int rw_stopx; 33 | 34 | extern boolean segtextured; 35 | 36 | // false if the back side is the same plane 37 | extern boolean markfloor; 38 | extern boolean markceiling; 39 | 40 | extern boolean skymap; 41 | 42 | extern drawseg_t drawsegs[MAXDRAWSEGS]; 43 | extern drawseg_t* ds_p; 44 | 45 | extern lighttable_t** hscalelight; 46 | extern lighttable_t** vscalelight; 47 | extern lighttable_t** dscalelight; 48 | 49 | 50 | typedef void (*drawfunc_t) (int start, int stop); 51 | 52 | 53 | // BSP? 54 | void R_ClearClipSegs (void); 55 | void R_ClearDrawSegs (void); 56 | 57 | 58 | void R_RenderBSPNode (int bspnum); 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/strife/r_data.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh module, data I/O, caching, retrieval of graphics 17 | // by name. 18 | // 19 | 20 | 21 | #ifndef __R_DATA__ 22 | #define __R_DATA__ 23 | 24 | #include "r_defs.h" 25 | #include "r_state.h" 26 | #include "p_spec.h" // villsa [STRIFE] 27 | 28 | 29 | // Retrieve column data for span blitting. 30 | byte* 31 | R_GetColumn 32 | ( int tex, 33 | int col ); 34 | 35 | 36 | // I/O, setting up the stuff. 37 | void R_InitData (void); 38 | void R_PrecacheLevel (void); 39 | 40 | 41 | // Retrieval. 42 | // Floor/ceiling opaque texture tiles, 43 | // lookup by name. For animation? 44 | int R_FlatNumForName(const char *name); 45 | 46 | 47 | // Called by P_Ticker for switches and animations, 48 | // returns the texture number for the texture name. 49 | int R_TextureNumForName (const char *name); 50 | int R_CheckTextureNumForName (const char *name); 51 | void R_SoundNumForDoor(vldoor_t* door); // villsa [STRIFE] 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/strife/r_local.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh (R_*) module, global header. 17 | // All the rendering/drawing stuff is here. 18 | // 19 | 20 | #ifndef __R_LOCAL__ 21 | #define __R_LOCAL__ 22 | 23 | // Binary Angles, sine/cosine/atan lookups. 24 | #include "tables.h" 25 | 26 | // Screen size related parameters. 27 | #include "doomdef.h" 28 | 29 | // Include the refresh/render data structs. 30 | #include "r_data.h" 31 | 32 | 33 | 34 | // 35 | // Separate header file for each module. 36 | // 37 | #include "r_main.h" 38 | #include "r_bsp.h" 39 | #include "r_segs.h" 40 | #include "r_plane.h" 41 | #include "r_data.h" 42 | #include "r_things.h" 43 | #include "r_draw.h" 44 | 45 | #endif // __R_LOCAL__ 46 | -------------------------------------------------------------------------------- /src/strife/r_segs.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh module, drawing LineSegs from BSP. 17 | // 18 | 19 | 20 | #ifndef __R_SEGS__ 21 | #define __R_SEGS__ 22 | 23 | 24 | 25 | 26 | void 27 | R_RenderMaskedSegRange 28 | ( drawseg_t* ds, 29 | int x1, 30 | int x2 ); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/strife/r_sky.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Sky rendering. The DOOM sky is a texture map like any 17 | // wall, wrapping around. A 1024 columns equal 360 degrees. 18 | // The default sky map is 256 columns and repeats 4 times 19 | // on a 320 screen? 20 | // 21 | // 22 | 23 | 24 | 25 | // Needed for FRACUNIT. 26 | #include "m_fixed.h" 27 | 28 | // Needed for Flat retrieval. 29 | #include "r_data.h" 30 | 31 | 32 | #include "r_sky.h" 33 | 34 | // 35 | // sky mapping 36 | // 37 | int skyflatnum; 38 | int skytexture; 39 | int skytexturemid; 40 | 41 | 42 | 43 | // 44 | // R_InitSkyMap 45 | // Called whenever the view size changes. 46 | // 47 | void R_InitSkyMap (void) 48 | { 49 | // haleyjd 10/03/10: [STRIFE] Sky is set here, not in G_DoLoadLevel. 50 | // Also skytexturemid changed from 100 to 199. 51 | skyflatnum = R_FlatNumForName ( SKYFLATNAME ); 52 | skytexturemid = 199*FRACUNIT; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /src/strife/r_sky.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Sky rendering. 17 | // 18 | 19 | 20 | #ifndef __R_SKY__ 21 | #define __R_SKY__ 22 | 23 | 24 | 25 | // SKY, store the number for name. 26 | #define SKYFLATNAME "F_SKY001" // villsa [STRIFE] 27 | 28 | // The sky map is 256*128*4 maps. 29 | #define ANGLETOSKYSHIFT 22 30 | 31 | extern int skytexture; 32 | extern int skytexturemid; 33 | 34 | // Called whenever the view size changes. 35 | void R_InitSkyMap (void); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/strife/wi_stuff.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Intermission. 17 | // 18 | 19 | #ifndef __WI_STUFF__ 20 | #define __WI_STUFF__ 21 | 22 | // haleyjd 08/23/2010: Strife does not have an intermission 23 | #if 0 24 | //#include "v_video.h" 25 | 26 | #include "doomdef.h" 27 | 28 | // States for the intermission 29 | 30 | typedef enum 31 | { 32 | NoState = -1, 33 | StatCount, 34 | ShowNextLoc, 35 | } stateenum_t; 36 | 37 | // Called by main loop, animate the intermission. 38 | void WI_Ticker (void); 39 | 40 | // Called by main loop, 41 | // draws the intermission directly into the screen buffer. 42 | void WI_Drawer (void); 43 | 44 | // Setup for an intermission screen. 45 | void WI_Start(wbstartstruct_t* wbstartstruct); 46 | 47 | // Shut down the intermission screen 48 | void WI_End(void); 49 | 50 | #endif 51 | #endif 52 | -------------------------------------------------------------------------------- /src/v_diskicon.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2021-2022 Graham Sanderson 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // DESCRIPTION: 17 | // Disk load indicator. 18 | // 19 | 20 | #ifndef __V_DISKICON__ 21 | #define __V_DISKICON__ 22 | 23 | // Dimensions of the flashing "loading" disk icon 24 | 25 | #define LOADING_DISK_W 16 26 | #define LOADING_DISK_H 16 27 | 28 | #if !NO_USE_LOADING_DISK 29 | extern void V_EnableLoadingDisk(const char *lump_name, int xoffs, int yoffs); 30 | extern void V_BeginRead(size_t nbytes); 31 | extern void V_DrawDiskIcon(void); 32 | extern void V_RestoreDiskBackground(void); 33 | #else 34 | static inline void V_EnableLoadingDisk(const char *lump_name, int xoffs, int yoffs) {} 35 | static inline void V_BeginRead(size_t nbytes) {} 36 | static inline void V_DrawDiskIcon(void) {} 37 | static inline void V_RestoreDiskBackground(void) {} 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/w_checksum.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Generate a checksum of the WAD directory. 17 | // 18 | 19 | #ifndef W_CHECKSUM_H 20 | #define W_CHECKSUM_H 21 | 22 | #include "doomtype.h" 23 | 24 | extern void W_Checksum(sha1_digest_t digest); 25 | 26 | #endif /* #ifndef W_CHECKSUM_H */ 27 | 28 | -------------------------------------------------------------------------------- /src/w_main.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Common code to parse command line, identifying WAD files to load. 16 | // 17 | 18 | #ifndef W_MAIN_H 19 | #define W_MAIN_H 20 | 21 | #include "d_mode.h" 22 | 23 | boolean W_ParseCommandLine(void); 24 | void W_CheckCorrectIWAD(GameMission_t mission); 25 | 26 | // Autoload all .wad files from the given directory: 27 | void W_AutoLoadWADs(const char *path); 28 | 29 | #endif /* #ifndef W_MAIN_H */ 30 | 31 | -------------------------------------------------------------------------------- /src/w_merge.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Handles merging of PWADs, similar to deutex's -merge option 16 | // 17 | // Ideally this should work exactly the same as in deutex, but trying to 18 | // read the deutex source code made my brain hurt. 19 | // 20 | 21 | #ifndef W_MERGE_H 22 | #define W_MERGE_H 23 | 24 | #define W_NWT_MERGE_SPRITES 0x1 25 | #define W_NWT_MERGE_FLATS 0x2 26 | 27 | // Add a new WAD and merge it into the main directory 28 | 29 | void W_MergeFile(const char *filename); 30 | 31 | // NWT-style merging 32 | 33 | void W_NWTMergeFile(const char *filename, int flags); 34 | 35 | // Acts the same as NWT's "-merge" option. 36 | 37 | void W_NWTDashMerge(const char *filename); 38 | 39 | // Debug function that prints the WAD directory. 40 | 41 | void W_PrintDirectory(void); 42 | 43 | #endif /* #ifndef W_MERGE_H */ 44 | 45 | -------------------------------------------------------------------------------- /src/whd_gen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT PICO_ON_DEVICE) 2 | add_library(wad INTERFACE) 3 | target_sources(wad INTERFACE 4 | wad.cpp) 5 | target_include_directories(wad INTERFACE ${CMAKE_CURRENT_LIST_DIR}) 6 | 7 | add_executable(whd_gen 8 | whd_gen.cpp 9 | mus2seq.cpp 10 | huff.cpp 11 | lodepng.cpp 12 | compress_mus.cpp 13 | ../tiny_huff.c 14 | ../musx_decoder.c 15 | ../image_decoder.c 16 | ) 17 | 18 | target_compile_definitions(whd_gen PRIVATE IS_WHD_GEN=1) 19 | 20 | target_include_directories(whd_gen PRIVATE .. ../doom) 21 | target_link_libraries(whd_gen PRIVATE wad adpcm-lib) 22 | endif() 23 | -------------------------------------------------------------------------------- /src/whd_gen/compress_mus.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 20222 Graham Sanderson 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | #pragma once 7 | #include "wad.h" 8 | #include 9 | #include "statsomizer.h" 10 | 11 | extern statsomizer musx_decoder_space; 12 | 13 | std::vector compress_mus(std::pair &e); 14 | 15 | -------------------------------------------------------------------------------- /src/whd_gen/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 20222 Graham Sanderson 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | // not sure we need anything, but doom headers expect it 7 | 8 | void __attribute__((noreturn)) fail(const char *msg, ...); 9 | 10 | //#define SAVE_PNG 1 11 | #define VERIFY_ENCODING 1 // extra work => warm fuzzy feeling 12 | #define USE_MUSX 1 13 | 14 | //#define MUS_PER_EVENT_GAP 1 15 | #define MUS_GROUP_SIZE_CODE 1 16 | 17 | #define TEXTURE_PIXEL_STATS 1 18 | //#define PRETEND_COMPRESS 1 19 | // todo sounds a bit better with 5, but slower 20 | #ifndef NDEBUG 21 | #define LOOKAHEAD 3 22 | #else 23 | #define LOOKAHEAD 5 24 | #endif 25 | 26 | #define CONSIDER_SEQUENCES 0 27 | #define SEQUENCE 10 28 | 29 | //#define SAVE_PNG 1 30 | 31 | -------------------------------------------------------------------------------- /src/whd_gen/huff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 20222 Graham Sanderson 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | #pragma once 7 | 8 | #include 9 | #include 10 | 11 | template std::vector huff(uint8_t *data, int size, bool dump = false); -------------------------------------------------------------------------------- /src/whd_gen/statsomizer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 20222 Graham Sanderson 3 | * 4 | * SPDX-License-Identifier: BSD-3-Clause 5 | */ 6 | #pragma once 7 | #include 8 | #include 9 | #include 10 | 11 | 12 | struct statsomizer { 13 | const std::string name; 14 | 15 | explicit statsomizer(std::string name) : name(std::move(name)) { reset(); } 16 | 17 | void record(int value) { 18 | total += value; 19 | min = std::min(min, value); 20 | max = std::max(max, value); 21 | count++; 22 | } 23 | 24 | void record_print(int value) { 25 | record(value); 26 | printf("%20s: value=%d min=%d max=%d avg=%d\n", name.c_str(), value, min, max, 27 | count ? ((int) (total / count)) : 0); 28 | } 29 | 30 | void print_summary() const { 31 | printf("%20s: min=%d max=%d avg=%d count=%d total=%ld\n", name.c_str(), min, max, 32 | count ? ((int) (total / count)) : 0, count, total); 33 | } 34 | 35 | void reset() { 36 | total = 0; 37 | count = 0; 38 | min = std::numeric_limits::max(); 39 | max = std::numeric_limits::min(); 40 | } 41 | 42 | long total; 43 | int count, min, max; 44 | }; 45 | -------------------------------------------------------------------------------- /textscreen/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | *.a 5 | tags 6 | TAGS 7 | -------------------------------------------------------------------------------- /textscreen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (PICO_SDK) 2 | add_library(textscreen INTERFACE) 3 | else() 4 | add_library(textscreen 5 | textscreen.h 6 | txt_conditional.c txt_conditional.h 7 | txt_checkbox.c txt_checkbox.h 8 | txt_desktop.c txt_desktop.h 9 | txt_dropdown.c txt_dropdown.h 10 | txt_fileselect.c txt_fileselect.h 11 | txt_gui.c txt_gui.h 12 | txt_inputbox.c txt_inputbox.h 13 | txt_io.c txt_io.h 14 | txt_main.h 15 | txt_button.c txt_button.h 16 | txt_label.c txt_label.h 17 | txt_radiobutton.c txt_radiobutton.h 18 | txt_scrollpane.c txt_scrollpane.h 19 | txt_separator.c txt_separator.h 20 | txt_spinctrl.c txt_spinctrl.h 21 | txt_sdl.c txt_sdl.h 22 | txt_strut.c txt_strut.h 23 | txt_table.c txt_table.h 24 | txt_utf8.c txt_utf8.h 25 | txt_widget.c txt_widget.h 26 | txt_window.c txt_window.h 27 | txt_window_action.c txt_window_action.h) 28 | target_include_directories(textscreen 29 | INTERFACE "." 30 | PRIVATE "../src/") 31 | target_link_libraries(textscreen m SDL2::SDL2) 32 | endif() 33 | -------------------------------------------------------------------------------- /textscreen/examples/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | guitest 5 | calculator 6 | *.exe 7 | tags 8 | TAGS 9 | -------------------------------------------------------------------------------- /textscreen/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/textscreen 3 | 4 | noinst_PROGRAMS=guitest calculator 5 | 6 | guitest_LDADD = ../libtextscreen.a @LDFLAGS@ @SDL_LIBS@ 7 | guitest_SOURCES = guitest.c 8 | 9 | calculator_LDADD = ../libtextscreen.a @LDFLAGS@ @SDL_LIBS@ 10 | calculator_SOURCES = calculator.c 11 | 12 | -------------------------------------------------------------------------------- /textscreen/fonts/Makefile.am: -------------------------------------------------------------------------------- 1 | FONT_HDRS = small.h normal.h large.h codepage.h 2 | EXTRA_DIST = small.png normal.png large.png convert-font $(FONT_HDRS) 3 | 4 | noinst_DATA = $(FONT_HDRS) 5 | 6 | if HAVE_PYTHON 7 | 8 | small.h: small.png convert-font 9 | ./convert-font small small.png small.h 10 | 11 | normal.h: normal.png convert-font 12 | ./convert-font normal normal.png normal.h 13 | 14 | large.h: large.png convert-font 15 | ./convert-font large large.png large.h 16 | 17 | endif 18 | 19 | -------------------------------------------------------------------------------- /textscreen/fonts/large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/textscreen/fonts/large.png -------------------------------------------------------------------------------- /textscreen/fonts/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/textscreen/fonts/normal.png -------------------------------------------------------------------------------- /textscreen/fonts/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsheldiii/rp2040-doom-LCD/14a2b48c07bb7e6fab57939909960e4dae965da0/textscreen/fonts/small.png -------------------------------------------------------------------------------- /textscreen/textscreen.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TEXTSCREEN_H 16 | #define TEXTSCREEN_H 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | #include "../src/doomkeys.h" 23 | #include "txt_main.h" 24 | 25 | #include "txt_button.h" 26 | #include "txt_checkbox.h" 27 | #include "txt_conditional.h" 28 | #include "txt_desktop.h" 29 | #include "txt_dropdown.h" 30 | #include "txt_fileselect.h" 31 | #include "txt_inputbox.h" 32 | #include "txt_label.h" 33 | #include "txt_radiobutton.h" 34 | #include "txt_scrollpane.h" 35 | #include "txt_separator.h" 36 | #include "txt_spinctrl.h" 37 | #include "txt_strut.h" 38 | #include "txt_table.h" 39 | #include "txt_widget.h" 40 | #include "txt_window_action.h" 41 | #include "txt_window.h" 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif /* #ifndef TEXTSCREEN_H */ 48 | 49 | -------------------------------------------------------------------------------- /textscreen/txt_gui.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Text mode emulation in SDL 16 | // 17 | 18 | #ifndef TXT_GUI_H 19 | #define TXT_GUI_H 20 | 21 | #define TXT_INACTIVE_WINDOW_BACKGROUND TXT_COLOR_BLACK 22 | #define TXT_ACTIVE_WINDOW_BACKGROUND TXT_COLOR_BLUE 23 | #define TXT_HOVER_BACKGROUND TXT_COLOR_CYAN 24 | 25 | void TXT_DrawDesktopBackground(const char *title); 26 | void TXT_DrawWindowFrame(const char *title, int x, int y, int w, int h); 27 | void TXT_DrawSeparator(int x, int y, int w); 28 | void TXT_DrawCodePageString(const char *s); 29 | void TXT_DrawString(const char *s); 30 | int TXT_CanDrawCharacter(unsigned int c); 31 | 32 | void TXT_DrawHorizScrollbar(int x, int y, int w, int cursor, int range); 33 | void TXT_DrawVertScrollbar(int x, int y, int h, int cursor, int range); 34 | 35 | void TXT_InitClipArea(void); 36 | void TXT_PushClipArea(int x1, int x2, int y1, int y2); 37 | void TXT_PopClipArea(void); 38 | 39 | #endif /* #ifndef TXT_GUI_H */ 40 | 41 | -------------------------------------------------------------------------------- /textscreen/txt_io.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Text mode emulation in SDL 16 | // 17 | 18 | #ifndef TXT_IO_H 19 | #define TXT_IO_H 20 | 21 | #include "txt_main.h" 22 | 23 | typedef struct 24 | { 25 | int bgcolor; 26 | int fgcolor; 27 | } txt_saved_colors_t; 28 | 29 | void TXT_PutSymbol(int c); 30 | void TXT_PutChar(int c); 31 | void TXT_Puts(const char *s); 32 | void TXT_GotoXY(int x, int y); 33 | void TXT_GetXY(int *x, int *y); 34 | void TXT_FGColor(txt_color_t color); 35 | void TXT_BGColor(int color, int blinking); 36 | void TXT_SaveColors(txt_saved_colors_t *save); 37 | void TXT_RestoreColors(txt_saved_colors_t *save); 38 | void TXT_ClearScreen(void); 39 | 40 | #endif /* #ifndef TXT_IO_H */ 41 | 42 | -------------------------------------------------------------------------------- /textscreen/txt_sdl.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Text mode emulation in SDL 16 | // 17 | 18 | #ifndef TXT_SDL_H 19 | #define TXT_SDL_H 20 | 21 | // The textscreen API itself doesn't need SDL; however, SDL needs its 22 | // headers included where main() is defined. 23 | 24 | #include "SDL.h" 25 | 26 | // Event callback function type: a function of this type can be used 27 | // to intercept events in the textscreen event processing loop. 28 | // Returning 1 will cause the event to be eaten; the textscreen code 29 | // will not see it. 30 | 31 | typedef int (*TxtSDLEventCallbackFunc)(SDL_Event *event, void *user_data); 32 | 33 | // Set a callback function to call in the SDL event loop. Useful for 34 | // intercepting events. Pass callback=NULL to clear an existing 35 | // callback function. 36 | // user_data is a void pointer to be passed to the callback function. 37 | 38 | void TXT_SDL_SetEventCallback(TxtSDLEventCallbackFunc callback, void *user_data); 39 | 40 | #endif /* #ifndef TXT_SDL_H */ 41 | 42 | -------------------------------------------------------------------------------- /textscreen/txt_strut.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TXT_STRUT_H 16 | #define TXT_STRUT_H 17 | 18 | /** 19 | * @file txt_strut.h 20 | * 21 | * Strut widget. 22 | */ 23 | 24 | /** 25 | * Strut widget. 26 | * 27 | * A strut is a widget that takes up a fixed amount of space. It can 28 | * be visualised as a transparent box. Struts are used to provide 29 | * spacing between widgets. 30 | */ 31 | 32 | typedef struct txt_strut_s txt_strut_t; 33 | 34 | #include "txt_widget.h" 35 | 36 | struct txt_strut_s 37 | { 38 | txt_widget_t widget; 39 | int width; 40 | int height; 41 | }; 42 | 43 | /** 44 | * Create a new strut. 45 | * 46 | * @param width Width of the strut, in characters. 47 | * @param height Height of the strut, in characters. 48 | */ 49 | 50 | txt_strut_t *TXT_NewStrut(int width, int height); 51 | 52 | #endif /* #ifndef TXT_STRUT_H */ 53 | 54 | 55 | -------------------------------------------------------------------------------- /textscreen/txt_utf8.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TXT_UTF8_H 16 | #define TXT_UTF8_H 17 | 18 | #include 19 | 20 | char *TXT_EncodeUTF8(char *p, unsigned int c); 21 | unsigned int TXT_DecodeUTF8(const char **ptr); 22 | unsigned int TXT_UTF8_Strlen(const char *s); 23 | char *TXT_UTF8_SkipChars(const char *s, unsigned int n); 24 | 25 | #endif /* #ifndef TXT_UTF8_H */ 26 | 27 | -------------------------------------------------------------------------------- /up.sh: -------------------------------------------------------------------------------- 1 | #xxd -i tiny.wad | sed "s/unsigned/const unsigned/g" >src/tiny.wad.h 2 | xxd -i tiny.whd | sed "s/unsigned/const unsigned/g" >src/tiny.whd.h 3 | #cp tiny.wad.meta.h src/ 4 | echo dont forget 5 | echo picotool load -v -n -t bin tiny.whd -o 0x10040000 6 | --------------------------------------------------------------------------------