From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ig0-f173.google.com ([209.85.213.173]) by ur; Wed Jul 29 12:06:00 EDT 2015 Received: by igbpg9 with SMTP id pg9so169865532igb.0 for <9front@9front.org>; Wed, 29 Jul 2015 09:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=FPolqwllod/ISGDd5o4Q8IWPBtvHCAlaxWKY7VUHVCg=; b=GMA2jbXOcS/nUFW3jpPw622PDT/ho6nRUr62dSUHuxhW/khwjdUeznuAugzwXARAk0 QGZLdwG3f6tYHIdeouHt2LJ5TsxjtCoLA3oSXJ6fjVf4OgemKsmFPGrZO4cV9SlS4m8x MW6xjcJ3n8RuG3C2j35VJjz1ayn97URPRKY5cXywjAPPg2E+xYrVHSHBARtKUf7RBy+l IivJK//uNGA6YkRVS5STnDVoInicAWemTypC35jXk116Sr992hTLYDQjnczhxQR0vFII PejU9yMOhOaoIjhWrmElIoj92bAQdZ47olKz+oV4bpxb7Gm2lsxaSU15y65H+SGs6cT6 RgNg== MIME-Version: 1.0 X-Received: by 10.50.102.98 with SMTP id fn2mr2924677igb.55.1438185958443; Wed, 29 Jul 2015 09:05:58 -0700 (PDT) Received: by 10.107.56.68 with HTTP; Wed, 29 Jul 2015 09:05:58 -0700 (PDT) Date: Wed, 29 Jul 2015 19:05:58 +0300 Message-ID: List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: virtual strategy-aware storage-aware NoSQL control Subject: games/doom: fix switch textures swapping in ultimate doom From: qux To: 9front@9front.org Content-Type: text/plain; charset=UTF-8 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 )