Commit Graph

553 Commits

Author SHA1 Message Date
terminx 6e61cfbe41 Remove md4 library, since we aren't using it anywhere anymore
git-svn-id: https://svn.eduke32.com/eduke32@3759 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:17:44 +00:00
terminx 08444cb825 WIP texture cache refactoring
git-svn-id: https://svn.eduke32.com/eduke32@3758 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:17:17 +00:00
terminx 80f645c65e Add some new cvar flags to handle cvars that need to invalidate textures or reset the video mode after modifying
git-svn-id: https://svn.eduke32.com/eduke32@3757 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 02:16:19 +00:00
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 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 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 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
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
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
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 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 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 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 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 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 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 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
helixhorned 48406e744b Mapster32: factor out 3x computing "alwaysshowgray", but don't change anything.
git-svn-id: https://svn.eduke32.com/eduke32@3623 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-29 15:59:14 +00:00
hendricks266 3d46bc1551 Implement alpha into rotatesprite (rotatesprite_) on the engine side.
git-svn-id: https://svn.eduke32.com/eduke32@3609 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-25 04:32:24 +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 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 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
helixhorned c397759217 Fix Lunatic build on Windows.
- Make _buildargv[_buildargc] NULL.
- With SDL layer, pass argv and argc directly and get rid of _build* ones.
- Add tilesiz* to dynsymlists.

git-svn-id: https://svn.eduke32.com/eduke32@3573 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-18 22:05:21 +00:00
helixhorned 1685228ab7 Lunatic: compile defs.ilua as bytecode and load it from the executable.
git-svn-id: https://svn.eduke32.com/eduke32@3517 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-24 16:05:31 +00:00
helixhorned f6a577ff68 Mapster32: add "movement by one" debugging functionality via a.m32.
If m32script gamevar "move_by_one" is nonzero, the some keys move the
"player arrow" by increments of 1:
- Without SHIFT: LEFT/RIGHT absolute x, DOWN/UP absolute y, A/Z absolute z.
- With SHIFT: DOWN/UP (unbounded!) horiz, LEFT/RIGHT angle.

This can be useful to debug renderer bugs that show a high sensitivity to the
exact location ("are transient in space").

git-svn-id: https://svn.eduke32.com/eduke32@3509 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-19 20:35:14 +00:00
hendricks266 624841257c Wii: Fix most warnings. Three remain: two are labeled with FIXMEs; the third consists of signed/unsigned comparisons involving LSWAPIB() in kplib.c.
git-svn-id: https://svn.eduke32.com/eduke32@3496 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-18 08:50:08 +00:00
hendricks266 75e5cebfff Wii: Fix build.
git-svn-id: https://svn.eduke32.com/eduke32@3494 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-18 08:48:18 +00:00
helixhorned 1dd52a4d6e Fix POLYMER=0 build, cleaning up #include discipline on the way.
Also taking care that the USE_OPENGL=0 build builds.

git-svn-id: https://svn.eduke32.com/eduke32@3467 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-07 21:01:24 +00:00
helixhorned 4e5cdba646 Lose the 'packed' attribute for types declared in build.h.
Most of them are already aligned to their natural boundaries, so lowering
the alignment to 1 byte can only worsen things by making the C compiler
generate poorer (unaligned access) code for some platforms.

The layout of structures is not specified by the C Standard, but is rather
given by a particular platform + toolchain's ABI (application binary interface).
Most ABIs follow the expected pattern "alignment of scalars is their size,
alignment of arrays is that of its element type, alignment of structs is the
maximum alignment of its members". A couple of links to particular ABIs are
given in build.h.

Problems are expected with archs that care about unaligned access when a pointer
to a non-packed struct is taken that resides in a packed aggregate, but these
uses should be weeded out (I'm not sure if there are any in our codebase).

The following types are affected, only hitdata_t changes its size:
sectortype, walltype, spritetype, spriteext_t, spritesmooth_t,
struct validmode_t, picanm_t, palette_t, vec2_t, vec3_t, hitdata_t.

git-svn-id: https://svn.eduke32.com/eduke32@3455 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-03 12:48:11 +00:00
terminx 8d64c001a0 Additional networking patch from Jasper Foreman, sadly sitting untested for almost a month because everyone here has been too sick to do anything with it. :(
git-svn-id: https://svn.eduke32.com/eduke32@3443 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-28 22:00:37 +00:00
helixhorned 0796c0e66e Don't apply GL fogging to wall lines drawn in game's "light" overhead view.
git-svn-id: https://svn.eduke32.com/eduke32@3438 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-26 17:07:58 +00:00
helixhorned 9103d4987c CON/m32script: remove GAMEVAR_DEFAULT uses, since they had no effect.
In CON, the bit is still always cleared for user-defined gamevars.

git-svn-id: https://svn.eduke32.com/eduke32@3417 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:15 +00:00
terminx 2d4ec23b2b MSVC doesn't have ssize_t
git-svn-id: https://svn.eduke32.com/eduke32@3411 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 01:00:00 +00:00
helixhorned dc9f4eb360 Mapster32: add cvar/mapster32.cfg option "keeptexturestretch".
If enabled, dragging wall vertices will correct the xrepeat after the
mouse button is released, so that the pre-drag absolute stretching is
restored.

git-svn-id: https://svn.eduke32.com/eduke32@3398 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-16 20:38:56 +00:00
helixhorned 8fb886b14a Replace dragpoint()'s "dragpoint_noreset" global with a "flags" argument.
Also, add another flag, signifying that from the editor, also the
"lastwall"s (i.e. the CCW-linked points) should get collected. This is
to signal the editor that their wall lengths should be displayed, too.

git-svn-id: https://svn.eduke32.com/eduke32@3394 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-16 20:38:41 +00:00
helixhorned 7d2dd223bb Mapster32: don't apply GL fogging to crosshair.
git-svn-id: https://svn.eduke32.com/eduke32@3389 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:14 +00:00
helixhorned 7872c0141f polymost.c: a couple of {tex,mem}cache cleanups / fixes.
- Stop using memcache on some other failure paths, particularly when
  failing to read from the on-disk texcache.
- Factor out cache reading code (3x).
- Fix endianness issues affecting big-enadian systems (one introduced by
  r3382, one existing before). Comment each B_LITTLE32 with whether we're
  converting from native to on-disk (little) endianness or back.

git-svn-id: https://svn.eduke32.com/eduke32@3386 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-08 23:12:56 +00:00
helixhorned b870b6bfa3 polymost.c: some meaning-preserving cleanups, make some vars file-local.
git-svn-id: https://svn.eduke32.com/eduke32@3384 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-08 23:12:51 +00:00
helixhorned a959b998bd Factor "pipe standard outputs to files" code into baselayer.c.
The SDL and Windows layers had slightly different code: the latter would
dereference a NULL pointer if stdout.txt failed being write-opened.

git-svn-id: https://svn.eduke32.com/eduke32@3377 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-06 18:56:29 +00:00
helixhorned 2528fd3bf5 player.c: factoring continued.
New local functions:
Proj_DoRandDecalSize, SectorContainsSE13, HandleHitWall, Proj_CheckBlood,
Proj_HandleKnee.

git-svn-id: https://svn.eduke32.com/eduke32@3362 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:42 +00:00
helixhorned 25f6255d28 Lunatic: fix stack discipline.
Preventing a continuously growing stack top and inevitable program termination.
Also, commonize the error handling to live on the engine side.

git-svn-id: https://svn.eduke32.com/eduke32@3352 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:11 +00:00
terminx e0acee6356 Replace the osdcvar_t members that needed to be kept in sync with cvar_t with an actual cvar_t. If this is questionable for any reason I'm forgetting, feel free to revert!
git-svn-id: https://svn.eduke32.com/eduke32@3350 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-31 01:51:03 +00:00
terminx 5c74bc6f56 Surround "debug1" and "debug2" with #ifdef DEBUGGINGAIDS
git-svn-id: https://svn.eduke32.com/eduke32@3349 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-31 01:50:45 +00:00
terminx cbf9d2cff3 Clean up a couple of other getrendermode() related bits that the previous commit missed
git-svn-id: https://svn.eduke32.com/eduke32@3347 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-30 20:34:55 +00:00
terminx 79e45c23d5 Add predefined REND_CLASSIC, REND_POLYMOST and REND_POLYMER constants and use them everywhere getrendermode() is called.
git-svn-id: https://svn.eduke32.com/eduke32@3346 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-30 20:34:34 +00:00
helixhorned 5fc9bb9779 Lunatic: more glue, fixes, backtrace for code called back from C.
git-svn-id: https://svn.eduke32.com/eduke32@3345 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 15:21:32 +00:00
helixhorned 4ad4f9ebb7 Remove commented code using former engine variable "automapping".
git-svn-id: https://svn.eduke32.com/eduke32@3342 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 15:21:20 +00:00
helixhorned 7d1879b777 Fix LTO=1 RELEASE=1 Lunatic build.
git-svn-id: https://svn.eduke32.com/eduke32@3341 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 15:21:16 +00:00