Commit graph

3662 commits

Author SHA1 Message Date
terminx
7c976018be Adds the following keywords from M32script into CON: shiftvarvarl, shiftvarvarr, ifvarvarle, ifvarvarge, ifvarvarboth, whilevarl, and whilevarvarl.
This also adds the shorthand versions of some commands, like "set" for "setvarvar", "add" for "addvarvar", "ife" for "ifvarvare", etc. There are about 30 of these. Because some of these names may already be used in some projects as variable names, this revision also includes a somewhat large change in variable naming rules: gamevars may now have the same names as CON keywords, with the caveat that the masked keyword is no longer accessible. This results in a warning at compile time but should ensure nobody's project ever stops compiling due to the introduction of new keywords.

git-svn-id: https://svn.eduke32.com/eduke32@5499 1a8010ca-5511-0410-912e-c29ae57300e0
2016-01-02 01:56:20 +00:00
terminx
0871e56b92 Projectile changes:
-palette is now set at spawn time, instead of during movement (oops!)
-projectiles can no longer hit their owner during their first tic of movement

git-svn-id: https://svn.eduke32.com/eduke32@5498 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-28 02:04:41 +00:00
terminx
935e9fa197 Fix hard coded white and red color indexes used in on-screen debug output, to better operate with a palette dissimilar to Duke3D.
git-svn-id: https://svn.eduke32.com/eduke32@5497 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-28 02:04:36 +00:00
terminx
1d17d2c6f6 Polymer lighting tweaks, mostly internal.
git-svn-id: https://svn.eduke32.com/eduke32@5496 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-28 02:04:29 +00:00
hendricks266
0075e746ba Mapster: Don't restrict setgamepalette to the range [0, 3].
git-svn-id: https://svn.eduke32.com/eduke32@5495 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-26 15:42:13 +00:00
hendricks266
aac1900472 Add new spriteflag SFLAG_GREENSLIMEFOOD = 8388608, which controls whether GREENSLIME will eat a given actor.
The flag is automatically set on LIZTROOP, LIZMAN, PIGCOP, and NEWBEAST, in a similar fashion as SFLAG_NOWATERDIP (r4956) and SFLAG_NODAMAGEPUSH (r4371).

git-svn-id: https://svn.eduke32.com/eduke32@5492 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-26 15:41:59 +00:00
terminx
f64a397b34 Fix issue with sin/cos CON commands that prevented using the special builtin structure shortcut access vars for input.
git-svn-id: https://svn.eduke32.com/eduke32@5490 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:06:24 +00:00
terminx
97c4b40ca2 Add vm_player, vm_sprite and vm_distance to get/setuserdef. This controls the sprite and player referenced by things like "THISACTOR", all of the "ifp" conditionals, per-actor gamevar access, etc. This is intended to be used to un-gimp things like EVENT_WORLD.
git-svn-id: https://svn.eduke32.com/eduke32@5489 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:06:20 +00:00
terminx
b0cb97acb6 Draw frame at level start after EVENT_LOADPLAYER instead of before.
git-svn-id: https://svn.eduke32.com/eduke32@5487 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:06:13 +00:00
terminx
49dd9ca9b7 Change references to eduke32.sourceforge.net to www.eduke32.com
git-svn-id: https://svn.eduke32.com/eduke32@5486 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:06:09 +00:00
terminx
c00f933a37 Update LZ4
git-svn-id: https://svn.eduke32.com/eduke32@5485 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:06:05 +00:00
terminx
febd50cc18 Add "restartmap" console command
git-svn-id: https://svn.eduke32.com/eduke32@5483 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:55 +00:00
terminx
242b6bf870 Appease clang
git-svn-id: https://svn.eduke32.com/eduke32@5478 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:35 +00:00
terminx
760ea6c313 Polymer light tweaks
git-svn-id: https://svn.eduke32.com/eduke32@5477 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:31 +00:00
terminx
48254ccb3d Fix FIRELASER spawning multiple Polymer lights
git-svn-id: https://svn.eduke32.com/eduke32@5476 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:27 +00:00
terminx
3b47e9d652 Move vsync option to video setup
git-svn-id: https://svn.eduke32.com/eduke32@5475 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-23 04:05:21 +00:00
hendricks266
971d5b6fac Prune the dynamic tile name system in the same manner as sounds were pruned in the previous commit and r4748.
git-svn-id: https://svn.eduke32.com/eduke32@5474 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-20 05:19:11 +00:00
hendricks266
334c98c054 Remove the __STATIC macros of dynamic sounds pruned in r4748.
git-svn-id: https://svn.eduke32.com/eduke32@5473 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-20 05:19:08 +00:00
hendricks266
70d51ddf02 Remove three unused-in-the-source dynamic sound variables partially forgotten in r4748.
git-svn-id: https://svn.eduke32.com/eduke32@5472 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-20 05:19:05 +00:00
hendricks266
3473580f5f Menus: When RETURN is set to INT32_MIN in EVENT_CHANGEMENU, cancel any animations in addition to not changing the current menu.
git-svn-id: https://svn.eduke32.com/eduke32@5471 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-20 05:19:02 +00:00
hendricks266
1ea0796b43 Name map best time entries in the cfg by MD4 checksum instead of filename.
Existing filename-demarcated personal bests are still read as a fallback if an MD4 is not found, but only MD4 entries are written.

Fans of both Lunar Apocalypse and Nuclear Winter should sort out the MapTimes section of their cfg file manually.

git-svn-id: https://svn.eduke32.com/eduke32@5470 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-20 05:18:59 +00:00
hendricks266
a5367ed600 Fix two bugs in SCRIPT_GetNumber that cause it to issue an incorrect return value.
git-svn-id: https://svn.eduke32.com/eduke32@5469 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-20 05:18:56 +00:00
hendricks266
00bc250811 Duke3D: Add globalgameflag 4, DUKE3D_NO_PALETTE_CHANGES. This disallows the game from performing its usual modification to palette data after loading it, mainly the transparent color.
If you use this flag, make sure your transparent color it set exactly as you would like it to be used in cases like those presented in the previous commit.

git-svn-id: https://svn.eduke32.com/eduke32@5468 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-20 05:18:53 +00:00
hendricks266
043656688f Add test cases for previous commit: transhacktest.map and .m32
git-svn-id: https://svn.eduke32.com/eduke32@5466 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-04 11:53:02 +00:00
hendricks266
0ddba3388f Factor out common handling of the end-of-level between sectors tagged 65535 and 65534, switches tagged 65535, and nukebuttons.
This fixes the bug with user maps ending in 65534-tagged sectors, reported by FistMarine: https://forums.duke4.net/topic/8367-end-of-level-bug/
It also eliminates dead code belonging to the nukebutton.

git-svn-id: https://svn.eduke32.com/eduke32@5463 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-04 11:52:51 +00:00
hendricks266
cbcef42656 Fix unused global variables in menus.c with DROIDMENU defined.
git-svn-id: https://svn.eduke32.com/eduke32@5462 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-04 11:52:47 +00:00
hendricks266
6a6bfc72fd Fix an unused variable in menus.c with USE_OPENGL=0.
git-svn-id: https://svn.eduke32.com/eduke32@5461 1a8010ca-5511-0410-912e-c29ae57300e0
2015-12-04 11:52:43 +00:00
hendricks266
38dd14b124 More NAM/WWII GI "bluefont" xbetween fixes missed in r5452.
git-svn-id: https://svn.eduke32.com/eduke32@5459 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-28 09:06:31 +00:00
hendricks266
27c646b5a7 Fix a compiler error on introduced in r5445.
git-svn-id: https://svn.eduke32.com/eduke32@5458 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-28 09:06:28 +00:00
hendricks266
33755d847b Fix typo in r5448.
git-svn-id: https://svn.eduke32.com/eduke32@5457 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-28 09:06:25 +00:00
hendricks266
a5ce52dc78 Fix compiler warnings when building for 32-bit.
git-svn-id: https://svn.eduke32.com/eduke32@5456 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-28 09:06:22 +00:00
hendricks266
aac7301af8 WWII GI: Use "GI2" as the cheat prefix instead of "WW2" because W conflicts with WSAD movement.
git-svn-id: https://svn.eduke32.com/eduke32@5455 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-28 09:06:17 +00:00
hendricks266
ff12dd11f4 Duke3D/Startup: Autodetect the installation path of the World War II GI release on Steam. Windows and Linux only for now, as there appears to be no OS X support.
git-svn-id: https://svn.eduke32.com/eduke32@5454 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:37 +00:00
hendricks266
0433d97a54 Implement WWII GI weapon display code.
Remaining issues with the weapons (both functionality and display):
- The "pistol", "shotgun", and "chaingun" fire too slowly.
- The flamethrower fires too quickly.
- The bazooka drop for reload is late.
- Upon starting a level, the "pistol" should show a reload frame, but it does not.

git-svn-id: https://svn.eduke32.com/eduke32@5453 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:34 +00:00
hendricks266
0fdeed231b Miscellaneous NAM and WWII GI tweaks/fixes.
Remaining issues:
- Inventory item gamefuncs still use their Duke 3D names. The buggy way custom gamefunc binds are saved and loaded needs to be addressed first.

git-svn-id: https://svn.eduke32.com/eduke32@5452 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:31 +00:00
hendricks266
4aae9378d0 Implement NAM and WWII GI's replacement cheats.
Whereas Duke starts cheats with DN, NAM starts with NVA and WWII GI starts with WW2. (Hackily: CheatKeys[] is still size 2, and the third character is at the start of every CheatString.)

The cheats hyper (NAM-only), coords, view, skill, weapons, and inventory were not originally present but since they work properly and this is EDuke32, I have re-added them. Non-working cheats are now disabled.

git-svn-id: https://svn.eduke32.com/eduke32@5451 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:28 +00:00
hendricks266
637f48e9ce Don't implicitly define GAMEFLAG_NAM for WWII GI. Instead, implement a new macro NAM_WW2GI synonymous with (NAM || WW2GI).
git-svn-id: https://svn.eduke32.com/eduke32@5450 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:24 +00:00
hendricks266
148927bb9d Restrict the right-edge widescreen clamping of the Pistol reload and Freezer to Duke Nukem 3D only: NAM and WWII GI don't need it.
git-svn-id: https://svn.eduke32.com/eduke32@5449 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:20 +00:00
hendricks266
90623c1f65 Duke3D/Startup: Instead of adding Megaton's music paths, don't remove the gameroot path and let my new S_OpenAudio take care of the SC-55 soundtrack.
git-svn-id: https://svn.eduke32.com/eduke32@5448 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:17 +00:00
hendricks266
f1a658e790 Duke3D/Startup: Clean up the Windows registry reading code.
There is no need to cache the result of a function called only once for each input.

git-svn-id: https://svn.eduke32.com/eduke32@5447 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:14 +00:00
hendricks266
6cb925a95d Duke3D/Sound: Add a hack to the previous commit so that Megaton's grabbag.voc will still upgrade to music/grabbag_voc.ogg, but its subway.voc will no longer upgrade to music/subway.ogg.
git-svn-id: https://svn.eduke32.com/eduke32@5446 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:10 +00:00
hendricks266
26aca9b291 Duke3D/Sound: Restructure S_OpenAudio to check in more paths. For each path, it performs the filename transformations and checks it does currently.
First, it will try the local path (as previously).
Second, it will check to see if the filename originally requested exists inside a GRP or SSI file (its parent), and if it does, it will check in "music/<parent's name sans extension>/".
Third, it will check in "music/".

Do not rely on this when distributing mods: These checks are hacks and may potentially be removed.

git-svn-id: https://svn.eduke32.com/eduke32@5445 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:07 +00:00
hendricks266
fcd7b2e0b1 Duke3D/Sound: Make kopen4loadfrommod a tail-call from S_UpgradeFormat, rename the function to S_OpenAudio, and replace 4x calls to one and then the other. No functional changes.
git-svn-id: https://svn.eduke32.com/eduke32@5444 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-25 12:08:04 +00:00
helixhorned
48e73c65df player.c: factor out large A_ShootWithZvel() block into A_ShootHardcoded()
The block is taken over verbatim; 'vec3_t srcvect' is passed by value.

The primary purpose of this is that it's easier to compare custom projectile
behavior in A_ShootCustom() with the hardcoded one by reading the code
of these two functions. For example, this may be of use to modders wishing
to emulate a hardcoded projectile.

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5435 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-21 12:42:47 +00:00
helixhorned
6123d0b904 Mapster32: add byte array editorcolors[256] to m32script variables.
This makes it possible to set up editor colors at startup (from
m32_autoexec.cfg). For example:

 script_expertmode 1
 do for i range 256 ifge i 33 { set editorcolors[i] i }
 script_expertmode 0

Use this method in the description of how to get old-style 2D colors
in tiles.cfg and suggest an alternative color index pair.

git-svn-id: https://svn.eduke32.com/eduke32@5433 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-20 20:26:51 +00:00
helixhorned
56672fd5e2 Mapster32: make 'script_expertmode' require an argument (0 or 1) to toggle.
Without an argument, it prints the current state.

git-svn-id: https://svn.eduke32.com/eduke32@5432 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-20 20:26:49 +00:00
helixhorned
5aae37c4c5 Mapster32: changes to aid getting the old color scheme (by customizing).
- bump MAX_TILE_GROUP_ENTRIES to MAXUSERTILES
- in loadtilegroups(), only assign a tile color if it wasn't already
  assigned
- allow "hidden" tile groups by omitting the hotkey
- Tweak the description added to tiles.cfg

git-svn-id: https://svn.eduke32.com/eduke32@5430 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 23:41:00 +00:00
helixhorned
f8076f9207 Mapster32: honor "blocking color" declared with DEF 'spritecol' et al.
Meaning tilegroup's 'colors' directive.

Also, to the packaged tiles.cfg, add a description of how to emulate the
earlier Mapster32 sprite coloring for one tile group.

git-svn-id: https://svn.eduke32.com/eduke32@5429 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 23:40:59 +00:00
helixhorned
eb863ef1dc Mapster32: introduce DEF command "2dcolidxrange <col> <idx> <idxend>".
<col> is the editorcolor[] starting index
<idx> is the actual color index start
<idxend> is the actual color index end

So, editor colors from <col> onward will be mapped to
[<idx> .. min(<idxend>, 255)].

Takes precedence over '2dcol'.

git-svn-id: https://svn.eduke32.com/eduke32@5427 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 23:40:57 +00:00
helixhorned
5e61b28ebc Mapster32: in drawscreen_drawsprite(), "sprite[j]." -> "spr->".
Also a similar stylistic tweak in parsetilegroups().

git-svn-id: https://svn.eduke32.com/eduke32@5426 1a8010ca-5511-0410-912e-c29ae57300e0
2015-11-14 23:40:56 +00:00