Commit Graph

3712 Commits

Author SHA1 Message Date
helixhorned e9bd1b7582 Various cleanup of status bar drawing code, remove some old commented out code.
git-svn-id: https://svn.eduke32.com/eduke32@3400 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-17 21:59:01 +00:00
helixhorned a98ea13f1e game.c: replace a couple of sbarsc() inline code with calls to sbarsc().
git-svn-id: https://svn.eduke32.com/eduke32@3399 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-17 21:58:54 +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 8bca521ef4 Mapster32: slightly rework code for setting/querying some cvars.
git-svn-id: https://svn.eduke32.com/eduke32@3397 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-16 20:38:52 +00:00
helixhorned 0648d25db1 Mapster32: more or less fix the auto wall-alignment feature ([.]/[,]).
- Run it twice, since the first one is wrong.
- Warn when attempting to align based on a top-oriented wall. When the
  sequence of walls to align has "windows", only the bottom parts will
  be correct.
- Make the modifiers actually useful:
  * Pressing SHIFT aligns at most one wall, remove the old CTRL modifier.
  * The rest is as before: ALT makes the walls have (approximately) equal
    texture stretching, ['] (quote) aligns the immediate TROR-nextwalls.

git-svn-id: https://svn.eduke32.com/eduke32@3396 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-16 20:38:50 +00:00
helixhorned ac31e386ff Mapster32: don't show wall length of *line* highlight when dragging points.
Also, factor out 2x dup'd code of insertsprite() into do_insertsprite()
and add searchwall-displaying code into package/samples/a.m32.

git-svn-id: https://svn.eduke32.com/eduke32@3395 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-16 20:38:46 +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 898462152c Fix MUSICANDSFX ambient sounds (bit 2) playing only one instance.
This is done by introducing an additional internal bit, meaning
"play only one instance". It is set for all sounds which have bit 1
("repeat in the sound system") set at definesound time, but not those
that set bit 1 temporarily (see r3336).

git-svn-id: https://svn.eduke32.com/eduke32@3393 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:36 +00:00
helixhorned 39ce7aee62 Lunatic: codegen beyond milestone 1.
- weapon data
- changing ones... (locals for now)
- operators

git-svn-id: https://svn.eduke32.com/eduke32@3392 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:32 +00:00
helixhorned 417dc33769 Lunatic translator: slight code reorganization to prevent too many local vars.
git-svn-id: https://svn.eduke32.com/eduke32@3391 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:26 +00:00
helixhorned 8e5d5f9b89 Lunatic: begin changing ones...
git-svn-id: https://svn.eduke32.com/eduke32@3390 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:21 +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 56ef10c893 Lunatic translator: handle -mx.
git-svn-id: https://svn.eduke32.com/eduke32@3388 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:07 +00:00
helixhorned 222e92ef37 Make r_downsize 0 by default.
Also, rewrite comparison to the non-tint in astub.c to be even less hackish.

git-svn-id: https://svn.eduke32.com/eduke32@3387 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-08 23:12:59 +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 a4cdd62e25 On Windows, remove "SHGetFileInfo failed with error code ..." note.
git-svn-id: https://svn.eduke32.com/eduke32@3385 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-08 23:12:53 +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 0f72135a04 polymost.c: factor out 2 x 3x dup'd I/O code for DXT filter functions.
git-svn-id: https://svn.eduke32.com/eduke32@3383 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-08 23:12:45 +00:00
hendricks266 8bb14fa13e Fix warnings that appear if big-endian || USE_OPENGL=0.
git-svn-id: https://svn.eduke32.com/eduke32@3382 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-08 06:17:10 +00:00
helixhorned 05161ea4d8 Re-enable spotlights on ATI cards again because the crash from 12.8 seems gone.
git-svn-id: https://svn.eduke32.com/eduke32@3381 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-06 18:56:50 +00:00
helixhorned 51c5afaae6 Lunatic: a couple of small changes.
git-svn-id: https://svn.eduke32.com/eduke32@3380 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-06 18:56:45 +00:00
helixhorned 87bd2c762e Fix NETCODE=0 build.
git-svn-id: https://svn.eduke32.com/eduke32@3379 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-06 18:56:38 +00:00
helixhorned 28d05e3fdd Reimplement pixel doubling by taking the upper left pixel of each 2x2 block.
This obviously won't help performance as the scene has still to be drawn at
the original resolution, but it's better than the draw-to-tile hack.

git-svn-id: https://svn.eduke32.com/eduke32@3378 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-06 18:56:34 +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 1e91bf1800 Mapster32: allow creating circle walls from TROR-constrained walls.
When reaching wall limits, it is possible that only some circle points will
be inserted and the result is left unfinished.

git-svn-id: https://svn.eduke32.com/eduke32@3376 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-05 13:09:34 +00:00
helixhorned 8ed4667265 Lunatic: grabbag of different things.
- fix error handing with recursing events
- wallsofsect iterator, sector[]:contains()
- more codegen; mangle function names
- m32: compinside

git-svn-id: https://svn.eduke32.com/eduke32@3375 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-05 13:09:31 +00:00
helixhorned e72557d9d9 Lunatic translator: dangling else, hopefully for the last time!
git-svn-id: https://svn.eduke32.com/eduke32@3374 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-05 13:09:25 +00:00
helixhorned 50f5a2340f Lunatic: more commands, mostly of the define* variety.
git-svn-id: https://svn.eduke32.com/eduke32@3373 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-05 13:09:19 +00:00
hendricks266 a4bbf30c3a Add r_togglecomposition cvar on Windows for Roma Loom.
r_togglecomposition: enable/disable toggle of desktop composition when initializing screen modes

default value: 1

git-svn-id: https://svn.eduke32.com/eduke32@3371 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-04 23:42:43 +00:00
hendricks266 05a550c08d Address some macro madness in jaudiolib. (Should fix PowerPC builds.)
git-svn-id: https://svn.eduke32.com/eduke32@3370 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-04 17:29:03 +00:00
hendricks266 2bb8b4c461 Fix a "typedef redefined" warning with clang in dsound.h
git-svn-id: https://svn.eduke32.com/eduke32@3369 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-04 17:28:34 +00:00
hendricks266 748e217a19 Bring the SDL.h include in SDLMain.m up to speed with driver_sdl.c in jaudiolib and sdl_inc.h in the engine. Also address some Apple macro problems.
git-svn-id: https://svn.eduke32.com/eduke32@3368 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-04 17:28:13 +00:00
hendricks266 5493583140 Amend r3328 so that NAM gets WEAPON_RELOAD_TIMING.
git-svn-id: https://svn.eduke32.com/eduke32@3367 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-04 17:27:43 +00:00
helixhorned 0c44056945 Lunatic: getting closer to the first milestone.
On the C side, zrange, angrange and autoaimang are represented as
DukePlayer_t members then.

git-svn-id: https://svn.eduke32.com/eduke32@3366 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-02 22:33:37 +00:00
helixhorned 67cdd9d883 gameexec.c: factor code for "ifnosounds" into sounds.c: A_CheckAnySoundPlaying.
git-svn-id: https://svn.eduke32.com/eduke32@3365 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-02 22:33:32 +00:00
helixhorned 4a6ded3f98 engine: fix a possible crash with texel-hitscan.
Reproduced as follows (assuming all tiles have texel-hitscan for simplicity):
In E2L5, shoot the opening switch with the shotgun, aiming for the border.
The crash occurs because the *other*, depressed switch tile isn't yet loaded
when we index into its tile storage. Dereferencing 0+small number == BAD!

git-svn-id: https://svn.eduke32.com/eduke32@3364 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-02 22:33:27 +00:00
helixhorned e4caa58cf2 Move DukePlayer_t's .palette down so that 2-byte-sized members are 2-byte-aligned.
Bump BYTEVERSION.

git-svn-id: https://svn.eduke32.com/eduke32@3363 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-02 22:33:22 +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 10feaeb5b4 player.c: cleanup. "ProjectileData[atwith]." --> "proj->", ...
The diff may look daunting, but it's clear what is changed with
git diff (...) --color-words='[a-zA-Z0-9_]+|[^[:space:]]' -b

git-svn-id: https://svn.eduke32.com/eduke32@3361 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:39 +00:00
helixhorned 552708103f player.c: finish hitscan projectile handling cleanup.
Factoring out 2x almost duplicated code into {P,A}_PostFireHitscan().

git-svn-id: https://svn.eduke32.com/eduke32@3360 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:36 +00:00
helixhorned f65f547fef player.c: hitscan projectile handling cleanup continued.
git-svn-id: https://svn.eduke32.com/eduke32@3359 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:33 +00:00
helixhorned 15b7444b46 player.c: factor out 2x almost dup'd code preparing hitscan weapon firing.
The code is duplicated with small changes for the hardcoded and custom
projectiles.
Adding local functions P_PreFireHitscan(), A_PreFireHitscan() and
Proj_MaybeAddSpread().

git-svn-id: https://svn.eduke32.com/eduke32@3358 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:31 +00:00
helixhorned eda5b22030 Lunatic: more code...
git-svn-id: https://svn.eduke32.com/eduke32@3357 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:28 +00:00
helixhorned a24ab8d4fa Factor out some code into C_AllocQuote() and C_InitQuotes().
In Lunatic-only build, also always allocate the first 128 quotes.

git-svn-id: https://svn.eduke32.com/eduke32@3356 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:25 +00:00
helixhorned 311967f425 Lunatic: definesound, more control.lua fixes.
git-svn-id: https://svn.eduke32.com/eduke32@3355 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:22 +00:00
helixhorned fd390efe2a Lunatic: compile out more code with LUNATIC_ONLY.
git-svn-id: https://svn.eduke32.com/eduke32@3354 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:18 +00:00
helixhorned 37d8cda701 Clean up actors.c and player.c.
git-svn-id: https://svn.eduke32.com/eduke32@3353 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-01 15:24:14 +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 80f3e132b0 Replace "if (g_tile[..].execPtr)" -> "if (G_HaveActor(...))".
git-svn-id: https://svn.eduke32.com/eduke32@3344 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 15:21:28 +00:00
helixhorned 80ee967b8e Lunatic: beginning to glue things together. Introducing LUNATIC_ONLY.
git-svn-id: https://svn.eduke32.com/eduke32@3343 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 15:21:24 +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
hendricks266 bf566e10a8 Rectify.
git-svn-id: https://svn.eduke32.com/eduke32@3340 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 11:27:07 +00:00
hendricks266 be03f29484 Clean up and factor jaudiolib.
git-svn-id: https://svn.eduke32.com/eduke32@3338 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:59:21 +00:00
hendricks266 b6ddc6149e Replace initialize_globals() with global initialization.
git-svn-id: https://svn.eduke32.com/eduke32@3337 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:58:38 +00:00
hendricks266 11e0897def Fix the gap between loops of ambient MUSICANDSFX sounds like BAR_MUSIC.
git-svn-id: https://svn.eduke32.com/eduke32@3336 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:58:09 +00:00
hendricks266 3933471e4b All kneel, king FLAC is here.
FLAC source from git commit 0920bc1ffb07f038b317e7e8056509fe0e4b680e, patched by me.

Windows libFLAC.a built using i686-MinGW-w64 and x86_64-MinGW-w64.

HUGE thanks to rhoenie for building the Mac fat library (ppc, i686, x86_86).

git-svn-id: https://svn.eduke32.com/eduke32@3335 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:57:24 +00:00
hendricks266 95dd57154e Clean up some file and directory structure.
* Renamed source/jaudiolib/third-party/mingw32 to source/jaudiolib/third-party/Windows.
* Moved source/jaudiolib/third-party/Windows/include to source/jaudiolib/third-party/common/include to use both on Windows and Apple.
* Deleted Apple/lib/include/{ogg,vorbis}/, see previous point.
* Deleted Apple/lib/libvorbisenc.a, 6MB saved.
* Moved Apple/lib/lib{ogg,vorbis,vorbisfile}.a to source/jaudiolib/third-party/Apple/lib, where they belong.
* Moved source files in Apple/ to source/, where they belong. (SDLMain.[mh] stay.)
* Deleted source/jaudiolib/third-party/{ogg,vorbis}.framework, not used any more.
* Renamed "StartupWinController*" to "startosx*".

git-svn-id: https://svn.eduke32.com/eduke32@3334 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:54:35 +00:00
terminx 8e61bff6f1 Bump DirectSound version to 8. This shouldn't really affect anything as the API is the same for all of the bits we make use of, but certain sets of DirectX headers/libs seem to be lacking v7 support.
git-svn-id: https://svn.eduke32.com/eduke32@3333 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 05:23:28 +00:00
terminx feaf4a7988 Remove FX_ASSVersion and related code since it wasn't used anywhere
git-svn-id: https://svn.eduke32.com/eduke32@3332 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 05:23:14 +00:00
terminx 61a8eaf666 Throw a compiler warning when building with only the null sound driver
git-svn-id: https://svn.eduke32.com/eduke32@3331 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 05:22:55 +00:00
terminx 0ae2d9ad60 Fix DirectSound in MSVC builds and remove the dependency on the DirectX SDK
git-svn-id: https://svn.eduke32.com/eduke32@3330 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 05:22:39 +00:00
helixhorned d970283582 DEF "voxel": fix a tile range check failure message.
git-svn-id: https://svn.eduke32.com/eduke32@3329 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-28 17:18:18 +00:00
helixhorned 9c328bf0a5 Encapsulate aplWeapon* array accesses in a PWEAPON(Player, Weapon, Wmember) macro.
In the normal game, these arrays are conceptually [MAX_WEAPONS][MAXPLAYERS],
allocated as CON per-player gamevars (e.g. WEAPONx_WORKSLIKE).
For Lunatic, they are replaced with
weapondata_t g_playerWeapon[MAXPLAYERS][MAX_WEAPONS].

git-svn-id: https://svn.eduke32.com/eduke32@3328 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-28 17:18:16 +00:00
helixhorned f1b1ce2cc3 Replace wall of dup'd code in Gv_AddSystemVars with something more readable.
Specifically, have a weapondata_t type mimicking the aplWeapon* arrays.
Keep a list weapondefaults[] which undergoes some static->dynamic tweaks
and then makes its way to the WEAPONx_XXX per-player gamevars.

git-svn-id: https://svn.eduke32.com/eduke32@3327 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-28 17:18:12 +00:00
helixhorned b30d00dd91 Replace initialize_engine_globals() with array initialization.
git-svn-id: https://svn.eduke32.com/eduke32@3326 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-28 17:18:09 +00:00
helixhorned 279a197e27 Lunatic translator: pack all translation units into one big blob.
git-svn-id: https://svn.eduke32.com/eduke32@3325 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-28 17:18:06 +00:00
helixhorned cc090a2ea8 Lunatic: sinking in code.
git-svn-id: https://svn.eduke32.com/eduke32@3324 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-28 17:18:02 +00:00
helixhorned d7cfde9d3d Make get{zs,ceilz,florz}ofslope (now ...ptr) accept sectortype pointer.
And rewrite the original functions as wrappers around these.

git-svn-id: https://svn.eduke32.com/eduke32@3323 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-28 17:17:58 +00:00
helixhorned 4f2639f4d7 Clean up spawning / actor initialization code.
git-svn-id: https://svn.eduke32.com/eduke32@3322 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-28 17:17:53 +00:00
helixhorned 0dd78fb029 Cleanup of console/on-screen-display (OSD) functionality.
- Rewrite the "clear background" routine in a no-brainer way instead of
  juggling around with rotatesprite(). Make it common to game+editor.
  Expose glRectd to glbuild.
- Don't stop OSD text line drawing when encountering a non-printable char.
  Instead, treat it as space.
- In OSD_SetTextMode(), don't use swaplong (which really swaps 32-bit ints)
  to swap pointers. Write an analogous "swapptr" instead.
- When changing from/to OSD, don't inject a pause key. This *might* have been
  the cause of the reported pausing problems.
- clean up the code...
(Yes, this commit throws together too much stuff. I suck sometimes. :P)

git-svn-id: https://svn.eduke32.com/eduke32@3321 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-25 16:13:50 +00:00
helixhorned fa2ac57674 Lunatic: event chaining.
git-svn-id: https://svn.eduke32.com/eduke32@3320 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-25 16:13:45 +00:00
helixhorned 41bfa1b841 Lunatic: print -> OSD_Printf, error reporting.
git-svn-id: https://svn.eduke32.com/eduke32@3319 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-25 16:13:41 +00:00
helixhorned 255c84c5a2 Clip printext256() at xdim, don't crash OSD_Printf() with empty string.
git-svn-id: https://svn.eduke32.com/eduke32@3318 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-25 16:13:36 +00:00
helixhorned 596b83aec1 Add a couple of test CONs: non-local control flow, rotation-fixed useractors.
git-svn-id: https://svn.eduke32.com/eduke32@3317 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-23 19:24:25 +00:00
helixhorned 6a4add81bd Fix rotation-fixed useractors (those having usertype bit 4 set).
Rotation-fixing happens for a couple of hard-coded statnums that presumably
never move (DEFAULT, STANDABLE, FX, FALLER, LIGHT), but for actors it wouldn't
make sense since the common case is that they do move. For this reason, bit 4
was introduced in r1934. The position of such useractors will not diverge
due to error roundoff accumulation in rotating sectors (SE0, train).

git-svn-id: https://svn.eduke32.com/eduke32@3316 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-23 19:24:21 +00:00
helixhorned 4ea9f799b1 Lunatic: more complete gameactor(), misc. translator tweaks.
git-svn-id: https://svn.eduke32.com/eduke32@3315 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-23 19:24:16 +00:00
helixhorned 48c47af5dc Pack actor_t's bposx/bposy/bposz members into a vec3_t named "bpos".
git-svn-id: https://svn.eduke32.com/eduke32@3314 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-23 14:00:08 +00:00
helixhorned 6f1259b131 Mapster32: save r_usenewshading in configuration file.
git-svn-id: https://svn.eduke32.com/eduke32@3313 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-23 14:00:03 +00:00
helixhorned d975a6a24f Fix build.lua's loadarts(), add bigytiles.lua.
git-svn-id: https://svn.eduke32.com/eduke32@3312 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-23 14:00:00 +00:00
helixhorned 9af1cf8368 engine.c: remove some old "#if 1"s, add compilation switch MULTI_COLUMN_VLINE.
Unconditionally enabled, but useful for comparing the behavior of the 1-column
vline functions against the 2- or 4-column ones.

git-svn-id: https://svn.eduke32.com/eduke32@3311 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-23 13:59:56 +00:00
helixhorned 9dc1d212a7 Classic: fix drawing tilesizy=512 walls, use non-pow2 routines with pskies.
The former is really only a workaround. Walls/vertical sprites/pskies with
ysize 512 (and presumably greater, but this was not tested) are rendered
with one shade higher at the borders (1 pixel vlines) because of a certain
assumption in the ASM (see comments there). With very dark shades, the
palookup[] buffer is accessed oob. We simply allocate 256 bytes more at the
end for each.

The latter is only for CLASSIC_NONPOW2_YSIZE_WALLS builds, which is not enabled
yet. It seems to matter only for the uncommon case where the such pskies repeat
in the height. A 1680x1050 window fully covered with such a sky is then rendered
at about 60/85 the FPS for me (mostly due to not using the 4 pixel vline
routines), so it may be leaning a bit too much on the side of correctness.

A compilation switch DEBUG_TILESIZY_512 is introduced in engine.c for
demonstration purposes.

git-svn-id: https://svn.eduke32.com/eduke32@3310 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-23 13:59:52 +00:00
hendricks266 0805060c74 Add "mapinfo" token to the def parser, pending implementation.
Sub-tokens: "mapfile", "maptitle", "mapmd4", "mhkfile"

http://forums.duke4.net/topic/6070-user-map-maphacks-eduke32-feature-request/

git-svn-id: https://svn.eduke32.com/eduke32@3309 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-23 03:12:50 +00:00
helixhorned 518ac7b4df Mapster32: in 3D mode's tile info, highlight members of swapped bottom walls.
- If aiming at a swapped bottom wall, display "Wall <wallnum> -> <otherwallnum>"
- highlight pic, shade, pal, cstat in yellow then
- in printext256, accept at most 3 digits for the color format string (e.g. ^123)

git-svn-id: https://svn.eduke32.com/eduke32@3308 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-20 12:04:39 +00:00
helixhorned 55283e5ce6 In Polymost, make r_usenewaspect=2 fog independent of screen x size.
git-svn-id: https://svn.eduke32.com/eduke32@3307 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-20 12:04:34 +00:00
helixhorned 192e863dd6 Mapster32: when pasting single wall, take over bits 4, 1+64 and 8+256.
That is, everything concerning orientation. Previously, it was wrongly
the bitwise NOT of these bits that got taken over. In particular, if bit
2 (swap bottom walls) would get pasted, ridiculousness could ensue.

git-svn-id: https://svn.eduke32.com/eduke32@3306 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-18 22:40:49 +00:00
terminx 817bc98964 Revert "Implement fullscreen 8bpp mode as a borderless, desktop-sized window when running on Windows, and expose an 8bpp mode to the game with the same size as the desktop when no fullscreen 8bpp modes are exposed by Windows. This is required on Windows 8 if we want to have any operation of classic mode in fullscreen, because Windows 8 drops the ability to set any mode other than 32bpp (leaving us largely in the same position we are when running under X)."
This reverts commit 705cc72fed880e857a68c483fd3ff1ead3df044d.

git-svn-id: https://svn.eduke32.com/eduke32@3305 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-18 18:07:28 +00:00
hendricks266 50844b6e71 Fix ebacktrace on 32-bit. (Sorry, we're back to 5 MB.)
git-svn-id: https://svn.eduke32.com/eduke32@3304 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-18 09:15:39 +00:00
helixhorned 28695e1d97 Move fog calc routines into polymost.c, declare in engine_priv.h.
git-svn-id: https://svn.eduke32.com/eduke32@3303 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-16 19:18:18 +00:00
helixhorned 5bda3a6ebf Don't enable fog in polymost_printext256() and when drawing tile view in M32.
The new "r_usenewshading 2" mode could darken these otherwise.

git-svn-id: https://svn.eduke32.com/eduke32@3302 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-16 19:18:13 +00:00
helixhorned 922aa3ca8b Classic-like visibility/fog for OpenGL modes, r_usenewshading 2 (new default).
Implemented using GL_LINEAR fog. The only source of difference (besides the
obvious indexed vs. true color) should now be the distance constant, which
still had to be determined experimentally.  Polymer implements this mode in
its fog fragment program part.

Parallaxed skies are always drawn with full visibility, I'm not sure if there
are any maps that expect otherwise.

Also, accidentally committed: factor out initialization code from
polymost_printext256() into gen_font_glyph_tex(), small game.c changes.

git-svn-id: https://svn.eduke32.com/eduke32@3301 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-16 19:18:10 +00:00
hendricks266 bb46b57d89 Fix the DirectInput breakage on Win64.
It was caused by the definition of c_dfDIJoystick using literal 24 and 16 values in place of sizeof(DIDATAFORMAT) and sizeof(DIOBJECTDATAFORMAT), which include pointers. On 64-bit, the values end up being 32 and 24, causing a discrepancy in which DIERR_INVALIDPARAM was thrown.

1b1e05db06/diffs

git-svn-id: https://svn.eduke32.com/eduke32@3300 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-16 05:46:20 +00:00
hendricks266 0f690797f5 ebacktrace1 updates:
- Updated to use StackWalk64 function call, requiring some addition of headers from MinGW-w64 to compile with MinGW.
- Code added to support 64-bit executables: functionality added and one warning fixed.
- New DLL binaries compiled using i686-MinGW-w64 and x86_64-MinGW-w64. (Oddly, the DLL built with MinGW is 5 MB while MinGW-w64's is 1 MB.)

git-svn-id: https://svn.eduke32.com/eduke32@3299 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-16 05:45:29 +00:00
terminx 7c94ee6874 Sort some of the more recently added source and header files so they're in the right sections in the VS2010 project
git-svn-id: https://svn.eduke32.com/eduke32@3298 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-16 04:04:25 +00:00
terminx af4ca16ddd Remove a few old references to the duke3d_w32.exe wrapper we once shipped
to facilitate compatibility with stuff like Dukester X years ago

git-svn-id: https://svn.eduke32.com/eduke32@3297 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-16 04:04:16 +00:00
terminx 9770b7ee39 Implement fullscreen 8bpp mode as a borderless, desktop-sized window when running on Windows, and expose an 8bpp mode to the game with the same size as the desktop when no fullscreen 8bpp modes are exposed by Windows. This is required on Windows 8 if we want to have any operation of classic mode in fullscreen, because Windows 8 drops the ability to set any mode other than 32bpp (leaving us largely in the same position we are when running under X).
git-svn-id: https://svn.eduke32.com/eduke32@3296 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-16 04:04:02 +00:00
helixhorned 441e2ed220 Fix savegame loading. Bump BYTEVERSION.
git-svn-id: https://svn.eduke32.com/eduke32@3295 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-15 11:28:56 +00:00
hendricks266 54e0fc260c Replace the scrolling contributor credits with a static programmatic three-column layout.
git-svn-id: https://svn.eduke32.com/eduke32@3294 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 23:11:26 +00:00
hendricks266 54195d8135 kextract: Propagate the GRP file's modification time to all extracted files.
git-svn-id: https://svn.eduke32.com/eduke32@3293 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 23:10:10 +00:00
helixhorned d7132e587f Fix CLANG=1 NOASM=1 build.
git-svn-id: https://svn.eduke32.com/eduke32@3292 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 19:28:20 +00:00
helixhorned c93096e938 Factor out multiply repeated code into calc_ylookup().
git-svn-id: https://svn.eduke32.com/eduke32@3291 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 19:28:17 +00:00
helixhorned 1c06bcf14e Classic: effectively clamp drawn ceiling/floor tile sizes at 256.
This prevents computing a shift value outside of [0..31].

git-svn-id: https://svn.eduke32.com/eduke32@3290 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 19:28:14 +00:00
helixhorned 243bea66dd Mapster32: correct message when changing shade by small steps ([+], [-], mwheel)
git-svn-id: https://svn.eduke32.com/eduke32@3289 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 19:28:11 +00:00
helixhorned 4cc5c431ae Factor out fogcalc() issuing and application of the computed values.
git-svn-id: https://svn.eduke32.com/eduke32@3288 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 19:28:09 +00:00
helixhorned 92dabb3694 Rename global visibility to g_visibility, remove useless casts & old fog code.
git-svn-id: https://svn.eduke32.com/eduke32@3287 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 19:28:05 +00:00
helixhorned 884302bea1 OpenGL modes: factor out shade factor calculation.
This also means that the "r_shadescale_unbounded 0" option will work
in Polymer (except on models).

git-svn-id: https://svn.eduke32.com/eduke32@3286 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 19:28:01 +00:00
helixhorned 13bff37caa engine.c: factor a frequent getpalookup() use into getpalookupsh().
git-svn-id: https://svn.eduke32.com/eduke32@3285 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 19:27:58 +00:00
helixhorned 65e5ebcdbc Add command line option "-rotatesprite-no-widescreen".
This global option will set bit 1024 and clear bits 256 and 512 for all
rotatesprite calls, fixing complex HUD drawing code relying on precise
alignment of individual elements (widescreen rotatesprite is entirely
unsuitable for this purpose).

git-svn-id: https://svn.eduke32.com/eduke32@3284 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 19:27:55 +00:00
terminx 21aa93c168 Limit attempting to toggle DWM off when using OpenGL modes to Vista/7, because Windows 8 no longer supports disabling DWM. Apparently, Windows 8 contains a software DWM renderer, and all of the "Metro" bs is directly tied to DWM, so there is no longer a way for an app to disable it at will.
git-svn-id: https://svn.eduke32.com/eduke32@3283 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 17:13:25 +00:00
terminx ba8d1a5c1e Change a few paths in various MSVC Makefiles to better suit my current dev environment. This doesn't really affect anyone else since these paths need to be customized to fit whatever machine by anyone building with MSVC anyway.
git-svn-id: https://svn.eduke32.com/eduke32@3282 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-14 17:13:17 +00:00
helixhorned 049e63d7f3 Mapster32: In 3D mode, [,] auto-aligns walls to the left.
git-svn-id: https://svn.eduke32.com/eduke32@3281 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 22:21:22 +00:00
helixhorned a8b445355b Mapster32: fix LAlt (carry over xrepeat) option for auto-alignment [.].
git-svn-id: https://svn.eduke32.com/eduke32@3280 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 12:41:28 +00:00
helixhorned d429aad9f2 Fix building on Linux; fix WITHOUT_GTK=0 build.
git-svn-id: https://svn.eduke32.com/eduke32@3279 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 12:41:23 +00:00
hendricks266 dac94ce284 Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)

To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.

All compiler and linker warnings when building in 64-bit mode have been fixed.

Remaining 64-bit to-do:
 - The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
 - RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
 - DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
 - Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)

This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.

In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.

git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
hendricks266 70aecb2e75 Fix declaration-after-statement warning in game.c after r3270.
git-svn-id: https://svn.eduke32.com/eduke32@3277 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:35:06 +00:00
hendricks266 2f8dbd94c3 Update credits.
git-svn-id: https://svn.eduke32.com/eduke32@3276 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:34:49 +00:00
hendricks266 9fcba228b1 Build tweaks:
Set up the use of {Windows,Apple}/{include,lib} regardless of feature toggles in Makefile.common using $(abspath ) in reference to the directory Makefile.common is in.
Add the three DirectX headers that are actually used to the repo. (from: http://alleg.sourceforge.net/files/dx9mgw.zip)
Since current MinGW versions include DirectX libs (for dynamic linking), remove "-L$(DXROOT)/lib".
The DirectX headers are no longer a separate dependency for building.
Add $(SDLROOT_OVERRIDE). $(SDLROOT) only functions for Windows and Mac OS X.
Factor handling of $(DXROOT_OVERRIDE) and $(SDLROOT_OVERRIDE) into Makefile.shared using $(abspath ).

git-svn-id: https://svn.eduke32.com/eduke32@3275 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:34:30 +00:00
hendricks266 6f2fa332dd Port system gamearray access from M32Script to CON. Expose tilesizx and tilesizy.
Also, fix deficient logic in Gv_Free and Gv_Clear (both M32 and CON) so that gamevar and gamearray erasure results are (closer to) correct, and so that the game does not crash when system arrays are accessed from CON because they all have been nulled.

git-svn-id: https://svn.eduke32.com/eduke32@3274 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:33:53 +00:00
hendricks266 a2f585fcfb jaudiolib: Modify OGG looping code to support the LOOP_LENGTH tag (where internally LOOP_START + LOOP_LENGTH = LOOP_END), and all three tags without the underscore.
As a note, libvorbis' vorbis_comment_query() checks for tags case-insensitively.

(This was done to support the output of vgmstream's "test.exe -g".)

git-svn-id: https://svn.eduke32.com/eduke32@3273 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:33:23 +00:00
hendricks266 ae59db2390 Makefiles: Replace all "ifeq ($(PLATFORM),LINUX)" with "ifeq ($(SUBPLATFORM),LINUX)" and set SUBPLATFORM=LINUX when PLATFORM equals LINUX, DINGOO, GCW, or CAANOO.
git-svn-id: https://svn.eduke32.com/eduke32@3272 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:32:59 +00:00
terminx 977764e57a Fix building as C instead of C++
git-svn-id: https://svn.eduke32.com/eduke32@3271 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-12 02:53:15 +00:00
terminx fbdbca2952 Networking patch from Jasper Foreman
git-svn-id: https://svn.eduke32.com/eduke32@3270 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-12 02:53:13 +00:00
terminx 5c59f785a1 Recognize the .pk4 file extension when loading grps and zips for shits and giggles (.pk3 was already recognized).
git-svn-id: https://svn.eduke32.com/eduke32@3269 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-12 02:53:10 +00:00
terminx 1c3f31b099 Move the definitions like MAXGAMEVARS out of the enums used for the gamevar flags, because it didn't really make a whole lot of sense for them to be there.
git-svn-id: https://svn.eduke32.com/eduke32@3268 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-12 02:53:08 +00:00
terminx 5d031ec257 Replace the separate full Gv_AddVar/SubVar/etc functions with a macro that generates them since they were all the same anyway (other than the operator, obviously)
git-svn-id: https://svn.eduke32.com/eduke32@3267 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-12 02:53:05 +00:00
helixhorned 9d2260c3c8 Replace outer apScriptGameEvent[...] checks with G_HaveEvent().
git-svn-id: https://svn.eduke32.com/eduke32@3266 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-10 18:17:57 +00:00
helixhorned 99f56fd295 Don't call setaspect_new() at end of rotatesprite.
This fixes 2nd and following rotatesprite calls drawing differently from
the first in a context with custom set-up aspect, as reported by Lezing here:
http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__143090

Also, back up and restore the aspect state across EVENT_DISPLAYREST.

git-svn-id: https://svn.eduke32.com/eduke32@3265 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-10 18:17:53 +00:00
helixhorned 4caab915ec Implement fade_screen_black() using fullscreen_tint_gl() in GL modes.
git-svn-id: https://svn.eduke32.com/eduke32@3264 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-10 18:17:50 +00:00
helixhorned abb54958e1 Factor dup. code in SDL/Windows layers into baselayer.c:fullscreen_tint_gl().
git-svn-id: https://svn.eduke32.com/eduke32@3263 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-10 18:17:44 +00:00
helixhorned 10ae7e342c CON: proper bound checks for {re,}definequote commands.
git-svn-id: https://svn.eduke32.com/eduke32@3262 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-09 13:42:38 +00:00
helixhorned f2a9af0bae Rearrange {net,}actor_t for 4-byte alignment of int32_t members.
Bump BYTEVERSION.

git-svn-id: https://svn.eduke32.com/eduke32@3261 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-09 13:24:46 +00:00
helixhorned fc048658dc Experimental NETCODE Makefile variable, enabled by default.
Disabling netcode compilation can be interesting on memory-constrained
systems, or those that have no means of accessing the network anyway.
Note: I'm OK with maintaining this myself, i.e. it's fine if netcode dev
breaks compilation with NETCODE=0.

git-svn-id: https://svn.eduke32.com/eduke32@3260 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-09 13:24:44 +00:00
helixhorned 1588a80442 Lunatic: drowning in code.
git-svn-id: https://svn.eduke32.com/eduke32@3259 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-09 13:24:39 +00:00
helixhorned 5c06ef08bf Make EventNames[] an array of (const char *) instead of const tokenlist.
git-svn-id: https://svn.eduke32.com/eduke32@3258 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-09 13:24:36 +00:00
helixhorned 599d9232f1 Initialize BADGUY sprite flags for hardcoded enemies.
... instead of switch/case-ing them in A_CheckEnemyTile().
Because this requires bumping BYTEVERSION, we also get rid of the
excess trailing bytes in the save game's "rest" data. (See r3052.)

git-svn-id: https://svn.eduke32.com/eduke32@3257 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-09 13:24:32 +00:00
helixhorned 541fca6dac Lunatic: gasping for some air.
That is, fix some oversights introduced in the preceding runs.
listglobals.sh is a helper to find global accesses.
Translator: add "number-conversion" warning option, max. error limit.

git-svn-id: https://svn.eduke32.com/eduke32@3256 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-09 13:24:28 +00:00
helixhorned 2212e4e6f8 Lunatic translator: warning options, on_state_end, more bad-identifier chars.
git-svn-id: https://svn.eduke32.com/eduke32@3255 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-03 18:24:33 +00:00
helixhorned 99c67c0190 Lunatic: submerging in code.
git-svn-id: https://svn.eduke32.com/eduke32@3254 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-03 18:24:30 +00:00
helixhorned b062d5f572 Lunatic: knee-deep in code.
- more codegen
- make more members const, some char unsigned
- fix some "geom" metamethods
- '^' operator

git-svn-id: https://svn.eduke32.com/eduke32@3253 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-03 18:24:25 +00:00
helixhorned 2bcf8aa8ec gameexec.c: rip out some inline code into VM_Fall() and VM_ResetPlayer().
git-svn-id: https://svn.eduke32.com/eduke32@3252 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-03 18:24:20 +00:00
helixhorned 76b970e547 Lunatic: implement the non-local control flow needed for some commands.
git-svn-id: https://svn.eduke32.com/eduke32@3250 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-30 18:57:59 +00:00
helixhorned 5b07f67627 Lunatic: player stuff (protect some members etc.)
git-svn-id: https://svn.eduke32.com/eduke32@3249 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-30 18:57:55 +00:00
helixhorned b850d04f8d Lunatic: Makefile tweaks, protect sprite[].picnum.
git-svn-id: https://svn.eduke32.com/eduke32@3248 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-30 18:57:50 +00:00
helixhorned 354a1a70ef Lunatic: expose more stuff, more codegen (the easy ones).
git-svn-id: https://svn.eduke32.com/eduke32@3247 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-30 18:57:46 +00:00
helixhorned 16c596b31b Some Lunatic cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@3246 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-30 18:57:40 +00:00
helixhorned 4d40ca6159 Fix build. It was my fault after all since I forgot common.h in r3243.
git-svn-id: https://svn.eduke32.com/eduke32@3245 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-29 14:08:03 +00:00
helixhorned c4abfc405a Windows: Fix potential crash in version checker.
1) see if we actually received anything
(if http://eduke32.sourceforge.net/VERSION is unavailable, this returns now
instead of continuing with nonsensical data)
2) check if we're getting a token from strtok()

git-svn-id: https://svn.eduke32.com/eduke32@3244 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-29 12:49:41 +00:00
helixhorned 7614a78cc5 Factor dist() and ldist() into common.c.
git-svn-id: https://svn.eduke32.com/eduke32@3243 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-29 12:49:38 +00:00
helixhorned 375d164138 Move enum vmflags_t to gameexec.c since it's an implementation detail.
git-svn-id: https://svn.eduke32.com/eduke32@3242 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-29 12:49:34 +00:00
hendricks266 64c21a5e0a Add "dump_used_assets.m32" to samples. This script can be used to extract what tilenum and sound IDs are used in maps.
git-svn-id: https://svn.eduke32.com/eduke32@3241 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-26 08:37:36 +00:00
hendricks266 6f21e0bdc9 Fix "undefined reference to `sampletimer()'" linking error using clang for a Win32 release build.
git-svn-id: https://svn.eduke32.com/eduke32@3240 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-26 08:37:18 +00:00
hendricks266 2007c4d233 Fix errors and warnings in nedmalloc.h using clang for a Win32 release build.
git-svn-id: https://svn.eduke32.com/eduke32@3239 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-26 08:36:57 +00:00
hendricks266 890aba88eb Fix warnings involving printf() requiring explicit casts on tracked types.
git-svn-id: https://svn.eduke32.com/eduke32@3238 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-26 08:26:04 +00:00
hendricks266 b6f41b6ae5 Add FORCEWARNINGS Makefile flag to prevent disabling compiler warnings within the source.
git-svn-id: https://svn.eduke32.com/eduke32@3237 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-26 08:25:26 +00:00
hendricks266 b304360c87 Remove ebacktrace1.dll from 'make all' and include a prebuilt one in package/. Build it with 'make ebacktrace'.
synthesis.sh updated.

git-svn-id: https://svn.eduke32.com/eduke32@3236 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-26 08:24:54 +00:00
hendricks266 9d2c19bcca Restructure so that everything packaged in a release build is stored in the package folder, instead of maintaining a list.
synthesis.sh, osxbuild.sh, and wiibuild.bat updated.

git-svn-id: https://svn.eduke32.com/eduke32@3235 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-26 08:23:20 +00:00
Plagman 36f80e9078 Move the tracking from a dirty state to a change count.
git-svn-id: https://svn.eduke32.com/eduke32@3234 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 16:24:41 +00:00
terminx 65104593e1 Revert "compat.h: slightly reformat the NOWARN-related preprocessor directives."
Commit breaks MSVC builds by failing to provide NOWARN macros to MSVC.

git-svn-id: https://svn.eduke32.com/eduke32@3232 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:54:33 +00:00
helixhorned befdb5d3d8 compat.h: slightly reformat the NOWARN-related preprocessor directives.
git-svn-id: https://svn.eduke32.com/eduke32@3231 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:19:12 +00:00
helixhorned 1bda7acca3 Expose per-tile nofullbright bit (GL modes only) to DEF.
The attribute is set per tile from DEF: either
    nofullbrightrange <begintile> <endtile>
or
    tilefromtexture <tile> { ... nofullbright ... }
As a special case, the list may only contain "nofullbright", in which case the
texture is not changed.  (This is analogous to "texhitscan".)

Example:
// make piggy's eyes fullbright red only when it fires the shotgun
nofullbrightrange 2000 2034
nofullbrightrange 2040 2049
nofullbrightrange 2055 2061

git-svn-id: https://svn.eduke32.com/eduke32@3230 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:19:06 +00:00
helixhorned 5c5c88a7ee Misc. engine cleanups, no functional changes.
git-svn-id: https://svn.eduke32.com/eduke32@3229 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:19:02 +00:00
helixhorned ca4ef47f0b engine.c: factor out 2 pract. ident. pieces of code into try_facespr_intersect.
The two uses are from hitscan and neartag.  The functionality is reproduced
exactly (assuming I made no mistake), down to different distance checking
(<= vs. <).

git-svn-id: https://svn.eduke32.com/eduke32@3228 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:18:57 +00:00
helixhorned dacf2695ff Lunatic: better protection of array members inside structs.
git-svn-id: https://svn.eduke32.com/eduke32@3227 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:18:52 +00:00
helixhorned 8293e72a95 Lunatic translator: rework how composites are passed around.
git-svn-id: https://svn.eduke32.com/eduke32@3226 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:18:46 +00:00
helixhorned cff452d814 Lunatic translator: update default defines.
git-svn-id: https://svn.eduke32.com/eduke32@3225 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:18:41 +00:00
helixhorned 50b6e4acac Guard macros.h by #ifndef/#define, remove two decls of nonexistent functions.
In jmact/mathutil.h: FindDistance3D_HP() and ArcTangentAppx().

git-svn-id: https://svn.eduke32.com/eduke32@3224 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:18:36 +00:00
hendricks266 8d2599cba1 Fix r3221: move the nedmalloc.h include to winbits.c.
git-svn-id: https://svn.eduke32.com/eduke32@3223 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 08:50:16 +00:00
hendricks266 9ebcbc1489 Replace SDL icons, freshly generated using GIMP 2.6.11.
The code has been factored. Additionally, 32x32 is used on Windows with SDL_MAJOR_VERSION==1, while 48x48 is the default.

See: http://www.libsdl.org/cgi/docwiki.cgi/SDL_WM_SetIcon

git-svn-id: https://svn.eduke32.com/eduke32@3222 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 04:27:13 +00:00
hendricks266 5e0ffb93b3 RENDERTYPE=SDL on Windows, part 2.
This introduces winbits.[ch] in the engine, containing layer-independent code migrated from winlayer, including nedmalloc, ebacktrace1, OS version detection, and high-resolution profiling timers.

sdlayer has been expanded to include the code from winbits under _WIN32.

All uses of RENDERTYPEWIN in the source have been examined and changed to _WIN32 (or removed) where the block in question is layer-independent.

git-svn-id: https://svn.eduke32.com/eduke32@3221 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 04:26:37 +00:00
hendricks266 9a75f0b88c Factor G_MultiPskyInit into common.c.
git-svn-id: https://svn.eduke32.com/eduke32@3220 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 04:25:31 +00:00
hendricks266 be899ba3af For novelty, add support for RENDERTYPE=SDL under Windows.
This needs improvements to bring it up to par with winlayer, but it is functional. In particular, a good amount of code from winlayer could be used for both layers, including the profiling timers, the version printing code, and the hInstance and hModule sharing.

Known problems: the mouse cursor is not trapped, and the game starts before the startup window shows options.

git-svn-id: https://svn.eduke32.com/eduke32@3219 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-24 09:13:29 +00:00
hendricks266 1f0693eca4 Implement OGG looping support; musicians rejoice!
Loops are controlled by two tags in the Vorbis Comment, both in PCM samples.

LOOP_START holds the beginning of the loop, the position to which playback returns at the end of the loop.

LOOP_END is optional; it holds the end of the loop, after which the game seeks to LOOP_START. If undefined, the end of the OGG is the end of the loop. The primary purpose of LOOP_END is if you want to give your file a proper ending for listening outside the game.

To preview a looped OGG you have assembled, give it a ".logg" extension and play it using the vgmstream plugin for Winamp or foobar2000.

git-svn-id: https://svn.eduke32.com/eduke32@3218 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-24 09:12:15 +00:00
hendricks266 6c59071155 Stop all sounds after completion of LOGO.ANM.
git-svn-id: https://svn.eduke32.com/eduke32@3217 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-24 09:11:50 +00:00
hendricks266 f8b2b9088c Allow CAMERA1 to have cstat 32768.
git-svn-id: https://svn.eduke32.com/eduke32@3216 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-24 09:11:30 +00:00
hendricks266 fd06052a1d Fix ebacktrace1.dll build with MinGW-GCC 4.7.2.
git-svn-id: https://svn.eduke32.com/eduke32@3215 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-24 09:11:06 +00:00
terminx 1fb8684bef Factor out duplicate code in CONTROL_BindKey/CONTROL_BindMouse/CONTROL_FreeKeyBind/CONTROL_FreeMouseBind
git-svn-id: https://svn.eduke32.com/eduke32@3214 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-20 01:33:25 +00:00
terminx f9ba5f827c Relocate Bstrncpyz to the bottom of compat.h so we can use our Bstrncpy macro there
git-svn-id: https://svn.eduke32.com/eduke32@3213 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-20 01:33:22 +00:00
helixhorned d5fa8ade49 build.lua: provide simplistic "readdefs()", use in foreachmap.lua.
So that symbolic tile names can be used when searching maps.

git-svn-id: https://svn.eduke32.com/eduke32@3212 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-18 19:01:39 +00:00
helixhorned 1009e0f2ec Remove many redundant (int16_t) casts and one now incorrect one.
The redundant ones are in code like this: s->cstat = (int16_t)32768;
Because the value is eventually converted to the type of "s->cstat", any
casts to integral types having at least as many bits are no-ops, signedness
being irrelevant due to (probably any two's complement arch targeting
compiler's) bit-pattern preserving semantics of these conversions.

The now incorrect one is: if (lotag == (int16_t) 65535),
"int32_t lotag" being read from a wall or sprite struct directly earlier.
Now, with these members being unsigned, and (int16_t)65535 equalling -1,
the check always fails.  The correction fixes normal switches having such
a lotag ending the level immediately.

In short: integer casts before assignments are unnecessary, those in reads
highly relevant!

git-svn-id: https://svn.eduke32.com/eduke32@3211 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-18 19:01:34 +00:00
helixhorned 0153853024 Correct arithmetic comparisons of lo/hitags in actors.c.
Rewriting them in the obvious way, i.e. by casting the expression
to int16_t first.  (That is, this commit is the reverse of r3174,
but with casts applied.)  This fixes at least one regression: a
FIREEXT with a hitag of 0 should not be linked with same-
(that is, zero-) tagged SEENINEs or OOZFILTERs.
Mind the corner cases!

git-svn-id: https://svn.eduke32.com/eduke32@3210 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-18 19:01:29 +00:00
helixhorned d8cd41fa94 Fix bound keys' commands being truncated in settings.cfg, control* cleanup.
- provide functions instead of messing with CONTROL_*Binds directly
- comment out a few more unused functions
- make clear what memory (alloc'd or const char *) 'keybind' members use
- for keys with no name, use "<?>"

git-svn-id: https://svn.eduke32.com/eduke32@3209 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-18 15:44:18 +00:00
terminx 878e41c34b Fix a keyboard scancode oversight I introduced with my changes last night, apparently caused crashes
git-svn-id: https://svn.eduke32.com/eduke32@3208 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-18 00:07:44 +00:00
helixhorned 72492df63e Engine cleanup: factor out code getting bounds of sprites.
git-svn-id: https://svn.eduke32.com/eduke32@3207 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 19:46:50 +00:00
helixhorned e9009bfdd4 Clean up base engine functions: tighten scope of locals declarations.
git-svn-id: https://svn.eduke32.com/eduke32@3206 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 19:46:47 +00:00
helixhorned 0316868c75 Clean up engine code by factoring repeated 3-liners into spriteheightofs().
This function also changed: it doesn't handle floor-aligned sprites now,
and the z offset is returned instead of set by pointer.

git-svn-id: https://svn.eduke32.com/eduke32@3205 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 19:46:43 +00:00
helixhorned 6abb63670c A couple of meaning-preserving rewrites of picanm[]-touching code.
git-svn-id: https://svn.eduke32.com/eduke32@3204 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 19:46:37 +00:00
helixhorned dd424fac70 Mapster32: fix cycling picnum in 3D mode.
Using non-keypad [-]/[+] or LMB + mousewheel, it was broken when a void
tile was in between.

git-svn-id: https://svn.eduke32.com/eduke32@3203 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 19:46:33 +00:00
helixhorned 44904b12be Clean up picanm[] by making its elements values of struct type picanm_t.
The size of that struct is currently 4, and its layout almost the same as
what is read in with loadpics().  The number of tiles in an animation is
bumped to 256, so that the max. tile difference in DEF's animtilerange is
255. (There's no way to have such animations from ART.)

git-svn-id: https://svn.eduke32.com/eduke32@3202 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 19:46:28 +00:00
helixhorned 29a8f245b8 Lunatic: update BUILD types with signed->unsigned changes of *stat.
git-svn-id: https://svn.eduke32.com/eduke32@3201 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 19:46:18 +00:00
terminx 83ae3a407a Further minor MACT cleanups
git-svn-id: https://svn.eduke32.com/eduke32@3200 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 16:48:11 +00:00
terminx bbbeefc6a1 Replace a few one line MACT mouse functions with macros that do the same thing
git-svn-id: https://svn.eduke32.com/eduke32@3199 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 16:48:05 +00:00
terminx f8a373cb70 Remove useless CONTROL_UserInputCleared. It was useless in the literal sense, e.g not actually used anywhere. :p
git-svn-id: https://svn.eduke32.com/eduke32@3198 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 16:48:02 +00:00
terminx 992de02101 Change key bindings to use dynamic allocation and remove the previous limit of 128 characters per key bind
git-svn-id: https://svn.eduke32.com/eduke32@3197 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 16:47:58 +00:00
terminx a5ee23215d Minor cleanups in MACT control.c
git-svn-id: https://svn.eduke32.com/eduke32@3196 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 16:47:53 +00:00
terminx 11a5000630 Rename a few variables we've added to MACT over the years to be more consistent with the rest of its naming conventions
git-svn-id: https://svn.eduke32.com/eduke32@3195 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-17 16:47:47 +00:00
terminx f779b53c0f Remove the xdelta3 files from the VS2010 project, too
git-svn-id: https://svn.eduke32.com/eduke32@3194 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-16 16:41:04 +00:00
terminx 2ab811cd9b Remove xdelta3 since it doesn't fit in with our current networking plans anymore
git-svn-id: https://svn.eduke32.com/eduke32@3193 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-16 15:40:28 +00:00
terminx ed464aaadc Add "ulotag" and "uhitag" to get/setactor/wall/sector, which exposes the tags unsigned, without the typecast to int16_t. This might be useful to someone.
git-svn-id: https://svn.eduke32.com/eduke32@3192 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-16 00:54:04 +00:00
terminx 51382ab19c Remove our old eduke32.vcproj as it hasn't been updated since whenever I switched to VS2010
git-svn-id: https://svn.eduke32.com/eduke32@3191 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 23:37:33 +00:00
terminx 626180dd3f Make GCC *printf_nowarn behavior conditional on compiling as C++
git-svn-id: https://svn.eduke32.com/eduke32@3190 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 23:35:40 +00:00
helixhorned 3c651e0a53 CON: make lotag/hitag getters return signed values, as per agreement on IRC.
This means that the internal change done to these sprite members in r3159 is
hidden from CON for backward-compatibility purposes.  Note that .cstat and
.{ceiling,floor}stat aren't touched, and will return unsigned values to CON.

git-svn-id: https://svn.eduke32.com/eduke32@3189 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 21:10:02 +00:00
helixhorned 5e049afa5d Probably fix the zoom crash encountered with Mapster32 and CBP8.
Described here:
http://forums.duke4.net/topic/3857-the-crash-thread/page__view__findpost__p__141202

git-svn-id: https://svn.eduke32.com/eduke32@3188 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 21:10:00 +00:00
helixhorned 9434025e6d Minor loadpics() cleanups, don't expose filegrp[] from cache1d.c.
git-svn-id: https://svn.eduke32.com/eduke32@3187 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 21:09:56 +00:00
helixhorned 826be655db picanm[]-cleanup pt1: hide code using animateoffs() behind macro DO_TILE_ANIM.
git-svn-id: https://svn.eduke32.com/eduke32@3186 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 21:09:53 +00:00
helixhorned b5cead500a foreachmap.lua: add possibility of running code per s/w/s match with ':' shortcut
Also, add a missing "pragma pack(pop)" to build.lua.

git-svn-id: https://svn.eduke32.com/eduke32@3185 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 21:09:48 +00:00
terminx a46844e937 Add nedmalloc.h to the VS2010 project files
git-svn-id: https://svn.eduke32.com/eduke32@3184 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 16:44:15 +00:00
helixhorned 0a999d7a7e Mapster32: Fix clipboard tile display in 3D mode.
git-svn-id: https://svn.eduke32.com/eduke32@3183 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:55 +00:00
helixhorned 225294e8ce demo.c: time G_DoMoveThings() using a double instead of an int32_t.
I think this may fix some negative "non-profiled overhead" that I
have been seeing.

git-svn-id: https://svn.eduke32.com/eduke32@3182 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:53 +00:00
helixhorned 5f76f699b2 Bump BYTEVERSION.
git-svn-id: https://svn.eduke32.com/eduke32@3181 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:50 +00:00
helixhorned 6547495cac Split r3159..r3161, part 14: The rest.
git-svn-id: https://svn.eduke32.com/eduke32@3180 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:47 +00:00
helixhorned 6144a2e18c Split r3159..r3161, part 13: Poly{mer,most}, engine changes.
git-svn-id: https://svn.eduke32.com/eduke32@3179 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:44 +00:00
helixhorned 107fa9cc39 Split r3159..r3161, part 12: Add explicit casts, non-pointer types.
Notes:
 - Atomic Edition (Censored) -> Plutonium Pak in grpscan.c
 - "scale" in astub.c:drawtileinfo() is incorrect, I think.
 - in demo.c, the gethitickms() value should be returned to a double.

git-svn-id: https://svn.eduke32.com/eduke32@3178 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:41 +00:00
helixhorned 61d038f217 Split r3159..r3161, part 11: Add explicit casts, pointer types.
git-svn-id: https://svn.eduke32.com/eduke32@3177 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:36 +00:00
helixhorned 5ad385c043 Split r3159..r3161, part 10: add explicit casts to *alloc return values.
NOTE: changes such as these are best viewed with something like
git diff (...) --color-words='[a-zA-Z0-9_]+|[^[:space:]]'

git-svn-id: https://svn.eduke32.com/eduke32@3176 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:29 +00:00
helixhorned 6b01b43713 Split r3159..r3161, part 9: make CON's 'respawnhitag' unconditional on hitag.
... in the 'default' case (non-FEM* tiles).

git-svn-id: https://svn.eduke32.com/eduke32@3175 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:21 +00:00
helixhorned 2cb3734f85 Split r3159..r3161, part 8: make some members of base types unsigned.
NOTE: This will need very thorough review.

git-svn-id: https://svn.eduke32.com/eduke32@3174 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:18 +00:00
helixhorned 7c07fee1b3 Split r3159..r3161, part 7: code touching networking.
git-svn-id: https://svn.eduke32.com/eduke32@3173 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:14 +00:00
helixhorned 6d5d415ea5 Split r3159..r3161, part 6: code conditional on __cplusplus.
Note the type change of vplce[] in engine.c: int32_t -> uint32_t.

git-svn-id: https://svn.eduke32.com/eduke32@3172 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:11 +00:00
helixhorned 5485206c03 Split r3159..r3161, part 3, addendum 1: add a forgotten "Bfstat".
git-svn-id: https://svn.eduke32.com/eduke32@3171 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:07 +00:00
helixhorned 274726be9b Split r3159..r3161, part 5: "nowarn" wrapping of printing functions.
git-svn-id: https://svn.eduke32.com/eduke32@3170 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:04 +00:00
helixhorned f7eb5adb40 Split r3159..r3161, part 4: Tweaks of tiledata_t's "cacherange" member.
REM: This will need a savegame version bump.

git-svn-id: https://svn.eduke32.com/eduke32@3169 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:28:00 +00:00
helixhorned 9dd3748b03 Split r3159..r3161, part 3: MSVC, nedmalloc, *layer, startup windows.
git-svn-id: https://svn.eduke32.com/eduke32@3168 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:27:57 +00:00
helixhorned d37278ec58 Split r3159..r3161, part 2: C++ tracker headers.
git-svn-id: https://svn.eduke32.com/eduke32@3167 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:27:51 +00:00
helixhorned f20a001618 Split r3159..r3161, part 1: Makefile and MSVC project file changes.
git-svn-id: https://svn.eduke32.com/eduke32@3166 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:27:49 +00:00
helixhorned 1cd11d06ef Revert "Fix the warnings when building with C++, add MSVC C++ build support."
This reverts r3159..r3161.

Conflicts:
	eduke32/build/include/compat.h
(Handled so that r3163's changes are kept applied.)

git-svn-id: https://svn.eduke32.com/eduke32@3165 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 14:27:45 +00:00
hendricks266 9b57e0ea51 Address crash when model skins have invalid file names. Affected surfaces will not be drawn, but FPS will plummet as mdloadskin() is called repeatedly. A more optimal solution would either flag the surface as invalid (so the renderers skip it) or reject the entire model when defs are loaded.
http://forums.duke4.net/topic/6031-eduke32-crashes-if-hrp-model-skin-not-available/

git-svn-id: https://svn.eduke32.com/eduke32@3164 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 06:42:57 +00:00
hendricks266 a418bec8c2 Tools updates:
- Eliminate use of the C++ standard library from arttool. I improved some of the program's workings but it continues to corrupt my art files in certain circumstances. (Note: Not a regression; it happens with previous revisions.)
- Construct "make utils" for the game side following the pattern of the engine.
- Move ivfrate to this new distinction.
- Minor Makefile cleanup and tweaks, mainly to facilitate CLANG=1 and to formalize text output in special cases.

git-svn-id: https://svn.eduke32.com/eduke32@3163 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 06:42:37 +00:00
hendricks266 c6bbb0547b Fix CPLUSPLUS=1 CLANG=1 building, and fix the "gotpic used attribute ignored" warning produced by clang.
git-svn-id: https://svn.eduke32.com/eduke32@3162 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 06:42:00 +00:00
terminx c9cd191bce MinGW C build fix
git-svn-id: https://svn.eduke32.com/eduke32@3161 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 01:30:31 +00:00
terminx 89c9a201b5 Add a couple of #ifdef __cplusplus I missed
git-svn-id: https://svn.eduke32.com/eduke32@3160 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 00:23:10 +00:00
terminx 3ff46c02b2 Fix the warnings when building with C++, add MSVC C++ build support. This also changes the internal type of lotags, hitags and cstat type fields to uint16_t instead of int16_t to clean up some dubious behavior wherein the code was using a value of 32768 as a flag in these fields for certain types of things, like invisible sprites (using the value as if it was uint16_t) where it was elsewhere checking if the value was < 0 (using the value as if it was int16_t). This change may break a few specific effects if any part of the relevant code was missed when looking for areas that needed to be addressed.
I think there's also a fix for the CON precache system breakage in here (lost it in my local tree when I started getting the C++ build working in MSVC, sorry!)


git-svn-id: https://svn.eduke32.com/eduke32@3159 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-14 23:32:43 +00:00
terminx 2cea43f150 Fix r3155 fuckup :)
git-svn-id: https://svn.eduke32.com/eduke32@3158 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-13 15:08:10 +00:00
helixhorned 74c46a7b3d Mapster32: set first walls more conveniently on split in one special case.
Specifically, if the first wall of the sector-to-split is to the left or right
of the *start* of the splitting line AND the sector has no TROR extensions,
make these two the new nextwalls of the respective split sectors.

git-svn-id: https://svn.eduke32.com/eduke32@3157 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-13 10:50:13 +00:00
helixhorned 51c544f4da Rewrite old-version-savegame signaling in a cleaner fashion.
git-svn-id: https://svn.eduke32.com/eduke32@3156 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-13 10:50:06 +00:00
terminx 00084e9e22 Update Net_SendVersion() and Net_ReceiveVersion() to use a 16-bit representation of BYTEVERSION
git-svn-id: https://svn.eduke32.com/eduke32@3155 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-12 15:47:52 +00:00
terminx 39437b2fdc Fix useractor enemystayput breakage
git-svn-id: https://svn.eduke32.com/eduke32@3154 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-11 18:46:02 +00:00
helixhorned ea5829f36c Make it possible to build a standalone libcache1d.so.
Exporting only (de)compression functions. Also, different reader/writer
functions can be set.

git-svn-id: https://svn.eduke32.com/eduke32@3153 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-11 17:57:13 +00:00
helixhorned 4b66769bcb Couple of tweaks in player.c to match all ProjectileData[...].xxx with a regexp.
It would be something like "ProjectileData\[([^]]+)]\.([a-z_]+)".

git-svn-id: https://svn.eduke32.com/eduke32@3152 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-11 17:57:09 +00:00
helixhorned a76a796ebb Fix demo playback with diff application enabled.
This requires ripping out the .proj member of tiledata_t back into
ProjectileData[] again because it was the only one in g_tile[] that
changed during the course of a game.  The g_tile[] array is now also
correctly flagged as "constant throughout a game" (DS_NOCHK).
Savegame version bumped.

git-svn-id: https://svn.eduke32.com/eduke32@3151 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-11 17:57:06 +00:00
helixhorned ed9fa753f1 Trivial G_Util_PtrToIdx*() tweaks.
git-svn-id: https://svn.eduke32.com/eduke32@3150 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-11 17:57:01 +00:00
helixhorned 3d74c8a9fd Fix viewing through moving cameras.
It's still not pretty though since there's no interpolation from G_DrawRooms().

git-svn-id: https://svn.eduke32.com/eduke32@3149 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-11 17:56:57 +00:00
helixhorned 3bcdc5acb8 Lunatic reorganization part 2: split into engine and editor/game parts.
On the engine side (functions starting with L_), there are now the basic
parts like state creation and running code from strings and files.
The game and editor can add to that by e.g. loading whatever they please
into the state. Their functions start with El_ and Em_, respectively.
The Lua scripts still reside in source/lunatic, even for the common ones.
This is because they will be embedded into the binaries as bytecode or
compressed source eventually, so their location on disk will be irrelevant.

git-svn-id: https://svn.eduke32.com/eduke32@3148 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 20:59:00 +00:00
helixhorned 550acb2b1a Lunatic reorganization part 1: two renames and one deletion.
See the next commit for details.

git-svn-id: https://svn.eduke32.com/eduke32@3147 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 20:58:54 +00:00
helixhorned 03454c8c3c Clean up texture loading code etc. in polymost.c, no functional changes.
git-svn-id: https://svn.eduke32.com/eduke32@3146 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 14:11:20 +00:00
helixhorned d85f529b74 Introduce a per-tile bit preventing fullbrights in GL modes, use for LOADSCREEN.
git-svn-id: https://svn.eduke32.com/eduke32@3145 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 14:11:17 +00:00
helixhorned c71b3d529c Classic: fix rotatesprite with no screen scaling and non-widescreen aspects.
Also, enable showing sprites in Mapster32's overhead view again, since that
was one (the only?) use of that code path.  The uninitialized read was
introduced in r2927.

git-svn-id: https://svn.eduke32.com/eduke32@3144 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 14:11:13 +00:00
helixhorned 547b28b63e When looking through a camera, don't do third person view.
Also, reorganize some G_DrawRooms() code a little without changing anything.

git-svn-id: https://svn.eduke32.com/eduke32@3143 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 14:11:10 +00:00
helixhorned e7e777348b When found a camera sprite for viewscreen, set position etc. immediately.
Instead of later in P_ProcessInput(). This fixes one drawrooms() call in
between where the sectnum is the camera's, but the position the player's,
which can lead to a slow "outer view" render in Polymer.

git-svn-id: https://svn.eduke32.com/eduke32@3142 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 14:11:07 +00:00
Plagman 861eea9b16 Make glbuild C++-safe.
git-svn-id: https://svn.eduke32.com/eduke32@3141 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 06:09:51 +00:00
Plagman be310c4d00 Fix warning in jaudiolib due to void ptr arith.
git-svn-id: https://svn.eduke32.com/eduke32@3140 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 01:53:54 +00:00
Plagman a1b82232fd Fix warnings from pointer math with the trackers.
git-svn-id: https://svn.eduke32.com/eduke32@3139 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 01:53:50 +00:00
Plagman a0dd0c85a5 Add automatic tracking to the sector[], wall[], sprite[] and tsprite[]
arrays; any write access to them will run the corresponding hook and write
to the [sector/wall/sprite/tsprite]clean array.

Note: tsprite and sprite use the same hook and require running a few more
instructions per access in order to disambiguiate; this could be made more
optimal (like the other arrays) by clearly separating the types in the game
code.

Note #2: taking a member's address currently marks it dirty because of tons
of helper functions across the editor code. I don't know how many read-only
accesses we have after taking a member address, but it could also be fixed
with some finessing of the code.

git-svn-id: https://svn.eduke32.com/eduke32@3138 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-09 22:31:02 +00:00
Plagman abc3fa4e8d Fix the C++ build on Linux with LTO.
git-svn-id: https://svn.eduke32.com/eduke32@3137 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-09 18:05:21 +00:00
Plagman 27a39f1982 Fix the Linux mapster32 build with LTO enabled.
git-svn-id: https://svn.eduke32.com/eduke32@3136 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-09 17:35:58 +00:00
Plagman 7e62f10728 Fix synthesis fallout after ivfrate addition.
git-svn-id: https://svn.eduke32.com/eduke32@3135 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-09 16:00:37 +00:00
terminx e0f519ddb0 Fix C90 compliance warning in sdlmusic
git-svn-id: https://svn.eduke32.com/eduke32@3134 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-08 22:09:30 +00:00
terminx a4311f5cb1 Fix warning from r3128
git-svn-id: https://svn.eduke32.com/eduke32@3133 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-08 22:09:00 +00:00
helixhorned 61f79336d6 Make ivfrate build standalone, Makefile tweaks.
git-svn-id: https://svn.eduke32.com/eduke32@3132 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-08 21:54:17 +00:00
helixhorned b2162f554d New utility ivfrate(.exe) and a couple of small VP8 changes.
The command-line utility can query and set the frame rate of IVF files, since
apparently encoders don't care too much about setting proper values in the IVF
header.  Also, add the utility to the synthesis build.

On the playback side in EDuke32, get rid of the 1/(2*fps) "correction" if the
FPS numerator is <1000 (presumably used in older encoders) and properly print
the frame rate's fractional part.

git-svn-id: https://svn.eduke32.com/eduke32@3131 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-08 20:17:23 +00:00
helixhorned 17bac8cb55 Lunatic: "fix" building.
git-svn-id: https://svn.eduke32.com/eduke32@3130 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-08 20:17:19 +00:00
helixhorned 2b0bbf4a1c Fix USE_OPENGL=0 build.
git-svn-id: https://svn.eduke32.com/eduke32@3129 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-08 20:17:15 +00:00
terminx d37e1093f5 Fix console key changing breakage
git-svn-id: https://svn.eduke32.com/eduke32@3128 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-08 17:00:31 +00:00
helixhorned 0f35221820 Prettify some code where I felt was necessary.
git-svn-id: https://svn.eduke32.com/eduke32@3127 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-06 23:06:44 +00:00
helixhorned 935f3ec50d When binding a key, take care of processing one-to-many binds properly in menu.
This means that the "Keyboard Setup" should now properly reflect the bindings,
except in the theoretical case of one gamefunc being bound more than two keys.
(What was fixed is the one key to many gamefuncs case.)

git-svn-id: https://svn.eduke32.com/eduke32@3126 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-06 23:06:40 +00:00
helixhorned 27c0c9c342 Get rid of the code reading in [KeyDefinitions] section of eduke32.cfg.
That section was only ever read in for little profit and never written
out!  Keyboard input is actually dispatched as OSD commands for a good
while, so that old cruft has to go!

git-svn-id: https://svn.eduke32.com/eduke32@3125 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-06 23:06:38 +00:00
helixhorned c429f3fbc4 Clean up control.c.
- Remove everything using CONTROL_KeyMapping, which was only written to.
- Remove unused functions, make local ones static.
- Remove private function declarations in _control.h.

git-svn-id: https://svn.eduke32.com/eduke32@3124 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-06 23:06:34 +00:00
helixhorned d6fe35a7d0 Fix one key <--> multiple gamefuncs dispatching.
git-svn-id: https://svn.eduke32.com/eduke32@3123 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-06 23:06:31 +00:00
hendricks266 a0c6fb9805 Fix linking with CLANG=1 by separating $(INVOCATION) into $(COMPILER) and $(LINKER) and removing "-x" from clang as a linker in Makefile.common. Additionally, the Build tools are now affected by CPLUSPLUS=1, for which small corrections have been made.
git-svn-id: https://svn.eduke32.com/eduke32@3122 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-06 07:49:44 +00:00
Plagman b31d5c9d59 Fix build error after C++ conversion.
git-svn-id: https://svn.eduke32.com/eduke32@3121 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-06 05:07:11 +00:00
helixhorned 2b583ebf4c Fix building with SDL 1.2.
git-svn-id: https://svn.eduke32.com/eduke32@3120 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-05 20:04:02 +00:00
Plagman 548f939df5 Add horrible tracking template; for each structure you'll want to create a
separate tracker type by #defining __TRACKER_NAME and __TRACKER_GLOBAL_OFFSET.

eg.:

Then if you have a tracked value and a value of the same type at the given offset:

Tracker_1<int32_t> trackedInt;
int32_t trackedIntDirty = 0; // 4 bytes after

trackedIntDirty will become 1 everytime trackedInt changes.

git-svn-id: https://svn.eduke32.com/eduke32@3119 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-05 04:34:23 +00:00
hendricks266 10c7206d1c Tweak r3116.
git-svn-id: https://svn.eduke32.com/eduke32@3118 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-05 03:48:03 +00:00
hendricks266 805ebe99de Fix mixed declarations and code in backtrace.c.
git-svn-id: https://svn.eduke32.com/eduke32@3117 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-05 02:50:12 +00:00
hendricks266 fcf9beae6a Work-in-progress adjustment to the C code to compile under C++. It builds for me without errors using Win32 MinGW-GCC, but it still generates warning soup. No guarantees about MSVC or anything using SDL. Enable C++ by building with CPLUSPLUS=1. C remains the default and should compile with no change in setup.
Credit to Plagman for the idea and doing the work on the game side, which is included in this commit.

(Building as C++ will give us features with which we can make improvements and optimizations on the multiplayer code and Polymer.)

git-svn-id: https://svn.eduke32.com/eduke32@3116 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-05 02:49:08 +00:00
terminx 5cca0d4ffe Add some compile time defined names for p->inven_icon values. Too bad these values aren't in the same order as the inventory items themselves... (dukeinv_t and dukeinvicon_t values do not match).
git-svn-id: https://svn.eduke32.com/eduke32@3115 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-04 23:41:05 +00:00
helixhorned 20f0f21986 engine.c: add bound-check assert failing for sprites in m32's textured 2D mode.
Also, disable drawing sprites in that mode for now.

git-svn-id: https://svn.eduke32.com/eduke32@3114 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-04 23:03:26 +00:00
helixhorned 65a7ed04f7 Mapster32: functionality to rotate or scale RShift-highlighted stuff smoothly.
This is done by pressing LShift and
 - holding down the left mouse button for scaling, or
 - the right mouse button for rotating the highlighted walls/sprites
with respect to a pivot point determined as the center of the bounding box of
all highlighted points.

Note that scaling sectors isn't that easy and the current functionality is very
rudimentary: there's no z scaling, no xrepeat correction, and sprites aren't
touched expect for their position.  The user is responsible to maintain map
consistency, for example to prevent wall-lines of the same sector crossing
each other.

git-svn-id: https://svn.eduke32.com/eduke32@3113 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-04 23:03:22 +00:00
helixhorned 737e6e6a17 Mapster32: when looking for matching wall in 2nd pt. ins., don't skip gray nextwalls.
This fixes a bug where it's not possible to split a sector under certain
circumstances, reported by Micky C here:
http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__138380

Also, don't allow zero in various 'F functions: Resize selection and
Global {shade, visibility} divide.

git-svn-id: https://svn.eduke32.com/eduke32@3112 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-04 23:03:16 +00:00
helixhorned 0bd8516806 Work around the transparent line with on-screen chaingun and linear filtering.
We do this by messing with the GL texture that gets uploaded for CHAINGUN.
Since this is implemented on the engine side, the static value for CHAINGUN
(2536) is used, and the tile dimensions are compared to 211x55 to have a
little confidence that the tile wasn't overridden by a mod.  Hack indeed.

git-svn-id: https://svn.eduke32.com/eduke32@3111 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-03 19:32:48 +00:00
helixhorned c9558d5ab4 VPX: print determined frame rate to the log.
Currently, the FPS determination is based on libvpx's vpxdec.c code, which uses
the FPS provided in the IVF file in one case, and simply sets it to 30 FPS in
the other.  For the first case, a "correction" is carried out for something
which the comments suggest to originate from other (old?) VPX encoder versions.

git-svn-id: https://svn.eduke32.com/eduke32@3110 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-03 19:32:45 +00:00
helixhorned ed0e73c84a Lunatic: update structures, find maps case-insensitively in findmaps.sh.
git-svn-id: https://svn.eduke32.com/eduke32@3109 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-03 19:32:43 +00:00
helixhorned e6fdb25d6d Mapster32: draw lines to linking sprites with LShift, jump to them with +[ or +]
When LShift is pressed and the mouse is over a linking sprite (as determined by
the tag labeling system), lines are drawn to all other sprites, and pressing
[ or ] will cycle these then. False positives and missed sprites are possible.

Additional changes:
 - consider SE 31 and 32's lotag to NOT be linking, since the ACTIVATOR is what
   matters.  The original maps are inconsistent there.
 - When pressing Alt+[ or Alt+] and there are no corruptions, say so instead of
   doing [ or ].

git-svn-id: https://svn.eduke32.com/eduke32@3108 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-03 19:32:39 +00:00
helixhorned 2dfe3c3d93 Lunatic: make geom.lua work standalone, fix __eq metamethods for dvec[23]_t.
git-svn-id: https://svn.eduke32.com/eduke32@3107 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-03 19:32:35 +00:00
helixhorned d42c28c344 Mapster32: when punching loop, fade screen; tweak two messages.
git-svn-id: https://svn.eduke32.com/eduke32@3106 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-03 19:32:32 +00:00
terminx 6f3f2eb1b8 Hopefully fix the projectile breakage, and add some predefined names for working with the built in statnums
git-svn-id: https://svn.eduke32.com/eduke32@3105 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-31 15:03:33 +00:00
terminx 7bd6d504c7 Move win32 "Initialized nedmalloc" message out of the function that prints the Windows version since it doesn't really belong there.
git-svn-id: https://svn.eduke32.com/eduke32@3104 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-30 16:06:18 +00:00
terminx 8b02800260 A pretty useless fix from a newer version of kplib than we forked from. I'm just tired of seeing it in my tree. ;)
git-svn-id: https://svn.eduke32.com/eduke32@3103 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-30 16:04:37 +00:00
terminx 88c95a18f7 Retire the actorscrptr[], actorLoadEventScrptr[], SpriteFlags[], ActorType[], SpriteCacheList[], ProjectileData[] and DefaultProjectile[] arrays in favor of a tile_t structure exposed as g_tile[]. This consolidates most of the MAXTILES sized arrays on the game side into one place.
git-svn-id: https://svn.eduke32.com/eduke32@3102 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-30 15:54:35 +00:00
hendricks266 f18ef269ed Add EVENT_CHANGEMENU and clean up menus.c a little more.
This event is useful in certain circumstances where you want to skip a menu/screen value and the design of the monster switch statement would require the M_ChangeMenu() call to be intercepted or the unwanted screen will flash for a split second.

git-svn-id: https://svn.eduke32.com/eduke32@3101 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-29 04:29:45 +00:00
hendricks266 2066656aed Two new player structure members: "autostep" and "autostep_sbw".
These control the maximum difference in height between two sectors that the player will automatically traverse without needing to jump.

The latter controls the special case when the player's sector's lotag is ST_1_ABOVE_WATER or p->spritebridge == 1.

BYTEVERSION bumped.

git-svn-id: https://svn.eduke32.com/eduke32@3100 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-29 04:29:17 +00:00
hendricks266 3366df0dbd Remove unused variable "doretry" from S_PlaySound().
git-svn-id: https://svn.eduke32.com/eduke32@3099 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-29 04:28:50 +00:00
hendricks266 80e8b18c66 Revise grpfiles[] to include the censored South Korean GRP.
git-svn-id: https://svn.eduke32.com/eduke32@3098 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-29 04:28:31 +00:00
hendricks266 7e4e760e9c Fix harmless warnings in the Build tools.
git-svn-id: https://svn.eduke32.com/eduke32@3097 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-29 04:28:10 +00:00
hendricks266 f51bdc2faa Slight makefile reorganization and cleanup.
* Centralize optimization strategies in Makefile.common. This required moving detection of $(PLATFORM), which makes sense if we work on the paradigm that Makefile.common is for generic compiler setup and Makefile.shared works with libraries and things closer to the engine and game code itself.
* New Makefile variables OPTOPT (Optimization Options) and CUSTOMOPT (Custom Optimizations). OPTOPT by default contains -march, -mtune, etc. Setting this variable from Make invocation will blank these. CUSTOMOPT (Custom Optimizations) works the same but in an additive fashion, overwriting nothing. Technically CUSTOMOPT could stand for (Custom Options) and include any additional parameters sent to both linker and compiler.
* Factor out literal names of the main executables.
* The build process now prints assembler (if NOASM=0) and linker settings in addition to compiler settings.

git-svn-id: https://svn.eduke32.com/eduke32@3096 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-29 04:26:25 +00:00
terminx a3fe057c0a WIP networking updates from Jasper Foreman
git-svn-id: https://svn.eduke32.com/eduke32@3095 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-28 22:27:53 +00:00
terminx 067baf626a Comment out the A_GetZLimits() call right before the Bassert() in A_MoveSprite(). This call is a problem because the assertion expects "dasectnum" and spr->sectnum to match, but A_GetZLimits() can itself call A_SetSprite() which results in another call to A_MoveSprite() and can potentially change the sectnum again.
This commit also adds the NOTELEPORT sprite flag, which of course prevents sprites from teleporting.


git-svn-id: https://svn.eduke32.com/eduke32@3094 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-24 13:21:02 +00:00
Plagman 67c7d67166 polymer: only let emitshadow affect shadows, not lightmaps.
Lightmaps are already opt-in anyway.

git-svn-id: https://svn.eduke32.com/eduke32@3093 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-21 18:41:09 +00:00
Plagman e726484ccc polymer: add support for negative lights
And hook them up to cstat 128 (half-submerged, 'c' in mapster).

git-svn-id: https://svn.eduke32.com/eduke32@3092 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-21 04:52:43 +00:00
Plagman 9d10b0b087 polymer: add a prlight flag to make shadow-less spotlights
And hook it up to SE cstat 64 ('1' in mapster32). This disables both lightmaps
and shadow maps for the spotlight; please let me know if you have a usecase
where you want lightmaps but no shadow maps for specific lights.

git-svn-id: https://svn.eduke32.com/eduke32@3091 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-21 03:41:13 +00:00
terminx fdef8a6b8c Remove a debug line I accidentally committed a few days ago.
git-svn-id: https://svn.eduke32.com/eduke32@3090 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-20 15:58:06 +00:00
terminx 2c00f53008 Add some CON defines for friendly names to pass to definegamefuncname. Now, instead of "definegamefuncname 36 something" you would "definegamefuncname GAMEFUNC_TURNAROUND something". It's just a little something to make CON files more readable.
git-svn-id: https://svn.eduke32.com/eduke32@3089 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-16 17:05:14 +00:00
terminx ef92094aa5 Update xdelta3 to 3.0.4. I haven't actually tested these changes yet but they're directly from upstream.
git-svn-id: https://svn.eduke32.com/eduke32@3088 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-15 16:13:13 +00:00
terminx c04bae8c13 Oops! Fix MinGW build issue caused by ripping out nedmalloc
git-svn-id: https://svn.eduke32.com/eduke32@3087 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-15 00:38:41 +00:00
terminx a5f479787f Remove built-in copy of nedmalloc and update nedmalloc.dll. Note that the built-in copy of nedmalloc hasn't been updated or enabled in a really long time as modern system allocators (Windows 7 and Linux 3.x at least) are no longer consistently beat by nedmalloc (but nor are they consistently faster). So, the dll remains for users of Windows XP because it may still improve performance there (while not likely degrading it on Vista/7).
git-svn-id: https://svn.eduke32.com/eduke32@3086 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-15 00:17:30 +00:00
terminx ca46dc76ec Move the Windows screen size based aspect ratio determination code down farther into the initialization and change the printed message to only appear when the calculation fails
git-svn-id: https://svn.eduke32.com/eduke32@3085 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 22:22:03 +00:00
terminx 54ec3c7640 Minor menu cleanups, only half-finished (if that).
git-svn-id: https://svn.eduke32.com/eduke32@3084 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 22:16:07 +00:00
terminx 2fde79b4bc A potential fix for MUSICANDSFX problems after loading a savegame. I was never able to reproduce the issue myself, but something like this seems like a good idea anyway. Thoughts?
git-svn-id: https://svn.eduke32.com/eduke32@3083 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 22:13:49 +00:00
terminx 28fab0d06d actors.h updates needed for the networking changes I committed a few minutes ago
git-svn-id: https://svn.eduke32.com/eduke32@3082 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 22:11:09 +00:00
terminx f6a11eacc1 Clean up a couple of functions, namely P_IncurDamage()
git-svn-id: https://svn.eduke32.com/eduke32@3081 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 22:10:29 +00:00
terminx 7e248dcc49 Remove some outdated/incorrect code that was causing some issues when multiple copies of a single sound were playing and just one of them needed to be stopped.
git-svn-id: https://svn.eduke32.com/eduke32@3080 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 22:09:16 +00:00
terminx 901b1bff0f Networking updates. Don't bother testing this to see if things are any better, because they aren't. :p
git-svn-id: https://svn.eduke32.com/eduke32@3079 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 21:52:51 +00:00
helixhorned d5f7e5becf Texel-granular hitscan() for wall-aligned sprites.
The attribute is set per tile from DEF: either
    texhitscanrange <begintile> <endtile>
or
    tilefromtexture <tile> { ... texhitscan ... }
(As a special case, the list may only contain "texhitscan", in which case the
texture is not changed.)

In passing, do some cleanup for "tilefromtexture" DEF parsing: the list tokens
should now be accepted in any order, and errors don't appear in the middle of
the list parsing.

git-svn-id: https://svn.eduke32.com/eduke32@3078 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:34 +00:00
helixhorned ce948c6ee4 Factor out 2x identical code into G_WeaponHitCeilingOrFloor().
git-svn-id: https://svn.eduke32.com/eduke32@3077 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:30 +00:00
helixhorned b03c95443b Clean up G_MoveWeapons(), among other things getting rid of weird indentation.
git-svn-id: https://svn.eduke32.com/eduke32@3076 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:28 +00:00
helixhorned abd8753e66 Clean up A_MoveSprite(), no functional changes.
git-svn-id: https://svn.eduke32.com/eduke32@3075 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:25 +00:00
helixhorned 8adb9d27af Rearrange G_MoveTransports() code a little to cut down on nested switches.
git-svn-id: https://svn.eduke32.com/eduke32@3074 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:23 +00:00
helixhorned a92d5486c4 Replace all/most literal SE lotags 1/2 with SE_1_ABOVE_WATER or SE_2_UNDERWATER.
Also catch some other literal SEs and statnums.

git-svn-id: https://svn.eduke32.com/eduke32@3073 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:21 +00:00
helixhorned e921346dac TROR: Prototypical no-SE7 water submersion/emersion.
Submersion only happens when the upper sector has lotag 1 and its vertical
neighbor has lotag 2 (this can be useful to create non-submergible above-water
sectors).  Currently, only the player is handled.  On the implementation side,
the water handling code is split into P_Submerge() and P_Emerge() preparing the
"teleportation", and P_FinishWaterChange() for the finalization.

git-svn-id: https://svn.eduke32.com/eduke32@3072 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 20:41:17 +00:00
terminx bc9a29b121 CON access to ud.runkey_mode through get/setuserdef
git-svn-id: https://svn.eduke32.com/eduke32@3071 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 18:18:30 +00:00
terminx 521ee43173 Fix setting r_pr_maxlightpasses from .cfg at startup
git-svn-id: https://svn.eduke32.com/eduke32@3070 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 14:51:29 +00:00
terminx 2d58801d8c Add cvar "cl_runmode" to control ud.runkey_mode. This should fix the "allow walk while running" preference not saving.
git-svn-id: https://svn.eduke32.com/eduke32@3069 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-14 14:43:37 +00:00
terminx f7ed6f47de Prevent Windows "case mismatch" spam when loading files from disk with the Windows Explorer "hide extensions for known file types" option enabled. This simply changes the relevant Bstrcmp() calls to Bstrncmp() calls instead, using the length of the string returned by SHGetFileInfo() as the number of bytes to compare.
git-svn-id: https://svn.eduke32.com/eduke32@3068 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-13 14:53:26 +00:00
terminx 83dd447621 Fix the bug I caused with custom projectiles :p
git-svn-id: https://svn.eduke32.com/eduke32@3067 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-11 03:25:10 +00:00
terminx 084ec632ea The other half of the previous commit.
git-svn-id: https://svn.eduke32.com/eduke32@3066 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-08 07:07:59 +00:00
terminx 5010b17efe Fix issue with explosion sound cutoff in E1L2. This implements functionality to stop playback and free up the voice of a currently playing sound of the same ID when there are already MAXSOUNDINSTANCES (currently 8) of the same sound playing, determined by distance/volume and which sound is oldest.
Initial determination is based purely on distance/volume, and if two qualifying sounds have the same distance/volume the one which started playback first is the one that gets the axe.

Feedback from other developers welcome.


git-svn-id: https://svn.eduke32.com/eduke32@3065 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-08 07:07:17 +00:00
helixhorned a2ed3682ee Lunatic: expose updatesector*, add random walker as timing test for them.
git-svn-id: https://svn.eduke32.com/eduke32@3064 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:29 +00:00
helixhorned 8f89c89d86 Lunatic: various tweaks and API changes/additions.
git-svn-id: https://svn.eduke32.com/eduke32@3063 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:24 +00:00
helixhorned 3a7b697a32 Lunatic-m32: save command input history.
git-svn-id: https://svn.eduke32.com/eduke32@3062 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:20 +00:00
helixhorned 5b311f98cc Clean up redundant/local function declarations in build.c.
git-svn-id: https://svn.eduke32.com/eduke32@3061 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:17 +00:00
helixhorned 1682eae693 Lunatic: various tweaks.
Going to extremes to avoid code duplication like the plague, but at
least it's great to learn about the whole function environment business.

git-svn-id: https://svn.eduke32.com/eduke32@3060 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:13 +00:00
helixhorned 36687ab986 Lunatic-m32: take over load path.
git-svn-id: https://svn.eduke32.com/eduke32@3059 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:09 +00:00
helixhorned 2851f412d2 Lunatic-m32: add an OSD command to be able to interface with stuff.
git-svn-id: https://svn.eduke32.com/eduke32@3058 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:04 +00:00
helixhorned f9e61ce37e Lunatic: fix up Makefiles, split dynsymlists.
The Makefile now has separate {GAME,EDITOR}LDFLAGS, so the correct
dynamic symbol list can be specified.

git-svn-id: https://svn.eduke32.com/eduke32@3057 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:25:58 +00:00
helixhorned 851c6b081d Lunatic: prototypical editor binding.
git-svn-id: https://svn.eduke32.com/eduke32@3056 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:25:52 +00:00
terminx 9120696e86 Minor cleanups in actors.c, mostly relating to custom projectiles and the like. A bug causing custom projectiles to knock the player back twice as far as the hard-coded ones was also fixed. There should be no other functional changes for the end user.
git-svn-id: https://svn.eduke32.com/eduke32@3053 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-05 20:48:10 +00:00
helixhorned f8480d00f9 In savegames, store dummy constant-length block instead of a _prlight array.
sizeof(_prlight) differs across compilers, and besides, Polymer lights were
not loaded anyway (they're restored live in-game later).  The savegame version
was not bumped, but only savegames made with builds where sizeof(_prlight)==261
(like synthesis) will stay compatible!
Report and helpful debugging information by LeoD.

git-svn-id: https://svn.eduke32.com/eduke32@3052 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-03 15:29:12 +00:00
helixhorned 30856c3949 In DNCOORDS display, add spritebridge and sbs.
git-svn-id: https://svn.eduke32.com/eduke32@3051 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-03 15:29:10 +00:00
helixhorned 04a542f1b3 On non-{Windows, OS X}, don't link to libpng when PNG support is not requested.
git-svn-id: https://svn.eduke32.com/eduke32@3050 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-03 15:29:07 +00:00
helixhorned 1ba5ec469b Add helper program profdemo.lua, running EDuke32's demo profiling N times.
... and displaying statistics afterwards.  It was easier to do it this way
than porting stat.lua to C and especially adding more logic to the already
spaghetti-like demo playback code.

git-svn-id: https://svn.eduke32.com/eduke32@3049 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:52 +00:00
helixhorned b6db86ef0a In Load Game menu, show 32- or 64-bitness of save game on mismatch.
git-svn-id: https://svn.eduke32.com/eduke32@3048 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:49 +00:00
helixhorned 57348c1fdc Mapster32: make 'corruptcheck_noalreadyrefd' a separate OSD command.
Instead of having 'noalreadyrefd' as a 'corruptcheck' subcommand.
This way, TAB completion can be had.

git-svn-id: https://svn.eduke32.com/eduke32@3047 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:47 +00:00
helixhorned 9d0bffebde Mapster32: factor out some code (3x) into GetSaveBoardFilename().
git-svn-id: https://svn.eduke32.com/eduke32@3046 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:44 +00:00
helixhorned 13599f56b8 In -d command line arg, allow specifying demo number in addition to file name.
git-svn-id: https://svn.eduke32.com/eduke32@3045 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:40 +00:00
helixhorned 54167d4c7e Factor out prepare/finish parts from load{old,}board(), misc. cleanup.
This means that loadoldboard() now should also initialize Polymer map
info after loading a v5/v6 map.  Make the variables holding a file descriptor
an int32_t instead of int16_t.

git-svn-id: https://svn.eduke32.com/eduke32@3044 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:37 +00:00
helixhorned 7efc08a919 Rip out v5/v6 map definitions and routines into src/engine_oldmap.h.
git-svn-id: https://svn.eduke32.com/eduke32@3043 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:34 +00:00
helixhorned 9128e8af04 For loadboard() and friends, pass a vec3_t position instead of separate x/y/z.
git-svn-id: https://svn.eduke32.com/eduke32@3042 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:30 +00:00
helixhorned f10bfb6774 A bit stylistic Polymost code cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@3041 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:25 +00:00
helixhorned b3daea46d6 Add compilation switch MODEL_OCCLUSION_CHECKING to polymost.h, leave it enabled.
git-svn-id: https://svn.eduke32.com/eduke32@3040 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:22 +00:00
helixhorned 735d1ed77e Remove last argument from yax_getneighborsect(), make radarang[] engine.c-local.
git-svn-id: https://svn.eduke32.com/eduke32@3039 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:18 +00:00
helixhorned 2ab247b68a A couple of inside()-related cleanups.
- make inside_editor() static in build.c
- replace comparisons of inside()'s return values with 0 by ones with 1
  (since a returned 0 can mean -1 or 1, i.e. oob sector or is really inside)
- prevent a theoretically possible oob access in correct_ornamented_sprite()

git-svn-id: https://svn.eduke32.com/eduke32@3038 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:13 +00:00
helixhorned d4ff4c4595 Clean up updatesector* family, no functional changes.
- factor out the "is inside" predicates
- rename updatesector_onlynextwalls() -> updatesectorbreadth()
- add ATTRIBUTE((nonnull(4))) to the bitmap arg of updatesectorexclude().

git-svn-id: https://svn.eduke32.com/eduke32@3037 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 17:52:09 +00:00
terminx 6019e86010 Update ENet with the latest changes from github
git-svn-id: https://svn.eduke32.com/eduke32@3036 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-01 05:37:31 +00:00
terminx ead8204e1e Fix a.masm changes so MSVC builds work again. The relevant functionality seems to work (non-power of 2 textures drawn without error), even with CLASSIC_NONPOW2_YSIZE_WALLS defined in engine.c, but I'm not familiar with any corner or edge cases that need to be watched out for with this.
Note: CLASSIC_NONPOW2_YSIZE_WALLS is still not enabled in svn.


git-svn-id: https://svn.eduke32.com/eduke32@3035 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-30 14:40:42 +00:00
helixhorned ede713af62 engine.c: Split CLASSIC_NONPOW2_YSIZE into _WALLS and _SPRITES, enable the second
git-svn-id: https://svn.eduke32.com/eduke32@3034 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-28 15:20:13 +00:00
helixhorned beb47f47b5 Port non-pow2 ysize texture mapping routines to MASM, untested.
It's mostly taking over the NASM code, with a couple of changes:
- declarations for externals and globals are slightly different
- the masm seems to have e.g. "dword ptr [...]" where the nasm has only
  "dword [...]", though the masm also has a couple of the latter. The "ptr"
  modifier seems kinda redundant to me, but I added it to every indirection
  anyway.

git-svn-id: https://svn.eduke32.com/eduke32@3033 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-28 15:20:10 +00:00
helixhorned ddc22ee395 a.nasm: add 'dword' to some stores in the nonpow2 routines for consistency.
git-svn-id: https://svn.eduke32.com/eduke32@3032 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-28 15:20:07 +00:00
helixhorned 52ed3e1a66 engine.c: add compilation switches for non-pow2 ysize functions, disable for now.
Previously, we used them in our builds for sprites, but MSVC builds don't have
the ASM ported to MASM, and thus the workaround of ignoring the linking errors
was not safe.

git-svn-id: https://svn.eduke32.com/eduke32@3031 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-28 15:20:03 +00:00
helixhorned 99f9cfca7f foreachmap.lua: add option of only printing matching file names (like grep -l)
Also, add convenience wrapper script findmaps.sh for quickly searching for
sprites/walls/sectors satisfying a certain condition in all map files under
a given directory.

git-svn-id: https://svn.eduke32.com/eduke32@3030 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-26 22:54:01 +00:00
helixhorned 599a2049e6 Mapster32: add check for sprites being out of the maximal grid range (+-524288).
Requested auto-correction will place such sprites at their sector's first point.

git-svn-id: https://svn.eduke32.com/eduke32@3029 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-26 22:53:57 +00:00
helixhorned 5957e0f143 Revert "Abyss crash prevention code", but make the overflow explicit.
git-svn-id: https://svn.eduke32.com/eduke32@3028 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-26 22:53:53 +00:00
helixhorned aba1ce9e7f Disable spot lights on ATI cards, fixing the recent crashes with Catalyst 12.8.
git-svn-id: https://svn.eduke32.com/eduke32@3027 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-24 21:09:37 +00:00
helixhorned 2d3fe5083d Fix compilation on Debian 6.0 (Squeeze).
git-svn-id: https://svn.eduke32.com/eduke32@3026 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-24 21:09:34 +00:00
helixhorned 94ebe8211b Revert r2223's removing of bit 1 making it to setbrightness(), now a noop.
Hendricks found a bug caused by that commit, so this one enables exprimentation
with setbrightness() bit 1 behavior.

git-svn-id: https://svn.eduke32.com/eduke32@3025 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-24 21:09:31 +00:00
helixhorned 2e36784575 Add the option of starting demo profiling from the command line.
EDuke32 will exit afterwards.

git-svn-id: https://svn.eduke32.com/eduke32@3024 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-24 21:09:27 +00:00
helixhorned c04f7cbb4c foreachmap.lua: add shortcut for quickly finding certain sectors/walls/sprites.
git-svn-id: https://svn.eduke32.com/eduke32@3023 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-24 21:09:22 +00:00
helixhorned 7e05f5884c With SDL 1.2 builds, make the profiling be cancelable by pressing any key.
git-svn-id: https://svn.eduke32.com/eduke32@3022 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-15 15:28:30 +00:00
helixhorned 95d11b9703 Add a profiling option to the 'demo' OSD command.
See the comment in source/osdcmds.c for instructions on its usage.

git-svn-id: https://svn.eduke32.com/eduke32@3021 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-15 15:28:26 +00:00
helixhorned 6389874b5d Fix aspect determination from showview in fullscreen mode.
This makes the splitscreen mod not have a ridiculous view distortion.
Such scenes will have no correction for non-square pixels, though.

git-svn-id: https://svn.eduke32.com/eduke32@3020 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-15 15:28:21 +00:00
hendricks266 f662911008 Remove old backtrace DLLs. For some time they have been unused and supplanted by ebacktrace1.dll.
git-svn-id: https://svn.eduke32.com/eduke32@3019 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-13 07:08:20 +00:00
hendricks266 8990017700 Add detection of Windows 8 and Server 2012 to win_printversion().
git-svn-id: https://svn.eduke32.com/eduke32@3018 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-13 07:07:54 +00:00
hendricks266 9f0824e79f Fix three (probably harmless) maybe-uninitialized warnings.
git-svn-id: https://svn.eduke32.com/eduke32@3017 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-13 07:07:21 +00:00
hendricks266 132aebf1c1 patch from jfmact: "added c++ trimming to header" mathutil.h
git-svn-id: https://svn.eduke32.com/eduke32@3016 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-13 07:06:47 +00:00
hendricks266 74c00dbbd6 Revise EVENT_CHANGEWEAPON so that RETURN has no effect except for two values. -1 will cancel the weapon switch. -2 will override the switch to whatever value p->curr_weapon is set in the course of the event.
While we're at it, factor out duplicate code into P_ChangeWeapon().

git-svn-id: https://svn.eduke32.com/eduke32@3015 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-13 07:06:11 +00:00
hendricks266 a7688523a1 Possible fix for saving the "Fav priority" autoswitch setting.
git-svn-id: https://svn.eduke32.com/eduke32@3014 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-13 07:02:56 +00:00
helixhorned 91e8613ae4 SE17 setup: when failing to find warp z height for lower level, use heuristic.
Specifically, use the elevator's own ceiling z height instead of searching
nextsectors with nextsectorneighborz().  This makes maps like L9.map (Spaceport
from N64) or DEMOUNT.MAP work.  [Note well: work at all, since if it happened
to work before, that was pure coincidence.]

git-svn-id: https://svn.eduke32.com/eduke32@3013 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-12 09:48:31 +00:00
helixhorned 22a4eaaf3d __fastcall int32_t getangle -> int32_t fastcall getangle. Might fix MSVC build.
git-svn-id: https://svn.eduke32.com/eduke32@3012 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-12 09:47:26 +00:00
helixhorned 011e2b714a Replace some literal statnums with the corrensponding STAT_...
git-svn-id: https://svn.eduke32.com/eduke32@3011 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-12 09:46:21 +00:00
helixhorned 8f6d9c0986 Replace some more literal SE numbers, rename a couple of functions.
git-svn-id: https://svn.eduke32.com/eduke32@3010 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-12 09:45:14 +00:00
helixhorned 15d1c94d03 STHELP.HLP/SEHELP.HLP: reference SE11 and ST23 from each other.
git-svn-id: https://svn.eduke32.com/eduke32@3009 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:47 +00:00
helixhorned eb4848fe05 Replace most other literal SEs/STs by symbolic enumeration values.
Have fun researching Duke3D's hardcoded weirdness!!!

git-svn-id: https://svn.eduke32.com/eduke32@3008 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:44 +00:00
helixhorned fba2556f9b Clean up some timing-related code.
- duke3d.h: comment the timing marcos a bit more
- factor out smoothratio calculation
- (TICRATE/TICSPERFRAME) --> REALGAMETICSPERSEC

git-svn-id: https://svn.eduke32.com/eduke32@3007 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:40 +00:00
helixhorned 8fba52a2bb New OSD cmd: demo <demonum or demofile>, starting one instantly from the menu.
Also, correct some comments made in the demo source made earlier. Oops.

git-svn-id: https://svn.eduke32.com/eduke32@3006 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:37 +00:00
helixhorned 8f8a3c6846 Move enum cheatindex_t from game.c to game.h and use its values in osdcmds.c.
git-svn-id: https://svn.eduke32.com/eduke32@3005 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:34 +00:00
helixhorned 06a64b8dd4 OSD command 'map': entering a name with a '*' wildcard lists those that match.
A new function maybe_append_ext() is added to common.c and used in the handling
of the -d<demo.edm> cmdline parameter and the 'map' OSD command with one
non-wildcard arg.  (It's slightly different from the way the extension was
maybe-appended previously.)

git-svn-id: https://svn.eduke32.com/eduke32@3004 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:31 +00:00
helixhorned ef7e057fd9 Make demos be named edemoXXX.edm, XXX ranging from 000 to 999.
Also, don't stop playback cycling at the 10th demo and show the demo
number when beginning to record one.

git-svn-id: https://svn.eduke32.com/eduke32@3003 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:28 +00:00
helixhorned a1aac0480b Fix entering the game from within a demo, but don't enable it.
git-svn-id: https://svn.eduke32.com/eduke32@3002 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:26 +00:00
helixhorned 312609d9ab demo.c: minor cleanup; comment the G_PlaybackDemo() a little.
git-svn-id: https://svn.eduke32.com/eduke32@3001 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-08 22:18:22 +00:00
helixhorned 7305fbbae9 Add macro CON_ERRPRINTF(Fmt, ...) and use that everywhere.
git-svn-id: https://svn.eduke32.com/eduke32@3000 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-05 17:25:47 +00:00
helixhorned 1729f8fa38 Factor out some repeated code into G_{Load,Save}PlayerMaybeMulti.
This currently says that MP saving/loading isn't supported, but doesn't
really work correctly.  Also, properly bound-check the immediate argument
to CON's 'save' command and one more ... -> G_HandleAsync().

git-svn-id: https://svn.eduke32.com/eduke32@2999 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-05 17:25:43 +00:00
helixhorned 0665d961d2 Use Bstrncpyz in 1 place; fix displaying err msg if write-opening savegame fails
git-svn-id: https://svn.eduke32.com/eduke32@2998 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-05 17:25:40 +00:00
helixhorned bb5d3496ee Factor out snprintf'ing a maybe-modDir'd file name into macro G_ModDirSnprintf().
... and use it in three places. In two of these uses,
1) CON {read,write}arrayfromfile and
2) G_SavePlayer,
display an error message if the file name such generated is too long.

In the CON commands of 1), also error out if the file couldn't be opened.

git-svn-id: https://svn.eduke32.com/eduke32@2997 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-05 17:25:37 +00:00
helixhorned e417274c1e Move G_HandleAsync() into game.h as 'static inline' and use everywhere else.
git-svn-id: https://svn.eduke32.com/eduke32@2996 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-05 17:25:34 +00:00
helixhorned 9311432cbf Fix crash when recording demo, stooping it, going to title screen, and exiting.
A macro MAYBE_FCLOSE_AND_NULL(fileptr) is introduced in compat.h that does
what it says.

git-svn-id: https://svn.eduke32.com/eduke32@2995 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-05 17:25:31 +00:00
helixhorned 667de29e01 Demo: rename some functions for new-style conventions, functionize one marco...
git-svn-id: https://svn.eduke32.com/eduke32@2994 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-05 17:25:26 +00:00
terminx a0d993c900 Rename a couple functions local to actors.c, remove IFHITSECT macro. This is mostly a test commit to make sure our CIA.vc script is properly updated now.
git-svn-id: https://svn.eduke32.com/eduke32@2993 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:30:32 +00:00
helixhorned 202d544f14 compat.h: tweak indentation of some preprocessing directives.
git-svn-id: https://svn.eduke32.com/eduke32@2992 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:13:06 +00:00
helixhorned 72b73f6356 Make getangle() a __fastcall function instead of static inline.
This trims four 4k pages of code from the release EDuke32 build and
one page from Mapster32.

git-svn-id: https://svn.eduke32.com/eduke32@2991 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:12:01 +00:00
helixhorned 1fdc464568 In dosetaspect(), bail out calculating radarang2[] instead of failing assertion.
When this happens, parallaxmodes other than 0 will be unavailable and silently
draw as parallaxmode 0.  This usually happens with extremely wide resolutions.

git-svn-id: https://svn.eduke32.com/eduke32@2990 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:10:55 +00:00
helixhorned dd681886c3 Add lunatic/test/tables.lua, which was used to compare the calc'd sin/atan values.
git-svn-id: https://svn.eduke32.com/eduke32@2989 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:09:49 +00:00
helixhorned ee39d713e8 Calculate sine and arctan tables, getting rid of TABLES.DAT dependency.
We're pulling stuff from math.h even in non-GL builds right now, so
adding libc's sin() and atan() doesn't seem like a big deal.  In the
unlikely event that their accuracy is so bad that the calculated tables
don't match the original ones, a warning is issued on little-endian
platforms.

git-svn-id: https://svn.eduke32.com/eduke32@2988 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:08:43 +00:00
helixhorned 5bca5f59ad Move #define PI from to build.h, add bound-checking assertion in dosetaspect().
git-svn-id: https://svn.eduke32.com/eduke32@2987 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:07:36 +00:00
helixhorned 52bb35361b Some [U]INT_MAX --> [U]INT32_MAX.
git-svn-id: https://svn.eduke32.com/eduke32@2986 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:06:30 +00:00
helixhorned 7f74880c96 Move #include <math.h> from polymer.h to polymer.c.
git-svn-id: https://svn.eduke32.com/eduke32@2985 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:05:23 +00:00
helixhorned 6fe5eb2863 Clean up A_FindPlayer(), constify some function args, some 0x7fffffff->INT32_MAX
git-svn-id: https://svn.eduke32.com/eduke32@2984 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:04:16 +00:00
helixhorned 59151dd045 player.c: factor out 7x similar code into GetAutoAimAngle().
This is one of the cases where the duplicated code has minor modifications
at each site. These are handled by function args here.

git-svn-id: https://svn.eduke32.com/eduke32@2983 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:03:10 +00:00
helixhorned a9d3103373 Remove commented out AI Duke opponent code.
git-svn-id: https://svn.eduke32.com/eduke32@2982 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:02:04 +00:00
helixhorned b8ed142c6b Remove some #if 0 blocks that are probably of no interest any more.
For reference, they are the following:
 - cache1d.c: suckcache()
 - build.c: compare_wall_coords()
 - make switch-invisible heuristic
 - Mapster32: old sprite search
 - Mapster32: manual z range
 - m32script: read/writearray, qgetsysstr
 - menus.c: savetemp()

git-svn-id: https://svn.eduke32.com/eduke32@2981 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 14:00:58 +00:00
helixhorned e4bb83cd39 player.c: factor out inline checks for shootable switch picnums.
git-svn-id: https://svn.eduke32.com/eduke32@2980 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 13:59:50 +00:00
helixhorned 08a19e19f3 player.c: factor out multiple instances of a 3-liner into A_SetHitData().
Playing around with Coccinelle's semantic patches... be prepared for more.

git-svn-id: https://svn.eduke32.com/eduke32@2979 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 13:58:45 +00:00
helixhorned 8efcc81096 Remove some unneeded NULL checks.
Found by http://coccinelle.lip6.fr/rules/notnull.cocci

git-svn-id: https://svn.eduke32.com/eduke32@2978 1a8010ca-5511-0410-912e-c29ae57300e0
2012-09-02 13:57:39 +00:00
helixhorned 26c540e736 Fix "shooting" tripbombs from non-players such as the SE shooter.
Well, this never worked anyway, but invoking demons flying out of your
nose is never a good idea.

git-svn-id: https://svn.eduke32.com/eduke32@2977 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-28 21:42:49 +00:00
hendricks266 3c5aeae341 Modify EVENT_CHANGEWEAPON so that it actually serves a purpose. Instead of being triggered before curr_weapon is changed, with nothing used for input or output with RETURN (meaning you could not cancel), now RETURN is set to the prospective new weapon ID and you can change it or cancel it in the event.
Note that since setting RETURN did nothing before, there is no backwards compatibility to uphold. Therefore, setting RETURN to 1 will cause the pistol to be selected, not disable the event. Set RETURN to -1 to cancel switching.

git-svn-id: https://svn.eduke32.com/eduke32@2976 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-27 03:53:59 +00:00
hendricks266 a0dc378eda Expand "Switch weapons on pickup" to three options: "Off", "All weapons", and a new one, "Fav priority". It switches to the weapon you have just picked up only if it is ranked higher in the favorite weapon hierarchy using the "-u" parameter.
Suggested at: http://forums.duke4.net/topic/5667-tiny-request/

git-svn-id: https://svn.eduke32.com/eduke32@2975 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-27 03:52:38 +00:00
hendricks266 574f83dc76 The Build tools no longer link with SDL or SDL_mixer because they don't need to.
Fix for: http://forums.duke4.net/topic/5392-mkpalette-fails-to-build/page__view__findpost__p__132791

git-svn-id: https://svn.eduke32.com/eduke32@2974 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-27 03:51:17 +00:00
hendricks266 2620738eb9 Add EVENT_PREGAME. Now all sprites are processed in the following fashion:
1. EVENT_PREGAME
2. hardcoded stuff
3. EVENT_GAME

One potential use is to examine values which are clobbered by commands such as ifhitweapon/ifwasweapon.

git-svn-id: https://svn.eduke32.com/eduke32@2973 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-27 03:49:55 +00:00
hendricks266 6650f34105 Disable questionable lines from Makefile.common that were causing my build system to deep crash.
git-svn-id: https://svn.eduke32.com/eduke32@2972 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-27 03:48:27 +00:00
helixhorned ffa4e8ebb3 Quit the game if SE17 (warp elevator) setup fails.
The spawn-time SE 17 setup uses nextsectorneighborz() which can fail
(return -1) on some circumstances and would cause an OOB sector[] access.

git-svn-id: https://svn.eduke32.com/eduke32@2971 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-26 22:17:14 +00:00
helixhorned 2b58c6de4c Replace some literal numbers denoting SEs/STs by symbolic enumeration values.
git-svn-id: https://svn.eduke32.com/eduke32@2970 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-26 22:16:08 +00:00
helixhorned 41f2535e91 engine.c: rewrite nextsectorneighborz() for clarity.
git-svn-id: https://svn.eduke32.com/eduke32@2969 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-26 22:15:02 +00:00
helixhorned 948b4f82fc build.lua map loader: add the option of canonicalizing sprite order.
This is mostly for debugging, since currently, Mapster32 restores sprites
not in the same order as the original sprite index order.  Also, expose
this option from map2text.lua and mapdiff.sh.

git-svn-id: https://svn.eduke32.com/eduke32@2968 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-26 22:13:57 +00:00
helixhorned b73d16b8cc foreachmap.lua: add -e"some code..." switch to execute code from the cmdline.
git-svn-id: https://svn.eduke32.com/eduke32@2967 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-26 22:12:51 +00:00
helixhorned a7eaac1add build.lua: add 'numbunches' field to map loader.
git-svn-id: https://svn.eduke32.com/eduke32@2966 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-26 22:11:46 +00:00
helixhorned 948a716229 Mapster32: for c&p-ing map portions w/o TROR, fix wrongly resetting wall lotag/extra
git-svn-id: https://svn.eduke32.com/eduke32@2965 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-26 22:10:40 +00:00
helixhorned f133be4ae8 Add map2text.lua and helper script mapdiff.sh.
git-svn-id: https://svn.eduke32.com/eduke32@2964 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-26 22:09:34 +00:00
helixhorned acdb7c139c Mapster32: for copy-pasting map portions without TROR, fix wrongly resetting xpanning.
This is really an artifact of overloading the sector fields for different uses.
For copy-pasting TROR'd portions, the bug still persists.

git-svn-id: https://svn.eduke32.com/eduke32@2963 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-26 22:08:27 +00:00
helixhorned 4724f5d18c On Linux build without startup GUI, don't save ModDir to config.
git-svn-id: https://svn.eduke32.com/eduke32@2962 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-24 18:55:06 +00:00
helixhorned 9abc415a24 A couple of trivial changes.
git-svn-id: https://svn.eduke32.com/eduke32@2961 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-24 18:54:01 +00:00
helixhorned a8af22ba9a Fix stack corruption when demo was attempted to be written with non-empty mod dir.
git-svn-id: https://svn.eduke32.com/eduke32@2960 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-24 18:52:55 +00:00
helixhorned 1f5971a4db If r_screenaspect is 0 (or any other invalid value), assume square pixel aspect.
git-svn-id: https://svn.eduke32.com/eduke32@2959 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-24 18:51:49 +00:00
helixhorned de199a4741 osxbuild.sh: add 'debughelix' preset, building only x64 debug packages.
git-svn-id: https://svn.eduke32.com/eduke32@2958 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-24 18:49:13 +00:00
helixhorned 772778205b Pack how many players fake multi was started with into g_fakeMultiMode.
git-svn-id: https://svn.eduke32.com/eduke32@2957 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-22 22:51:38 +00:00
helixhorned 95de2abb3a splitscreen: don't wrongly change pitch for sounds originating from 2nd player.
For example, if the first one is underwater.

git-svn-id: https://svn.eduke32.com/eduke32@2956 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-22 22:50:32 +00:00
helixhorned 481a986a30 splitscreen: tweak base palette application, remove resp. code from splitscr.con.
Basically, base palettes with lower indices trump higher ones.  For example,
when one player is underwater and the other above, the normal palette takes
precedence.

git-svn-id: https://svn.eduke32.com/eduke32@2955 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-22 22:49:27 +00:00
helixhorned 96acc3dc52 Generalize fullscreen tint application to more than one tint.
Currently, the only kinds of tint that can be applied simultaneously are
one "palfrom" per player, plus one loogie tint per player.  Each palfrom
still overrides the preceding one.  However, this is not a big problem IMO
since palfroms decrease at the same rate (loogie tint decreases at half the
speed).  This change is especially good for the splitscreen mod, since now
the tints of the two players won't compete with each other.  See the comment
in the source for some properties of the blending formula.

git-svn-id: https://svn.eduke32.com/eduke32@2954 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-22 22:48:21 +00:00
helixhorned ef8adcc51f Don't clear loogie tint transiently on changing palette.
git-svn-id: https://svn.eduke32.com/eduke32@2953 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-22 22:47:16 +00:00
helixhorned a53e9b60d8 Keep full-screen tints through palette changes again.
A debug macro to test tints being stuck at the least intense non-zero value
is provided in engine.c.

git-svn-id: https://svn.eduke32.com/eduke32@2952 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-22 22:46:09 +00:00
helixhorned 19c2c57ffb Make a colored REACTOR/REACTOR2 sprite disappear in single player again.
Noted by Nukey.  See Duke3D 1.5 GAME.C line 4220.

git-svn-id: https://svn.eduke32.com/eduke32@2951 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-21 17:40:05 +00:00
helixhorned d2d10a4c4c splitscreen: print "reserved" quotes in the upper half of the screen.
Reverved quotes are ones like "Killed by xxx". Since they're only
shown for the first player for now, printing them in the upper part
makes more sense (in above/below split, the first player is above).

git-svn-id: https://svn.eduke32.com/eduke32@2950 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-21 17:39:00 +00:00
helixhorned 5d83f679dd splitscreen: tweak weapon selection to do the expected thing for shrinker/grower.
git-svn-id: https://svn.eduke32.com/eduke32@2949 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-21 17:37:54 +00:00
helixhorned 6953dbd964 Print quotes for both players in fake multi, remove quote code in splitscr.con.
git-svn-id: https://svn.eduke32.com/eduke32@2948 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:32:11 +00:00
helixhorned bb02f861e4 game.c: clean up G_PrintGameText() a little.
git-svn-id: https://svn.eduke32.com/eduke32@2947 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:31:05 +00:00
helixhorned 75457adaab game.c: clean up G_PrintGameQuotes().
git-svn-id: https://svn.eduke32.com/eduke32@2946 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:30:00 +00:00
helixhorned 60b876aa46 splitscreen: handle crosshairs for above/below split and regard crosshairscale.
git-svn-id: https://svn.eduke32.com/eduke32@2945 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:29:54 +00:00
helixhorned b6090152ac splitscreen: support for above/below screen split.
To enable it, the HUD-less (maximized) screen size must be selected.

git-svn-id: https://svn.eduke32.com/eduke32@2944 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:28:48 +00:00
helixhorned 13178b7cda Mapster32: properly reset highlights in undo/redo.
git-svn-id: https://svn.eduke32.com/eduke32@2943 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:27:42 +00:00
helixhorned eba4a3b722 Mapster32: with highlighted sectors, print rot. angle; Alt + [,]: manual angle.
Because rotating sectors "smoothly" by 1 BUILD ang will quickly accumulate
roundoff error, this lets the user first do that as a preview and then use the
manual angle rotation do carry it out for real.

git-svn-id: https://svn.eduke32.com/eduke32@2942 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:26:36 +00:00
helixhorned 6ed50e7170 Mapster32: use the rotatepoint code for both smooth and 90-degree sect. rotation.
git-svn-id: https://svn.eduke32.com/eduke32@2941 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:26:00 +00:00
helixhorned 7807f35691 control layer: comment out some unused functions and stuff.
git-svn-id: https://svn.eduke32.com/eduke32@2940 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:24:54 +00:00
helixhorned d24aad08dc splitscreen: tweak view drawing: use player's cursectnum and simulate z clamping.
Using the players's cursectnum instead of "updating" the sectnum means that it
won't glitch on SoS.  The z clamping (basically a port of some code from
G_DrawRooms) is so that the view won't be drawn from under the floor when shrunk.

git-svn-id: https://svn.eduke32.com/eduke32@2939 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:23:48 +00:00
helixhorned 627476541b In G_DisplayRest, be sure to always un-apply a previously applied tint.
This fixes the screen keeping the bluish tint even after shattering a
frozen player in the splitscreen mod.

git-svn-id: https://svn.eduke32.com/eduke32@2938 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-20 21:22:41 +00:00
helixhorned 28cc08a65f Fix two "may be used uninitialized" warnings (they can't, as far as I can see).
git-svn-id: https://svn.eduke32.com/eduke32@2937 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 13:02:47 +00:00
helixhorned 1f858e8fc7 fake multi: don't display name when aiming at opponents.
git-svn-id: https://svn.eduke32.com/eduke32@2936 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 13:02:43 +00:00
helixhorned dc3a523eed Fake multi: fix display of item percentage and on/off states.
git-svn-id: https://svn.eduke32.com/eduke32@2935 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 13:02:37 +00:00
helixhorned 5e6642df2a Display the firsts-when-shrunk hud-weaponscaled, tweak for fake multi.
git-svn-id: https://svn.eduke32.com/eduke32@2934 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 13:01:30 +00:00
helixhorned 1ac7dd16be Make the scuba HUD be affected by hud_weaponscale, tweak for fake multi.
git-svn-id: https://svn.eduke32.com/eduke32@2933 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 13:01:24 +00:00
helixhorned 04ff274f77 Display the nukebutton punching fist with viewport clipping bounds.
Using rotatesprite with bit 8 clear (scale to viewport) but using
fullscreen clipping bounds is never what we want.  Also, tweak for
fake multi.

git-svn-id: https://svn.eduke32.com/eduke32@2932 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 13:00:19 +00:00
helixhorned 5806582805 Fake multi: draw the HUD weapons and status bar with the proper aspect.
This uses the new rotatesprite bit introduced earlier.  Also, allow the
HUD-less screen size.

git-svn-id: https://svn.eduke32.com/eduke32@2931 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 13:00:08 +00:00
helixhorned eca0959740 player.c: In G_DrawTileScaled, lose bit 1024 (prior to r1658, bit 256).
I checked all direct and transitive uses of that function and am fairly
confident that it is never used.

git-svn-id: https://svn.eduke32.com/eduke32@2930 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:59:03 +00:00
helixhorned 99160ede88 Introduce additional rotatesprite bit for internal use and mask ext. ones from CON.
ROTATESPRITE_MAX is moved to build.h and all orientation bits from CON commands
using rotatesprite are ANDed with (ROTATESPRITE_MAX-1).  Some of the functions
use ROTATESPRITE_MAX for different internal purposes, which will not be exposed
to CON now (a good thing).  Also, dorotspr_handle_bit2 is made clearer.

git-svn-id: https://svn.eduke32.com/eduke32@2929 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:57:57 +00:00
helixhorned 88eb1fac78 Clean up a couple of rotatesprite uses.
The black translucent background underneath the user map list will now
be drawn with a shade 32 tile 0 instead of tile BLANK, since I've seen
the latter being replaced in some mod. Also, it will look the same
regardless of screen aspect.

git-svn-id: https://svn.eduke32.com/eduke32@2928 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:56:51 +00:00
helixhorned b07b540c0b Restucture dorotspr_handle_bit2().
This also fixes the OSD with aspects < 4/3. I broke that, too.

git-svn-id: https://svn.eduke32.com/eduke32@2927 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:55:45 +00:00
helixhorned d83de40608 Always draw the full original status bar fully instead of in patches.
It seems like I broke the blitty/patchy way of drawing it with one of
the last commits.

git-svn-id: https://svn.eduke32.com/eduke32@2926 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:55:35 +00:00
helixhorned ea74aad3a6 Some g_netServer || g_netServer --> g_netServer.
git-svn-id: https://svn.eduke32.com/eduke32@2925 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:54:30 +00:00
helixhorned 9caf442177 In places where fullscreen tiles are drawn (logo etc.), use clearallviews().
This really fixes clearing the borders to the left and right with widescreen
and hud_bgstretch=0.  Also, it seems to fix glitches when the "screen size"
is small (ud.screen_size is large).

git-svn-id: https://svn.eduke32.com/eduke32@2924 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:53:24 +00:00
helixhorned e9095c8470 Lunatic: rotatesprite+test, player access, misc.
git-svn-id: https://svn.eduke32.com/eduke32@2923 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:52:18 +00:00
helixhorned df591aba1c mdsprite.c: factor out two instances of identical code.
git-svn-id: https://svn.eduke32.com/eduke32@2922 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:52:10 +00:00
helixhorned 60a03c2fb3 Clean up handling of widescreen bits in dorotatesprite functions.
Don't call setaspect from them, because the only thing that's needed is
(in classic) yxaspect and xyaspect.  Pass these from the helper function
defined earlier instead.

git-svn-id: https://svn.eduke32.com/eduke32@2921 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:51:04 +00:00
helixhorned e014246d82 player.c: fix a check of md_tilehasmodel return value against >0 (should be >=0)
git-svn-id: https://svn.eduke32.com/eduke32@2920 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:50:42 +00:00
helixhorned 020f261015 Clean up polymost_dorotatesprite a little (triv. changes only)
git-svn-id: https://svn.eduke32.com/eduke32@2919 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:49:37 +00:00
helixhorned aadfd49435 In polymost_dorotatesprite, don't set [xy]dimen to [xy]dim temporarily.
This fixes stuff like the HUD chaingun with widescreen and small "screen sizes"
(in-game viewport). It also makes rotatesprite behave more like classic overall.
I have no idea why it was there in the first place.

git-svn-id: https://svn.eduke32.com/eduke32@2918 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:48:31 +00:00
helixhorned 6253113476 Clean up player.c's weapon display code (no functional changes).
git-svn-id: https://svn.eduke32.com/eduke32@2917 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 12:47:55 +00:00
terminx 71fc24c0f7 OpenBSD build fix from Brad Smith (plus a couple of irrelevant changes to the same file from my local tree)
git-svn-id: https://svn.eduke32.com/eduke32@2916 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-19 04:01:04 +00:00
helixhorned 8d3db58950 splitscreen: rewrite special weapons cycling, don't cycle to foot.
git-svn-id: https://svn.eduke32.com/eduke32@2915 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:49:01 +00:00
helixhorned a5d68d46f0 Redraw background when ud.screen_size >= 8, unconditional on ud.statusbarscale.
Classic HUD now has correct aspect in widescreen modes, so with the full status
bar, there may be patches of free room left to the left and right.

git-svn-id: https://svn.eduke32.com/eduke32@2914 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:58 +00:00
helixhorned 786df72c6d In setaspect_new, determine the aspect with {x,y}dim again except for showview.
setaspect(), which is called by setaspect_new, already uses the *dimen variables,
so it's the same thing done twice.  Now, a change from the original full status
bar to the original mini status bar keeps the horizontal FOV again and only
bumps the view a little higher, as with the classic aspect determination.

git-svn-id: https://svn.eduke32.com/eduke32@2913 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:56 +00:00
helixhorned 008c93636c Clear the screen first in some non-in-game places, also in classic.
Compare with revision 2584.

git-svn-id: https://svn.eduke32.com/eduke32@2912 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:52 +00:00
helixhorned ecf277c70e Factor out Polymost's widescreen bit handling code and use it in classic, too.
This means that classic and the GL modes now look the same as far as e.g.
hud_bgstretch or HUD weapons are concerned.

git-svn-id: https://svn.eduke32.com/eduke32@2911 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:50 +00:00
helixhorned 08260dbf25 polymost.c: rewite widescreen bit code, part 2.
Use integer math; both args to setaspect are constant.

git-svn-id: https://svn.eduke32.com/eduke32@2910 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:46 +00:00
helixhorned 20ccab9022 Clean up classic's and Polymost's dorotatesprite functions (triv. changes only)
git-svn-id: https://svn.eduke32.com/eduke32@2909 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:44 +00:00
helixhorned 8ac85eef54 polymost.c: rewrite dorotatesprite's widescreen bit handling (256,512,1024).
Instead of setting and resetting the [xy]dim globals, use them as locals
in a block (shadowing the globals).  Also, do some common subexpression
elimination for clarity.

git-svn-id: https://svn.eduke32.com/eduke32@2908 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:41 +00:00
helixhorned 21ee6fadc0 splitscreen: use updatesector instead of *z.
When shrunk, the player position is below the floor for some weird reason.
Updatesectorz would set the sector to -1, and the view would not be drawn.

git-svn-id: https://svn.eduke32.com/eduke32@2907 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:38 +00:00
helixhorned 1e74199bde splitscreen: remove weapon item drawing code.
git-svn-id: https://svn.eduke32.com/eduke32@2906 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:36 +00:00
helixhorned ad88878328 fake multi: draw weapons for both players.
git-svn-id: https://svn.eduke32.com/eduke32@2905 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:33 +00:00
helixhorned 9d3d7bfe2f splitscreen: remove HUD drawing code, draw view from EVENT_DISPLAYROOMS.
git-svn-id: https://svn.eduke32.com/eduke32@2904 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:31 +00:00
helixhorned d60bffd35d In fake multi, never draw the screen rotated.
git-svn-id: https://svn.eduke32.com/eduke32@2903 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:28 +00:00
helixhorned 4fc1376fcb Splitscreen hack: draw status bar for both players.
git-svn-id: https://svn.eduke32.com/eduke32@2902 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:26 +00:00
helixhorned 400a1ba895 Always draw the frag bar in fake multi.
git-svn-id: https://svn.eduke32.com/eduke32@2901 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:23 +00:00
helixhorned 4076f5a1c4 In fake multi-mode, always draw the original mini status bar.
git-svn-id: https://svn.eduke32.com/eduke32@2900 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:21 +00:00
helixhorned fca10f420a splitscreen: update to modified version posted at the Duke4.net forums.
git-svn-id: https://svn.eduke32.com/eduke32@2899 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:18 +00:00
helixhorned 84c69b5327 Add original splitscreen mod by Bloodclaw for reference.
git-svn-id: https://svn.eduke32.com/eduke32@2898 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:16 +00:00
helixhorned c6f30669b1 Fake multi-mode: better -q* messages, make surplus APLAYER sprites invisible.
Also, change type of g_numPlayerSprites (global and mapstate) from inconsistent
uint8_t/char to int8_t.

git-svn-id: https://svn.eduke32.com/eduke32@2897 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:13 +00:00
helixhorned 2913ee5211 Clean up build.h and status bar drawing code in game.c.
git-svn-id: https://svn.eduke32.com/eduke32@2896 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-16 21:48:08 +00:00
helixhorned 32d721a055 CON: in showview*, use new aspect determination if r_usenewaspect is 1.
git-svn-id: https://svn.eduke32.com/eduke32@2895 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:26:18 +00:00
helixhorned d6e0009ec0 engine: in setaspect_new, determine the aspect with {x,y}dimen instead of {x,y}dim.
That is, use the view boundries instead of the whole screen.

git-svn-id: https://svn.eduke32.com/eduke32@2894 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:26:16 +00:00
helixhorned 6aad2578a3 Rewrite the EVENT_ANIMATESPRITES loop (G_DoEventAnimSprites calls) for clarity.
git-svn-id: https://svn.eduke32.com/eduke32@2893 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:26:13 +00:00
helixhorned 0aec79ef8f game.c: factor out 2 inst. of dup. code into G_DoEventAnimSprites().
git-svn-id: https://svn.eduke32.com/eduke32@2892 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:26:11 +00:00
helixhorned 27ebcc41b4 Hack for fake multimode/splitscreen: also draw mirrors from showview*.
See the source for why this hack is ugly.

git-svn-id: https://svn.eduke32.com/eduke32@2891 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:26:08 +00:00
helixhorned cb812625a7 CON: in fake multi-mode, play 'globalsound' even if player index isn't screenpeek.
This makes sounds like DUKE_GET (item pickup) be heard for the second player
in the splitscreen mod, too.

git-svn-id: https://svn.eduke32.com/eduke32@2890 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:26:06 +00:00
helixhorned d1e9116c23 If a value of 1 is returned from EVENT_DISPLAYROOMS, don't draw them.
This includes mirrors, rooms and masks.  Any value other than 0 or 1
that is returned is considered an error (reserved for future use).

git-svn-id: https://svn.eduke32.com/eduke32@2889 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:26:03 +00:00
helixhorned 0cac20c2d6 Fix mirrors in Polymost.
git-svn-id: https://svn.eduke32.com/eduke32@2888 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:26:01 +00:00
helixhorned e420dc84bd Clean up G_MoveFX() a little.
git-svn-id: https://svn.eduke32.com/eduke32@2887 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:25:59 +00:00
helixhorned b93deba4c2 Splitscreen mod hacks: handle screen tinting from both players.
Of course, it still affects the whole screen.  Handles pain and lizard spit.

git-svn-id: https://svn.eduke32.com/eduke32@2886 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:25:56 +00:00
helixhorned 8039db5ff2 Hacks for the splitscreen mod: play sounds from both players.
The sound distance is the minimum of the two.  Both point sources as well
as MUSICANDSFX ambient sound is handled.

git-svn-id: https://svn.eduke32.com/eduke32@2885 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:25:53 +00:00
helixhorned af05fe18be sounds.c: Factor out duplicate code into S_CalcDistAndAng().
The two instances in S_PlaySound3D() and S_Update() were slightly
different as far as sequencing is concerned.  However, I think making
it the same has only benefits and may fix some popping sounds when
starting to play a sound and updating it with a different distance
value on the second buffer fill.

git-svn-id: https://svn.eduke32.com/eduke32@2884 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:25:51 +00:00
helixhorned 847c886c14 First round of sounds.c cleanup, no functional changes.
git-svn-id: https://svn.eduke32.com/eduke32@2883 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:25:48 +00:00
helixhorned 458b202ce3 Also draw TROR from showview* commands.
git-svn-id: https://svn.eduke32.com/eduke32@2882 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:25:46 +00:00
helixhorned 21a9cb3581 Rename args in G_DoSpriteAnimations(), for easier grepping.
git-svn-id: https://svn.eduke32.com/eduke32@2881 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:25:40 +00:00
helixhorned 2b2be071d4 High-level TROR drawing: clean up how things are passed around.
git-svn-id: https://svn.eduke32.com/eduke32@2880 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:25:37 +00:00
helixhorned 8eafee0636 Resurrect fake multiplayer mode a little (no bots).
Just enough so that Bloodclaw's splitscreen mod can be played.

git-svn-id: https://svn.eduke32.com/eduke32@2879 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:25:32 +00:00
helixhorned a19dcdc48e Correct premap.c's clearfrags().
The story: Duke3D 1.5 source had "short frags[MAXPLAYERS][MAXPLAYERS]" and
"clearbufbyte(&frags[0][0],(MAXPLAYERS*MAXPLAYERS)<<1,0L);". In r1625,
g_player[].frags[MAXPLAYERS] was changed from an array of int32_t to one of
uint8_t, but the clearing code
("clearbufbyte(&g_player[i].frags[0],MAXPLAYERS<<1,0L);") stayed. In r2201, I
rewrote clearfrags() under the assumption that it really is supposed to clear
stuff beyond .frags[].
The moral:
1. Write clean code.
2. Use sizeof.
3. Write clean code!

git-svn-id: https://svn.eduke32.com/eduke32@2878 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-13 18:25:28 +00:00
helixhorned 4dca439d8f Text-repl.: hitinfo variables -> hit, hit{sprite,sect,wall} members -> no "hit"
This makes the code rather more readable in some places.  Unlike the two
preceding commits, this one is actually purely textual replacement.

git-svn-id: https://svn.eduke32.com/eduke32@2877 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-10 19:12:01 +00:00
helixhorned 971d816235 Mass text replacement g_player[p].ps --> ps, part 2 (harder)
Functions affected are G_Move* in actors.c and A_Shoot in player.c.
Here, the p variable had function scope, now it's redeclared in shorter
blocks. I'm still relatively sure that no observable behavior was changed,
though not as sure as in part 1.  Also, some dead assignments and the like
are eliminated.

git-svn-id: https://svn.eduke32.com/eduke32@2876 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-10 19:11:56 +00:00
helixhorned e1d6fe534d Mass text replacement g_player[p].ps --> ps, part 1 (the easy one).
The p variable (sometimes named differently) has short scope in all cases,
so I'm almost sure that the replacements amount to an identity transformation.

git-svn-id: https://svn.eduke32.com/eduke32@2875 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-10 19:11:53 +00:00
helixhorned 689788c65b actors.c: factor out 4 instances of id. code (up to args) into nudge_player().
git-svn-id: https://svn.eduke32.com/eduke32@2874 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-10 19:11:49 +00:00
helixhorned 5084d08249 CON: factor out addammo/addweapon{,var} common code, harden addweaponvar...
... against invalid weapon indices and arguments accessed from arrays/structs.

git-svn-id: https://svn.eduke32.com/eduke32@2873 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-10 19:11:47 +00:00
helixhorned 26df580dac Lunatic: rewrite bitar to use arrays of int32, more convenience ops.
git-svn-id: https://svn.eduke32.com/eduke32@2872 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-10 19:11:43 +00:00
helixhorned 761c2d1c84 Lunatic: reflect the preceding rename in the sources.
git-svn-id: https://svn.eduke32.com/eduke32@2871 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-08 19:32:45 +00:00
helixhorned 00e99b2207 Rename a certain file to appease Windows file systems.
git-svn-id: https://svn.eduke32.com/eduke32@2870 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-08 19:32:40 +00:00
helixhorned 7f4eb4f5c3 Lunatic: implement a couple more 1.5 commands.
git-svn-id: https://svn.eduke32.com/eduke32@2869 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-08 19:32:35 +00:00
helixhorned 8fa80701bb Fix tile CAMERA1+4 being not changed to a CAMERA1 on spawn.
git-svn-id: https://svn.eduke32.com/eduke32@2868 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-07 13:09:00 +00:00
helixhorned af626df86b Fix slimers not disappearing on dnmonsters cheat, display 2nd 'on' state.
git-svn-id: https://svn.eduke32.com/eduke32@2867 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-07 13:08:57 +00:00
helixhorned 8f61b72ca2 Mapster32: add "extend all highlighted sectors" func to 'F menu via a.m32.
git-svn-id: https://svn.eduke32.com/eduke32@2866 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-06 20:00:35 +00:00
helixhorned 936ef3424b Clean up game.c and actors.c.
git-svn-id: https://svn.eduke32.com/eduke32@2865 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-06 20:00:31 +00:00
helixhorned f3970f9ac7 Lunatic: clean up handing of ac/mv internally, add control module.
git-svn-id: https://svn.eduke32.com/eduke32@2864 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-06 20:00:29 +00:00
helixhorned b983ec7b49 Lunatic: cleanup
git-svn-id: https://svn.eduke32.com/eduke32@2863 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-06 20:00:23 +00:00
helixhorned f4c7e3f77e Lunatic: 'bitar': rewrite ops for colon syntax, serialization, set ops.
git-svn-id: https://svn.eduke32.com/eduke32@2862 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:44 +00:00
helixhorned 569f0dbe7c sdlayer.c: Add high-resolution timer for OS X, using mach_absolute_time().
git-svn-id: https://svn.eduke32.com/eduke32@2861 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:41 +00:00
helixhorned b7cfd2fe2c Lunatic: fix build on OS X, pass LUNATIC define to build/ sources.
git-svn-id: https://svn.eduke32.com/eduke32@2860 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:38 +00:00
helixhorned 86a3603edd Lunatic: fix hex literal parsing on Windows, add two comments.
git-svn-id: https://svn.eduke32.com/eduke32@2859 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:35 +00:00
helixhorned a00f411b3b Lunatic: add 'stat' module for running statistics.
Also, rewrite the mapastats iterator and the LIZTROOP hitscan timing
in terms of that.

git-svn-id: https://svn.eduke32.com/eduke32@2858 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:32 +00:00
helixhorned fdfcca557b Lunatic: add 'randgen' module, implementing an encapsulated JKISS PRNG.
Also fix error handling path in our_require(), i.e. when loadstring fails.

git-svn-id: https://svn.eduke32.com/eduke32@2857 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:28 +00:00
helixhorned e7d3dcba78 gethitickms(): replace division by multiplication.
git-svn-id: https://svn.eduke32.com/eduke32@2856 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:25 +00:00
helixhorned 69365f2a0b Lunatic: add 'geom' module, sporting a vec2 type and a general 'intersect' func.
git-svn-id: https://svn.eduke32.com/eduke32@2855 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:21 +00:00
helixhorned defe79216d Lunatic: update DukePlayer_t, fix build.
git-svn-id: https://svn.eduke32.com/eduke32@2854 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:17 +00:00
helixhorned f1ffd6d90a Factor out 5 instances of functionally identical code into G_ClearCameraView().
git-svn-id: https://svn.eduke32.com/eduke32@2853 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:13 +00:00
helixhorned 19d426ba02 OSX build: mighty tweak osxbuild.sh and link to LibPNG from Fink on x86_64.
The build script now has two more presets: helix and installtools
(which was previously attempted after the build; untested). Also,
 - when detecting git, run commands such that the SVN repo isn't accessed
 - package kextract, kgroup and arttool into tools/ in the zip
 - try to exit on failure in some places, though that doesn't seem to work

git-svn-id: https://svn.eduke32.com/eduke32@2852 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-29 23:35:12 +00:00
helixhorned b1f98d241e osxbuild.sh: factor out building commands and exit 1 on failure
git-svn-id: https://svn.eduke32.com/eduke32@2851 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-29 23:35:09 +00:00
helixhorned 109457994e Classic: on x86 GCC asm builds, fix crash with floor sprites of (x or y) size 2.
The idiv instruction also signals an FPE when the resulting *signed* quotient
overflows, so we simply use div instead.

git-svn-id: https://svn.eduke32.com/eduke32@2850 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-29 12:46:56 +00:00
helixhorned 0e6c83bb1b Lunatic: build fix on Windows and translator fix with 32-bit archs?
erratum in r2844 commit message:
ydim vs. bytesperline --> xdim vs. bytesperline

git-svn-id: https://svn.eduke32.com/eduke32@2849 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-25 18:56:18 +00:00
helixhorned 568f213de8 Add gethitickms() to the Windows layer.
git-svn-id: https://svn.eduke32.com/eduke32@2848 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-25 18:56:15 +00:00
helixhorned 25e25b71fd Make DukePlayer_t's transporter_hold an int16_t again.
This was narrowed to int8_t in r1625, breaking CON code that wanted
to lock the player for a longer time than 127 game tics.

git-svn-id: https://svn.eduke32.com/eduke32@2847 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-25 18:56:11 +00:00
helixhorned d20bb4e3a1 Prevent integer div-by-0 (SIGFPE) when drawing console background with void tiles.
The tiles used are BIGHOLE (1141) and VIEWBORDER (3250).  Ideally we'd draw the
console background using something specially-coded instead of rotatesprite if
it's fully black anyway.

git-svn-id: https://svn.eduke32.com/eduke32@2846 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-22 11:10:08 +00:00
helixhorned f39c4306ec Fix SHOW MAP ON/OFF message in the game.
git-svn-id: https://svn.eduke32.com/eduke32@2845 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:59 +00:00
helixhorned 49ab0eb6e9 PNG screenshots: fix oob read of malloc'd mem on Windows.
These could manifest themselves as garbage lines on the bottom and
happened because of the ydim vs. bytesperline discrepancy again.

git-svn-id: https://svn.eduke32.com/eduke32@2844 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:56 +00:00
helixhorned 2a2f56f510 Add custom-built lean zlib and libpng and enable PNG screenshots on Windows.
Instructions on how I built the libs are in Windows/src/minipng.dfa.

git-svn-id: https://svn.eduke32.com/eduke32@2843 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:53 +00:00
helixhorned b47c18518f Lunatic: time every event and actor call and print summary at game exit.
git-svn-id: https://svn.eduke32.com/eduke32@2842 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:44 +00:00
helixhorned 528ccbca4a Lunatic: add "bit array" helper module, rewrite the bit test in terms of that.
git-svn-id: https://svn.eduke32.com/eduke32@2841 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:40 +00:00
helixhorned 3c5e36feb4 Lunatic: protect user modules from tampering, too.
git-svn-id: https://svn.eduke32.com/eduke32@2840 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:37 +00:00
helixhorned ee9991adbd Lunatic: more bitop profiling; make undeclared-var reads forbidden in modules
git-svn-id: https://svn.eduke32.com/eduke32@2839 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:34 +00:00
helixhorned 1ffab1bf1a Lunatic: override 'error' so that a string is always returned to C.
git-svn-id: https://svn.eduke32.com/eduke32@2838 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:31 +00:00
helixhorned 55d474990f Lunatic: module(), require() for custom modules, bit op test from LJ homepage.
git-svn-id: https://svn.eduke32.com/eduke32@2837 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:28 +00:00
helixhorned a464527f8f In game.c's kopen4loadfrommod, use snprintf.
git-svn-id: https://svn.eduke32.com/eduke32@2836 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:24 +00:00
helixhorned a17cdd9d95 Polymer: fix underwalls being not animated (introduced in r2823).
git-svn-id: https://svn.eduke32.com/eduke32@2835 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-15 09:23:58 +00:00
helixhorned ba2a0c602e VP8: clamp GL texture to edge if possible, preventing potential stray lines
git-svn-id: https://svn.eduke32.com/eduke32@2834 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-13 18:21:00 +00:00
helixhorned f42ab0044f VP8: don't call I_ClearAllInput() before idle loop.
If input is cleared before, it can become impossible to cancel the video
when decoding and displaying a frame takes longer than a frame.

git-svn-id: https://svn.eduke32.com/eduke32@2833 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-13 18:20:58 +00:00
helixhorned 5802857eb7 VP8: collect times while playing the video and print a summary to the log afterwards.
git-svn-id: https://svn.eduke32.com/eduke32@2832 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-13 18:20:55 +00:00
helixhorned 0cb2d3e528 Update LibVPX prebuilt library and headers to git commit 3eb4143fc3381497128d.
The library was built with GCC 4.6.1 and configured like
 ./configure --disable-vp8-encoder --disable-multithread --disable-spatial-resampling

On the aforementioned AMD system, this reduces the mean time for decoding a frame
from 18.2 to 15.4 ms, so IMO it's worth the somewhat hefty addition of 430 Kb.

git-svn-id: https://svn.eduke32.com/eduke32@2831 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-13 18:20:52 +00:00
helixhorned 43fe858652 VP8: unroll 3 planes -> packed conversion loop.
On an AMD Phenom II X4 system with generic memory modules, this brings down
the mean time for this conversion from 16.5 to 10.5 ms.
(GCC 4.6.1, optimized build)

git-svn-id: https://svn.eduke32.com/eduke32@2830 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-13 18:20:43 +00:00
helixhorned cd1401fb52 Lunatic: extend must-fail tests with a check for the expected error messages.
git-svn-id: https://svn.eduke32.com/eduke32@2829 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-13 18:20:40 +00:00
helixhorned 91b7a10bd0 Lunatic: overridden 'require', currently for base modules only.
git-svn-id: https://svn.eduke32.com/eduke32@2828 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-13 18:20:38 +00:00
helixhorned b86dbc0818 Lunatic: make baselib functions used in defs.c local, be more disciplined with stack.
Also, print a backtrace if we return to C with an error.

git-svn-id: https://svn.eduke32.com/eduke32@2827 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-13 18:20:35 +00:00
helixhorned 420e61d0f8 a.m32: in collect_*_sectors from the 'F menu, start query with sector under mouse
git-svn-id: https://svn.eduke32.com/eduke32@2826 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-13 18:20:31 +00:00
Plagman 7e16357c68 Revert hightile factoring for now.
git-svn-id: https://svn.eduke32.com/eduke32@2825 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-11 04:39:01 +00:00
helixhorned 0482d67894 This should fix the "assignment discards 'const' qualifier" warning in music.c.
git-svn-id: https://svn.eduke32.com/eduke32@2824 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-09 19:00:23 +00:00
helixhorned 9000e23683 Polymer: simplify some code while I'm at it (equivalence tranformations only)
git-svn-id: https://svn.eduke32.com/eduke32@2823 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-09 19:00:21 +00:00
helixhorned d66856eeea Polymer: bring the ypanning correction for non-pow2 walls closer to Pmost's, pt2
This changes a constant inside the panning calculation from 256 to 255 (making
e.g. panning 255 and 0 the same in the "San Andreas fault" sign in E1L5) and
uses the correct reference wall for the "do panning correction?" conditional.
Now, the problematic walls should look the same as in Polymost.

git-svn-id: https://svn.eduke32.com/eduke32@2822 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-09 19:00:17 +00:00
helixhorned fe1a5fe2a6 Polymer: bring the ypanning correction for non-pow2 walls closer to Pmost's, pt1
This makes the corrections conditional on where they appear in (under-, over-,
white or mask wall).

git-svn-id: https://svn.eduke32.com/eduke32@2821 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-09 19:00:14 +00:00
helixhorned 6bafc7d176 a.m32: add some commented out example code for the screenshot functionality.
git-svn-id: https://svn.eduke32.com/eduke32@2820 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-08 21:49:31 +00:00
helixhorned 98f7be1ace Classic: draw walls with non-pow2 ysizes in the old fashion for the time being.
I'm willing to make this one concession to correctness in the name of backward-
compatibility.  I think that one reason why this has never cause a crash is that
tiles in BUILD are allocated in Ken's big allocache buffer, so oob accesses were
dampened by that (though they hit uninitialized data).

git-svn-id: https://svn.eduke32.com/eduke32@2819 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-08 21:47:25 +00:00
helixhorned e02843b133 m32script: EVENT_DRAW3DSCREEN, screenshot functonality.
The event is run after drawing the scene, but before the overlays. To
make a screenshot from a script, set DOSCRSHOT to non-zero. It will then
be scheduled to run once after the drawing but before the above-mentioned
event.  The screenshots will be called mcapXXXX.{png,tga}.

git-svn-id: https://svn.eduke32.com/eduke32@2818 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-08 21:47:23 +00:00
helixhorned f6c1c125ac Comment out printext256's GL mode fallback code.
This would only hit when polymost_printext256 erred out (mem alloc failure,
glGenTextures failure), i.e. "almost never".

Also, tweak a bound check in polymost_printext256.

git-svn-id: https://svn.eduke32.com/eduke32@2817 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-08 21:47:19 +00:00
helixhorned e71c7cc2a8 m32script: if printext256's <col> arg is negative, use editorcolors[-<col>].
The editor colors are the ones listed on page 9 of the Mapster32 built-in help.

git-svn-id: https://svn.eduke32.com/eduke32@2816 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-08 21:47:16 +00:00
helixhorned 20da833bdb Polymost: factor out y panning coefficient calculation code.
git-svn-id: https://svn.eduke32.com/eduke32@2815 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-08 21:47:14 +00:00
helixhorned 3697842bc5 Add ART loader for the LuaJIT BUILD struct loader module, 2 more examples.
The map iterator now has init/finish capability, making it possible to
write scripts that aggregate data over multiple map files.  One such example
calculates some statistics, the other loads art metadata and looks for
red walls with non-pow2 ysize tiles.

git-svn-id: https://svn.eduke32.com/eduke32@2814 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-08 21:47:11 +00:00
helixhorned 6b0f6176f6 Add LuaJIT-based BUILD map loader and batch processing script + example.
git-svn-id: https://svn.eduke32.com/eduke32@2813 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-08 21:47:06 +00:00
terminx 886f2e5a26 Update our prebuilt MinGW libogg/libvorbis/libvorbisfile to the newest versions, courtesy of forum user LeoD
git-svn-id: https://svn.eduke32.com/eduke32@2812 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-06 18:40:54 +00:00
helixhorned dfdcce090b Polymer: factor out wall y panning coefficient calculation.
Non-pow2 wall/mask drawing in classic introduced cases where walls are
drawn "incorrectly" because they were constructed with the old behavior
in mind.  Polymer appears to "correct" for it partially, but doesn't cover
all cases.  Specifically, now we have:
 - E1L1 first inside secret room (5000, 50000): Polymer draws like Duke 1.5,
   classic now draws with an offset.
 - E3L2 near the vault (-20000, 25000): both classic and Polymer draw with
   offsets compared to Duke 1.5, but they're different!

This means that more research is needed into what makes these two cases
diverge, even though both have the same root cause.

!!! Also, mappers should abstain from using non-power-of two textures on
    walls until this issue is resolved in a satisfactory fashion !!!

git-svn-id: https://svn.eduke32.com/eduke32@2811 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-06 15:36:50 +00:00
helixhorned 6ed9241f0a Classic: fix glitches where stuff would be drawn transiently on sect change.
This was introduced with r2771, which fixed e.g. AMC TC city_si's mirrors,
but instructed the base drawrooms inside yax_drawrooms to not correct the
passed sectnum.  Therefore, stuff would get drawn wrongly when passing
sector boundaries, like from the platform to the rails in trueror1.map.

git-svn-id: https://svn.eduke32.com/eduke32@2810 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-06 15:36:46 +00:00
helixhorned eae25756a8 Classic: fix drawing mirrors, introduced by nonpow2-ysize wall/mask drawing.
Some more drawing glitches remain.

git-svn-id: https://svn.eduke32.com/eduke32@2809 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-06 14:16:31 +00:00
helixhorned 39e944dffe Add description for 'remap' to mapster32.cfg, add 'setstartpos' to a.m32.
The latter is commented out, since it has to be *compiled* with
script_expertmode enabled.

git-svn-id: https://svn.eduke32.com/eduke32@2808 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-06 11:27:52 +00:00
helixhorned caa36c9d77 Classic: hook up non-power-of-two ysize wall/mask drawing in asm builds, too.
git-svn-id: https://svn.eduke32.com/eduke32@2807 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-06 11:27:49 +00:00
helixhorned 6c4c4fed15 Classic: add {,m,t}vlineasm1nonpow2, currently unreferenced from high-level drawing.
git-svn-id: https://svn.eduke32.com/eduke32@2806 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-06 11:27:46 +00:00
helixhorned 5a96b4e572 Classic-noasm: fix drawing of walls and maskwalls with non-pow2 y size tiles.
Related to that, it looks like out-of-bounds accesses when drawing such walls/
maskwalls or *sprites* are fixed, too.  Sprites still show a stray lines on some
occasions, but Valgrind doesn't complain then.

git-svn-id: https://svn.eduke32.com/eduke32@2805 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-06 11:26:24 +00:00
hendricks266 51331e11a0 Wii: Minor adjustments to the joystick defaults for the Classic Controller.
git-svn-id: https://svn.eduke32.com/eduke32@2804 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-05 17:55:44 +00:00
hendricks266 acbfa9ad05 Fix disabling EVENT_DISPLAYCROSSHAIR by setting RETURN to 1. SECTOREFFECTOR is not a useful crosshair.
git-svn-id: https://svn.eduke32.com/eduke32@2803 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-05 17:55:15 +00:00
hendricks266 00cb9caa2c Remove BUTTON(gamefunc_Jump) and KB_KeyPressed(sc_Space) from AdvanceTrigger so you can type spaces in savegame names.
git-svn-id: https://svn.eduke32.com/eduke32@2802 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-05 17:53:27 +00:00
terminx 9a69b481cf Fix for "undefined reference to `clock_gettime'" linking error on some Linux systems
git-svn-id: https://svn.eduke32.com/eduke32@2801 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-05 17:43:58 +00:00
Plagman 5b887587f3 mdsprite: don't try to factor textures from fallback skins
git-svn-id: https://svn.eduke32.com/eduke32@2800 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-02 04:51:24 +00:00
Plagman 4055e446c0 hightile: enable the texture factoring code for all palettes
git-svn-id: https://svn.eduke32.com/eduke32@2799 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-02 04:24:04 +00:00
Plagman 5a8d61d479 Fix MinGW build.
git-svn-id: https://svn.eduke32.com/eduke32@2798 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-02 03:44:54 +00:00
helixhorned 57dbedf59d Makefile.common: add a couple of C warning flags.
Most notably, -Wdeclaration-after-statement.  This and -Wpointer-arith
give some warning on linux, but this is "harmless" as it's assumed that
we'll be always compiling with GCC or Clang there.

Also, erratum in the "Make ksqrt take uint32_t ..." commit:
 hypotenuse -> squared length of the hypotenuse

git-svn-id: https://svn.eduke32.com/eduke32@2797 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-01 22:11:35 +00:00
helixhorned bdedbc6f76 Constify various char* vars, parameters, etc. for more -Wwrite-strings cleanness
-Wwrite-strings is useful to detect code where string literals and e.g. alloc'd
strings are used side-by-side, potentially creating dangerous situations, or to
find uses of old, non-constified APIs.  However, enabling it would still flood
the log with too many warnings.  Also, GCC wrongly warns for initializations of
char arrays.

git-svn-id: https://svn.eduke32.com/eduke32@2796 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-01 22:11:33 +00:00
helixhorned 8a89c07261 editor: const char *scripthist -> char *, since it's alloc'd/freed
git-svn-id: https://svn.eduke32.com/eduke32@2795 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-01 22:11:25 +00:00
helixhorned 650d859a6f actors.c: factor out 4 almost identical code instances into proj_spawn_and_sound
Most differences are handled with function parameters, except that one instance
checked SpriteProjectile[i].spawns for being >0 instead of >=0.  The factored
function always checks for >=0.

git-svn-id: https://svn.eduke32.com/eduke32@2794 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-01 22:11:22 +00:00
helixhorned 35e4f19ceb Make nsqrtasm return int32_t (instead of uint32_t) when compiled with GCC/x86.
git-svn-id: https://svn.eduke32.com/eduke32@2793 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-01 22:11:20 +00:00