Commit graph

3550 commits

Author SHA1 Message Date
Plagman
3d65b36ebe Revert to spherical shading; it's not like you could look up in classic anyway.
git-svn-id: https://svn.eduke32.com/eduke32@3739 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-08 05:03:36 +00:00
Plagman
6128911c8c Fix interaction between ART mapping and lighting.
git-svn-id: https://svn.eduke32.com/eduke32@3738 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-08 05:03:29 +00:00
Plagman
cd1b147dd3 Finish Polymer cancer mode and enable by default.
TODO: figure out wtf is wrong with rotatesprite, linear filtering.

git-svn-id: https://svn.eduke32.com/eduke32@3737 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-07 07:48:08 +00:00
helixhorned
e9844d2e51 Lunatic: reading of map-text prototype.
Also fixes a couple of oversights (introduced) with the saving.

git-svn-id: https://svn.eduke32.com/eduke32@3736 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:42 +00:00
helixhorned
82d6c2d5f7 Factor out four instances of duplicate code into append_ext_UNSAFE().
git-svn-id: https://svn.eduke32.com/eduke32@3735 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:38 +00:00
helixhorned
34af7e6353 Lunatic: move readintostr() into defs_common.lua, fix an oversight.
git-svn-id: https://svn.eduke32.com/eduke32@3734 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:35 +00:00
helixhorned
3b65dc3a78 Lunatic: first prototype of map-text saving.
git-svn-id: https://svn.eduke32.com/eduke32@3733 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:34 +00:00
helixhorned
65a10afbc8 LunaCON: make on-disk gamearray footer contain non-printable chars.
Also, allow writing userdefs[].auto_run.

git-svn-id: https://svn.eduke32.com/eduke32@3732 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:30 +00:00
helixhorned
258e28bafb Map-int VX: rearrange members so that ceiling* and floor* are contiguous.
git-svn-id: https://svn.eduke32.com/eduke32@3731 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:28 +00:00
terminx
5b672a19e3 MSVC build fix
git-svn-id: https://svn.eduke32.com/eduke32@3730 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 18:46:34 +00:00
Plagman
6dac6ac1c0 New Polymer feature: shitty mode.
git-svn-id: https://svn.eduke32.com/eduke32@3729 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 03:12:38 +00:00
Plagman
c2a5b60a14 Fix Makefile fuckery.
git-svn-id: https://svn.eduke32.com/eduke32@3728 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 03:12:29 +00:00
helixhorned
d5a1f0a0d4 osd.c: Fix OSD_StripColors() with empty input string.
git-svn-id: https://svn.eduke32.com/eduke32@3727 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-04 16:36:13 +00:00
helixhorned
1ec058a47f Classic: fix oob read of frame buffer when leftmost vline has a mirror.
In the mirror reversing code, get rid of the padding. This may produce
seams, but they appear to be extremely transient and shouldn't be
noticeable.
In game.c, add a debugging compilation switch DEBUG_MIRRORS_ONLY.

git-svn-id: https://svn.eduke32.com/eduke32@3726 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-04 16:36:12 +00:00
helixhorned
6deabcdb5d Makefiles: allow overriding the optimization level with debugging builds.
git-svn-id: https://svn.eduke32.com/eduke32@3725 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-04 16:36:10 +00:00
helixhorned
d56e5451d9 Fix one more 1<<31 calculation, remove one unneeded cast.
git-svn-id: https://svn.eduke32.com/eduke32@3724 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-04 16:36:08 +00:00
terminx
287f829e32 I am not a smart man. Fix startup window hangs with grpinfo files.
git-svn-id: https://svn.eduke32.com/eduke32@3723 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-01 18:49:03 +00:00
helixhorned
9f313043bf Fix model HUD weapons not showing in Polymer, introduced in r3717.
git-svn-id: https://svn.eduke32.com/eduke32@3722 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-01 17:42:07 +00:00
helixhorned
198a3a556c Classic: optimize background 'rainbow' drawing in use for editor/debug.
Also, draw it at shade 18 and don't use fullbright colors.

git-svn-id: https://svn.eduke32.com/eduke32@3721 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-01 17:42:05 +00:00
helixhorned
0193d7b0e5 Makefiles: do not pass $(STDCPPLIB) to final eduke32/mapster32 linking step.
git-svn-id: https://svn.eduke32.com/eduke32@3720 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-01 17:42:03 +00:00
helixhorned
bc78ff27ed Classic: clean up mirror drawing code.
No functional changes, but a (commented out) debug line for an oob read of the
frame buffer when the mirror covers the whole screen is inserted.

git-svn-id: https://svn.eduke32.com/eduke32@3719 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-01 17:41:59 +00:00
terminx
7864a559c8 Fix GTK build
git-svn-id: https://svn.eduke32.com/eduke32@3718 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-30 18:51:15 +00:00
helixhorned
74aaac70d2 Fix two bugs found by Clang's undefined behavior sanitizer.
- Return early from drawsprite_classic() if tspr->owner if oob.
  Commonize that check between renderers into bad_tspr().
- Make the BIT() macro a left-shift of the *unsigned* number 1,
  preventing expansion to (1<<31).

git-svn-id: https://svn.eduke32.com/eduke32@3717 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-29 19:24:19 +00:00
helixhorned
bdecbc45db Fix debugging builds with Clang 3.2 and up.
In those Clang versions, -fcatch-undefined-behavior was replaced by
-fsanitize=<what>.  For Clang 3.2, we enable the address sanitizer
and for 3.3 also the miscellaneous undefined behavior one.
Currently, there's no version auto-detection from the Makefiles, it's
set to 3.3 and the others are commented out.

git-svn-id: https://svn.eduke32.com/eduke32@3716 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-29 19:24:15 +00:00
helixhorned
c6d7c08d58 Generalize ZRANGE and ANGRANGE to accept any nonnegative number.
Numbers 0 and 1 mean 'no spread', but the latter does one krand() call.
Negative numbers are reserved for potential future use.

git-svn-id: https://svn.eduke32.com/eduke32@3715 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-29 19:24:12 +00:00
terminx
75294401c4 My love/hate relationship with git stash is quickly becoming a hate/hate relationship. :p
git-svn-id: https://svn.eduke32.com/eduke32@3714 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-29 15:13:48 +00:00
helixhorned
46ccf59c74 Fix TARGET sprites used as switches, introduced in r3679.
git-svn-id: https://svn.eduke32.com/eduke32@3713 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-28 16:45:29 +00:00
helixhorned
3910456d55 In G_LoadAddon(), remove inner 'struct grpfile *grp', fixing uninited access.
... four lines later.
I don't know if that is the intended semantics for this function, but
nasal demons is clearly not what we want. Please review!

git-svn-id: https://svn.eduke32.com/eduke32@3712 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-25 21:10:29 +00:00
helixhorned
3e9b1be6fb Fix two harmless warnings and reindent one switch block.
Also, make G_LoadAddon() local to game.c.

git-svn-id: https://svn.eduke32.com/eduke32@3711 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-25 21:10:25 +00:00
helixhorned
a628cbdd13 Lunatic (map-int VX) build: implement loading <V7 maps.
git-svn-id: https://svn.eduke32.com/eduke32@3710 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-25 21:10:22 +00:00
helixhorned
ac2379171c Engine: auto-detect LameDuke's PALETTE.DAT and read tables accordingly.
LameDuke's shade table has 32 gradients of shade, like Duke3D.
For the translucency table though, only the diagonal + one half is stored
because it's symmetric (50/50 translucency).

git-svn-id: https://svn.eduke32.com/eduke32@3709 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-25 21:10:15 +00:00
terminx
a002290853 Support adding custom grps to the selector in the startup window. To use this feature, create a file with a ".grpinfo" extension in your EDuke32 directory, following this template:
grpinfo
{
    name "YourGameName"
    scriptname "yourgame.con"
    defname "yourgame.def"
    size yourgrpsize
    dependency DUKE15_CRC
    flags GAMEFLAG_ADDON
    crc yourgrpcrc
}

The "flags" field can also take the value "GAMEFLAG_DUKE" to define a new base game. Since this is the first commit of a new feature, certain semantics of the implementation and syntax are liable to change as necessary.

git-svn-id: https://svn.eduke32.com/eduke32@3708 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-25 17:49:10 +00:00
terminx
3af951db1b Don't write SelectedGRP to eduke32.cfg when using the Megaton compatibility "-addon" parameter.
git-svn-id: https://svn.eduke32.com/eduke32@3707 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-25 17:48:51 +00:00
terminx
630261aa50 Automatically execute mapname.cfg at map load time. This allows different maps in mods to have different rendering settings (shadescale, etc). This is not currently suitable for standalone user maps as there's no functionality to reset such cvars back to default at the next map load (so, if using this in a mod, every map needs to have a cfg).
git-svn-id: https://svn.eduke32.com/eduke32@3706 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-25 17:48:37 +00:00
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
b7e3f8cbc9 a.m32: add user variable 'override_basepal'.
Set it to >=0 to override the base palette (water, slime, ...) in 3D mode.
This can be useful to navigate Lameduke's underwater sections, since its
LOOKUP.DAT only contains 8 lookup tables, but no other *base* palettes.
Consequently, base palettes >=1 will make the whole screen black when
Lameduke's LOOKUP.DAT is loaded into EDuke32 or Mapster32.

git-svn-id: https://svn.eduke32.com/eduke32@3704 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-22 10:35:50 +00:00
helixhorned
b9b8e01e32 Revert an awful stupidity I committed in r3700.
git-svn-id: https://svn.eduke32.com/eduke32@3703 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-22 10:35:48 +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
b6be776079 Classic drawmasks(): if sprite is on other side of maskwall, always draw it first.
This fixes the bug reported here:
http://forums.duke4.net/topic/5340-bug-with-masked-walls/page__view__findpost__p__123233
But I haven't checked the change for any adverse effects.

git-svn-id: https://svn.eduke32.com/eduke32@3701 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-21 19:55:45 +00:00
helixhorned
14b16a10eb engine.c: stylistic tweaks of drawmasks().
git-svn-id: https://svn.eduke32.com/eduke32@3700 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-21 19:55:38 +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
ae6bea7285 Mapster32: tweak the 'loaded map' message a bit.
- colorize the trailing part if there is corruption or (new) if sprites were
  removed
- also corrupt-check when loading <V7 map
- move start{pos,ang,sectnum} to build.c
- remove pointless ...[].extra = -1 before loading map, scantoasc*[] comment

git-svn-id: https://svn.eduke32.com/eduke32@3697 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-21 19:55:22 +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
c298c56652 Lunatic/OS X: generate bytecode in object files from LuaJIT.
git-svn-id: https://svn.eduke32.com/eduke32@3693 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-17 20:34:59 +00:00
helixhorned
d30faf8950 osxbuild.sh: Add 'clean' preset, deleting files missed by 'make veryclean'.
git-svn-id: https://svn.eduke32.com/eduke32@3692 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-17 20:34:54 +00:00
helixhorned
e64ecfbf4f OS X: Pass -Wno-narrowing only with GCC 4.3+, fixing arttool build on my setup.
git-svn-id: https://svn.eduke32.com/eduke32@3691 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-17 20:34:51 +00:00
helixhorned
298da67e63 osxbuild.sh: new option --lastrev, 'dummyhelix' preset.
git-svn-id: https://svn.eduke32.com/eduke32@3690 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-17 20:34:45 +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
terminx
95ccd3ad7c Fix building against libpng 1.6, which removed png_sizeof
git-svn-id: https://svn.eduke32.com/eduke32@3687 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-16 22:37:19 +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
1e7283f982 Fix a "duplicate const" error.
git-svn-id: https://svn.eduke32.com/eduke32@3672 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-13 03:50:57 +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
33ab42e7b4 Fix "Error setting gamma ramp: DDERR_INVALIDPARAMS" on 64-bit.
git-svn-id: https://svn.eduke32.com/eduke32@3670 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-13 03:50:19 +00:00
hendricks266
2bbc1dd97a Fix Mapster32 crash caused by custom s_buildRev strings longer than five characters.
(Note: We are still vulnerable to crashes here (and likely in other places), but you have (4096-16) extra characters to work with. We should consider replacing many uses of Bsprintf with Bsnprintf.)

git-svn-id: https://svn.eduke32.com/eduke32@3669 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-13 03:49:58 +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
helixhorned
03b09aabd0 Engine: in hitscan and getzrange, skip sprites if sprite part of clipmask is 0.
... like was done with clipmove() previously.
Also, do some code clean up. There are no changes of functionality.

git-svn-id: https://svn.eduke32.com/eduke32@3662 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-12 11:59:22 +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
478544acb6 a.m32: Don't reposition head light if in void space, fixing crash.
git-svn-id: https://svn.eduke32.com/eduke32@3651 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-07 15:20:33 +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