Commit Graph

2972 Commits

Author SHA1 Message Date
helixhorned 716ea1f3b2 Fix a drawing glitch with mirrors and TROR in classic.
git-svn-id: https://svn.eduke32.com/eduke32@2772 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-20 20:54:55 +00:00
terminx 1002ceb240 Wii: offset displayed quotes a bit from the top of the screen to deal with overscan
git-svn-id: https://svn.eduke32.com/eduke32@2771 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-20 20:03:51 +00:00
helixhorned 8a28b3ad80 Allow fogpal DEF command to fogify pal 0.
git-svn-id: https://svn.eduke32.com/eduke32@2770 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-18 20:09:03 +00:00
helixhorned d2e0909139 Add samples/r_usenewshading.map.
This is to the cvar of the same name as samples/aspect.map is to r_usenewaspect.

git-svn-id: https://svn.eduke32.com/eduke32@2769 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-17 19:45:53 +00:00
helixhorned 2875a45b68 polymost.c: make polymost_checkcoordinates() static
git-svn-id: https://svn.eduke32.com/eduke32@2768 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-17 19:45:51 +00:00
helixhorned d741df358d Mapster32: display zero-length walls as level-3 corruptions.
git-svn-id: https://svn.eduke32.com/eduke32@2767 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-17 19:45:48 +00:00
helixhorned 3975e34625 gamedef.c: some bound tweaks
git-svn-id: https://svn.eduke32.com/eduke32@2766 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-17 19:45:46 +00:00
helixhorned cbb71c088a Lunatic translator: ai/move/action.
This exposes some problems in the default/in-the-wild CONs. As usual,
we'll have to retrofit sensible semantics :rolleyes:.

git-svn-id: https://svn.eduke32.com/eduke32@2765 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-17 19:45:43 +00:00
helixhorned 23e43886a8 Lunatic translator: define* et al
git-svn-id: https://svn.eduke32.com/eduke32@2764 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-17 19:45:41 +00:00
helixhorned 67dabd84f8 Lunatic t.: handle prefix-problematic commands for real, definelevelname, ...
git-svn-id: https://svn.eduke32.com/eduke32@2763 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-17 19:45:37 +00:00
helixhorned 5bdbd2eda5 Lunatic/LT: provide the predefined labels in con_lang, add "strict" from luajit.
The latter is only for development, since the embedded version already has a
undeclared-var-reference handling similar to that.  Also fix parm2memberpat.

git-svn-id: https://svn.eduke32.com/eduke32@2762 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-17 19:45:33 +00:00
helixhorned b30ac41147 Integer Overflow Offensive, First Act: rintersect, hitscan, neartag.
It's time to replace some int32s with 64-bit ints in core engine functions.
The problem is that for example, the dot product is taken between vectors that
may be the difference between two arbitrary points in a sector, so even if one
sticks to the "no blue walls" rule, that doesn't guarantee freedom from
overflows.

git-svn-id: https://svn.eduke32.com/eduke32@2761 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-13 23:13:39 +00:00
helixhorned 41921e728c Polymost: don't attempt to draw sprite with void tile, preventing div-by-0s later
git-svn-id: https://svn.eduke32.com/eduke32@2760 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-13 23:13:36 +00:00
helixhorned 84cb4fd6ca Mapster32: draw a wall blue if its squared length exceeds INT_MAX (not UINT_MAX)
git-svn-id: https://svn.eduke32.com/eduke32@2759 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-13 23:13:34 +00:00
helixhorned 4353170b47 Fix a div by zero in polymost_internal_nonparallaxed.
git-svn-id: https://svn.eduke32.com/eduke32@2758 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-13 23:13:31 +00:00
helixhorned 8d8196993b Mapster32: fix a div by zero when drawing tile info for void tile in 3D mode.
This was exposed by Clang with -ftrapv, which apparently also traps those.

git-svn-id: https://svn.eduke32.com/eduke32@2757 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-13 23:13:28 +00:00
helixhorned f2789ab90f Lunatic translator: fix dangling else and add a test file, tweak warnings
git-svn-id: https://svn.eduke32.com/eduke32@2756 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-13 23:13:26 +00:00
helixhorned ec56b8e2d9 build/Makefile: Always compile a-c.o with -O2 and without -fcatch-undefined-behavior
This is to not slow down the core drawing functions too much in debugging builds
and mimics the way things are on x86.

git-svn-id: https://svn.eduke32.com/eduke32@2755 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-13 23:13:23 +00:00
helixhorned ad908070a7 a.m32: new state "collect_ceilsky_sectors" collecting parallaxed ceilings.
git-svn-id: https://svn.eduke32.com/eduke32@2754 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-13 23:13:20 +00:00
helixhorned 88d7a77fdc Mapster32: disallow joining non-adjacent sectors when expert mode is disabled.
git-svn-id: https://svn.eduke32.com/eduke32@2753 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-13 23:13:15 +00:00
helixhorned d8721f743e Factor out r2726' kopen4load checks into testkopen, closing opened files.
git-svn-id: https://svn.eduke32.com/eduke32@2752 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-11 20:35:47 +00:00
helixhorned e57a8715fc CON: warn on out-of-range hex literals and ignored redefines with different values
git-svn-id: https://svn.eduke32.com/eduke32@2751 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-10 18:56:27 +00:00
helixhorned c3955f7462 CON parser/runtime: two bound tweaks, defer setting insptr in (load)actor.
git-svn-id: https://svn.eduke32.com/eduke32@2750 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-10 18:56:24 +00:00
helixhorned c2c8b00a78 Lunatic translator: define, include, fix "music" parsing, ...
git-svn-id: https://svn.eduke32.com/eduke32@2749 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-10 18:56:21 +00:00
helixhorned 5531888c8b Lunatic: take a stab at semantic actions; tweaks
git-svn-id: https://svn.eduke32.com/eduke32@2748 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-10 18:56:18 +00:00
helixhorned 59df76f0b6 Lunatic: actors
git-svn-id: https://svn.eduke32.com/eduke32@2747 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-10 18:56:15 +00:00
helixhorned 90b169d8c8 Lunatic: in event interface, pass actor, player, dist.
git-svn-id: https://svn.eduke32.com/eduke32@2746 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-10 18:56:10 +00:00
helixhorned 0ac242293b gameexec.c: factor out stuff, make code more readable overall.
git-svn-id: https://svn.eduke32.com/eduke32@2745 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-07 17:38:01 +00:00
helixhorned 2ddd6df14a Classic: don't attempt drawing sprites with (cstat&48) == 48 that aren't voxels.
Bang! One more invalid internals exposure squashed. Maybe one day we'll be able
to call EDuke32 "stable"...

Actually the offending sprite IS drawn as face sprite with shade 32 and xrepeat
and yrepeat 255 for the convenience of the CON coder who will have to debug it.

git-svn-id: https://svn.eduke32.com/eduke32@2744 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-07 17:37:57 +00:00
terminx 169587b5b4 Fix MSVC build error caused by the use of a C99 feature (that should have been added to the compiler about 13 years ago)
git-svn-id: https://svn.eduke32.com/eduke32@2743 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-07 02:59:24 +00:00
helixhorned f9077dc9cd Silence "number greater than INT32_MAX converted to a negative one" warning.
Literals written out as if they were unsigned and having the highest-order
bit set are all too ubiquitous, like hitscan masks for example.

git-svn-id: https://svn.eduke32.com/eduke32@2742 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-06 22:03:35 +00:00
helixhorned 9e5696a486 TROR/classic: same fix as r2739, intersecting case.
git-svn-id: https://svn.eduke32.com/eduke32@2741 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-06 22:03:32 +00:00
helixhorned cf429d0e76 engine.c: cleanup / readability tweaks
git-svn-id: https://svn.eduke32.com/eduke32@2740 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-05 22:21:26 +00:00
helixhorned 2fa7ccf9dd TROR/classic: fix a certain class of underdraw glitches.
Those were happening when wall drawing in an upper/lower layer "closed" too
much of the "curtain" (umost/dmost) for subsequent drawing in that portal.
Example: looking down the sewer manhole at the beginning of Retaliation will
now render without HOM.

git-svn-id: https://svn.eduke32.com/eduke32@2739 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-05 22:21:22 +00:00
terminx 9f40f84cbe This probably fixes the music breakage caused by r2727.
git-svn-id: https://svn.eduke32.com/eduke32@2738 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-04 22:01:45 +00:00
helixhorned 3fbf46ce3a net: do strtok on a duplicated string containing the address in Net_Connect().
Also,
 - don't strip const when passing the char ptr to it and a couple more
   instances in game.c
 - use g_netPort when -connect parameter doesn't have a port suffix (":XXXX"),
   so that e.g.
    eduke32 -port 1700 -connect localhost
   is the same as
    eduke32 -connect localhost:1700
   (-port must come before -connect, unfortunately.)

git-svn-id: https://svn.eduke32.com/eduke32@2737 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 19:20:41 +00:00
helixhorned 9b40534c8f net: second part of buffer overflow check correction.
This was supposed to go into the last commit, but I did
 git commit --amend
without adding the changes to the index. Now I'm too lazy to sort
things out.

git-svn-id: https://svn.eduke32.com/eduke32@2736 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 19:20:39 +00:00
helixhorned 18eba11657 net: correct packet buffer overflow checks.
The GAMESTATE one has to be carried out twice, first on the data from
xd3_encode_memory, and then with the compressed data (because it might have
increased in size, though this is very unlikely).  The MOVE check is
similar, though there, failure of the first check implies corrupt memory
(which is why we're Bassert'ing that condition).

Currently, the overflow on GAMESTATE sending happens when switching to a
different map.

git-svn-id: https://svn.eduke32.com/eduke32@2735 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 19:20:36 +00:00
helixhorned 8ffb35add0 net: remove (char *) casts where they amount to no-ops.
git-svn-id: https://svn.eduke32.com/eduke32@2734 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 19:20:34 +00:00
helixhorned 2df94e8bc7 Fix a "set but not used warning" in xdelta3.c, revert definition of XD3_ASSERT.
git-svn-id: https://svn.eduke32.com/eduke32@2733 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 19:20:32 +00:00
helixhorned 1404174584 Revert a change in xdelta3.c done in r2683.
git-svn-id: https://svn.eduke32.com/eduke32@2732 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 19:20:29 +00:00
helixhorned 56114a608d net: eliminate ptr->byte idx conversion of action/move/ai in t_data.
These are element indices for a while now.  Also eliminate some dead
code afterwards.

git-svn-id: https://svn.eduke32.com/eduke32@2731 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 19:20:26 +00:00
helixhorned 6fc99bcdf3 Bump BYTEVERSION, correct actor_t size on x64, add assert(sizeof(actor_t)==128).
r2727 made old savegames incompatible, as an array with MAXVOLUMES*MAXLEVELS
is saved in Gv_WriteSave().

git-svn-id: https://svn.eduke32.com/eduke32@2730 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 19:20:23 +00:00
hendricks266 3a3284e2a3 Prevent the reserved cheats from displaying a finished time and from clobbering personal map time records.
git-svn-id: https://svn.eduke32.com/eduke32@2729 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 16:12:44 +00:00
hendricks266 d3a3c74112 Massive menu input control revamp/cleanup/factor. (added: input.[ch])
New Wii control defaults for the Wii Remote + Nunchuk and the Classic Controller. This includes new code added just so that the Home key brings up the menu in-game, reducing the need for a USB keyboard.

On the technical side, raw joystick access (comparable to what is available for keyboard and mouse) is now present in jmact, on the game side. (added: joystick.[ch])

Using this new raw joystick access, I replaced tueidj's hack to map A and B to LMB/RMB and D-Pad Up/Down to the scrollwheel.

I made the menus more friendly to mouse and joystick browsing by adding and unifying checks and clears for various buttons and gamefuncs. In fact, the majority of the time spent on this commit was tracking down problems that appeared with the factoring and trying to understand the menu system and the way input checks are precariously executed.

In addition, "Press any key or button to continue" now truly means what it says.

As a result of incorporating proper raw access into control.c instead of it directly accessing the implementaiton, the program *may* no longer be affected by joystick input when it is out of focus. This follows the pattern set by the mouse, and I think this is a positive change.

A small bonus: In the classic/old keyboard preset, the key for Show_Console has been changed from '`' to 'C' because '`' is taken by Quick_Kick.

git-svn-id: https://svn.eduke32.com/eduke32@2728 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 16:11:22 +00:00
hendricks266 f9713011f4 Bump MAXLEVELS to 64, per user request.
git-svn-id: https://svn.eduke32.com/eduke32@2727 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 16:10:08 +00:00
hendricks266 67ed6945fd The handling for grp, con, and def filenames has been massively cleaned up and factored into common.c. A new header, common_game.h, was created because common.h was placed in build/include (see r2542) and we need a common header for things that strictly should not be in the engine. RTS file names were also improved but some of the patterned changes were already made in r2420, and they were not factored because they are strictly part of the game, not the editor.
NAM and Napalm can now share their con, def, and rts files if the one for their respective game is not present because the con and rts files are identical.

Also, decapitalize two string literals missed in r2540.

git-svn-id: https://svn.eduke32.com/eduke32@2726 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 16:09:33 +00:00
hendricks266 19d9d0a71e Incorporate some use of Bfflush(NULL) in hopes to alleviate Wii configuration saving concerns.
git-svn-id: https://svn.eduke32.com/eduke32@2725 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 16:08:27 +00:00
helixhorned 59fa419506 Lunatic: pack actor/move parameters into t_data, which is enlarged to 14 elements.
(LUNATIC build only.)
Also, a minor problem is identified.  sizeof(actor_t) is 124 on 64-bit platforms,
while the expected size is 128 bytes.  This needs to be corrected whenever the
next savegame version bump happens.

git-svn-id: https://svn.eduke32.com/eduke32@2724 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 15:46:08 +00:00
helixhorned 39261018b4 In G_GameExit, rename arg 't' to 'msg' for (slightly) easier grepping of t_data etc.
git-svn-id: https://svn.eduke32.com/eduke32@2723 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 15:46:05 +00:00