Commit Graph

2557 Commits

Author SHA1 Message Date
terminx 15014234ab Fix startup problems stemming from SelectedGRP = "" ending up in eduke32.cfg
git-svn-id: https://svn.eduke32.com/eduke32@3705 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-22 16:30:39 +00:00
helixhorned 086ef3f901 Remove 'cl_angleinterpolation' cvar because it had no effect for a while.
Also remove the two instances of commented out code, but not the respective
CON structure access code.

git-svn-id: https://svn.eduke32.com/eduke32@3702 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-22 10:35:44 +00:00
helixhorned e1a9cadbce m32script: in tsprite access, fix checking min/max/RO; tweak RESPAWN preview.
This fixes RESPAWN preview wrongly clamping the previewed tsprite z coords to
[-524288 .. 524288] (x/y limits).
Also, make the previewed tsprites be 33% translucent with the option of 66%
translucency by setting 'showrespawn_fulltrans' to 1 in a.m32.

git-svn-id: https://svn.eduke32.com/eduke32@3699 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-21 19:55:32 +00:00
helixhorned 3792cc7312 Mapster32: in quick tile selection [G], if tile is nonexistent, revert it.
git-svn-id: https://svn.eduke32.com/eduke32@3698 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-21 19:55:26 +00:00
helixhorned 520b608094 Engine: stricter map load time checking for sprites with oob sectnums.
Sprites are now considered to have out of bounds sector numbers if it is
< 0 or >= numsectors (not merely >= MAXSECTORS). If such a sprite is now
encountered during post-load, an attempt is made first to assign it a sector
number (using updatesector()). If that fails, the sprite is removed from the
map.  The background is that a dozen of maps do come with such sprites and
could previously corrupt the sprite list when loaded.

git-svn-id: https://svn.eduke32.com/eduke32@3696 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-21 19:55:18 +00:00
helixhorned 08b10ca03c Draw the flat on-screen CHAINGUN in a way inspired by 3688, preventing seam.
Specifically, in GL modes, and if the CHAINGUN is not replaced by a model,
 - draw the upper part twice: first, two screen pixels * weapon scale lower,
   then at the original position
 - reverse the previous order: draw the upper part first, then the lower part

This is much preferable to the previous engine-side hack, and to my eye,
it looks perfect now.

git-svn-id: https://svn.eduke32.com/eduke32@3695 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-21 19:55:11 +00:00
helixhorned dac18a99e9 A couple of trivial stylistic changes.
git-svn-id: https://svn.eduke32.com/eduke32@3694 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-21 19:55:03 +00:00
helixhorned 34a965721b OS X: Write eduke32.log to ~/Library/Logs unless -usecwd is given.
git-svn-id: https://svn.eduke32.com/eduke32@3689 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-17 20:34:39 +00:00
terminx 3c5c8b44dc Mask the seam that shows up when drawing the scuba HUD overlay in OpenGL by drawing SCUBAMASK 3 times... once at the left position + 1, and then at the proper left and right positions. It's definitely a hack, but at least it lives on the game side of things.
git-svn-id: https://svn.eduke32.com/eduke32@3688 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-16 22:37:31 +00:00
helixhorned e2c05cbbae Fix A_MoveSprite() wrongly reporting sector hit without z change after r3678.
git-svn-id: https://svn.eduke32.com/eduke32@3686 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-16 20:08:45 +00:00
helixhorned 6be448c534 Fix SPRITES_OF_SECT_SAFE macro. Oops!
git-svn-id: https://svn.eduke32.com/eduke32@3685 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-15 18:50:21 +00:00
helixhorned bac1a3ff63 gameexec.c: in VM_Fall(), comment out dead code, small indentation change.
git-svn-id: https://svn.eduke32.com/eduke32@3684 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-15 10:48:22 +00:00
helixhorned 0db0587731 TROR no-SE7 water: spawn splash, reuse calculated other sector number.
git-svn-id: https://svn.eduke32.com/eduke32@3683 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-15 10:48:20 +00:00
helixhorned 73eb1c4def Improve on the code that handles changing sectors of projectiles.
- In the A_MoveSprite() code that transports projectiles due to an SE7
  (introduced in r1450 / legacy ROR), only report "success" if the
  transportation succeeded.
- Clear newly introduced internal SPRITE_DIDNOSE7WATER flag after
  checking it.

git-svn-id: https://svn.eduke32.com/eduke32@3682 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-15 10:48:18 +00:00
helixhorned 732a1ca33c In G_MoveStandables() CRACKx handling, fix oob access of DynamicTileMap[].
Also, in two cases, don't assign A_IncurDamage() result to a variable if
it's not needed.

git-svn-id: https://svn.eduke32.com/eduke32@3681 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-15 10:48:15 +00:00
helixhorned 3b39a87bd1 Fix a couple of issues identified in the preceding commit.
- In S_PlaySound(), move the sound index bound check above an indexing.
- For A_CheckHitSprite(), and A_FindPlayer(), allow NULL second arg.
- In A_ShootWithZvel(), make some one-letter vars be int32_t, making
  storing safeldist() results in them meaningful.
- In MaybeTrainKillEnemies(), remove two redundant checks and move another
  one further up.
- Comment that SIDEBOLT1 will never be translucent as was probably intended.
- In G_MoveFX(), fix an always-true comparison.

git-svn-id: https://svn.eduke32.com/eduke32@3680 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-15 10:48:13 +00:00
helixhorned 8064bd2f30 Clean up of mostly actors.c, but some other files along the way too.
- Rewrite some sprites-of-{stat,sector} loops using the SPRITES_OF,
  SPRITES_OF_SECT and new SPRITES_OF_SECT_SAFE macros.
- In passing, identify some problems and mark them with 'XXX', but don't
  attempt to fix them yet.
- The usual readability improvements...

git-svn-id: https://svn.eduke32.com/eduke32@3679 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-15 10:48:09 +00:00
helixhorned 52fc0bdfc5 TROR no-SE7 water: handle projectiles.
Actually, the tweaked code in VM_Move() is not specific to projectiles, so
other sprites now may pass no-SE7 water boundaries too, but it's most noticeable
with projectiles.

git-svn-id: https://svn.eduke32.com/eduke32@3678 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-15 10:48:05 +00:00
helixhorned 84e8ce6855 TROR no-SE7 water: allow boundary change only if other-side lotag is other one.
That is, if submerging, the lower sector MUST have lotag 2. If emerging, the
upper sector MUST have lotag 1. (Previously, emersion happened from ST 2 sectors
unconditionally.)  This means that the area where submersion or emersion can
happen is now the same for the top and bottom parts.

git-svn-id: https://svn.eduke32.com/eduke32@3677 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-15 10:48:00 +00:00
hendricks266 3cd85edac0 Fix the inventory icon selector's positioning to match v1.5 (reported by Fox [1]). While we're at it, move it according to ud.statusbarscale for aesthetic purposes.
[1] http://forums.duke4.net/topic/2961-paper-cuts-minor-bugs-and-annoyances/page__view__findpost__p__153060

git-svn-id: https://svn.eduke32.com/eduke32@3676 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-14 06:42:58 +00:00
hendricks266 eb4031fe8f Add cvars "hud_statusbarmode" and "r_rotatespritenowidescreen".
git-svn-id: https://svn.eduke32.com/eduke32@3675 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-14 06:42:36 +00:00
hendricks266 8055ec675b Center the x-position of BOTTOMSTATUSBAR displayed to the screen so an extra-wide one would display correctly.
Let me know if this breaks any mods that have #2462 with an x-dimension other than 320.

git-svn-id: https://svn.eduke32.com/eduke32@3674 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-14 06:42:09 +00:00
hendricks266 e2ab98261f Fix a signed/unsigned comparison.
git-svn-id: https://svn.eduke32.com/eduke32@3673 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-13 03:51:17 +00:00
hendricks266 670ede9f60 Fix reading the GOG and Steam paths for Win64 builds.
git-svn-id: https://svn.eduke32.com/eduke32@3671 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-13 03:50:37 +00:00
hendricks266 82b6414d92 Add newlines to some diagostic log messages that lack them and need them.
git-svn-id: https://svn.eduke32.com/eduke32@3668 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-13 03:49:35 +00:00
hendricks266 cbb003ba6e Fix the pause during display of TENSCREEN.
git-svn-id: https://svn.eduke32.com/eduke32@3667 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-13 03:49:05 +00:00
helixhorned a25cd24dd5 In upward moving enemy code of VM_Move(), consider TROR boundaries.
This fixes liztroops not passing TROR layers when on the jetpack, as well as
other enemies capable of moving upward, and also COMMANDER and DRONE (for which
the code is special-cased).

git-svn-id: https://svn.eduke32.com/eduke32@3666 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-12 11:59:35 +00:00
helixhorned 0dba35b207 build.lua: add .sectsperbunch to map table, useful for TROR stats w/ findmaps.sh
Also, sync MAXBUNCHES to new limit in lunatic/defs_common.lua.

git-svn-id: https://svn.eduke32.com/eduke32@3665 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-12 11:59:32 +00:00
helixhorned ec5cd930e0 Lunatic: fix test.elua after map-int VX and one rename, add one microbenchmark.
git-svn-id: https://svn.eduke32.com/eduke32@3664 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-12 11:59:29 +00:00
helixhorned 985c3d8428 Mostly engine and some gameexec.c stylistic changes.
git-svn-id: https://svn.eduke32.com/eduke32@3663 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-12 11:59:26 +00:00
terminx 9c7ab93e21 Fix something I fucked up with GRP scanning when I added support for the Megaton addon GRPs.
git-svn-id: https://svn.eduke32.com/eduke32@3661 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-10 23:47:14 +00:00
helixhorned 964e16a506 Silence "may be used uninitialized" warning, use Batoi() for user input.
Nag: The behavoir of atoi() is *undefined* if "the value of the result
cannot be represented" (C99 7.20.1).

Note: my nagging about undefined behaviors will *not* get less over time. :P

git-svn-id: https://svn.eduke32.com/eduke32@3660 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-09 17:35:17 +00:00
helixhorned 1773ac9276 Mapster32: print the "Saved board" message more persistently.
git-svn-id: https://svn.eduke32.com/eduke32@3659 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-09 17:35:14 +00:00
helixhorned 7b6bf4dda2 Lunatic: new-generation map format, in-memory representation ("map-int VX").
The Lunatic build compiles with new structures for sector and wall types.
They have separate members for TROR {up,down}{bunch,nextwall}, so there are
no conflicts with other uses of members into which they were previously
shoehorned.  Also, the maximum bunch limit is bumped to 512 in that build.

Currently, loading from V7/8/9 and saving to V7 and V8 are supported.

git-svn-id: https://svn.eduke32.com/eduke32@3658 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-09 17:35:11 +00:00
helixhorned a648522c68 Lunatic: move utility scripts to util/, bittest.lua -> test/test_bitar.lua.
git-svn-id: https://svn.eduke32.com/eduke32@3657 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-09 17:35:03 +00:00
helixhorned d1280de362 Lunatic: fix stuff after last commits; translator: clean up -f parsing code.
Also, implement 'cmenu' in LunaCON, make 'definequote' also allowed as inner
command.

git-svn-id: https://svn.eduke32.com/eduke32@3656 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-09 17:34:53 +00:00
terminx 6c7e835fb0 Fix changing the max refresh rate in EDuke32 (it was already working correctly in Mapster32).
git-svn-id: https://svn.eduke32.com/eduke32@3655 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-08 18:30:52 +00:00
terminx 606e7cce98 Add support for the versions of Duke it out in D.C., Duke Caribbean: Life's a Beach, and Duke: Nuclear Winter packaged with Duke Nukem 3D: Megaton Edition on Steam. This allows them to be launched directly from the startup window and also adds an "-addon" command line parameter that should allow the duke3d.exe included with Megaton Edition to be replaced with a copy of EDuke32.
git-svn-id: https://svn.eduke32.com/eduke32@3654 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-08 18:30:39 +00:00
helixhorned bbdc035335 Lunatic: replace DukePlayer_t set-member methods with metatable magic.
So that members needing it are checked when they're assigned to using the
usual syntax. What kind of check to perform (sector, player, ... x whether
negative values are allowed) is written in a declarative fashion inside the
C declaration.

Also, make Lunatic's MAXQUOTES be C's OBITQUOTEINDEX and bound-check an
access of sprite[p->wackedbyplayer] in the C code.

git-svn-id: https://svn.eduke32.com/eduke32@3653 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-07 15:20:41 +00:00
helixhorned fb41d91a50 Lunatic: get rid of some now unneeded set-member methods, add others.
git-svn-id: https://svn.eduke32.com/eduke32@3652 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-07 15:20:37 +00:00
helixhorned abcc98d5c1 Lunatic: access to show2dsector[], fix some permit-negative bound checks.
git-svn-id: https://svn.eduke32.com/eduke32@3650 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-07 15:20:28 +00:00
helixhorned c91363d7f9 Remove useless code setting show2dwall[] or show2dsprite[], as they're unused.
git-svn-id: https://svn.eduke32.com/eduke32@3649 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-07 15:20:24 +00:00
helixhorned f1f84beeda a.m32: Implement a Polymer "head light" emanating from your position in 3D mode.
Toggled with Ctrl+Shift+[KP-]. Variable 'headlight_range' controls its range.
For the implementation, a new event EVENT_PREDRAW3DSCREEN was added.

git-svn-id: https://svn.eduke32.com/eduke32@3648 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:53:31 +00:00
helixhorned 53b01f57c6 Factor out displaying episode ending cutscenes into G_BonusCutscenes().
Also,
 - retire IFWITHIN() macro, preferring expanding it
 - fix _endofgame() in control.lua

git-svn-id: https://svn.eduke32.com/eduke32@3647 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:53:25 +00:00
helixhorned e638c38c35 LunaCON: gen. cleaner code, make actor[].movflag internal, update listglobals.sh
git-svn-id: https://svn.eduke32.com/eduke32@3646 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:53:21 +00:00
helixhorned edcef5c3ec Define a macro LUNATIC_EXTERN that expands to 'static' in non-Lunatic builds.
git-svn-id: https://svn.eduke32.com/eduke32@3645 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:53:18 +00:00
helixhorned 203bd1e9e9 Take over and use static assertion macro found in LuaJIT sources.
git-svn-id: https://svn.eduke32.com/eduke32@3644 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:53:14 +00:00
helixhorned 6ebe2d4745 Lunatic: custom integer types treated as bitfields.
Used for engine struct's (c)stat and actor[].flags members.

git-svn-id: https://svn.eduke32.com/eduke32@3643 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:53:10 +00:00
helixhorned 023ff8f190 Lunatic: begin gamevar system. Not much there yet.
In Lunatic, gamevars (variables that are saved with savegames) are per-module.

git-svn-id: https://svn.eduke32.com/eduke32@3642 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:53:06 +00:00
helixhorned 49290a090c Lunatic: make palette_t a bcarray-generated type, various tweaks.
- Increase LuaJIT max. machine code limit to 10 MiB

git-svn-id: https://svn.eduke32.com/eduke32@3641 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:53:03 +00:00
helixhorned 512b9286fe LunaCON: ifsquished.
git-svn-id: https://svn.eduke32.com/eduke32@3640 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:52:59 +00:00
helixhorned 1e21ea3aae LunaCON: fix rotatesprite coordinate check, gen. events to chain at beginning.
git-svn-id: https://svn.eduke32.com/eduke32@3639 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:52:50 +00:00
terminx 9fbab31998 Support NVIDIA's adaptive vsync, you can enable it by setting r_swapinterval -1 in the console or by using the new third setting for the vsync menu option.
git-svn-id: https://svn.eduke32.com/eduke32@3638 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 16:41:12 +00:00
terminx e20b834ea8 Prevent loading anything except the GRP from the Steam or GOG Duke3D install directories. Loading DUKE.RTS from those paths will be resolved later.
git-svn-id: https://svn.eduke32.com/eduke32@3637 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 07:48:20 +00:00
terminx 73cb94b389 Fix savegamevar/readgamevar breakage from r3579
git-svn-id: https://svn.eduke32.com/eduke32@3636 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-03 17:26:49 +00:00
helixhorned 385c582efa Fix handling of SE31 pointing upward. A bug was introduced in r2607.
git-svn-id: https://svn.eduke32.com/eduke32@3635 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-01 18:35:44 +00:00
helixhorned e3ae81262e Fix activated MUSICANDSFX wrongly being looped, introduced in r3631.
git-svn-id: https://svn.eduke32.com/eduke32@3632 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-31 22:29:30 +00:00
helixhorned a6a4e30bbc Fix playing ambient sounds at max volume for split sec on entering their range.
This is done by always calling FX_PlayAuto3D() to play such sounds. It now
additionally takes a third argument 'loophow', permissible values being
FX_ONESHOT and FX_LOOP.

git-svn-id: https://svn.eduke32.com/eduke32@3631 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-31 18:58:17 +00:00
helixhorned cbfd2eb438 In 'tip' display code, extrapolate four more values of the y coord table.
Also, for tip_incs values greater or equal than the number of elements in
this table, return early reporting that the hand has been drawn, so that
the otherwise selected weapon is not drawn.

git-svn-id: https://svn.eduke32.com/eduke32@3630 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-31 18:58:09 +00:00
helixhorned e63874d011 Lunatic: chaining of actor callback functions.
For events and actors, a flag can be now passed whether to chain the new
function at the beginning or end of an already existing one, or to replace
it entirely.
Also, for the translator, add option -fno-error-nostate, disabled by default.

git-svn-id: https://svn.eduke32.com/eduke32@3629 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-31 18:58:04 +00:00
helixhorned fe69ee5476 Add rudimentary sanity checks when playing ANM files.
- Don't attempt to play an ANM file if it is empty (warn) or too short (error).
- If failing to read IVF file header or initializing VPX codec, don't play ANM.
- Return early from gltexapplyprops() if not in GL modes.

git-svn-id: https://svn.eduke32.com/eduke32@3628 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-31 18:57:59 +00:00
helixhorned 85d6526264 Add some test CON files to source/lunatic/test.
The code is mostly by other people, who are credited in the CON files.

git-svn-id: https://svn.eduke32.com/eduke32@3627 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-29 15:59:26 +00:00
helixhorned 53f6d749df Return early from A_IncurDamage() if actor[].picnum ("htpicnum" in CON) is < 0.
With this change, it is impossible for negative values to be used as array
indices inside this function, and I believe that it is also impossible that
they escape to somewhere they might be used as such.

For Lunatic, allow setting actor[].picnum to negative values and in the
translator, add (commented out) code to warn whenever it is set to a constant
negative value.  Also, fix a _sound call in _addphealth in control.lua.

git-svn-id: https://svn.eduke32.com/eduke32@3626 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-29 15:59:23 +00:00
helixhorned f291143bb8 Don't output an empty SelectedGRP entry into the cfg, fixing bare EDuke32 build.
git-svn-id: https://svn.eduke32.com/eduke32@3624 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-29 15:59:17 +00:00
terminx 1f490a6fc3 Tweak the code that adds the Steam and GOG Duke3D paths a little. This changes things so that we add the DOSBox version provided on Steam as a source for the GRP instead of their main content dir, bypassing loading their screwed up duke3d.def.
git-svn-id: https://svn.eduke32.com/eduke32@3622 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-28 23:35:52 +00:00
hendricks266 ae96d9a162 Correct the capitalization of NAPALM.
git-svn-id: https://svn.eduke32.com/eduke32@3618 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-28 09:05:18 +00:00
hendricks266 2bfb7736cb Fix loading of a user's previous "SelectedGRP" file.
git-svn-id: https://svn.eduke32.com/eduke32@3617 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-28 09:04:54 +00:00
terminx cd235d2ec2 Don't continue animating Ripper, Shrinker, Expander and Freezethrower when the game is paused or the menu is up.
git-svn-id: https://svn.eduke32.com/eduke32@3616 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-27 06:37:19 +00:00
terminx 7e22c6d81c Read GOG.com and Steam Duke3D install paths from the registry instead of hard-coding the default paths.
git-svn-id: https://svn.eduke32.com/eduke32@3615 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-27 01:39:18 +00:00
terminx f96788866c Fix shrunk player fist animation speed as requested on the forums. I didn't test this against the DOS version but it seems about right according to my memory. Let me know if it's still wrong and you care that much about it.
git-svn-id: https://svn.eduke32.com/eduke32@3614 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-27 01:38:42 +00:00
terminx 7f4185198c MSVC build fixes. The change to Makefile.deps is slightly questionable but it's not really an issue.
git-svn-id: https://svn.eduke32.com/eduke32@3613 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-27 01:38:21 +00:00
hendricks266 26fc1aa4f8 Fix a case in minitext_() overlooked by r3608.
(This should fix the inventory item box in the statusbar.)

git-svn-id: https://svn.eduke32.com/eduke32@3612 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 19:19:28 +00:00
hendricks266 9d3b96a636 LunaCON: Properly implement rotatesprite16 by adding ROTATESPRITE_FULL16 to orientation.
git-svn-id: https://svn.eduke32.com/eduke32@3611 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 19:19:05 +00:00
hendricks266 30f510d521 Add "rotatespritea" to CON and M32script.
I hope I didn't bruise Lunatic too much.

git-svn-id: https://svn.eduke32.com/eduke32@3610 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 04:33:03 +00:00
hendricks266 c5044b3ecd Add orientation bit 2048, enumerated as ROTATESPRITE_FULL16, which is a courtesy provided by the engine for the purpose of the game to internally force use of full 32-bit coordinates. With this bit set, all CON screen drawing commands can use rotatesprite16-like coordinates.
While the functionality was already internally in place for gametext as one of two hacks using ROTATESPRITE_MAX (the other still used by minitext_() to align with the statusbar) we must codify a bit in the engine for safe external use. (Otherwise, ROTATESPRITE_MAX could/would theoretically increase and leave modders high and dry.)

(Dev note: In G_DrawTXDigiNumZ(), ROTATESPRITE_MAX was used to bitshift the value used to calculate digit spacing for no reason I can ascertain other than to introduce rounding errors into the zoom/textscale calculations. It was never used anywhere, so I removed it.)

Bonus: The scaling code for digitalnumberz and gametextz has been modified so that the spacing is no longer affected by rounding errors. Try animating the zoom value and compare how the text used to jump but now does not.

git-svn-id: https://svn.eduke32.com/eduke32@3608 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 04:31:58 +00:00
hendricks266 d7e30a65dd Relax CAPITALIZATION restrictions.
git-svn-id: https://svn.eduke32.com/eduke32@3606 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 04:31:09 +00:00
helixhorned 8d2a60ff70 Lunatic translator: proper Lua->CON line mapping for actor/event/etc. headers.
git-svn-id: https://svn.eduke32.com/eduke32@3604 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:55:27 +00:00
helixhorned 3a1c590572 LunaCON: readarrayfromfile: fail silently if file can't be opened.
git-svn-id: https://svn.eduke32.com/eduke32@3602 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:55:05 +00:00
helixhorned c7d97d55ec Lunatic: simplify RETURN handling, make its behavior across events same as C-CON.
There's only one RETURN value on the C side (g_RETURN), which is also referenced
from Lua.  Upon entering an event, its value takes on the per-event default one,
and its value when the event code finishes is passed back to the game.
Independently of that, its value is always saved and restored across event calls.

git-svn-id: https://svn.eduke32.com/eduke32@3601 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:54:56 +00:00
helixhorned 57416c541a Lunatic: add LuaJIT's 'dump' module, printing traced bytecode, IR and mcode.
git-svn-id: https://svn.eduke32.com/eduke32@3600 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:54:14 +00:00
helixhorned ebb71cf4ab Mapster32: don't wrongly report PANIC corruption with MAXSPRITES sprites present.
git-svn-id: https://svn.eduke32.com/eduke32@3599 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:56 +00:00
helixhorned c5e76e73f3 Lunatic t.: don't error on changing stat/sect of sprite not in the game world.
git-svn-id: https://svn.eduke32.com/eduke32@3598 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:48 +00:00
helixhorned efbc4cec90 Lunatic: actor usertypes from CON, set SFLAGs as 2nd gameactor() arg in Lua.
In passing, fix a couple of omissions: gameactor() being passed nil's in the
middle, more than one moveflag to CON *actor.

git-svn-id: https://svn.eduke32.com/eduke32@3597 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:28 +00:00
helixhorned 290eb3a962 Lunatic: make some variables local, fix some bugs found using listglobals.sh.
git-svn-id: https://svn.eduke32.com/eduke32@3596 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:14 +00:00
helixhorned ea118fe436 Lunatic: fix weapondata_t read access, Lua->CON line mapping for if* commands.
git-svn-id: https://svn.eduke32.com/eduke32@3595 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:06 +00:00
helixhorned b7ea1cb205 Lunatic: in readgamearray support code, use engine file functions.
This is so that files residing in GRPs (or anywhere the engine looks for them)
can be read, too.

git-svn-id: https://svn.eduke32.com/eduke32@3594 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:52:52 +00:00
helixhorned 3e4a0dadf5 Lunatic: cancel logo on EVENT_LOGO error, fix CON mulscale and writable gv.
git-svn-id: https://svn.eduke32.com/eduke32@3593 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:52:41 +00:00
helixhorned 95b1a2a791 premap.c: fix oob access of tagbitmap[] with formerly negative lo-/hitags.
Also, allocate that array dynamically instead of on the stack.

git-svn-id: https://svn.eduke32.com/eduke32@3592 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:37 +00:00
helixhorned ad55e2d424 Lunatic: make ivec3 and dvec3 types share same metatable, orthogonalize API.
Specifically, remove ivec3's blen1() method and add from/to BUILD coordinate
(z scaled by 16) conversion methods.

git-svn-id: https://svn.eduke32.com/eduke32@3591 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:27 +00:00
helixhorned 700d9cef0c Lunatic: slightly cleaner weapondata_t access.
Also, for the embedded translator: don't warn on unrecognized command line opt.

git-svn-id: https://svn.eduke32.com/eduke32@3590 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:20 +00:00
helixhorned 904a26e045 Clean up mdsprite.c:voxdraw() a little.
git-svn-id: https://svn.eduke32.com/eduke32@3589 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:14 +00:00
helixhorned 271bb545ec Make -testlua accepted (but ignored) in non-Lunatic build.
So that it doesn't result in the -t (respawn on) command line switch.

git-svn-id: https://svn.eduke32.com/eduke32@3586 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:19:46 +00:00
helixhorned 182121a0aa engine: give sprite cstat 1024 a marco name, CSTAT_SPRITE_MDHACK.
git-svn-id: https://svn.eduke32.com/eduke32@3584 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:19:32 +00:00
hendricks266 ec1923b417 Wii: Fix Mapster32. It runs now.
git-svn-id: https://svn.eduke32.com/eduke32@3582 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 09:49:12 +00:00
hendricks266 bdc4f7cd68 Windows: Add the default installation paths for the GOG.com release of Duke Nukem 3D: Atomic Edition and the Steam release of Duke Nukem 3D: Megaton Edition (if they exist) to EDuke32's search path.
git-svn-id: https://svn.eduke32.com/eduke32@3581 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 09:48:21 +00:00
hendricks266 e7d8256fc3 Save the configuration files whenever a savegame is made.
git-svn-id: https://svn.eduke32.com/eduke32@3579 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-19 06:23:12 +00:00
hendricks266 72156dd4c1 Prevent the middle chaingun muzzleflash from animating its position when the player is frozen.
The unmodified behavior is completely wrong and I don't see how any mod could ever use it.

git-svn-id: https://svn.eduke32.com/eduke32@3578 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-19 06:22:52 +00:00
hendricks266 85f6a64deb Add to r3544.
git-svn-id: https://svn.eduke32.com/eduke32@3576 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-19 06:22:08 +00:00
helixhorned 90d71a5953 Classic screen tilting: fix it by passing bit 1024 to rotatesprite().
This now should look correct for both settings of r_usenewaspect.

git-svn-id: https://svn.eduke32.com/eduke32@3575 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-18 22:05:30 +00:00
helixhorned cec987631a Lunatic: properly protect weapondata_t members, fix Lua->CON line mapping.
Also, make -Werror-bad-getactorvar disabled by default.

git-svn-id: https://svn.eduke32.com/eduke32@3574 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-18 22:05:26 +00:00