From: qux <qu7uux@gmail.com>
To: 9front@9front.org
Subject: games/doom: fix switch textures swapping in ultimate doom
Date: Wed, 29 Jul 2015 19:05:58 +0300 [thread overview]
Message-ID: <CAAGZaiJPSkjo9ocmPVNu4SUKw51t6ENkBDuhHM3jmD6htJb4FQ@mail.gmail.com> (raw)
games/doom: fix switch textures swapping in ultimate doom
gamemode is set according to the name of the main wad (cf. d_main.c), i.e.:
- doom1.wad: (shareware doom1, ep1 only) gamemode == shareware
- doom.wad: (registered doom1, ep1-3) gamemode == registered
- doomu.wad: (ultimate doom, ep1-4) gamemode == retail
- doom2.wad, plutonia.wad, tnt.wad: gamemode == commercial
most doom.wad's distributed online are, in fact, ultimate doom.
if your ultimate doom wad is correctly named doomu.wad, some switches in
episodes 2-4 won't swap their texture when toggled, because
p_switch.c:P_InitSwitchList() is only checking for registered doom1.
easy way to test: demo2 in either registered or ultimate doom: the player flips
a switch right at the beginning of the demo; if the main wad is called
doomu.wad, the switch won't change its texture.
% games/doom -playdemo demo2
if you rename the wad to doom.wad or alter d_main.c:IdentifyVersion, the switch
will swap its texture like it should.
diff -r aa2b4dca05f1 sys/src/games/doom/p_switch.c
--- a/sys/src/games/doom/p_switch.c Wed Jul 29 14:51:00 2015 +0200
+++ b/sys/src/games/doom/p_switch.c Wed Jul 29 17:32:41 2015 +0300
@@ -112,7 +112,7 @@
episode = 1;
- if (gamemode == registered)
+ if (gamemode == registered || gamemode == retail)
episode = 2;
else
if ( gamemode == commercial )
reply other threads:[~2015-07-29 16:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAGZaiJPSkjo9ocmPVNu4SUKw51t6ENkBDuhHM3jmD6htJb4FQ@mail.gmail.com \
--to=qu7uux@gmail.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).