Compare commits

3 Commits
Author SHA1 Message Date
gronod 5a779c4ce5 macOS port: pin build workflow to macOS 12
Build macOS app / Build DOOM.app (push) Successful in 1m17s
2026-09-18 20:04:12 +01:00
gronod 6aaf73d70c macOS port: add app build workflow
Build macOS app / Build DOOM.app (push) Canceled after 0s
2026-09-18 20:01:16 +01:00
gronod 1eb2d9a1bf macOS port: buildable and runnable on macOS 12+ (x86_64)
Replaces X11/MIT-SHM video and Linux OSS audio with SDL2, and plays
MIDI music through AudioToolbox MusicSequence/MusicPlayer (system DLS
synth, no soundfont needed). MUS lumps are converted by a new mus2mid;
already-MIDI lumps pass through.

Also includes the 64-bit portability fixes needed to run on modern
clang/LP64: pointer-size casts and struct layouts in the renderer,
savegame code, zone allocator and config defaults, plus removal of
obsolete headers and unsequenced-modification UB.
2026-09-18 17:56:06 +01:00
32 changed files with 2305 additions and 1367 deletions
+41
View File
@@ -0,0 +1,41 @@
name: Build macOS app
on:
push:
branches: [main, develop/mac]
tags: ['v*']
pull_request:
workflow_dispatch:
jobs:
build:
name: Build DOOM.app
# Requires a Gitea Actions runner on macOS with Xcode installed.
runs-on: macos-12
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Build app bundle
run: |
xcodebuild \
-project DOOM.xcodeproj \
-scheme DOOM \
-configuration Release \
-derivedDataPath build/DerivedData \
build
- name: Package app bundle
run: |
mkdir -p build/artifacts
ditto -c -k --sequesterRsrc --keepParent \
build/DerivedData/Build/Products/Release/DOOM.app \
build/artifacts/DOOM-macos-x86_64.zip
- name: Upload app bundle
uses: actions/upload-artifact@v4
with:
name: DOOM-macos-x86_64
path: build/artifacts/DOOM-macos-x86_64.zip
if-no-files-found: error
+20
View File
@@ -0,0 +1,20 @@
# macOS port build artifacts
linuxdoom-1.10/macos/
# local IWADs for testing
wads/
# DOOM.app fetched dependencies and bundled IWADs
macos-app/Frameworks/*
!macos-app/Frameworks/.gitkeep
macos-app/Resources/*.wad
# Xcode user state / build output
build/
xcuserdata/
*.xcuserstate
# misc
*.o
*~
.DS_Store
+762
View File
@@ -0,0 +1,762 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objects = {
/* Begin PBXBuildFile section */
82F6E0F9ED5E594D35F0679B /* am_map.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C1249AA7391E508A413D99D /* am_map.c */; };
2BDA81EB4E944B780E1B1711 /* d_items.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A9107C461DF4C359A83F659 /* d_items.c */; };
BF2E14B37531244DDAFE0785 /* d_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C736B0312B7395E12A89A69 /* d_main.c */; };
7FB61C1FDFCD4E2D071687ED /* d_net.c in Sources */ = {isa = PBXBuildFile; fileRef = 0946F594DCA60CF66CAA0883 /* d_net.c */; };
6B2A575E33B4FC23D2483EBD /* doomdef.c in Sources */ = {isa = PBXBuildFile; fileRef = C8ADFE9F95F07F1B81E1B444 /* doomdef.c */; };
30B9C74F667994A9614DE976 /* doomstat.c in Sources */ = {isa = PBXBuildFile; fileRef = 7ECB0EB06E4B76515A4F0BA6 /* doomstat.c */; };
78936A55AD77A999214909E2 /* dstrings.c in Sources */ = {isa = PBXBuildFile; fileRef = 78806ABFEAE130CA3DAA2CD3 /* dstrings.c */; };
8317912472471287640E22F3 /* f_finale.c in Sources */ = {isa = PBXBuildFile; fileRef = A167848610850E67F10E6668 /* f_finale.c */; };
163A5317840192ED400D24B2 /* f_wipe.c in Sources */ = {isa = PBXBuildFile; fileRef = CB4AD04ACD525ECEB9010AC5 /* f_wipe.c */; };
A65189AF52EEFB04810645C2 /* g_game.c in Sources */ = {isa = PBXBuildFile; fileRef = 903570F13D9D87FC23237602 /* g_game.c */; };
66818C319AC2B030B514DE84 /* hu_lib.c in Sources */ = {isa = PBXBuildFile; fileRef = E99411D19E9170BD460C28D3 /* hu_lib.c */; };
BEDF7D6C8440CAC49D2ED404 /* hu_stuff.c in Sources */ = {isa = PBXBuildFile; fileRef = B260A071DAD831B6C0C4021F /* hu_stuff.c */; };
6C5484D260FB220A3F4CA91F /* i_mac.c in Sources */ = {isa = PBXBuildFile; fileRef = B75D30780094ADA2EED7B8A3 /* i_mac.c */; };
F5FA2D4A3E109C8F28EB41C6 /* i_main.c in Sources */ = {isa = PBXBuildFile; fileRef = F28C9FA40912326D57455E4C /* i_main.c */; };
F5717810EF6D8605368B8AC6 /* i_net.c in Sources */ = {isa = PBXBuildFile; fileRef = 5755D7953D2CC9BD4B2C6F26 /* i_net.c */; };
2C7223C10E705CBE3FEEC5A7 /* i_sound.c in Sources */ = {isa = PBXBuildFile; fileRef = BA0385F1A8C71EDEB6444D58 /* i_sound.c */; };
C61F7E28D5DE331BBF906656 /* i_system.c in Sources */ = {isa = PBXBuildFile; fileRef = B09554F6419D841C2DDC3A3F /* i_system.c */; };
84A7399386806CA435512FDF /* i_video.c in Sources */ = {isa = PBXBuildFile; fileRef = 3DE17612DBDBE02C182E176C /* i_video.c */; };
35ED2B72301FFEB68CA765E0 /* info.c in Sources */ = {isa = PBXBuildFile; fileRef = 2824532F7E2266F290E8556E /* info.c */; };
689D31B57C1429748892672A /* m_argv.c in Sources */ = {isa = PBXBuildFile; fileRef = C26F63CB7518FA68DC098927 /* m_argv.c */; };
05619C6CD2FE9C56051A0D3A /* m_bbox.c in Sources */ = {isa = PBXBuildFile; fileRef = A5F97DB3EDB9F36FF8653E92 /* m_bbox.c */; };
4DD4D5554D8481BBAE46DCC2 /* m_cheat.c in Sources */ = {isa = PBXBuildFile; fileRef = C3FF8AB3B486A21107BE8054 /* m_cheat.c */; };
921BDB77DC12080237981267 /* m_fixed.c in Sources */ = {isa = PBXBuildFile; fileRef = 7F0DF2D73FB79B8AD5ACB2DE /* m_fixed.c */; };
3F9A9E8F9659B01790430EA0 /* m_menu.c in Sources */ = {isa = PBXBuildFile; fileRef = B05F75F56BB6577149AC036F /* m_menu.c */; };
82A86DAC779013F55EE3DCC0 /* m_misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 24E0027A04D0E4F5DB18B71E /* m_misc.c */; };
E9B3762F800B83961714B938 /* m_random.c in Sources */ = {isa = PBXBuildFile; fileRef = DA4629FA93656D5E662A8518 /* m_random.c */; };
CD2BF8D583E1AA0D3E6A17B1 /* m_swap.c in Sources */ = {isa = PBXBuildFile; fileRef = E3ECE012D8D1F6C5611D12EE /* m_swap.c */; };
F3893CF011A858E56C763AC0 /* mus2mid.c in Sources */ = {isa = PBXBuildFile; fileRef = C038FF76E4EE57D1EB90FA47 /* mus2mid.c */; };
29A0E82DEA78259E22419FFD /* p_ceilng.c in Sources */ = {isa = PBXBuildFile; fileRef = 132834BA5E42B0AE023BB20A /* p_ceilng.c */; };
F6ACCB541AA76F2C147724E4 /* p_doors.c in Sources */ = {isa = PBXBuildFile; fileRef = 65A2C0D8B8044DFCD9482EF3 /* p_doors.c */; };
CECD2F2728F56E554460AAB7 /* p_enemy.c in Sources */ = {isa = PBXBuildFile; fileRef = B88A90BB49C9B9486072EB01 /* p_enemy.c */; };
5F93109C3D22BCFA53EBF7C0 /* p_floor.c in Sources */ = {isa = PBXBuildFile; fileRef = ACAFFD6FB56D272A9D1491CE /* p_floor.c */; };
5AB29336A26F355E77C5E683 /* p_inter.c in Sources */ = {isa = PBXBuildFile; fileRef = 3995A0ACA1FA52CEAFA44CF8 /* p_inter.c */; };
5CF62EB67B2484CAFA9B6D80 /* p_lights.c in Sources */ = {isa = PBXBuildFile; fileRef = 7E5F821B3812F96722BC25EB /* p_lights.c */; };
879E7CB0A7D9B9DB730FD0F1 /* p_map.c in Sources */ = {isa = PBXBuildFile; fileRef = CA21A36EBB684D2162230F13 /* p_map.c */; };
7E6296DA40892F4C0BD123D3 /* p_maputl.c in Sources */ = {isa = PBXBuildFile; fileRef = 6799BC991B1E628331C05276 /* p_maputl.c */; };
F93A1447576A62C98B129C7C /* p_mobj.c in Sources */ = {isa = PBXBuildFile; fileRef = 1EDDC28A79DD604E1B2B972E /* p_mobj.c */; };
4E9467DACCBCA0482BE58FAF /* p_plats.c in Sources */ = {isa = PBXBuildFile; fileRef = DDCCC105D034FF3051A182AD /* p_plats.c */; };
5F7024633AB08477229E9571 /* p_pspr.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D7A5D24FBE85D47147C96D /* p_pspr.c */; };
23463C592FD57B625B40F1CF /* p_saveg.c in Sources */ = {isa = PBXBuildFile; fileRef = 18E6D369197C756B02D66806 /* p_saveg.c */; };
63625621719E5D09C72D39E9 /* p_setup.c in Sources */ = {isa = PBXBuildFile; fileRef = 231879CBFEA7B56C26701910 /* p_setup.c */; };
E178BFECD7F176C806D7FD8A /* p_sight.c in Sources */ = {isa = PBXBuildFile; fileRef = 02479BD59F2969CB6C188E23 /* p_sight.c */; };
3D73975A74E28C62F614C1FE /* p_spec.c in Sources */ = {isa = PBXBuildFile; fileRef = 16F0B6B5698FD35DE253901D /* p_spec.c */; };
CDB29E5AD4131CB322B5CBCE /* p_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = CE852F51B0CDCD0CD5494776 /* p_switch.c */; };
801C77E385CEF0A47F4FF220 /* p_telept.c in Sources */ = {isa = PBXBuildFile; fileRef = BA391D056205328284DC3ADA /* p_telept.c */; };
6D1A239D80B01D75CD76AC78 /* p_tick.c in Sources */ = {isa = PBXBuildFile; fileRef = 76B089023AFD70AA399C8C3E /* p_tick.c */; };
BF803A17BF02E0F0FF8D07FA /* p_user.c in Sources */ = {isa = PBXBuildFile; fileRef = 1BBF7B26D7F5DF00432D36A5 /* p_user.c */; };
68A7415DB8DDB38BDC5BC75F /* r_bsp.c in Sources */ = {isa = PBXBuildFile; fileRef = AC321B907DED587C4C147461 /* r_bsp.c */; };
0FE67938E8F1855FE48AE139 /* r_data.c in Sources */ = {isa = PBXBuildFile; fileRef = D8FD57CA2905B9E0028DE496 /* r_data.c */; };
45F6027426D1A5A2C00AD654 /* r_draw.c in Sources */ = {isa = PBXBuildFile; fileRef = 72BED770C06834E767E49D8B /* r_draw.c */; };
78479D11DE6886936DF7200B /* r_main.c in Sources */ = {isa = PBXBuildFile; fileRef = F2EC84C3DCEEBF31461BAA44 /* r_main.c */; };
6A380AB8EAD898DE3352D254 /* r_plane.c in Sources */ = {isa = PBXBuildFile; fileRef = 3CF82C41DA90BE0157590A50 /* r_plane.c */; };
0181890B3F015BC3F488993A /* r_segs.c in Sources */ = {isa = PBXBuildFile; fileRef = 7573C1A6880C4FEC0D86C48B /* r_segs.c */; };
0A7184DB70B9DAEC6480AE2B /* r_sky.c in Sources */ = {isa = PBXBuildFile; fileRef = 3FF216D02ABB0A346BD2E8C6 /* r_sky.c */; };
503B1E04559E0DE48906ADE3 /* r_things.c in Sources */ = {isa = PBXBuildFile; fileRef = 9ABEDB53E06B9E06A24C650E /* r_things.c */; };
60BDEC56BA9F82A58B080E91 /* s_sound.c in Sources */ = {isa = PBXBuildFile; fileRef = 07E292AC79DD221AF48A4416 /* s_sound.c */; };
D6E131BAE2EE406A528C03BE /* sounds.c in Sources */ = {isa = PBXBuildFile; fileRef = ADD254F77288621DB649EBFB /* sounds.c */; };
DC5863CDFE040AEC220C9E9D /* st_lib.c in Sources */ = {isa = PBXBuildFile; fileRef = 126E2DAC3D92F92D60ADF5ED /* st_lib.c */; };
331C49BF34E355F6D75936D4 /* st_stuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 7C62CEE45BB0F4B334607EC8 /* st_stuff.c */; };
3F36BDC3BD00B29B1C13F032 /* tables.c in Sources */ = {isa = PBXBuildFile; fileRef = 062B78A42E122F1F2152DB06 /* tables.c */; };
F06C51BF023A4500B2C72997 /* v_video.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C9B1B94C5D95CE124CA681 /* v_video.c */; };
FA37803032021509700CB7A1 /* w_wad.c in Sources */ = {isa = PBXBuildFile; fileRef = FA5C87A06D300BE5CF80704B /* w_wad.c */; };
4B2E16D56A674DBC48A7CD5F /* wi_stuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 050BAA8143FA63FA6B4F9C65 /* wi_stuff.c */; };
AAD29AB7F067D5AF7DA9F00D /* z_zone.c in Sources */ = {isa = PBXBuildFile; fileRef = 28667C2A020800AEF92BDC90 /* z_zone.c */; };
FD2E1ABE0A756C81F88527CF /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04148481BADAC8F853AD4B02 /* SDL2.framework */; };
9F7C7D64968D1D2B9E488CA3 /* SDL2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 04148481BADAC8F853AD4B02 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy); }; };
0C3E13EE555A8BF56B0FC472 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC89C0F6A12E87504616F1A1 /* AudioToolbox.framework */; };
4B8AB0C2049572FD831CAC41 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8457C1F34DC6F4648A8EA7B2 /* CoreFoundation.framework */; };
C43324BCBF51AD2BAF1FC256 /* Resources in Resources */ = {isa = PBXBuildFile; fileRef = 48E8555FD63505A7E9A6B72C /* Resources */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
BAE1492BDE49D13FF7E211EB /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
9F7C7D64968D1D2B9E488CA3 /* SDL2.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
7C1249AA7391E508A413D99D /* am_map.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "am_map.c"; sourceTree = "<group>"; };
0A9107C461DF4C359A83F659 /* d_items.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "d_items.c"; sourceTree = "<group>"; };
4C736B0312B7395E12A89A69 /* d_main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "d_main.c"; sourceTree = "<group>"; };
0946F594DCA60CF66CAA0883 /* d_net.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "d_net.c"; sourceTree = "<group>"; };
C8ADFE9F95F07F1B81E1B444 /* doomdef.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "doomdef.c"; sourceTree = "<group>"; };
7ECB0EB06E4B76515A4F0BA6 /* doomstat.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "doomstat.c"; sourceTree = "<group>"; };
78806ABFEAE130CA3DAA2CD3 /* dstrings.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "dstrings.c"; sourceTree = "<group>"; };
A167848610850E67F10E6668 /* f_finale.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "f_finale.c"; sourceTree = "<group>"; };
CB4AD04ACD525ECEB9010AC5 /* f_wipe.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "f_wipe.c"; sourceTree = "<group>"; };
903570F13D9D87FC23237602 /* g_game.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "g_game.c"; sourceTree = "<group>"; };
E99411D19E9170BD460C28D3 /* hu_lib.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "hu_lib.c"; sourceTree = "<group>"; };
B260A071DAD831B6C0C4021F /* hu_stuff.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "hu_stuff.c"; sourceTree = "<group>"; };
B75D30780094ADA2EED7B8A3 /* i_mac.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "i_mac.c"; sourceTree = "<group>"; };
F28C9FA40912326D57455E4C /* i_main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "i_main.c"; sourceTree = "<group>"; };
5755D7953D2CC9BD4B2C6F26 /* i_net.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "i_net.c"; sourceTree = "<group>"; };
BA0385F1A8C71EDEB6444D58 /* i_sound.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "i_sound.c"; sourceTree = "<group>"; };
B09554F6419D841C2DDC3A3F /* i_system.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "i_system.c"; sourceTree = "<group>"; };
3DE17612DBDBE02C182E176C /* i_video.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "i_video.c"; sourceTree = "<group>"; };
2824532F7E2266F290E8556E /* info.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "info.c"; sourceTree = "<group>"; };
C26F63CB7518FA68DC098927 /* m_argv.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "m_argv.c"; sourceTree = "<group>"; };
A5F97DB3EDB9F36FF8653E92 /* m_bbox.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "m_bbox.c"; sourceTree = "<group>"; };
C3FF8AB3B486A21107BE8054 /* m_cheat.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "m_cheat.c"; sourceTree = "<group>"; };
7F0DF2D73FB79B8AD5ACB2DE /* m_fixed.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "m_fixed.c"; sourceTree = "<group>"; };
B05F75F56BB6577149AC036F /* m_menu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "m_menu.c"; sourceTree = "<group>"; };
24E0027A04D0E4F5DB18B71E /* m_misc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "m_misc.c"; sourceTree = "<group>"; };
DA4629FA93656D5E662A8518 /* m_random.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "m_random.c"; sourceTree = "<group>"; };
E3ECE012D8D1F6C5611D12EE /* m_swap.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "m_swap.c"; sourceTree = "<group>"; };
C038FF76E4EE57D1EB90FA47 /* mus2mid.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "mus2mid.c"; sourceTree = "<group>"; };
132834BA5E42B0AE023BB20A /* p_ceilng.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_ceilng.c"; sourceTree = "<group>"; };
65A2C0D8B8044DFCD9482EF3 /* p_doors.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_doors.c"; sourceTree = "<group>"; };
B88A90BB49C9B9486072EB01 /* p_enemy.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_enemy.c"; sourceTree = "<group>"; };
ACAFFD6FB56D272A9D1491CE /* p_floor.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_floor.c"; sourceTree = "<group>"; };
3995A0ACA1FA52CEAFA44CF8 /* p_inter.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_inter.c"; sourceTree = "<group>"; };
7E5F821B3812F96722BC25EB /* p_lights.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_lights.c"; sourceTree = "<group>"; };
CA21A36EBB684D2162230F13 /* p_map.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_map.c"; sourceTree = "<group>"; };
6799BC991B1E628331C05276 /* p_maputl.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_maputl.c"; sourceTree = "<group>"; };
1EDDC28A79DD604E1B2B972E /* p_mobj.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_mobj.c"; sourceTree = "<group>"; };
DDCCC105D034FF3051A182AD /* p_plats.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_plats.c"; sourceTree = "<group>"; };
00D7A5D24FBE85D47147C96D /* p_pspr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_pspr.c"; sourceTree = "<group>"; };
18E6D369197C756B02D66806 /* p_saveg.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_saveg.c"; sourceTree = "<group>"; };
231879CBFEA7B56C26701910 /* p_setup.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_setup.c"; sourceTree = "<group>"; };
02479BD59F2969CB6C188E23 /* p_sight.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_sight.c"; sourceTree = "<group>"; };
16F0B6B5698FD35DE253901D /* p_spec.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_spec.c"; sourceTree = "<group>"; };
CE852F51B0CDCD0CD5494776 /* p_switch.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_switch.c"; sourceTree = "<group>"; };
BA391D056205328284DC3ADA /* p_telept.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_telept.c"; sourceTree = "<group>"; };
76B089023AFD70AA399C8C3E /* p_tick.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_tick.c"; sourceTree = "<group>"; };
1BBF7B26D7F5DF00432D36A5 /* p_user.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "p_user.c"; sourceTree = "<group>"; };
AC321B907DED587C4C147461 /* r_bsp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "r_bsp.c"; sourceTree = "<group>"; };
D8FD57CA2905B9E0028DE496 /* r_data.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "r_data.c"; sourceTree = "<group>"; };
72BED770C06834E767E49D8B /* r_draw.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "r_draw.c"; sourceTree = "<group>"; };
F2EC84C3DCEEBF31461BAA44 /* r_main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "r_main.c"; sourceTree = "<group>"; };
3CF82C41DA90BE0157590A50 /* r_plane.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "r_plane.c"; sourceTree = "<group>"; };
7573C1A6880C4FEC0D86C48B /* r_segs.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "r_segs.c"; sourceTree = "<group>"; };
3FF216D02ABB0A346BD2E8C6 /* r_sky.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "r_sky.c"; sourceTree = "<group>"; };
9ABEDB53E06B9E06A24C650E /* r_things.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "r_things.c"; sourceTree = "<group>"; };
07E292AC79DD221AF48A4416 /* s_sound.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "s_sound.c"; sourceTree = "<group>"; };
ADD254F77288621DB649EBFB /* sounds.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "sounds.c"; sourceTree = "<group>"; };
126E2DAC3D92F92D60ADF5ED /* st_lib.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "st_lib.c"; sourceTree = "<group>"; };
7C62CEE45BB0F4B334607EC8 /* st_stuff.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "st_stuff.c"; sourceTree = "<group>"; };
062B78A42E122F1F2152DB06 /* tables.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "tables.c"; sourceTree = "<group>"; };
46C9B1B94C5D95CE124CA681 /* v_video.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "v_video.c"; sourceTree = "<group>"; };
FA5C87A06D300BE5CF80704B /* w_wad.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "w_wad.c"; sourceTree = "<group>"; };
050BAA8143FA63FA6B4F9C65 /* wi_stuff.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "wi_stuff.c"; sourceTree = "<group>"; };
28667C2A020800AEF92BDC90 /* z_zone.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = "z_zone.c"; sourceTree = "<group>"; };
52D48C7A8A71EA7C0D61F2D1 /* am_map.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "am_map.h"; sourceTree = "<group>"; };
847428EBC977581ACC940210 /* d_englsh.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "d_englsh.h"; sourceTree = "<group>"; };
7E4A3F02E155F50473065844 /* d_event.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "d_event.h"; sourceTree = "<group>"; };
EDC115934039E6719EEB7FA9 /* d_french.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "d_french.h"; sourceTree = "<group>"; };
B08A84522348EA78F374BCAF /* d_items.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "d_items.h"; sourceTree = "<group>"; };
5AC7EACC25C20D2A1DE21490 /* d_main.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "d_main.h"; sourceTree = "<group>"; };
9D75FAA0934E9271D2BF1AD2 /* d_net.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "d_net.h"; sourceTree = "<group>"; };
9A80FDD06A77885A7D711755 /* d_player.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "d_player.h"; sourceTree = "<group>"; };
706C790552BDF9D472BE2A11 /* d_textur.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "d_textur.h"; sourceTree = "<group>"; };
31817B47D0AF37E1CADCF920 /* d_think.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "d_think.h"; sourceTree = "<group>"; };
22D18A567D47B00636085424 /* d_ticcmd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "d_ticcmd.h"; sourceTree = "<group>"; };
F2E881375127CA1FD532EC3A /* doomdata.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "doomdata.h"; sourceTree = "<group>"; };
697A900391BF640F0C01CAA4 /* doomdef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "doomdef.h"; sourceTree = "<group>"; };
07022A5A08EF10069E651D14 /* doomstat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "doomstat.h"; sourceTree = "<group>"; };
84E4DC1B0E3C451783CC8A56 /* doomtype.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "doomtype.h"; sourceTree = "<group>"; };
A3EEF19FAD8709F8F501620C /* dstrings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "dstrings.h"; sourceTree = "<group>"; };
08841D9BFB835E849DA39129 /* f_finale.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "f_finale.h"; sourceTree = "<group>"; };
20BFF3A8AFF64D98A9C0ADFD /* f_wipe.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "f_wipe.h"; sourceTree = "<group>"; };
8AE64B472E5FEA4FBD87124F /* g_game.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "g_game.h"; sourceTree = "<group>"; };
27F93A14715C3C655B12BD10 /* hu_lib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "hu_lib.h"; sourceTree = "<group>"; };
C3D094CFF20B7CE4EC7D945B /* hu_stuff.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "hu_stuff.h"; sourceTree = "<group>"; };
8926EEC001C95F2E4FB5EC29 /* i_mac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "i_mac.h"; sourceTree = "<group>"; };
621F376174F9615D68C8B813 /* i_net.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "i_net.h"; sourceTree = "<group>"; };
CE4A99331FF9AF1DD23C1ECC /* i_sound.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "i_sound.h"; sourceTree = "<group>"; };
8EFEFE510E85B4CD42C15A70 /* i_system.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "i_system.h"; sourceTree = "<group>"; };
AD550DACDD38096F8B34D1B4 /* i_video.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "i_video.h"; sourceTree = "<group>"; };
0169EF0AF36EA30B4CF9D535 /* info.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "info.h"; sourceTree = "<group>"; };
B56ED104B852FA6CD01C0DCD /* m_argv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "m_argv.h"; sourceTree = "<group>"; };
101168CDCE250CF58F8580F7 /* m_bbox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "m_bbox.h"; sourceTree = "<group>"; };
C005C2AE1D1CE91DBD0784F3 /* m_cheat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "m_cheat.h"; sourceTree = "<group>"; };
DB422ACE75FEFEDE3EF18672 /* m_fixed.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "m_fixed.h"; sourceTree = "<group>"; };
D0278D42050744469C5484A9 /* m_menu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "m_menu.h"; sourceTree = "<group>"; };
A5CBA8A7C65FE307BF3A2DBE /* m_misc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "m_misc.h"; sourceTree = "<group>"; };
2F7B74F04DACE646638CBDE8 /* m_random.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "m_random.h"; sourceTree = "<group>"; };
CA4220DFC152A71026747B4C /* m_swap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "m_swap.h"; sourceTree = "<group>"; };
906E62901A7A56F0520739E5 /* mus2mid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "mus2mid.h"; sourceTree = "<group>"; };
A9889370CF033AAE5F22DDC0 /* p_inter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "p_inter.h"; sourceTree = "<group>"; };
A69A50819681997BD7CA227D /* p_local.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "p_local.h"; sourceTree = "<group>"; };
49E6D6C528DC753E00A6B7E6 /* p_mobj.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "p_mobj.h"; sourceTree = "<group>"; };
617782DB7807CC98D87A9634 /* p_pspr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "p_pspr.h"; sourceTree = "<group>"; };
5896B893E8CEE26E0476767A /* p_saveg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "p_saveg.h"; sourceTree = "<group>"; };
F64E45034B95DD479A79B574 /* p_setup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "p_setup.h"; sourceTree = "<group>"; };
049640054290E83212C8EB0D /* p_spec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "p_spec.h"; sourceTree = "<group>"; };
0381F0038D9550E9B871CAEF /* p_tick.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "p_tick.h"; sourceTree = "<group>"; };
A55EF6A59631E31B2CCBA160 /* r_bsp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_bsp.h"; sourceTree = "<group>"; };
D5DEB261FDB6124303B5119E /* r_data.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_data.h"; sourceTree = "<group>"; };
2CD4E14C7406C8F9C636EA0B /* r_defs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_defs.h"; sourceTree = "<group>"; };
75F53DC533696B88978A8F97 /* r_draw.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_draw.h"; sourceTree = "<group>"; };
D8CB6438EDF48572159865A7 /* r_local.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_local.h"; sourceTree = "<group>"; };
071E09896FC6923CDDB2A42D /* r_main.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_main.h"; sourceTree = "<group>"; };
6A31F10BBC6E040BB1FD5EFF /* r_plane.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_plane.h"; sourceTree = "<group>"; };
5EBE2505DA38A0BD057803AE /* r_segs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_segs.h"; sourceTree = "<group>"; };
5B9CA69A444F2F0792E984E9 /* r_sky.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_sky.h"; sourceTree = "<group>"; };
DCC5D61204D518301291A65C /* r_state.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_state.h"; sourceTree = "<group>"; };
D0A51C775441B1589DD2E5DD /* r_things.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "r_things.h"; sourceTree = "<group>"; };
66292040897B9724F019F4A9 /* s_sound.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "s_sound.h"; sourceTree = "<group>"; };
8E78C252CB8CD7EE1DFBC52C /* sounds.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "sounds.h"; sourceTree = "<group>"; };
6B9870CADC751D693AB51D77 /* st_lib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "st_lib.h"; sourceTree = "<group>"; };
87071CA6FC3887E455DA1236 /* st_stuff.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "st_stuff.h"; sourceTree = "<group>"; };
0EDD9A304A2014DA8E16CED0 /* tables.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "tables.h"; sourceTree = "<group>"; };
017574C969EA422932606EA7 /* v_video.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "v_video.h"; sourceTree = "<group>"; };
7C02956CD1549FA52740AD70 /* w_wad.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "w_wad.h"; sourceTree = "<group>"; };
E26E672F381DD0D42ADF90A4 /* wi_stuff.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "wi_stuff.h"; sourceTree = "<group>"; };
8821B2BBD7139EB043734CD2 /* z_zone.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "z_zone.h"; sourceTree = "<group>"; };
A0C65199E7C1F1D186F19E38 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "macos-app/Info.plist"; sourceTree = "<group>"; };
5D376799B3307FB9AE9CD671 /* fetch-deps.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "macos-app/Scripts/fetch-deps.sh"; sourceTree = "<group>"; };
48E8555FD63505A7E9A6B72C /* Resources */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "macos-app/Resources"; sourceTree = "<group>"; };
04148481BADAC8F853AD4B02 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = "macos-app/Frameworks/SDL2.framework"; sourceTree = "<group>"; };
DC89C0F6A12E87504616F1A1 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
8457C1F34DC6F4648A8EA7B2 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
0A508A722A72E9466B8B85CA /* DOOM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DOOM.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
424153ED3CD079DB4DB459AF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FD2E1ABE0A756C81F88527CF /* SDL2.framework in Frameworks */,
0C3E13EE555A8BF56B0FC472 /* AudioToolbox.framework in Frameworks */,
4B8AB0C2049572FD831CAC41 /* CoreFoundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
518DA81DB9B99529C0C0AEBE = {
isa = PBXGroup;
children = (
D2B9DDFE27A66BAEAE9CCFF6 /* linuxdoom-1.10 */,
DF3B2156CD0754295AD7F1CD /* macos-app */,
649F037DD903349A9F8F2971 /* Frameworks */,
547D009064F7C3F13BEF3460 /* Products */,
);
sourceTree = "<group>";
};
D2B9DDFE27A66BAEAE9CCFF6 /* linuxdoom-1.10 */ = {
isa = PBXGroup;
children = (
52D48C7A8A71EA7C0D61F2D1 /* am_map.h */,
847428EBC977581ACC940210 /* d_englsh.h */,
7E4A3F02E155F50473065844 /* d_event.h */,
EDC115934039E6719EEB7FA9 /* d_french.h */,
B08A84522348EA78F374BCAF /* d_items.h */,
5AC7EACC25C20D2A1DE21490 /* d_main.h */,
9D75FAA0934E9271D2BF1AD2 /* d_net.h */,
9A80FDD06A77885A7D711755 /* d_player.h */,
706C790552BDF9D472BE2A11 /* d_textur.h */,
31817B47D0AF37E1CADCF920 /* d_think.h */,
22D18A567D47B00636085424 /* d_ticcmd.h */,
F2E881375127CA1FD532EC3A /* doomdata.h */,
697A900391BF640F0C01CAA4 /* doomdef.h */,
07022A5A08EF10069E651D14 /* doomstat.h */,
84E4DC1B0E3C451783CC8A56 /* doomtype.h */,
A3EEF19FAD8709F8F501620C /* dstrings.h */,
08841D9BFB835E849DA39129 /* f_finale.h */,
20BFF3A8AFF64D98A9C0ADFD /* f_wipe.h */,
8AE64B472E5FEA4FBD87124F /* g_game.h */,
27F93A14715C3C655B12BD10 /* hu_lib.h */,
C3D094CFF20B7CE4EC7D945B /* hu_stuff.h */,
8926EEC001C95F2E4FB5EC29 /* i_mac.h */,
621F376174F9615D68C8B813 /* i_net.h */,
CE4A99331FF9AF1DD23C1ECC /* i_sound.h */,
8EFEFE510E85B4CD42C15A70 /* i_system.h */,
AD550DACDD38096F8B34D1B4 /* i_video.h */,
0169EF0AF36EA30B4CF9D535 /* info.h */,
B56ED104B852FA6CD01C0DCD /* m_argv.h */,
101168CDCE250CF58F8580F7 /* m_bbox.h */,
C005C2AE1D1CE91DBD0784F3 /* m_cheat.h */,
DB422ACE75FEFEDE3EF18672 /* m_fixed.h */,
D0278D42050744469C5484A9 /* m_menu.h */,
A5CBA8A7C65FE307BF3A2DBE /* m_misc.h */,
2F7B74F04DACE646638CBDE8 /* m_random.h */,
CA4220DFC152A71026747B4C /* m_swap.h */,
906E62901A7A56F0520739E5 /* mus2mid.h */,
A9889370CF033AAE5F22DDC0 /* p_inter.h */,
A69A50819681997BD7CA227D /* p_local.h */,
49E6D6C528DC753E00A6B7E6 /* p_mobj.h */,
617782DB7807CC98D87A9634 /* p_pspr.h */,
5896B893E8CEE26E0476767A /* p_saveg.h */,
F64E45034B95DD479A79B574 /* p_setup.h */,
049640054290E83212C8EB0D /* p_spec.h */,
0381F0038D9550E9B871CAEF /* p_tick.h */,
A55EF6A59631E31B2CCBA160 /* r_bsp.h */,
D5DEB261FDB6124303B5119E /* r_data.h */,
2CD4E14C7406C8F9C636EA0B /* r_defs.h */,
75F53DC533696B88978A8F97 /* r_draw.h */,
D8CB6438EDF48572159865A7 /* r_local.h */,
071E09896FC6923CDDB2A42D /* r_main.h */,
6A31F10BBC6E040BB1FD5EFF /* r_plane.h */,
5EBE2505DA38A0BD057803AE /* r_segs.h */,
5B9CA69A444F2F0792E984E9 /* r_sky.h */,
DCC5D61204D518301291A65C /* r_state.h */,
D0A51C775441B1589DD2E5DD /* r_things.h */,
66292040897B9724F019F4A9 /* s_sound.h */,
8E78C252CB8CD7EE1DFBC52C /* sounds.h */,
6B9870CADC751D693AB51D77 /* st_lib.h */,
87071CA6FC3887E455DA1236 /* st_stuff.h */,
0EDD9A304A2014DA8E16CED0 /* tables.h */,
017574C969EA422932606EA7 /* v_video.h */,
7C02956CD1549FA52740AD70 /* w_wad.h */,
E26E672F381DD0D42ADF90A4 /* wi_stuff.h */,
8821B2BBD7139EB043734CD2 /* z_zone.h */,
7C1249AA7391E508A413D99D /* am_map.c */,
0A9107C461DF4C359A83F659 /* d_items.c */,
4C736B0312B7395E12A89A69 /* d_main.c */,
0946F594DCA60CF66CAA0883 /* d_net.c */,
C8ADFE9F95F07F1B81E1B444 /* doomdef.c */,
7ECB0EB06E4B76515A4F0BA6 /* doomstat.c */,
78806ABFEAE130CA3DAA2CD3 /* dstrings.c */,
A167848610850E67F10E6668 /* f_finale.c */,
CB4AD04ACD525ECEB9010AC5 /* f_wipe.c */,
903570F13D9D87FC23237602 /* g_game.c */,
E99411D19E9170BD460C28D3 /* hu_lib.c */,
B260A071DAD831B6C0C4021F /* hu_stuff.c */,
B75D30780094ADA2EED7B8A3 /* i_mac.c */,
F28C9FA40912326D57455E4C /* i_main.c */,
5755D7953D2CC9BD4B2C6F26 /* i_net.c */,
BA0385F1A8C71EDEB6444D58 /* i_sound.c */,
B09554F6419D841C2DDC3A3F /* i_system.c */,
3DE17612DBDBE02C182E176C /* i_video.c */,
2824532F7E2266F290E8556E /* info.c */,
C26F63CB7518FA68DC098927 /* m_argv.c */,
A5F97DB3EDB9F36FF8653E92 /* m_bbox.c */,
C3FF8AB3B486A21107BE8054 /* m_cheat.c */,
7F0DF2D73FB79B8AD5ACB2DE /* m_fixed.c */,
B05F75F56BB6577149AC036F /* m_menu.c */,
24E0027A04D0E4F5DB18B71E /* m_misc.c */,
DA4629FA93656D5E662A8518 /* m_random.c */,
E3ECE012D8D1F6C5611D12EE /* m_swap.c */,
C038FF76E4EE57D1EB90FA47 /* mus2mid.c */,
132834BA5E42B0AE023BB20A /* p_ceilng.c */,
65A2C0D8B8044DFCD9482EF3 /* p_doors.c */,
B88A90BB49C9B9486072EB01 /* p_enemy.c */,
ACAFFD6FB56D272A9D1491CE /* p_floor.c */,
3995A0ACA1FA52CEAFA44CF8 /* p_inter.c */,
7E5F821B3812F96722BC25EB /* p_lights.c */,
CA21A36EBB684D2162230F13 /* p_map.c */,
6799BC991B1E628331C05276 /* p_maputl.c */,
1EDDC28A79DD604E1B2B972E /* p_mobj.c */,
DDCCC105D034FF3051A182AD /* p_plats.c */,
00D7A5D24FBE85D47147C96D /* p_pspr.c */,
18E6D369197C756B02D66806 /* p_saveg.c */,
231879CBFEA7B56C26701910 /* p_setup.c */,
02479BD59F2969CB6C188E23 /* p_sight.c */,
16F0B6B5698FD35DE253901D /* p_spec.c */,
CE852F51B0CDCD0CD5494776 /* p_switch.c */,
BA391D056205328284DC3ADA /* p_telept.c */,
76B089023AFD70AA399C8C3E /* p_tick.c */,
1BBF7B26D7F5DF00432D36A5 /* p_user.c */,
AC321B907DED587C4C147461 /* r_bsp.c */,
D8FD57CA2905B9E0028DE496 /* r_data.c */,
72BED770C06834E767E49D8B /* r_draw.c */,
F2EC84C3DCEEBF31461BAA44 /* r_main.c */,
3CF82C41DA90BE0157590A50 /* r_plane.c */,
7573C1A6880C4FEC0D86C48B /* r_segs.c */,
3FF216D02ABB0A346BD2E8C6 /* r_sky.c */,
9ABEDB53E06B9E06A24C650E /* r_things.c */,
07E292AC79DD221AF48A4416 /* s_sound.c */,
ADD254F77288621DB649EBFB /* sounds.c */,
126E2DAC3D92F92D60ADF5ED /* st_lib.c */,
7C62CEE45BB0F4B334607EC8 /* st_stuff.c */,
062B78A42E122F1F2152DB06 /* tables.c */,
46C9B1B94C5D95CE124CA681 /* v_video.c */,
FA5C87A06D300BE5CF80704B /* w_wad.c */,
050BAA8143FA63FA6B4F9C65 /* wi_stuff.c */,
28667C2A020800AEF92BDC90 /* z_zone.c */,
);
path = "linuxdoom-1.10";
sourceTree = "<group>";
};
DF3B2156CD0754295AD7F1CD /* macos-app */ = {
isa = PBXGroup;
children = (
A0C65199E7C1F1D186F19E38 /* Info.plist */,
48E8555FD63505A7E9A6B72C /* Resources */,
85ABD5009F67F716AA06490E /* Scripts */,
);
name = "macos-app";
sourceTree = "<group>";
};
85ABD5009F67F716AA06490E /* Scripts */ = {
isa = PBXGroup;
children = (
5D376799B3307FB9AE9CD671 /* fetch-deps.sh */,
);
name = "Scripts";
sourceTree = "<group>";
};
649F037DD903349A9F8F2971 /* Frameworks */ = {
isa = PBXGroup;
children = (
04148481BADAC8F853AD4B02 /* SDL2.framework */,
DC89C0F6A12E87504616F1A1 /* AudioToolbox.framework */,
8457C1F34DC6F4648A8EA7B2 /* CoreFoundation.framework */,
);
name = "Frameworks";
sourceTree = "<group>";
};
547D009064F7C3F13BEF3460 /* Products */ = {
isa = PBXGroup;
children = (
0A508A722A72E9466B8B85CA /* DOOM.app */,
);
name = "Products";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
EE4B4C92D393960C1C0DF25F /* DOOM */ = {
isa = PBXNativeTarget;
buildConfigurationList = F2F62AAE534BA46EC59716F3 /* Build configuration list for PBXNativeTarget "DOOM" */;
buildPhases = (
DB545A832942127D5E81BB99 /* Fetch Dependencies */,
7A70D71C385290AF96BF1031 /* Sources */,
424153ED3CD079DB4DB459AF /* Frameworks */,
285BB1C1430063331E9F5DD0 /* Resources */,
BAE1492BDE49D13FF7E211EB /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = DOOM;
productName = DOOM;
productReference = 0A508A722A72E9466B8B85CA /* DOOM.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
46F86FAA6BBF9AC94A7E4595 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastUpgradeCheck = 1600;
};
buildConfigurationList = 7EF2517A8FE63F4681EC5EEA /* Build configuration list for PBXProject "DOOM" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 518DA81DB9B99529C0C0AEBE;
productRefGroup = 547D009064F7C3F13BEF3460 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
EE4B4C92D393960C1C0DF25F /* DOOM */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
285BB1C1430063331E9F5DD0 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C43324BCBF51AD2BAF1FC256 /* Resources in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
DB545A832942127D5E81BB99 /* Fetch Dependencies */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Fetch Dependencies";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/macos-app/Scripts/fetch-deps.sh\"\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7A70D71C385290AF96BF1031 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
82F6E0F9ED5E594D35F0679B /* am_map.c in Sources */,
2BDA81EB4E944B780E1B1711 /* d_items.c in Sources */,
BF2E14B37531244DDAFE0785 /* d_main.c in Sources */,
7FB61C1FDFCD4E2D071687ED /* d_net.c in Sources */,
6B2A575E33B4FC23D2483EBD /* doomdef.c in Sources */,
30B9C74F667994A9614DE976 /* doomstat.c in Sources */,
78936A55AD77A999214909E2 /* dstrings.c in Sources */,
8317912472471287640E22F3 /* f_finale.c in Sources */,
163A5317840192ED400D24B2 /* f_wipe.c in Sources */,
A65189AF52EEFB04810645C2 /* g_game.c in Sources */,
66818C319AC2B030B514DE84 /* hu_lib.c in Sources */,
BEDF7D6C8440CAC49D2ED404 /* hu_stuff.c in Sources */,
6C5484D260FB220A3F4CA91F /* i_mac.c in Sources */,
F5FA2D4A3E109C8F28EB41C6 /* i_main.c in Sources */,
F5717810EF6D8605368B8AC6 /* i_net.c in Sources */,
2C7223C10E705CBE3FEEC5A7 /* i_sound.c in Sources */,
C61F7E28D5DE331BBF906656 /* i_system.c in Sources */,
84A7399386806CA435512FDF /* i_video.c in Sources */,
35ED2B72301FFEB68CA765E0 /* info.c in Sources */,
689D31B57C1429748892672A /* m_argv.c in Sources */,
05619C6CD2FE9C56051A0D3A /* m_bbox.c in Sources */,
4DD4D5554D8481BBAE46DCC2 /* m_cheat.c in Sources */,
921BDB77DC12080237981267 /* m_fixed.c in Sources */,
3F9A9E8F9659B01790430EA0 /* m_menu.c in Sources */,
82A86DAC779013F55EE3DCC0 /* m_misc.c in Sources */,
E9B3762F800B83961714B938 /* m_random.c in Sources */,
CD2BF8D583E1AA0D3E6A17B1 /* m_swap.c in Sources */,
F3893CF011A858E56C763AC0 /* mus2mid.c in Sources */,
29A0E82DEA78259E22419FFD /* p_ceilng.c in Sources */,
F6ACCB541AA76F2C147724E4 /* p_doors.c in Sources */,
CECD2F2728F56E554460AAB7 /* p_enemy.c in Sources */,
5F93109C3D22BCFA53EBF7C0 /* p_floor.c in Sources */,
5AB29336A26F355E77C5E683 /* p_inter.c in Sources */,
5CF62EB67B2484CAFA9B6D80 /* p_lights.c in Sources */,
879E7CB0A7D9B9DB730FD0F1 /* p_map.c in Sources */,
7E6296DA40892F4C0BD123D3 /* p_maputl.c in Sources */,
F93A1447576A62C98B129C7C /* p_mobj.c in Sources */,
4E9467DACCBCA0482BE58FAF /* p_plats.c in Sources */,
5F7024633AB08477229E9571 /* p_pspr.c in Sources */,
23463C592FD57B625B40F1CF /* p_saveg.c in Sources */,
63625621719E5D09C72D39E9 /* p_setup.c in Sources */,
E178BFECD7F176C806D7FD8A /* p_sight.c in Sources */,
3D73975A74E28C62F614C1FE /* p_spec.c in Sources */,
CDB29E5AD4131CB322B5CBCE /* p_switch.c in Sources */,
801C77E385CEF0A47F4FF220 /* p_telept.c in Sources */,
6D1A239D80B01D75CD76AC78 /* p_tick.c in Sources */,
BF803A17BF02E0F0FF8D07FA /* p_user.c in Sources */,
68A7415DB8DDB38BDC5BC75F /* r_bsp.c in Sources */,
0FE67938E8F1855FE48AE139 /* r_data.c in Sources */,
45F6027426D1A5A2C00AD654 /* r_draw.c in Sources */,
78479D11DE6886936DF7200B /* r_main.c in Sources */,
6A380AB8EAD898DE3352D254 /* r_plane.c in Sources */,
0181890B3F015BC3F488993A /* r_segs.c in Sources */,
0A7184DB70B9DAEC6480AE2B /* r_sky.c in Sources */,
503B1E04559E0DE48906ADE3 /* r_things.c in Sources */,
60BDEC56BA9F82A58B080E91 /* s_sound.c in Sources */,
D6E131BAE2EE406A528C03BE /* sounds.c in Sources */,
DC5863CDFE040AEC220C9E9D /* st_lib.c in Sources */,
331C49BF34E355F6D75936D4 /* st_stuff.c in Sources */,
3F36BDC3BD00B29B1C13F032 /* tables.c in Sources */,
F06C51BF023A4500B2C72997 /* v_video.c in Sources */,
FA37803032021509700CB7A1 /* w_wad.c in Sources */,
4B2E16D56A674DBC48A7CD5F /* wi_stuff.c in Sources */,
AAD29AB7F067D5AF7DA9F00D /* z_zone.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
969595A508627F35A110362C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = "NO";
CLANG_ANALYZER_NONNULL = "YES";
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = "YES_AGGRESSIVE";
CLANG_ENABLE_MODULES = "YES";
CLANG_ENABLE_OBJC_WEAK = "YES";
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = "YES";
CLANG_WARN_BOOL_CONVERSION = "YES";
CLANG_WARN_COMMA = "YES";
CLANG_WARN_CONSTANT_CONVERSION = "YES";
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = "YES";
CLANG_WARN_EMPTY_BODY = "YES";
CLANG_WARN_ENUM_CONVERSION = "YES";
CLANG_WARN_INFINITE_RECURSION = "YES";
CLANG_WARN_INT_CONVERSION = "YES";
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = "YES";
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = "YES";
CLANG_WARN_OBJC_LITERAL_CONVERSION = "YES";
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = "YES";
CLANG_WARN_RANGE_LOOP_ANALYSIS = "YES";
CLANG_WARN_STRICT_PROTOTYPES = "YES";
CLANG_WARN_SUSPICIOUS_MOVE = "YES";
CLANG_WARN_UNGUARDED_AVAILABILITY = "YES_AGGRESSIVE";
CLANG_WARN_UNREACHABLE_CODE = "YES";
CLANG_WARN__DUPLICATE_METHOD_MATCH = "YES";
COPY_PHASE_STRIP = "NO";
DEBUG_INFORMATION_FORMAT = "dwarf";
ENABLE_NS_ASSERTIONS = "YES";
ENABLE_STRICT_OBJC_MSGSEND = "YES";
ENABLE_TESTABILITY = "NO";
GCC_C_LANGUAGE_STANDARD = "gnu11";
GCC_DYNAMIC_NO_PIC = "NO";
GCC_NO_COMMON_BLOCKS = "YES";
GCC_OPTIMIZATION_LEVEL = "0";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = "YES";
GCC_WARN_ABOUT_RETURN_TYPE = "YES_ERROR";
GCC_WARN_UNDECLARED_SELECTOR = "YES";
GCC_WARN_UNINITIALIZED_AUTOS = "YES_AGGRESSIVE";
GCC_WARN_UNUSED_FUNCTION = "YES";
GCC_WARN_UNUSED_VARIABLE = "YES";
MACOSX_DEPLOYMENT_TARGET = "12.0";
MTL_ENABLE_DEBUG_INFO = "INCLUDE_SOURCE";
MTL_FAST_MATH = "YES";
ONLY_ACTIVE_ARCH = "YES";
SDKROOT = "macosx";
};
name = Debug;
};
4C95F91A6D5CD87BB5DB8FDD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = "NO";
CLANG_ANALYZER_NONNULL = "YES";
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = "YES_AGGRESSIVE";
CLANG_ENABLE_MODULES = "YES";
CLANG_ENABLE_OBJC_WEAK = "YES";
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = "YES";
CLANG_WARN_BOOL_CONVERSION = "YES";
CLANG_WARN_COMMA = "YES";
CLANG_WARN_CONSTANT_CONVERSION = "YES";
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = "YES";
CLANG_WARN_EMPTY_BODY = "YES";
CLANG_WARN_ENUM_CONVERSION = "YES";
CLANG_WARN_INFINITE_RECURSION = "YES";
CLANG_WARN_INT_CONVERSION = "YES";
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = "YES";
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = "YES";
CLANG_WARN_OBJC_LITERAL_CONVERSION = "YES";
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = "YES";
CLANG_WARN_RANGE_LOOP_ANALYSIS = "YES";
CLANG_WARN_STRICT_PROTOTYPES = "YES";
CLANG_WARN_SUSPICIOUS_MOVE = "YES";
CLANG_WARN_UNGUARDED_AVAILABILITY = "YES_AGGRESSIVE";
CLANG_WARN_UNREACHABLE_CODE = "YES";
CLANG_WARN__DUPLICATE_METHOD_MATCH = "YES";
COPY_PHASE_STRIP = "NO";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = "NO";
ENABLE_STRICT_OBJC_MSGSEND = "YES";
ENABLE_TESTABILITY = "NO";
GCC_C_LANGUAGE_STANDARD = "gnu11";
GCC_DYNAMIC_NO_PIC = "NO";
GCC_NO_COMMON_BLOCKS = "YES";
GCC_OPTIMIZATION_LEVEL = "s";
GCC_WARN_64_TO_32_BIT_CONVERSION = "YES";
GCC_WARN_ABOUT_RETURN_TYPE = "YES_ERROR";
GCC_WARN_UNDECLARED_SELECTOR = "YES";
GCC_WARN_UNINITIALIZED_AUTOS = "YES_AGGRESSIVE";
GCC_WARN_UNUSED_FUNCTION = "YES";
GCC_WARN_UNUSED_VARIABLE = "YES";
MACOSX_DEPLOYMENT_TARGET = "12.0";
MTL_ENABLE_DEBUG_INFO = "INCLUDE_SOURCE";
MTL_FAST_MATH = "YES";
SDKROOT = "macosx";
};
name = Release;
};
A3FD2624D90AA76C1E18FB70 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "x86_64";
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = "Manual";
COMBINE_HIDPI_IMAGES = "YES";
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/macos-app/Frameworks";
GCC_PREPROCESSOR_DEFINITIONS = (
"NORMALUNIX",
"$(inherited)",
);
GENERATE_INFOPLIST_FILE = "NO";
HEADER_SEARCH_PATHS = "$(SRCROOT)/macos-app/Frameworks/SDL2.framework/Headers";
INFOPLIST_FILE = "macos-app/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.local.linuxdoom";
PRODUCT_NAME = "DOOM";
};
name = Debug;
};
CB4CAEBFF1A865FD02635BC0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "x86_64";
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = "Manual";
COMBINE_HIDPI_IMAGES = "YES";
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/macos-app/Frameworks";
GCC_PREPROCESSOR_DEFINITIONS = (
"NORMALUNIX",
"$(inherited)",
);
GENERATE_INFOPLIST_FILE = "NO";
HEADER_SEARCH_PATHS = "$(SRCROOT)/macos-app/Frameworks/SDL2.framework/Headers";
INFOPLIST_FILE = "macos-app/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.local.linuxdoom";
PRODUCT_NAME = "DOOM";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7EF2517A8FE63F4681EC5EEA /* Build configuration list for PBXProject "DOOM" */ = {
isa = XCConfigurationList;
buildConfigurations = (
969595A508627F35A110362C /* Debug */,
4C95F91A6D5CD87BB5DB8FDD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F2F62AAE534BA46EC59716F3 /* Build configuration list for PBXNativeTarget "DOOM" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A3FD2624D90AA76C1E18FB70 /* Debug */,
CB4CAEBFF1A865FD02635BC0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 46F86FAA6BBF9AC94A7E4595 /* Project object */;
}
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EE4B4C92D393960C1C0DF25F"
BuildableName = "DOOM.app"
BlueprintName = "DOOM"
ReferencedContainer = "container:DOOM.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EE4B4C92D393960C1C0DF25F"
BuildableName = "DOOM.app"
BlueprintName = "DOOM"
ReferencedContainer = "container:DOOM.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EE4B4C92D393960C1C0DF25F"
BuildableName = "DOOM.app"
BlueprintName = "DOOM"
ReferencedContainer = "container:DOOM.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
+21 -10
View File
@@ -4,14 +4,20 @@
#
# $Log:$
#
CC= gcc # gcc or g++
# macOS port: clang + SDL2 + AudioToolbox, x86_64, min target 12.0.
CFLAGS=-g -Wall -DNORMALUNIX -DLINUX # -DUSEASM
LDFLAGS=-L/usr/X11R6/lib
LIBS=-lXext -lX11 -lnsl -lm
CC= clang
SDL_CONFIG ?= sdl2-config
SDL_CFLAGS := $(shell $(SDL_CONFIG) --cflags)
SDL_LIBS := $(filter-out -lSDL2main,$(shell $(SDL_CONFIG) --libs))
CFLAGS=-g -O2 -Wall -DNORMALUNIX -arch x86_64 -mmacosx-version-min=12.0 $(SDL_CFLAGS)
LDFLAGS=-arch x86_64 -mmacosx-version-min=12.0
LIBS=$(SDL_LIBS) -framework AudioToolbox -framework CoreFoundation -lm
# subdirectory for objects
O=linux
O=macos
# not too sophisticated dependency
OBJS= \
@@ -22,6 +28,7 @@ OBJS= \
$(O)/i_sound.o \
$(O)/i_video.o \
$(O)/i_net.o \
$(O)/i_mac.o \
$(O)/tables.o \
$(O)/f_finale.o \
$(O)/f_wipe.o \
@@ -38,6 +45,7 @@ OBJS= \
$(O)/m_cheat.o \
$(O)/m_random.o \
$(O)/am_map.o \
$(O)/mus2mid.o \
$(O)/p_ceilng.o \
$(O)/p_doors.o \
$(O)/p_enemy.o \
@@ -77,19 +85,22 @@ OBJS= \
$(O)/info.o \
$(O)/sounds.o
all: $(O)/linuxxdoom
all: $(O) $(O)/doom
clean:
rm -f *.o *~ *.flc
rm -f linux/*
rm -f macos/*
$(O)/linuxxdoom: $(OBJS) $(O)/i_main.o
$(O):
mkdir -p $(O)
$(O)/doom: $(OBJS) $(O)/i_main.o
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(O)/i_main.o \
-o $(O)/linuxxdoom $(LIBS)
-o $(O)/doom $(LIBS)
$(O)/%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
#############################################################
#
#############################################################
#############################################################
+160
View File
@@ -0,0 +1,160 @@
# linuxdoom 1.10 — macOS port
This tree is the original linuxdoom 1.10 source, ported to build and run
natively on macOS (12.0+, x86_64). X11/MIT-SHM video and Linux OSS audio
were replaced with SDL2 and Apple AudioToolbox while keeping the original
software renderer and sound mixer.
There are two ways to build:
| | Output | SDL2 | IWAD |
|---|---|---|---|
| **App bundle** (recommended) | `DOOM.app` | vendored `SDL2.framework`, embedded | bundled FreeDoom, runs standalone |
| **CLI binary** | `linuxdoom-1.10/macos/doom` | Homebrew `sdl2` | bring your own via `DOOMWADDIR` |
## App bundle: `DOOM.app`
The committed `DOOM.xcodeproj` (at the repo root) builds a self-contained
`DOOM.app`: it embeds a real SDL2 2.30.x `SDL2.framework` (not
sdl2-compat, so no SDL3 dependency) and an IWAD, so the result runs on
any macOS 12+ x86_64 machine with no Homebrew install.
### One-time dependency fetch
```sh
macos-app/Scripts/fetch-deps.sh
```
This downloads `SDL2.framework` into `macos-app/Frameworks/` (pinned to
2.30.12) and makes sure at least one IWAD is in `macos-app/Resources/`:
any `*.wad` in the repo's `wads/` dir is copied first, otherwise
`freedoom2.wad` is downloaded (pinned to FreeDoom 0.13.0). The script is
idempotent and also runs as the first Xcode build phase, so it's safe to
skip this step and let the build do it — it only needs the network once.
### Build
```sh
open DOOM.xcodeproj # then ⌘R
# or
xcodebuild -scheme DOOM -configuration Release
```
The product lands in the usual DerivedData location
(`.../Build/Products/Release/DOOM.app`).
### Where things live at runtime
When launched as a bundle (Finder or `open DOOM.app`), the working
directory is `/`, so the app `chdir()`s to its data directory:
- **Savegames / screenshots**: `~/Library/Application Support/DOOM/`
- **Config**: `$HOME/.doomrc` (absolute path, unchanged upstream)
### IWAD search order
The engine checks each IWAD filename across all search dirs before moving
to the next name, so a higher-priority IWAD anywhere wins:
- Filenames (high → low): `doom2f` (French), `doom2`, `plutonia`, `tnt`,
`doomu`, `doom`, `doom1`, `freedoom2`, `freedoom1`
- Directories (high → low): `$DOOMWADDIR`, bundle `Contents/Resources`,
`~/Library/Application Support/DOOM`, `.`
Consequences:
- `doom.wad` in `macos-app/Resources/` beats the bundled `freedoom2.wad`.
- A `doom2.wad` dropped in `~/Library/Application Support/DOOM` beats a
bundled `freedoom2.wad` (filenames are compared before directories).
- To bundle your own IWAD, drop it in `macos-app/Resources/` (or `wads/`
before running `fetch-deps.sh`) and rebuild.
### Command-line arguments
The scheme ships with no arguments. To add some (`-3`, `-warp 1 1`,
`-file foo.wad`), edit the scheme in Xcode (Product ▸ Scheme ▸ Edit
Scheme ▸ Run ▸ Arguments). Equivalent from a terminal:
```sh
DOOM.app/Contents/MacOS/DOOM -warp 1 1
```
### Signing
The target signs ad-hoc (`CODE_SIGN_IDENTITY = "-"`). That's fine on the
machine that built it; on other Macs Gatekeeper will complain — either
right-click ▸ Open, or re-sign with a Developer ID for real distribution.
## CLI binary: `make`
```sh
brew install sdl2 # sdl2-compat (SDL3-backed) also works
cd linuxdoom-1.10 && make
```
Produces `linuxdoom-1.10/macos/doom`. Needs an IWAD via `DOOMWADDIR`
or cwd:
```sh
DOOMWADDIR=/path/to/wads ./macos/doom
```
The same IWAD search order above applies (App Support dir included), so
IWADs are shared between the app and the CLI binary.
## Useful options
| Option | Effect |
|---|---|
| `-2` / `-3` / `-4` | Start at 640×480, 960×720, or 1280×960 |
| `-fullscreen` | Fullscreen (scaled desktop mode) |
| `-grabmouse` | Grab the mouse (relative mouse mode) |
| `-warp E M` | Warp to episode/map, e.g. `-warp 1 1` |
| `-nomouse` / `-nojoy` | Disable input devices |
The window is freely resizable down to 640×480. DOOM keeps its original
320×200 internal framebuffer and scales it with nearest-neighbour filtering
into the largest centered 4:3 area, adding black bars for wider or taller
windows. SDL's renderer output size is used so the presentation also stays
correct on Retina displays.
A new configuration starts at 960×720. Normal window resizing updates the
`window_width` and `window_height` settings in `.doomrc`, and that windowed
size is restored on the next launch. Fullscreen size changes and the `-2`,
`-3`, and `-4` startup presets do not overwrite the remembered size unless
the window is subsequently resized by the user.
## Porting notes
- `i_video.c` — resizable, high-DPI SDL2 window/renderer/streaming ARGB8888
texture; the 320x200 indexed framebuffer is palette-expanded each frame
and aspect-corrected to 4:3 for presentation.
Keyboard/mouse SDL events are translated to DOOM `event_t`s.
- `i_sound.c` — original software mixer retained; output is queued to
an SDL2 audio device (11025 Hz s16 stereo) instead of `/dev/dsp`.
Music lumps are converted by `mus2mid.c` (MUS→MIDI; already-MIDI
lumps pass through) and played with AudioToolbox
`MusicSequence`/`MusicPlayer` through the system DLS synth —
no SDL_mixer or soundfont needed. Track looping uses
`kSequenceTrackProperty_LoopInfo`.
- `i_mac.c` — bundle detection (`CFBundleGetIdentifier`), resource-dir
and `~/Library/Application Support/DOOM` lookup, and the bundled-app
`chdir()` that redirects all relative-path writes (savegames,
screenshots) somewhere writable.
- 64-bit fixes: pointer-size casts in the renderer, savegame code,
zone allocator and `m_misc` defaults; WAD `maptexture_t` layout
corrected (`columndirectory` is a 4-byte offset, not a pointer);
`*4`-sized allocations for pointer arrays fixed; unsequenced
`eventhead`/`eventtail` updates made well-defined.
- Networking (`i_net.c`) still uses UDP/BSD sockets and should work
for `-net` play; it is unchanged apart from byte-order/socket fixes.
## Known limitations
- Embedded demo lumps recorded for other engine versions print
"Demo is from a different game version" — use `-warp` to skip the
title-screen demo loop if the IWAD's demos mismatch (e.g. FreeDoom).
- Music volume slider is tracked but not applied to the MusicPlayer
(AudioToolbox has no per-sequence gain at this API level).
- x86_64 only; no arm64 slice. `sndserv/`, `ipx/`, `sersrc/` are
unused by this port.
+5 -5
View File
@@ -783,7 +783,7 @@ void AM_doFollowPlayer(void)
//
void AM_updateLightLev(void)
{
static nexttic = 0;
static int nexttic = 0;
//static int litelevels[] = { 0, 3, 5, 6, 6, 7, 7, 7 };
static int litelevels[] = { 0, 4, 7, 10, 12, 14, 15, 15 };
static int litelevelscnt = 0;
@@ -856,9 +856,9 @@ AM_clipMline
TOP =8
};
register outcode1 = 0;
register outcode2 = 0;
register outside;
register int outcode1 = 0;
register int outcode2 = 0;
register int outside;
fpoint_t tmp;
int dx;
@@ -989,7 +989,7 @@ AM_drawFline
register int ay;
register int d;
static fuck = 0;
static int fuck = 0;
// For debugging only
if ( fl->a.x < 0 || fl->a.x >= f_w
+73 -92
View File
@@ -63,6 +63,7 @@ static const char rcsid[] = "$Id: d_main.c,v 1.8 1997/02/03 22:45:09 b1 Exp $";
#include "i_system.h"
#include "i_sound.h"
#include "i_video.h"
#include "i_mac.h"
#include "g_game.h"
@@ -150,7 +151,7 @@ int eventtail;
void D_PostEvent (event_t* ev)
{
events[eventhead] = *ev;
eventhead = (++eventhead)&(MAXEVENTS-1);
eventhead = (eventhead+1)&(MAXEVENTS-1);
}
@@ -167,7 +168,7 @@ void D_ProcessEvents (void)
&& (W_CheckNumForName("map01")<0) )
return;
for ( ; eventtail != eventhead ; eventtail = (++eventtail)&(MAXEVENTS-1) )
for ( ; eventtail != eventhead ; eventtail = (eventtail+1)&(MAXEVENTS-1) )
{
ev = &events[eventtail];
if (M_Responder (ev))
@@ -560,53 +561,65 @@ void D_AddFile (char *file)
// to determine whether registered/commercial features
// should be executed (notably loading PWAD's).
//
// IWAD filenames in priority order inside each search directory.
// The original IWADs come first, FreeDoom last, so a real
// doom2.wad/doom.wad always wins over the bundled fallback.
static const struct
{
const char* name;
GameMode_t mode;
Language_t lang;
} iwads[] =
{
{ "doom2f", commercial, french },
{ "doom2", commercial, english },
{ "plutonia", commercial, english },
{ "tnt", commercial, english },
{ "doomu", retail, english },
{ "doom", registered, english },
{ "doom1", shareware, english },
{ "freedoom2", commercial, english },
{ "freedoom1", registered, english },
};
void IdentifyVersion (void)
{
char* doom1wad;
char* doomwad;
char* doomuwad;
char* doom2wad;
char* doom2fwad;
char* plutoniawad;
char* tntwad;
int i;
int j;
#ifdef NORMALUNIX
char *home;
char *doomwaddir;
doomwaddir = getenv("DOOMWADDIR");
if (!doomwaddir)
doomwaddir = ".";
char* home;
char wadpath[1024];
char bundledir[1024];
char bundlesubdir[1024];
char appsupportdir[1024];
const char* waddir[5];
int ndirs;
// Commercial.
doom2wad = malloc(strlen(doomwaddir)+1+9+1);
sprintf(doom2wad, "%s/doom2.wad", doomwaddir);
// IWAD search directories, in priority order. Filename-major
// iteration below means a higher-priority IWAD anywhere always
// beats a bundled FreeDoom fallback.
ndirs = 0;
waddir[ndirs] = getenv("DOOMWADDIR");
if (waddir[ndirs])
ndirs++;
// Retail.
doomuwad = malloc(strlen(doomwaddir)+1+8+1);
sprintf(doomuwad, "%s/doomu.wad", doomwaddir);
// Registered.
doomwad = malloc(strlen(doomwaddir)+1+8+1);
sprintf(doomwad, "%s/doom.wad", doomwaddir);
// Shareware.
doom1wad = malloc(strlen(doomwaddir)+1+9+1);
sprintf(doom1wad, "%s/doom1.wad", doomwaddir);
I_GetBundleResourcesDir (bundledir, sizeof (bundledir));
if (bundledir[0])
{
waddir[ndirs++] = bundledir;
// The Xcode project copies macos-app/Resources into the bundle
// as a folder reference, so bundled IWADs land one level deep.
snprintf (bundlesubdir, sizeof (bundlesubdir), "%s/Resources", bundledir);
waddir[ndirs++] = bundlesubdir;
}
// Bug, dear Shawn.
// Insufficient malloc, caused spurious realloc errors.
plutoniawad = malloc(strlen(doomwaddir)+1+/*9*/12+1);
sprintf(plutoniawad, "%s/plutonia.wad", doomwaddir);
I_GetAppSupportDir (appsupportdir, sizeof (appsupportdir));
if (appsupportdir[0])
waddir[ndirs++] = appsupportdir;
tntwad = malloc(strlen(doomwaddir)+1+9+1);
sprintf(tntwad, "%s/tnt.wad", doomwaddir);
// French stuff.
doom2fwad = malloc(strlen(doomwaddir)+1+10+1);
sprintf(doom2fwad, "%s/doom2f.wad", doomwaddir);
waddir[ndirs++] = ".";
home = getenv("HOME");
if (!home)
@@ -655,58 +668,26 @@ void IdentifyVersion (void)
return;
}
if ( !access (doom2fwad,R_OK) )
#ifdef NORMALUNIX
for (j = 0 ; j < (int)(sizeof (iwads) / sizeof (iwads[0])) ; j++)
{
gamemode = commercial;
// C'est ridicule!
// Let's handle languages in config files, okay?
language = french;
printf("French version\n");
D_AddFile (doom2fwad);
return;
}
if ( !access (doom2wad,R_OK) )
{
gamemode = commercial;
D_AddFile (doom2wad);
return;
}
if ( !access (plutoniawad, R_OK ) )
{
gamemode = commercial;
D_AddFile (plutoniawad);
return;
}
if ( !access ( tntwad, R_OK ) )
{
gamemode = commercial;
D_AddFile (tntwad);
return;
}
if ( !access (doomuwad,R_OK) )
{
gamemode = retail;
D_AddFile (doomuwad);
return;
}
if ( !access (doomwad,R_OK) )
{
gamemode = registered;
D_AddFile (doomwad);
return;
}
if ( !access (doom1wad,R_OK) )
{
gamemode = shareware;
D_AddFile (doom1wad);
return;
for (i = 0 ; i < ndirs ; i++)
{
sprintf (wadpath, "%s/%s.wad", waddir[i], iwads[j].name);
if ( !access (wadpath, R_OK) )
{
gamemode = iwads[j].mode;
// C'est ridicule!
// Let's handle languages in config files, okay?
language = iwads[j].lang;
if (language == french)
printf ("French version\n");
D_AddFile (wadpath);
return;
}
}
}
#endif
printf("Game mode indeterminate.\n");
gamemode = indetermined;
@@ -1119,7 +1100,7 @@ void D_DoomMain (void)
// for statistics driver
extern void* statcopy;
statcopy = (void*)atoi(myargv[p+1]);
statcopy = (void*)strtoll(myargv[p+1], NULL, 0);
printf ("External statistics registered.\n");
}
+1 -1
View File
@@ -461,7 +461,7 @@ void CheckAbort (void)
I_StartTic ();
for ( ; eventtail != eventhead
; eventtail = (++eventtail)&(MAXEVENTS-1) )
; eventtail = (eventtail+1)&(MAXEVENTS-1) )
{
ev = &events[eventtail];
if (ev->type == ev_keydown && ev->data1 == KEY_ESCAPE)
+3 -1
View File
@@ -81,7 +81,9 @@ typedef enum
// and unfinished. Default is synchronous.
// Experimental asynchronous timer based is
// handled by SNDINTR.
#define SNDSERV 1
// macOS port mixes in-process via SDL audio;
// no external sndserver process is used.
//#define SNDSERV 1
//#define SNDINTR 1
+2 -2
View File
@@ -492,8 +492,8 @@ void G_DoLoadLevel (void)
joyxmove = joyymove = 0;
mousex = mousey = 0;
sendpause = sendsave = paused = false;
memset (mousebuttons, 0, sizeof(mousebuttons));
memset (joybuttons, 0, sizeof(joybuttons));
memset (mousearray, 0, sizeof(mousearray));
memset (joyarray, 0, sizeof(joyarray));
}
+86
View File
@@ -0,0 +1,86 @@
// Emacs style mode select -*- C -*-
//-----------------------------------------------------------------------------
//
// $Id:$
//
// DESCRIPTION:
// macOS-specific system helpers: app-bundle detection and
// user-writable data directory lookup.
//
//-----------------------------------------------------------------------------
static const char
rcsid[] = "$Id:$";
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <CoreFoundation/CoreFoundation.h>
// stdbool.h (pulled in by CoreFoundation) defines false/true as macros,
// which clashes with doomtype's enum boolean if a doom header ever
// follows this include.
#undef false
#undef true
#include "i_mac.h"
int I_IsBundled (void)
{
CFBundleRef bundle = CFBundleGetMainBundle ();
if (!bundle)
return 0;
return CFBundleGetIdentifier (bundle) != NULL;
}
void I_GetBundleResourcesDir (char *out, size_t len)
{
CFURLRef url;
if (!len)
return;
out[0] = '\0';
if (!I_IsBundled ())
return;
url = CFBundleCopyResourcesDirectoryURL (CFBundleGetMainBundle ());
if (!url)
return;
CFURLGetFileSystemRepresentation (url, 1, (UInt8*)out, (CFIndex)len);
CFRelease (url);
}
void I_GetAppSupportDir (char *out, size_t len)
{
const char *home;
if (!len)
return;
out[0] = '\0';
home = getenv ("HOME");
if (!home)
return;
snprintf (out, len, "%s/Library/Application Support/DOOM", home);
mkdir (out, 0755);
}
void I_PrepareAppEnvironment (void)
{
char dir[1024];
if (!I_IsBundled ())
return;
I_GetAppSupportDir (dir, sizeof (dir));
if (dir[0])
chdir (dir);
}
+37
View File
@@ -0,0 +1,37 @@
// Emacs style mode select -*- C -*-
//-----------------------------------------------------------------------------
//
// $Id:$
//
// DESCRIPTION:
// macOS-specific system helpers: app-bundle detection and
// user-writable data directory lookup. Plain C; implemented
// with CoreFoundation in i_mac.c.
//
//-----------------------------------------------------------------------------
#ifndef __I_MAC__
#define __I_MAC__
#include <stddef.h>
// Nonzero when running as a real .app bundle (has a bundle identifier).
// A loose command-line binary returns a bundle object without an
// identifier, so this reliably distinguishes the two cases.
int I_IsBundled (void);
// Absolute path of the bundle's Contents/Resources directory.
// Writes an empty string when not running from a bundle.
void I_GetBundleResourcesDir (char *out, size_t len);
// Absolute path of "~/Library/Application Support/DOOM" (created if
// missing). Writes an empty string if $HOME is unset.
void I_GetAppSupportDir (char *out, size_t len);
// When running bundled, make the app-support directory the working
// directory so relative-path writes (savegames, screenshots, PWAD
// resolution) land somewhere writable instead of "/" (a Finder-launched
// app's cwd). No-op for the command-line binary.
void I_PrepareAppEnvironment (void);
#endif
+4
View File
@@ -31,6 +31,8 @@ rcsid[] = "$Id: i_main.c,v 1.4 1997/02/03 22:45:10 b1 Exp $";
#include "m_argv.h"
#include "d_main.h"
#include "i_mac.h"
int
main
( int argc,
@@ -39,6 +41,8 @@ main
myargc = argc;
myargv = argv;
I_PrepareAppEnvironment ();
D_DoomMain ();
return 0;
+1 -15
View File
@@ -51,20 +51,6 @@ rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
// For some odd reason...
#define ntohl(x) \
((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
(((unsigned long int)(x) & 0x0000ff00U) << 8) | \
(((unsigned long int)(x) & 0x00ff0000U) >> 8) | \
(((unsigned long int)(x) & 0xff000000U) >> 24)))
#define ntohs(x) \
((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \
(((unsigned short int)(x) & 0xff00) >> 8))) \
#define htonl(x) ntohl(x)
#define htons(x) ntohs(x)
void NetSend (void);
boolean NetListen (void);
@@ -163,7 +149,7 @@ void PacketGet (void)
int i;
int c;
struct sockaddr_in fromaddress;
int fromlen;
socklen_t fromlen;
doomdata_t sw;
fromlen = sizeof(fromaddress);
+183 -335
View File
@@ -18,6 +18,8 @@
//
// DESCRIPTION:
// System interface for sound.
// macOS port: SDL2 audio queue for SFX,
// AudioToolbox MusicSequence/MusicPlayer for music.
//
//-----------------------------------------------------------------------------
@@ -32,21 +34,19 @@ rcsid[] = "$Id: i_unix.c,v 1.5 1997/02/03 22:45:10 b1 Exp $";
#include <sys/time.h>
#include <sys/types.h>
#ifndef LINUX
#include <sys/filio.h>
#endif
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
// Linux voxware output.
#include <linux/soundcard.h>
#define SDL_MAIN_HANDLED
#include <SDL.h>
// Timer stuff. Experimental.
#include <time.h>
#include <signal.h>
#include <AudioToolbox/AudioToolbox.h>
#include <CoreFoundation/CoreFoundation.h>
// stdbool.h (pulled in by CoreFoundation) clashes
// with doomtype's enum boolean.
#undef false
#undef true
#include "z_zone.h"
@@ -58,37 +58,14 @@ rcsid[] = "$Id: i_unix.c,v 1.5 1997/02/03 22:45:10 b1 Exp $";
#include "doomdef.h"
// UNIX hack, to be removed.
#ifdef SNDSERV
// Separate sound server process.
FILE* sndserver=0;
char* sndserver_filename = "./sndserver ";
#elif SNDINTR
#include "mus2mid.h"
// Update all 30 millisecs, approx. 30fps synchronized.
// Linux resolution is allegedly 10 millisecs,
// scale is microseconds.
#define SOUND_INTERVAL 500
// Get the interrupt. Set duration in millisecs.
int I_SoundSetTimer( int duration_of_tick );
void I_SoundDelTimer( void );
#else
// None?
#endif
// A quick hack to establish a protocol between
// synchronous mix buffer updates and asynchronous
// audio writes. Probably redundant with gametic.
static int flag = 0;
// The number of internal mixing channels,
// the samples calculated for each mixing step,
// the size of the 16bit, 2 hardware channel (stereo)
// mixing buffer, and the samplerate of the raw data.
// Needed for calling the actual sound output.
#define SAMPLECOUNT 512
#define NUM_CHANNELS 8
@@ -97,13 +74,12 @@ static int flag = 0;
#define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL)
#define SAMPLERATE 11025 // Hz
#define SAMPLESIZE 2 // 16bit
// The actual lengths of all sound effects.
int lengths[NUMSFX];
// The actual output device.
int audio_fd;
static SDL_AudioDeviceID audio_device;
// The global mixing buffer.
// Basically, samples from all active internal channels
@@ -152,32 +128,6 @@ int* channelrightvol_lookup[NUM_CHANNELS];
//
// Safe ioctl, convenience.
//
void
myioctl
( int fd,
int command,
int* arg )
{
int rc;
extern int errno;
rc = ioctl(fd, command, arg);
if (rc < 0)
{
fprintf(stderr, "ioctl(dsp,%d,arg) failed\n", command);
fprintf(stderr, "errno=%d\n", errno);
exit(-1);
}
}
//
// This function loads the sound data from the WAD lump,
// for single sound.
@@ -253,7 +203,6 @@ getsfx
//
// This function adds a sound to the
// list of currently active sounds,
@@ -383,7 +332,6 @@ addsfx
//
// SFX API
// Note: this was called by S_Init.
@@ -434,13 +382,13 @@ void I_SetSfxVolume(int volume)
snd_SfxVolume = volume;
}
// MUSIC API - dummy. Some code from DOS version.
// MUSIC API
void I_SetMusicVolume(int volume)
{
// Internal state variable.
// MusicPlayer has no per-sequence volume control;
// the setting is kept for config consistency.
snd_MusicVolume = volume;
// Now set volume on output device.
// Whatever( snd_MusciVolume );
}
@@ -478,26 +426,17 @@ I_StartSound
// UNUSED
priority = 0;
#ifdef SNDSERV
if (sndserver)
{
fprintf(sndserver, "p%2.2x%2.2x%2.2x%2.2x\n", id, pitch, vol, sep);
fflush(sndserver);
}
// warning: control reaches end of non-void function.
return id;
#else
// Debug.
//fprintf( stderr, "starting sound %d", id );
// Returns a handle (not used).
id = addsfx( id, vol, steptable[pitch], sep );
// fprintf( stderr, "/handle is %d\n", id );
return id;
#endif
// The menu and config store SFX volume on a 0..15 scale, while the
// original mixer lookup tables use 0..127.
vol *= 8;
if (vol > 127)
vol = 127;
// Returns a handle (not used).
id = addsfx( id, vol, steptable[pitch], sep );
return id;
}
@@ -522,7 +461,6 @@ int I_SoundIsPlaying(int handle)
//
// This function loops all active (internal) sound
// channels, retrieves a given number of samples
@@ -538,12 +476,6 @@ int I_SoundIsPlaying(int handle)
//
void I_UpdateSound( void )
{
#ifdef SNDINTR
// Debug. Count buffer misses with interrupt.
static int misses = 0;
#endif
// Mix current sound data.
// Data, from raw sound, for right and left.
register unsigned int sample;
@@ -609,11 +541,6 @@ void I_UpdateSound( void )
}
// Clamp to range. Left hardware channel.
// Has been char instead of short.
// if (dl > 127) *leftout = 127;
// else if (dl < -128) *leftout = -128;
// else *leftout = dl;
if (dl > 0x7fff)
*leftout = 0x7fff;
else if (dl < -0x8000)
@@ -633,40 +560,26 @@ void I_UpdateSound( void )
leftout += step;
rightout += step;
}
#ifdef SNDINTR
// Debug check.
if ( flag )
{
misses += flag;
flag = 0;
}
if ( misses > 10 )
{
fprintf( stderr, "I_SoundUpdate: missed 10 buffer writes\n");
misses = 0;
}
// Increment flag for update.
flag++;
#endif
}
//
// This would be used to write out the mixbuffer
// Write out the mixbuffer to the audio device
// during each game loop update.
// Updates sound buffer and audio device at runtime.
// It is called during Timer interrupt with SNDINTR.
// Mixing now done synchronous, and
// only output be done asynchronous?
//
void
I_SubmitSound(void)
{
// Write it to DSP device.
write(audio_fd, mixbuffer, SAMPLECOUNT*BUFMUL);
if (!audio_device)
return;
// Throttle: the game produces 512 stereo frames per tic
// (35 tics/sec) but the device consumes at 11025 Hz.
// Bound the queue the way the blocking /dev/dsp write did.
while (SDL_GetQueuedAudioSize(audio_device) > 4*MIXBUFFERSIZE)
SDL_Delay(1);
SDL_QueueAudio(audio_device, mixbuffer, MIXBUFFERSIZE);
}
@@ -689,113 +602,51 @@ I_UpdateSoundParams
void I_ShutdownSound(void)
{
#ifdef SNDSERV
if (sndserver)
{
if (audio_device)
{
// Send a "quit" command.
fprintf(sndserver, "q\n");
fflush(sndserver);
SDL_CloseAudioDevice(audio_device);
audio_device = 0;
}
#else
// Wait till all pending sounds are finished.
int done = 0;
int i;
// FIXME (below).
fprintf( stderr, "I_ShutdownSound: NOT finishing pending sounds\n");
fflush( stderr );
while ( !done )
{
for( i=0 ; i<8 && !channels[i] ; i++);
// FIXME. No proper channel output.
//if (i==8)
done=1;
}
#ifdef SNDINTR
I_SoundDelTimer();
#endif
// Cleaning up -releasing the DSP device.
close ( audio_fd );
#endif
// Done.
return;
}
void
I_InitSound()
{
#ifdef SNDSERV
char buffer[256];
if (getenv("DOOMWADDIR"))
sprintf(buffer, "%s/%s",
getenv("DOOMWADDIR"),
sndserver_filename);
else
sprintf(buffer, "%s", sndserver_filename);
// start sound process
if ( !access(buffer, X_OK) )
{
strcat(buffer, " -quiet");
sndserver = popen(buffer, "w");
}
else
fprintf(stderr, "Could not start sound server [%s]\n", buffer);
#else
int i;
#ifdef SNDINTR
fprintf( stderr, "I_SoundSetTimer: %d microsecs\n", SOUND_INTERVAL );
I_SoundSetTimer( SOUND_INTERVAL );
#endif
// Secure and configure sound device first.
fprintf( stderr, "I_InitSound: ");
audio_fd = open("/dev/dsp", O_WRONLY);
if (audio_fd<0)
fprintf(stderr, "Could not open /dev/dsp\n");
i = 11 | (2<<16);
myioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &i);
myioctl(audio_fd, SNDCTL_DSP_RESET, 0);
i=SAMPLERATE;
myioctl(audio_fd, SNDCTL_DSP_SPEED, &i);
i=1;
myioctl(audio_fd, SNDCTL_DSP_STEREO, &i);
myioctl(audio_fd, SNDCTL_DSP_GETFMTS, &i);
if (i&=AFMT_S16_LE)
myioctl(audio_fd, SNDCTL_DSP_SETFMT, &i);
SDL_AudioSpec want;
SDL_zero(want);
if (SDL_InitSubSystem(SDL_INIT_AUDIO) != 0)
{
fprintf(stderr, "I_InitSound: could not init SDL audio: %s\n",
SDL_GetError());
return;
}
want.freq = SAMPLERATE;
want.format = AUDIO_S16SYS;
want.channels = 2;
want.samples = SAMPLECOUNT;
want.callback = NULL;
want.userdata = NULL;
audio_device = SDL_OpenAudioDevice(NULL, 0, &want, NULL, 0);
if (!audio_device)
fprintf(stderr, "I_InitSound: could not open audio device: %s\n",
SDL_GetError());
else
fprintf(stderr, "Could not play signed 16 data\n");
SDL_PauseAudioDevice(audio_device, 0);
fprintf(stderr, " configured audio device\n" );
// Initialize external data (all sounds) at start, keep static.
fprintf( stderr, "I_InitSound: ");
for (i=1 ; i<NUMSFX ; i++)
{
// Alias? Example is the chaingun sound linked to pistol.
@@ -808,20 +659,20 @@ I_InitSound()
{
// Previously loaded already?
S_sfx[i].data = S_sfx[i].link->data;
lengths[i] = lengths[(S_sfx[i].link - S_sfx)/sizeof(sfxinfo_t)];
lengths[i] = lengths[S_sfx[i].link - S_sfx];
}
}
fprintf( stderr, " pre-cached all sound data\n");
// Now initialize mixbuffer with zero.
for ( i = 0; i< MIXBUFFERSIZE; i++ )
mixbuffer[i] = 0;
I_InitMusic();
// Finished initialization.
fprintf(stderr, "I_InitSound: sound module ready\n");
#endif
}
@@ -829,157 +680,154 @@ I_InitSound()
//
// MUSIC API.
// Still no music done.
// Remains. Dummies.
// MUS lumps are converted to MIDI and played through
// AudioToolbox MusicSequence/MusicPlayer (system DLS synth).
//
void I_InitMusic(void) { }
void I_ShutdownMusic(void) { }
static int looping=0;
static int musicdies=-1;
#define MAX_MUSIC_HANDLES 128
void I_PlaySong(int handle, int looping)
static MusicSequence music_handles[MAX_MUSIC_HANDLES];
static int music_handles_used;
static MusicPlayer music_player;
static int looping;
static int current_song;
void I_InitMusic(void)
{
// UNUSED.
handle = looping = 0;
musicdies = gametic + TICRATE*30;
NewMusicPlayer(&music_player);
}
void I_ShutdownMusic(void)
{
int i;
if (music_player)
{
MusicPlayerStop(music_player);
DisposeMusicPlayer(music_player);
music_player = NULL;
}
for (i=0 ; i<music_handles_used ; i++)
if (music_handles[i])
DisposeMusicSequence(music_handles[i]);
music_handles_used = 0;
}
void I_PlaySong(int handle, int loop)
{
MusicTrack track;
MusicTrackLoopInfo loopinfo;
MusicTimeStamp tracklen;
UInt32 tracks, i, len32;
if (handle <= 0 || handle > music_handles_used
|| !music_handles[handle-1])
return;
looping = loop;
current_song = handle;
MusicPlayerSetSequence(music_player, music_handles[handle-1]);
// MusicPlayer has no repeat mode; loop each track
// via its LoopInfo property (-1 = forever).
MusicSequenceGetTrackCount(music_handles[handle-1], &tracks);
for (i=0 ; i<tracks ; i++)
{
if (MusicSequenceGetIndTrack(music_handles[handle-1], i, &track))
continue;
len32 = sizeof(tracklen);
MusicTrackGetProperty(track, kSequenceTrackProperty_TrackLength,
&tracklen, &len32);
loopinfo.loopDuration = tracklen;
loopinfo.numberOfLoops = loop ? -1 : 0;
MusicTrackSetProperty(track, kSequenceTrackProperty_LoopInfo,
&loopinfo, sizeof(loopinfo));
}
MusicPlayerStart(music_player);
}
void I_PauseSong (int handle)
{
// UNUSED.
handle = 0;
MusicPlayerStop(music_player);
}
void I_ResumeSong (int handle)
{
// UNUSED.
handle = 0;
MusicPlayerStart(music_player);
}
void I_StopSong(int handle)
{
// UNUSED.
handle = 0;
looping = 0;
musicdies = 0;
MusicPlayerStop(music_player);
}
void I_UnRegisterSong(int handle)
{
// UNUSED.
handle = 0;
if (handle <= 0 || handle > music_handles_used
|| !music_handles[handle-1])
return;
DisposeMusicSequence(music_handles[handle-1]);
music_handles[handle-1] = NULL;
}
int I_RegisterSong(void* data)
{
// UNUSED.
data = NULL;
return 1;
byte* mid;
int midlen;
CFDataRef middata;
MusicSequence seq;
OSStatus err;
if (music_handles_used >= MAX_MUSIC_HANDLES)
return 0;
midlen = mus2mid((byte *)data, &mid);
if (midlen <= 0)
return 0;
middata = CFDataCreate(NULL, mid, midlen);
free(mid);
if (!middata)
return 0;
err = NewMusicSequence(&seq);
if (!err)
err = MusicSequenceFileLoadData(seq, middata,
kMusicSequenceFile_MIDIType, 0);
CFRelease(middata);
if (err)
{
fprintf(stderr, "I_RegisterSong: MIDI load failed (%d)\n",
(int)err);
return 0;
}
music_handles[music_handles_used] = seq;
return ++music_handles_used;
}
// Is the song playing?
int I_QrySongPlaying(int handle)
{
Boolean playing = false;
// UNUSED.
handle = 0;
return looping || musicdies > gametic;
}
//
// Experimental stuff.
// A Linux timer interrupt, for asynchronous
// sound output.
// I ripped this out of the Timer class in
// our Difference Engine, including a few
// SUN remains...
//
#ifdef sun
typedef sigset_t tSigSet;
#else
typedef int tSigSet;
#endif
// We might use SIGVTALRM and ITIMER_VIRTUAL, if the process
// time independend timer happens to get lost due to heavy load.
// SIGALRM and ITIMER_REAL doesn't really work well.
// There are issues with profiling as well.
static int /*__itimer_which*/ itimer = ITIMER_REAL;
static int sig = SIGALRM;
// Interrupt handler.
void I_HandleSoundTimer( int ignore )
{
// Debug.
//fprintf( stderr, "%c", '+' ); fflush( stderr );
// Feed sound device if necesary.
if ( flag )
{
// See I_SubmitSound().
// Write it to DSP device.
write(audio_fd, mixbuffer, SAMPLECOUNT*BUFMUL);
// Reset flag counter.
flag = 0;
}
else
return;
// UNUSED, but required.
ignore = 0;
return;
}
// Get the interrupt. Set duration in millisecs.
int I_SoundSetTimer( int duration_of_tick )
{
// Needed for gametick clockwork.
struct itimerval value;
struct itimerval ovalue;
struct sigaction act;
struct sigaction oact;
int res;
// This sets to SA_ONESHOT and SA_NOMASK, thus we can not use it.
// signal( _sig, handle_SIG_TICK );
// Now we have to change this attribute for repeated calls.
act.sa_handler = I_HandleSoundTimer;
#ifndef sun
//ac t.sa_mask = _sig;
#endif
act.sa_flags = SA_RESTART;
sigaction( sig, &act, &oact );
value.it_interval.tv_sec = 0;
value.it_interval.tv_usec = duration_of_tick;
value.it_value.tv_sec = 0;
value.it_value.tv_usec = duration_of_tick;
// Error is -1.
res = setitimer( itimer, &value, &ovalue );
// Debug.
if ( res == -1 )
fprintf( stderr, "I_SoundSetTimer: interrupt n.a.\n");
return res;
}
// Remove the interrupt. Set duration to zero.
void I_SoundDelTimer()
{
// Debug.
if ( I_SoundSetTimer( 0 ) == -1)
fprintf( stderr, "I_SoundDelTimer: failed to remove interrupt. Doh!\n");
if (music_player)
MusicPlayerIsPlaying(music_player, &playing);
return playing;
}
+232 -858
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -23,7 +23,7 @@
#ifndef __M_BBOX__
#define __M_BBOX__
#include <values.h>
#include "doomtype.h"
#include "m_fixed.h"
+32 -21
View File
@@ -34,6 +34,7 @@ rcsid[] = "$Id: m_misc.c,v 1.6 1997/02/03 22:45:10 b1 Exp $";
#include <unistd.h>
#include <ctype.h>
#include <stdint.h>
#include "doomdef.h"
@@ -220,13 +221,17 @@ char* mousedev;
extern char* chat_macros[];
// Last manually selected windowed size.
int window_width;
int window_height;
typedef struct
{
char* name;
int* location;
int defaultvalue;
void* location;
intptr_t defaultvalue;
int scantranslate; // PC scan code hack
int untranslated; // lousy hack
} default_t;
@@ -237,6 +242,8 @@ default_t defaults[] =
{"sfx_volume",&snd_SfxVolume, 8},
{"music_volume",&snd_MusicVolume, 8},
{"show_messages",&showMessages, 1},
{"window_width",&window_width, 960},
{"window_height",&window_height, 720},
#ifdef NORMALUNIX
@@ -254,15 +261,15 @@ default_t defaults[] =
// UNIX hack, to be removed.
#ifdef SNDSERV
{"sndserver", (int *) &sndserver_filename, (int) "sndserver"},
{"sndserver", &sndserver_filename, (intptr_t) "sndserver"},
{"mb_used", &mb_used, 2},
#endif
#endif
#ifdef LINUX
{"mousedev", (int*)&mousedev, (int)"/dev/ttyS0"},
{"mousetype", (int*)&mousetype, (int)"microsoft"},
{"mousedev", &mousedev, (intptr_t)"/dev/ttyS0"},
{"mousetype", &mousetype, (intptr_t)"microsoft"},
#endif
{"use_mouse",&usemouse, 1},
@@ -285,16 +292,16 @@ default_t defaults[] =
{"usegamma",&usegamma, 0},
{"chatmacro0", (int *) &chat_macros[0], (int) HUSTR_CHATMACRO0 },
{"chatmacro1", (int *) &chat_macros[1], (int) HUSTR_CHATMACRO1 },
{"chatmacro2", (int *) &chat_macros[2], (int) HUSTR_CHATMACRO2 },
{"chatmacro3", (int *) &chat_macros[3], (int) HUSTR_CHATMACRO3 },
{"chatmacro4", (int *) &chat_macros[4], (int) HUSTR_CHATMACRO4 },
{"chatmacro5", (int *) &chat_macros[5], (int) HUSTR_CHATMACRO5 },
{"chatmacro6", (int *) &chat_macros[6], (int) HUSTR_CHATMACRO6 },
{"chatmacro7", (int *) &chat_macros[7], (int) HUSTR_CHATMACRO7 },
{"chatmacro8", (int *) &chat_macros[8], (int) HUSTR_CHATMACRO8 },
{"chatmacro9", (int *) &chat_macros[9], (int) HUSTR_CHATMACRO9 }
{"chatmacro0", &chat_macros[0], (intptr_t) HUSTR_CHATMACRO0 },
{"chatmacro1", &chat_macros[1], (intptr_t) HUSTR_CHATMACRO1 },
{"chatmacro2", &chat_macros[2], (intptr_t) HUSTR_CHATMACRO2 },
{"chatmacro3", &chat_macros[3], (intptr_t) HUSTR_CHATMACRO3 },
{"chatmacro4", &chat_macros[4], (intptr_t) HUSTR_CHATMACRO4 },
{"chatmacro5", &chat_macros[5], (intptr_t) HUSTR_CHATMACRO5 },
{"chatmacro6", &chat_macros[6], (intptr_t) HUSTR_CHATMACRO6 },
{"chatmacro7", &chat_macros[7], (intptr_t) HUSTR_CHATMACRO7 },
{"chatmacro8", &chat_macros[8], (intptr_t) HUSTR_CHATMACRO8 },
{"chatmacro9", &chat_macros[9], (intptr_t) HUSTR_CHATMACRO9 }
};
@@ -320,7 +327,7 @@ void M_SaveDefaults (void)
if (defaults[i].defaultvalue > -0xfff
&& defaults[i].defaultvalue < 0xfff)
{
v = *defaults[i].location;
v = *(int *)defaults[i].location;
fprintf (f,"%s\t\t%i\n",defaults[i].name,v);
} else {
fprintf (f,"%s\t\t\"%s\"\n",defaults[i].name,
@@ -351,7 +358,13 @@ void M_LoadDefaults (void)
// set everything to base values
numdefaults = sizeof(defaults)/sizeof(defaults[0]);
for (i=0 ; i<numdefaults ; i++)
*defaults[i].location = defaults[i].defaultvalue;
{
if (defaults[i].defaultvalue > -0xfff
&& defaults[i].defaultvalue < 0xfff)
*(int *)defaults[i].location = defaults[i].defaultvalue;
else
*(char **)defaults[i].location = (char *)defaults[i].defaultvalue;
}
// check for a custom default file
i = M_CheckParm ("-config");
@@ -389,10 +402,9 @@ void M_LoadDefaults (void)
if (!strcmp(def, defaults[i].name))
{
if (!isstring)
*defaults[i].location = parm;
*(int *)defaults[i].location = parm;
else
*defaults[i].location =
(int) newstring;
*(char **)defaults[i].location = newstring;
break;
}
}
@@ -531,4 +543,3 @@ void M_ScreenShot (void)
players[consoleplayer].message = "screen shot";
}
+3
View File
@@ -48,6 +48,9 @@ void M_LoadDefaults (void);
void M_SaveDefaults (void);
extern int window_width;
extern int window_height;
int
M_DrawText
+366
View File
@@ -0,0 +1,366 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// mus2mid - convert DOOM MUS music lumps to standard MIDI.
//
// MUS events run at 140Hz. Emitting a MIDI division of 70 ticks
// per quarter note (at the default 120bpm tempo) reproduces the
// same timing, so delay values pass through unchanged.
//
//-----------------------------------------------------------------------------
#include <stdlib.h>
#include <string.h>
#include "doomtype.h"
#include "mus2mid.h"
// MUS event types (score byte high nibble).
enum
{
MUS_RELEASE_NOTE = 0,
MUS_PLAY_NOTE = 1,
MUS_PITCH_WHEEL = 2,
MUS_SYSTEM_EVENT = 3,
MUS_CHANGE_CTRL = 4,
MUS_SCORE_END = 7
};
// MUS controller number -> MIDI controller number.
// MUS controller 0 means program change, handled separately.
static const byte ctrl_map[10] =
{
0x00, // program change (special-cased)
0x00, // bank select
0x01, // modulation
0x07, // volume
0x0a, // pan
0x0b, // expression
0x5b, // reverb depth
0x5d, // chorus depth
0x40, // sustain pedal
0x43 // soft pedal
};
// MUS system event controller numbers (10-14) -> MIDI controllers.
static const byte system_map[5] =
{
120, // all sound off
123, // all notes off
126, // mono on
127, // poly on
121 // reset all controllers
};
// Growable byte buffer for the MIDI track.
typedef struct
{
byte* data;
int len;
int cap;
} midibuf_t;
static void
mb_put
( midibuf_t* b,
int v )
{
if (b->len == b->cap)
{
b->cap = b->cap ? b->cap*2 : 4096;
b->data = realloc(b->data, b->cap);
}
b->data[b->len++] = v;
}
// MIDI variable-length quantity.
static void
mb_put_varlen
( midibuf_t* b,
int v )
{
byte tmp[4];
int n = 0;
tmp[n++] = v & 0x7f;
while ((v >>= 7))
tmp[n++] = 0x80 | (v & 0x7f);
while (n)
mb_put(b, tmp[--n]);
}
static int
read16
( const byte* p )
{
return p[0] | (p[1] << 8);
}
static int
read16be
( const byte* p )
{
return (p[0] << 8) | p[1];
}
static int
read32be
( const byte* p )
{
return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
}
// Length of a standard MIDI stream, by walking its chunks.
// Some WADs (e.g. FreeDoom) store MIDI rather than MUS lumps.
static int
midi_length
( byte* data )
{
byte* q;
int ntracks;
int len;
int i;
if (memcmp(data, "MThd", 4)
|| read32be(data + 4) != 6)
return -1;
ntracks = read16be(data + 10);
len = 14;
q = data + 14;
for (i=0 ; i<ntracks ; i++)
{
int chunklen;
if (memcmp(q, "MTrk", 4))
return -1;
chunklen = read32be(q + 4);
len += 8 + chunklen;
q += 8 + chunklen;
}
return len;
}
// MUS channel 15 is the percussion channel -> MIDI channel 9.
static int
midichan
( int muschan )
{
return muschan == 15 ? 9 : muschan;
}
int
mus2mid
( byte* musdata,
byte** mid_out )
{
byte* score;
byte* p;
byte* end;
midibuf_t track = {0, 0, 0};
byte last_volumes[16];
int score_len;
int score_start;
int instr_cnt;
int i;
int delay;
int pending = 0;
int done = 0;
byte* mid;
byte* q;
*mid_out = NULL;
if (!musdata)
return -1;
// Already-MIDI lumps (e.g. FreeDoom) pass straight through.
if (!memcmp(musdata, "MThd", 4))
{
int midlen = midi_length(musdata);
if (midlen <= 0)
return -1;
*mid_out = malloc(midlen);
if (!*mid_out)
return -1;
memcpy(*mid_out, musdata, midlen);
return midlen;
}
if (memcmp(musdata, "MUS\x1a", 4))
return -1;
score_len = read16(musdata + 4);
score_start = read16(musdata + 6);
instr_cnt = read16(musdata + 12);
score = musdata + score_start;
p = score;
end = score + score_len;
// Default channel volumes.
for (i=0 ; i<16 ; i++)
last_volumes[i] = 0x64;
// Channel instrument assignments from the header.
// Instrument i plays on channel i.
for (i=0 ; i<instr_cnt && i<16 ; i++)
{
if (i == 15)
continue; // percussion channel needs no program
mb_put_varlen(&track, 0);
mb_put(&track, 0xc0 | midichan(i));
mb_put(&track, musdata[14 + i*2] & 0x7f);
}
while (!done && p < end)
{
int mus_event = (p[0] >> 4) & 7;
int mus_chan = p[0] & 15;
int has_delay = p[0] & 0x80;
int chan = midichan(mus_chan);
p++;
switch (mus_event)
{
case MUS_RELEASE_NOTE:
mb_put_varlen(&track, pending);
pending = 0;
mb_put(&track, 0x80 | chan);
mb_put(&track, p[0] & 0x7f);
mb_put(&track, 0);
p += 1;
break;
case MUS_PLAY_NOTE:
{
int note = p[0] & 0x7f;
int vol;
if (p[0] & 0x80)
{
vol = p[1] & 0x7f;
last_volumes[mus_chan] = vol;
p += 2;
}
else
{
vol = last_volumes[mus_chan];
p += 1;
}
mb_put_varlen(&track, pending);
pending = 0;
mb_put(&track, 0x90 | chan);
mb_put(&track, note);
mb_put(&track, vol);
break;
}
case MUS_PITCH_WHEEL:
// MUS bend byte (0-255, center 128) -> 14-bit MIDI bend.
mb_put_varlen(&track, pending);
pending = 0;
mb_put(&track, 0xe0 | chan);
mb_put(&track, (p[0] & 1) << 6);
mb_put(&track, p[0] >> 1);
p += 1;
break;
case MUS_SYSTEM_EVENT:
if (p[0] >= 10 && p[0] <= 14)
{
mb_put_varlen(&track, pending);
pending = 0;
mb_put(&track, 0xb0 | chan);
mb_put(&track, system_map[p[0] - 10]);
mb_put(&track, 0);
}
p += 1;
break;
case MUS_CHANGE_CTRL:
if (p[0] == 0)
{
// program change
mb_put_varlen(&track, pending);
pending = 0;
mb_put(&track, 0xc0 | chan);
mb_put(&track, p[1] & 0x7f);
}
else if (p[0] >= 1 && p[0] <= 9)
{
mb_put_varlen(&track, pending);
pending = 0;
mb_put(&track, 0xb0 | chan);
mb_put(&track, ctrl_map[p[0]]);
mb_put(&track, p[1] & 0x7f);
}
p += 2;
break;
case MUS_SCORE_END:
done = 1;
break;
default:
// Unknown event: bail out.
done = 1;
break;
}
// Delay time (MUS ticks) follows when the high bit was set;
// it becomes the delta time preceding the next event.
if (has_delay)
{
delay = 0;
while (p < end)
{
delay = (delay << 7) | (*p & 0x7f);
if (!(*p++ & 0x80))
break;
}
pending += delay;
}
}
// End of track.
mb_put_varlen(&track, pending);
mb_put(&track, 0xff);
mb_put(&track, 0x2f);
mb_put(&track, 0x00);
// Assemble the MIDI file: MThd + MTrk.
mid = malloc(14 + 8 + track.len);
if (!mid)
{
free(track.data);
return -1;
}
q = mid;
memcpy(q, "MThd", 4); q += 4;
*q++ = 0; *q++ = 0; *q++ = 0; *q++ = 6; // header length
*q++ = 0; *q++ = 0; // format 0
*q++ = 0; *q++ = 1; // one track
*q++ = 0; *q++ = 70; // division: 70 ticks/qn
memcpy(q, "MTrk", 4); q += 4;
*q++ = (track.len >> 24) & 0xff;
*q++ = (track.len >> 16) & 0xff;
*q++ = (track.len >> 8) & 0xff;
*q++ = track.len & 0xff;
memcpy(q, track.data, track.len);
free(track.data);
*mid_out = mid;
return 14 + 8 + track.len;
}
+20
View File
@@ -0,0 +1,20 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// mus2mid - convert DOOM MUS music lumps to standard MIDI.
//
// MUS lumps have no embedded length beyond their header fields,
// so only the data pointer is needed.
//
//-----------------------------------------------------------------------------
#ifndef __MUS2MID__
#define __MUS2MID__
#include "doomtype.h"
// Converts a MUS lump to a malloc()'d MIDI byte stream.
// Returns the stream length, or -1 on malformed input.
int mus2mid (byte* musdata, byte** mid_out);
#endif
+13 -11
View File
@@ -24,6 +24,8 @@
static const char
rcsid[] = "$Id: p_tick.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
#include <stdint.h>
#include "i_system.h"
#include "z_zone.h"
#include "p_local.h"
@@ -37,7 +39,7 @@ byte* save_p;
// Pads save_p to a 4-byte boundary
// so that the load/save works on SGI&Gecko.
#define PADSAVEP() save_p += (4 - ((int) save_p & 3)) & 3
#define PADSAVEP() save_p += (4 - ((intptr_t) save_p & 3)) & 3
@@ -101,7 +103,7 @@ void P_UnArchivePlayers (void)
if (players[i]. psprites[j].state)
{
players[i]. psprites[j].state
= &states[ (int)players[i].psprites[j].state ];
= &states[ (intptr_t)players[i].psprites[j].state ];
}
}
}
@@ -299,11 +301,11 @@ void P_UnArchiveThinkers (void)
mobj = Z_Malloc (sizeof(*mobj), PU_LEVEL, NULL);
memcpy (mobj, save_p, sizeof(*mobj));
save_p += sizeof(*mobj);
mobj->state = &states[(int)mobj->state];
mobj->state = &states[(intptr_t)mobj->state];
mobj->target = NULL;
if (mobj->player)
{
mobj->player = &players[(int)mobj->player-1];
mobj->player = &players[(intptr_t)mobj->player-1];
mobj->player->mo = mobj;
}
P_SetThingPosition (mobj);
@@ -498,7 +500,7 @@ void P_UnArchiveSpecials (void)
ceiling = Z_Malloc (sizeof(*ceiling), PU_LEVEL, NULL);
memcpy (ceiling, save_p, sizeof(*ceiling));
save_p += sizeof(*ceiling);
ceiling->sector = &sectors[(int)ceiling->sector];
ceiling->sector = &sectors[(intptr_t)ceiling->sector];
ceiling->sector->specialdata = ceiling;
if (ceiling->thinker.function.acp1)
@@ -513,7 +515,7 @@ void P_UnArchiveSpecials (void)
door = Z_Malloc (sizeof(*door), PU_LEVEL, NULL);
memcpy (door, save_p, sizeof(*door));
save_p += sizeof(*door);
door->sector = &sectors[(int)door->sector];
door->sector = &sectors[(intptr_t)door->sector];
door->sector->specialdata = door;
door->thinker.function.acp1 = (actionf_p1)T_VerticalDoor;
P_AddThinker (&door->thinker);
@@ -524,7 +526,7 @@ void P_UnArchiveSpecials (void)
floor = Z_Malloc (sizeof(*floor), PU_LEVEL, NULL);
memcpy (floor, save_p, sizeof(*floor));
save_p += sizeof(*floor);
floor->sector = &sectors[(int)floor->sector];
floor->sector = &sectors[(intptr_t)floor->sector];
floor->sector->specialdata = floor;
floor->thinker.function.acp1 = (actionf_p1)T_MoveFloor;
P_AddThinker (&floor->thinker);
@@ -535,7 +537,7 @@ void P_UnArchiveSpecials (void)
plat = Z_Malloc (sizeof(*plat), PU_LEVEL, NULL);
memcpy (plat, save_p, sizeof(*plat));
save_p += sizeof(*plat);
plat->sector = &sectors[(int)plat->sector];
plat->sector = &sectors[(intptr_t)plat->sector];
plat->sector->specialdata = plat;
if (plat->thinker.function.acp1)
@@ -550,7 +552,7 @@ void P_UnArchiveSpecials (void)
flash = Z_Malloc (sizeof(*flash), PU_LEVEL, NULL);
memcpy (flash, save_p, sizeof(*flash));
save_p += sizeof(*flash);
flash->sector = &sectors[(int)flash->sector];
flash->sector = &sectors[(intptr_t)flash->sector];
flash->thinker.function.acp1 = (actionf_p1)T_LightFlash;
P_AddThinker (&flash->thinker);
break;
@@ -560,7 +562,7 @@ void P_UnArchiveSpecials (void)
strobe = Z_Malloc (sizeof(*strobe), PU_LEVEL, NULL);
memcpy (strobe, save_p, sizeof(*strobe));
save_p += sizeof(*strobe);
strobe->sector = &sectors[(int)strobe->sector];
strobe->sector = &sectors[(intptr_t)strobe->sector];
strobe->thinker.function.acp1 = (actionf_p1)T_StrobeFlash;
P_AddThinker (&strobe->thinker);
break;
@@ -570,7 +572,7 @@ void P_UnArchiveSpecials (void)
glow = Z_Malloc (sizeof(*glow), PU_LEVEL, NULL);
memcpy (glow, save_p, sizeof(*glow));
save_p += sizeof(*glow);
glow->sector = &sectors[(int)glow->sector];
glow->sector = &sectors[(intptr_t)glow->sector];
glow->thinker.function.acp1 = (actionf_p1)T_Glow;
P_AddThinker (&glow->thinker);
break;
+1 -1
View File
@@ -533,7 +533,7 @@ void P_GroupLines (void)
}
// build line tables for each sector
linebuffer = Z_Malloc (total*4, PU_LEVEL, 0);
linebuffer = Z_Malloc (total*sizeof(*linebuffer), PU_LEVEL, 0);
sector = sectors;
for (i=0 ; i<numsectors ; i++, sector++)
{
+10 -11
View File
@@ -41,9 +41,8 @@ rcsid[] = "$Id: r_data.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
#include "doomstat.h"
#include "r_sky.h"
#ifdef LINUX
#include <alloca.h>
#endif
#include <stdint.h>
#include "r_data.h"
@@ -87,7 +86,7 @@ typedef struct
boolean masked;
short width;
short height;
void **columndirectory; // OBSOLETE
int columndirectory; // OBSOLETE
short patchcount;
mappatch_t patches[1];
} maptexture_t;
@@ -479,13 +478,13 @@ void R_InitTextures (void)
}
numtextures = numtextures1 + numtextures2;
textures = Z_Malloc (numtextures*4, PU_STATIC, 0);
texturecolumnlump = Z_Malloc (numtextures*4, PU_STATIC, 0);
texturecolumnofs = Z_Malloc (numtextures*4, PU_STATIC, 0);
texturecomposite = Z_Malloc (numtextures*4, PU_STATIC, 0);
texturecompositesize = Z_Malloc (numtextures*4, PU_STATIC, 0);
texturewidthmask = Z_Malloc (numtextures*4, PU_STATIC, 0);
textureheight = Z_Malloc (numtextures*4, PU_STATIC, 0);
textures = Z_Malloc (numtextures*sizeof(*textures), PU_STATIC, 0);
texturecolumnlump = Z_Malloc (numtextures*sizeof(*texturecolumnlump), PU_STATIC, 0);
texturecolumnofs = Z_Malloc (numtextures*sizeof(*texturecolumnofs), PU_STATIC, 0);
texturecomposite = Z_Malloc (numtextures*sizeof(*texturecomposite), PU_STATIC, 0);
texturecompositesize = Z_Malloc (numtextures*sizeof(*texturecompositesize), PU_STATIC, 0);
texturewidthmask = Z_Malloc (numtextures*sizeof(*texturewidthmask), PU_STATIC, 0);
textureheight = Z_Malloc (numtextures*sizeof(*textureheight), PU_STATIC, 0);
totalwidth = 0;
@@ -639,7 +638,7 @@ void R_InitColormaps (void)
lump = W_GetNumForName("COLORMAP");
length = W_LumpLength (lump) + 255;
colormaps = Z_Malloc (length, PU_STATIC, 0);
colormaps = (byte *)( ((int)colormaps + 255)&~0xff);
colormaps = (byte *)( ((uintptr_t)colormaps + 255)&~0xff);
W_ReadLump (lump,colormaps);
}
+3 -1
View File
@@ -28,6 +28,8 @@ static const char
rcsid[] = "$Id: r_draw.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
#include <stdint.h>
#include "doomdef.h"
#include "i_system.h"
@@ -461,7 +463,7 @@ void R_InitTranslationTables (void)
int i;
translationtables = Z_Malloc (256*3+255, PU_STATIC, 0);
translationtables = (byte *)(( (int)translationtables + 255 )& ~255);
translationtables = (byte *)(( (uintptr_t)translationtables + 255 )& ~255);
// translate just the 16 green colors
for (i=0 ; i<256 ; i++)
+1 -1
View File
@@ -31,7 +31,7 @@ rcsid[] = "$Id: w_wad.c,v 1.5 1997/02/03 16:47:57 b1 Exp $";
#include <sys/types.h>
#include <string.h>
#include <unistd.h>
#include <malloc.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <alloca.h>
+3 -1
View File
@@ -24,6 +24,8 @@
static const char
rcsid[] = "$Id: z_zone.c,v 1.4 1997/02/03 16:47:58 b1 Exp $";
#include <stdint.h>
#include "z_zone.h"
#include "i_system.h"
#include "doomdef.h"
@@ -437,7 +439,7 @@ Z_ChangeTag2
if (block->id != ZONEID)
I_Error ("Z_ChangeTag: freed a pointer without ZONEID");
if (tag >= PU_PURGELEVEL && (unsigned)block->user < 0x100)
if (tag >= PU_PURGELEVEL && (uintptr_t)block->user < 0x100)
I_Error ("Z_ChangeTag: an owner is required for purgable blocks");
block->tag = tag;
View File
+32
View File
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>DOOM</string>
<key>CFBundleDisplayName</key>
<string>DOOM</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>12.0</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
View File
+113
View File
@@ -0,0 +1,113 @@
#!/bin/sh
#
# fetch-deps.sh — fetch the binary dependencies for DOOM.app:
# * SDL2.framework -> macos-app/Frameworks/ (embedded in the app)
# * an IWAD (*.wad) -> macos-app/Resources/ (bundled in the app)
#
# Idempotent: anything already present is left alone. Safe to run
# standalone or from the Xcode "Fetch Dependencies" build phase.
#
# Pinned versions:
SDL2_VERSION=2.30.12
SDL2_DMG_URL="https://github.com/libsdl-org/SDL/releases/download/release-${SDL2_VERSION}/SDL2-${SDL2_VERSION}.dmg"
FREEDOOM_VERSION=0.13.0
FREEDOOM_ZIP_URL="https://github.com/freedoom/freedoom/releases/download/v${FREEDOOM_VERSION}/freedoom-${FREEDOOM_VERSION}.zip"
set -euo pipefail
# Repo root = two levels up from this script (macos-app/Scripts/).
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
REPO_ROOT=$(CDPATH= cd -- "$SCRIPT_DIR/../.." && pwd)
FRAMEWORKS_DIR="$REPO_ROOT/macos-app/Frameworks"
RESOURCES_DIR="$REPO_ROOT/macos-app/Resources"
REPO_WADS_DIR="$REPO_ROOT/wads"
mkdir -p "$FRAMEWORKS_DIR" "$RESOURCES_DIR"
TMPDIR_WORK=""
cleanup() {
[ -n "$TMPDIR_WORK" ] && rm -rf "$TMPDIR_WORK"
return 0
}
trap cleanup EXIT
fail() {
echo "fetch-deps.sh: error: $*" >&2
exit 1
}
have_iwad() {
for name in doom2f doom2 plutonia tnt doomu doom doom1 freedoom2 freedoom1; do
[ -f "$RESOURCES_DIR/$name.wad" ] && return 0
done
return 1
}
#
# SDL2.framework
#
if [ -d "$FRAMEWORKS_DIR/SDL2.framework" ]; then
echo "SDL2.framework already present, skipping download."
else
echo "Fetching SDL2.framework $SDL2_VERSION ..."
TMPDIR_WORK=$(mktemp -d /tmp/doomdeps.XXXXXX)
dmg="$TMPDIR_WORK/sdl2.dmg"
curl -fL --progress-bar -o "$dmg" "$SDL2_DMG_URL" \
|| fail "could not download $SDL2_DMG_URL (offline?). Place SDL2.framework in $FRAMEWORKS_DIR manually."
mountpoint="$TMPDIR_WORK/mnt"
mkdir -p "$mountpoint"
hdiutil attach "$dmg" -nobrowse -readonly -mountpoint "$mountpoint" -quiet \
|| fail "could not mount SDL2 dmg."
if [ -d "$mountpoint/SDL2.framework" ]; then
cp -R "$mountpoint/SDL2.framework" "$FRAMEWORKS_DIR/"
else
hdiutil detach "$mountpoint" -quiet || true
fail "SDL2.framework not found inside dmg."
fi
hdiutil detach "$mountpoint" -quiet || true
rm -rf "$TMPDIR_WORK"; TMPDIR_WORK=""
# Remove quarantine attribute so the ad-hoc signed app can load it.
xattr -dr com.apple.quarantine "$FRAMEWORKS_DIR/SDL2.framework" 2>/dev/null || true
echo "Installed $FRAMEWORKS_DIR/SDL2.framework"
fi
#
# IWAD(s) — copy any *.wad from the repo's wads/ dir first; if nothing
# usable ends up in Resources/, download FreeDoom's freedoom2.wad.
#
if [ -d "$REPO_WADS_DIR" ]; then
for wad in "$REPO_WADS_DIR"/*.wad; do
[ -e "$wad" ] || continue
base=$(basename "$wad")
if [ ! -f "$RESOURCES_DIR/$base" ]; then
cp "$wad" "$RESOURCES_DIR/$base"
echo "Copied $base from wads/ into app resources."
fi
done
fi
if have_iwad; then
echo "IWAD present in app resources."
else
echo "Fetching freedoom2.wad $FREEDOOM_VERSION ..."
TMPDIR_WORK=$(mktemp -d /tmp/doomdeps.XXXXXX)
zip="$TMPDIR_WORK/freedoom.zip"
curl -fL --progress-bar -o "$zip" "$FREEDOOM_ZIP_URL" \
|| fail "could not download $FREEDOOM_ZIP_URL (offline?). Drop a doom.wad/freedoom2.wad into $RESOURCES_DIR manually."
unzip -o -q "$zip" -d "$TMPDIR_WORK" \
|| fail "could not unzip freedoom archive."
src="$TMPDIR_WORK/freedoom-$FREEDOOM_VERSION/freedoom2.wad"
[ -f "$src" ] || fail "freedoom2.wad not found inside archive."
cp "$src" "$RESOURCES_DIR/freedoom2.wad"
rm -rf "$TMPDIR_WORK"; TMPDIR_WORK=""
echo "Installed $RESOURCES_DIR/freedoom2.wad"
fi
echo "fetch-deps.sh: done."