Commit Graph

1212 Commits

Author SHA1 Message Date
terminx f553d6ad10 Add assertion for memory error handler in debug builds, add .def load time information to log, call Gv_ResetSystemDefaults() at startup to populate fake tilesizx/tilesizy arrays for CON
git-svn-id: https://svn.eduke32.com/eduke32@4629 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:15:53 +00:00
terminx 144a4798ce More Polymost cleanup, also consolidate tilesizx and tilesizy into a single tilesiz vec2_t to ensure both x and y are always in the same cache line. I may add a new vec2_16t later. Still need to take care of emulating the old flat array for the sake of CON access.
git-svn-id: https://svn.eduke32.com/eduke32@4623 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:14:21 +00:00
terminx e20f297774 r_showfps 2, displaying min and max fps
git-svn-id: https://svn.eduke32.com/eduke32@4622 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:13:14 +00:00
terminx 0a62ba1a21 On Android, remove the counter that automatically proceeds from the startup screen to the main menu and require a button press instead.
git-svn-id: https://svn.eduke32.com/eduke32@4613 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:08:23 +00:00
terminx 599ff50ca0 Misc Android changes and fixes, add alternate HUD mode that displays at the top of the screen, add support for replacing the DREALMS tile during startup with a 3dr.anm/3dr.ivf, fix usage of widescreen menu background or status bar tiles, limit - key from actually sizing down the screen (which has decreased performance instead of increasing it for a long, long time). The size can still be set manually from the console for special cases.
git-svn-id: https://svn.eduke32.com/eduke32@4602 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:05:07 +00:00
terminx cd713abf1e HUD on the top of the screen and extra wide autoaim mode for Android
git-svn-id: https://svn.eduke32.com/eduke32@4595 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:03:17 +00:00
helixhorned ef8c2f14c4 Fix taking over floor pal in the unlikely event that no fog pals are defined.
This DOES NOT fix the more complex issue discussed at the forums.

git-svn-id: https://svn.eduke32.com/eduke32@4592 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:18 +00:00
helixhorned 2713bc3d75 Get rid of EnvMusicFilename[] and use MapInfo[].musicfn for that.
The additional space was there all the time, so it's not understandable why
another array was necessary.
CON: for 'music', error if volume number is outside [0 .. MAXVOLUMES+1], and
in LunaCON, additionally warn if it's MAXVOLUMES+1 (0 is preferred for that).

git-svn-id: https://svn.eduke32.com/eduke32@4588 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:14 +00:00
helixhorned 3dc5c9e144 Allow DEFining music for which there is no CON music; Add 'music' OSD command.
The OSD command is invoked like "music E5L3" (case insensitively).

git-svn-id: https://svn.eduke32.com/eduke32@4587 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:13 +00:00
helixhorned 73a252a73e More music-related cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@4586 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:12 +00:00
helixhorned 5597f3faab Some cleanup around S_PlayMusic() and related functionality.
git-svn-id: https://svn.eduke32.com/eduke32@4585 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:09 +00:00
helixhorned 3aaf167d6b game.c: fix -game_dir and -j by moving G_ExtInit() after G_CheckCommandLine().
git-svn-id: https://svn.eduke32.com/eduke32@4571 1a8010ca-5511-0410-912e-c29ae57300e0
2014-08-08 20:02:56 +00:00
hendricks266 b0e82d4264 Split parts of loadlookups() into generatefogpals() and fillemptylookups(), and move Duke-specific LOOKUP.DAT behavior to G_LoadLookups() in source/common.c, which contains the call to loadlookups() as factored out from astub.c and game.c.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4564 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-28 06:45:53 +00:00
hendricks266 b48f3b44e3 Progress towards KenBuild Editor, part 1.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4558 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-28 06:43:16 +00:00
hendricks266 e8949e1c31 Elimininate some codedup between game.c and astub.c.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4557 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-28 06:42:28 +00:00
hendricks266 a187bbd8f3 Normalize all rotatesprite calls to fullscreen panels so that they are centered at (160, 100) instead of top-lefted at (0, 0).
git-svn-id: https://svn.eduke32.com/eduke32@4550 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-22 11:20:13 +00:00
hendricks266 c1c01f0e0b Replace the funkily-formatted GNU.TXT with the FSF's official gpl-2.0.txt. Also, update the FSF's address in all source files that contain it.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4541 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-20 08:55:56 +00:00
hendricks266 43eb98fdec Extend ebacktrace in two ways.
1. The application must specify its proper name and technical name. Instead of eduke32_or_mapster32.crash.log, we now have eduke32.crash.log and mapster32.crash.log.
2. The exception handler will display a message box informing the user of a crash and requesting they send in the crash log. The box has three options: "Quit", the DLL's current behavior, "Continue", which passes the exception to the next handler, and "Ignore", which resumes execution immediately. These should allow the user to skip bogus exceptions picked up by ebacktrace, such as one I get with my laptop that causes EDuke32 no issues.

git-svn-id: https://svn.eduke32.com/eduke32@4538 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-06 22:38:02 +00:00
terminx 06072db493 WIP OSD refactor, committing now before it stops applying cleanly to current svn. This shouldn't break anything in an obvious or major way.
git-svn-id: https://svn.eduke32.com/eduke32@4536 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-06 00:12:25 +00:00
hendricks266 ca03f7af44 Hotfix to allow display of E1L8's par time and 3DR time if no usermap has been played yet.
Note that the user map function still overwrites everything in slot E1L8 for the time being, which is a deeper problem I need to address.

git-svn-id: https://svn.eduke32.com/eduke32@4525 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-23 02:25:20 +00:00
hendricks266 1497a75ef0 Disable the diagnostic log message upon successfully using the "animsounds" def command.
git-svn-id: https://svn.eduke32.com/eduke32@4523 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-23 02:24:53 +00:00
hendricks266 41fb46b1bc Fix a display error with the bonus screen when a map's 3DR time was zero.
git-svn-id: https://svn.eduke32.com/eduke32@4518 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-21 15:30:48 +00:00
hendricks266 27c9651fde Fix a problem with r4514.
git-svn-id: https://svn.eduke32.com/eduke32@4517 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-21 15:30:33 +00:00
hendricks266 f4becd06d5 Instead of displaying "Unknown GRP - EDuke32", simply display "EDuke32".
Much classier this way.

git-svn-id: https://svn.eduke32.com/eduke32@4516 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-16 23:17:11 +00:00
hendricks266 fd78e9f954 By request, implement EVENT_ACTIVATECHEAT.
git-svn-id: https://svn.eduke32.com/eduke32@4515 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-16 23:16:55 +00:00
hendricks266 45deabc782 Add the following LOGO_FLAGS:
LOGO_NOE1ENDSCREEN
LOGO_NOE2ENDSCREEN
LOGO_NOE3RADLOGO
LOGO_NODUKETEAMTEXT
LOGO_NODUKETEAMPIC

As part of this, the LOGO_NOE*BONUSSCENE flags no longer remove the entire end sequence in one go. They now only remove the primary cinematic. If you want their previous effect, you'll have to add these additional bits.

git-svn-id: https://svn.eduke32.com/eduke32@4514 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-16 23:16:37 +00:00
hendricks266 71cf9af5f5 Clean up the menu input layer.
git-svn-id: https://svn.eduke32.com/eduke32@4511 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-16 23:15:49 +00:00
hendricks266 a03f9bce40 Wrap most calls to exit() with a macro that will print the exit status, file name, line number, and function name to the log when using a debug build.
git-svn-id: https://svn.eduke32.com/eduke32@4502 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-13 09:02:37 +00:00
hendricks266 11e9b8f4ce Ball-busting new menus. Still WIP.
Mouse/touch/pointer support is yet to come. #SOON.

Exposure to scripting is a LONG way off. Months. The spec and data structure needs time for comment and revision. The eventual scripting access will be Lua-only.

git-svn-id: https://svn.eduke32.com/eduke32@4496 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-31 12:26:41 +00:00
hendricks266 c24c08599f Better compile timestamp handling.
git-svn-id: https://svn.eduke32.com/eduke32@4495 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-31 12:26:13 +00:00
helixhorned 66f5b547cf Replace two missed literal numbers with SE_* enum labels.
git-svn-id: https://svn.eduke32.com/eduke32@4492 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-30 19:39:06 +00:00
helixhorned 0900f4066c Bye, bye, B*alloc(), all hail X*alloc()! Replace large portion of the calls...
... and cull code that is dead with the X*alloc() versions since they never
return NULL on requesting memory.

Use something like
 git grep '[^Xx]\(m\|c\|re\)alloc *('
and
 git grep '[^Xx]strdup *('
to see places where I left the B*alloc() calls intact.

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4491 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-30 00:02:19 +00:00
helixhorned 1d26121514 Add X{m,c,re}alloc and Xstrdup macros that call an out-of-memory handler on failure.
These wrap the x*alloc or xstrdup functions in compat.c. The handler gets passed
__FILE__, __LINE__ and __func__ (if available) in debugging builds.

Terminating the application process immediately in case of allocation failure
will let us prune many error handling paths and simplify a good portion of code.

git-svn-id: https://svn.eduke32.com/eduke32@4490 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-30 00:02:16 +00:00
helixhorned 69c867b8e3 Replace various GL rendering related literal flags with enum labels.
- pthtyp pth->flags bits
- Flags of the <dameth> argument of various functions
- hictinting[].f / gloadtile_hi() and daskinloader() <effect> arg bits
- hicreplctyp hicr->flags bits
- texcacheheader cachead.flags bits

git-svn-id: https://svn.eduke32.com/eduke32@4486 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-28 22:40:16 +00:00
helixhorned e61afe6d88 Rip out S_FindMusicSFX() from A_CallSound() and use in SE6/14 on-spawn init.
This makes the subway sound not played once on map initialization.

git-svn-id: https://svn.eduke32.com/eduke32@4481 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-23 20:25:29 +00:00
helixhorned 0c2776e7fc game.c: in A_Spawn(), protect CSTAT_SPRITE_NOSHADE of spawned MASKWALL* sprites.
git-svn-id: https://svn.eduke32.com/eduke32@4478 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-22 11:17:50 +00:00
hendricks266 a755e95c2c Replace some constants with preprocessor macros.
git-svn-id: https://svn.eduke32.com/eduke32@4472 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-17 12:36:40 +00:00
terminx d287b50cd7 Android updates from Emile. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4440 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-15 19:02:48 +00:00
terminx 4815ebaa23 More Android. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4439 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-14 16:30:23 +00:00
terminx 5645858a64 Partial Android support cleanup. I actually have no idea if this even compiles ;)
git-svn-id: https://svn.eduke32.com/eduke32@4433 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-12 08:45:50 +00:00
terminx e760d590be Hack around HOM when passing through a masked wall, but only on Android because the solution isn't very good.
git-svn-id: https://svn.eduke32.com/eduke32@4430 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-11 16:19:36 +00:00
helixhorned 63fee16ca5 CON: in rotatespritea and screentext, if alpha < 0, make -alpha denote blend.
For convenience, orientation gets bit 1 (translucency) set automatically.
Again, test/screentext.con is updated to show off this functionality (the
code there assumes that additive blending tables are loaded at blend
numbers 101 -- 132).

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4428 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-09 18:51:35 +00:00
terminx 1d077db710 Add "osdscale", allowing the console text to be resized anywhere from 1-4x. It's a float because that seemed more useful to Android, where this will probably be hooked up to a slider (its intended usage).
git-svn-id: https://svn.eduke32.com/eduke32@4425 1a8010ca-5511-0410-912e-c29ae57300e0
2014-04-07 06:17:25 +00:00
helixhorned 2fd4617412 Add a second DNCOORDS/cl_showcoords mode, showing some renderer settings.
Also, extend the documentation for r_usenewshading a little. Specifically,
note when the different modes were introduced. BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4410 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-30 20:36:00 +00:00
helixhorned da0c6d00ca game.c: fix last step of p->visibility approaching ud.const_visibility.
git-svn-id: https://svn.eduke32.com/eduke32@4401 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-29 21:48:40 +00:00
hendricks266 69d04171c0 Tidy menu code in advance of complete redesign.
This replaces all remaining magic numbers with enumerations thereof.

It also tweaks the following, even though most will be irrelevant post-rewrite:
-Remove unused menus
-Properly center the nuke icon in Duke and the star icon in NAM
-Fix the multiplayer macro editing menu:
--Position the currently editing quote its proper spot instead of beneath the first row
--Don't highlight the first quote while editing a different one
--Select the quote just edited when finished editing instead of the first one
-Fix the cursor of a centered text input field (such as the adult mode password)
-Implement proper shade glowing of selected menu entries in Joystick Settings, Joystick Axes, and Joystick Dead Zones
-Shift the the Joystick Axes menu down to avoid overlapping the title bar
-Change the title of mouse digital axis assignment "Digital Axes Setup" instead of "Advanced Mouse"
-Fix the behavior of the Next button in Joystick Dead Zones to not act like a scrollbar

git-svn-id: https://svn.eduke32.com/eduke32@4399 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-26 09:14:01 +00:00
helixhorned dd5f71e3ff Fix an unused variable warning with NETCODE=0. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4389 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 12:55:48 +00:00
terminx ba0c64971c Widespread use of ARRAY_SIZE macro.
git-svn-id: https://svn.eduke32.com/eduke32@4385 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 09:25:15 +00:00
terminx 057c5c9356 Clean up A_InitEnemyFlags() a bit.
git-svn-id: https://svn.eduke32.com/eduke32@4384 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-22 09:23:55 +00:00
helixhorned 5cb6e20c63 Add new actor flag and predefined CON label SFLAG_NODAMAGEPUSH.
This flag is set from C for some enemies that should not be pushed back when
damaged, such as TANK. Both the tile flag and the per-sprite flag are used
(i.e. the ultimate flag value is the XOR of the two).
Add currently non-functional example to test.lua that attempts to set this bit
for NEWBEAST.

git-svn-id: https://svn.eduke32.com/eduke32@4371 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:47 +00:00
helixhorned 69d906c4f7 If 3rd person view gets outside map, try again w/o subtracting 3072 from player z.
Also, clean up G_DoThirdPerson().

git-svn-id: https://svn.eduke32.com/eduke32@4369 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-15 14:10:42 +00:00
terminx 7d88e047d3 Make non-pal 0 enemy health doubling depend on running 1.3D or earlier
git-svn-id: https://svn.eduke32.com/eduke32@4366 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-07 22:17:25 +00:00
helixhorned 73b3199b7c Classic: implement screen tilting by 180 degrees without quality loss.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4364 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-05 21:12:59 +00:00
helixhorned 689a8aef1d Propagate 'blend' to rotatesprite_(), but don't hook it up to scripting yet.
git-svn-id: https://svn.eduke32.com/eduke32@4360 1a8010ca-5511-0410-912e-c29ae57300e0
2014-03-05 21:12:54 +00:00
helixhorned 82b87e1812 engine.c: in loadlookups(), allow pal 0.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4355 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-26 20:18:28 +00:00
helixhorned 605c4dbc21 Fix crosshair color.
git-svn-id: https://svn.eduke32.com/eduke32@4354 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-23 20:44:43 +00:00
helixhorned f346e46ed8 A few stylistic tweaks, like substituting missed SE_* enum constants.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4353 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:54 +00:00
helixhorned b8bd2069ea Rename SPRITE_* flag enum constants to SFLAG_*, for consistency with CON.
git-svn-id: https://svn.eduke32.com/eduke32@4351 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:52 +00:00
helixhorned 6f34193bb6 Give sprite cstat bit 2048 (NOSHADE, Mapster32 key [N]) a macro name.
git-svn-id: https://svn.eduke32.com/eduke32@4350 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:51 +00:00
helixhorned 1b1cb73e1c A couple of very minor code beauty tweaks.
git-svn-id: https://svn.eduke32.com/eduke32@4346 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:47 +00:00
terminx ea602827cd Indicate MSVC in build string
git-svn-id: https://svn.eduke32.com/eduke32@4339 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 01:26:34 +00:00
helixhorned 2afb680d22 engine.c: always setup blending table whenever drawing translucent objects.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4338 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-19 19:47:28 +00:00
helixhorned df25e3cd7c In loadlookups(), look for gap of 4 consecutive unused pals for fog pals.
As opposed to the previous way, where the first fog pals was <numlookups>+1,
where <numlookups> is the first byte value of LOOKUP.DAT. This allows to
pack e.g. lookups [1 .. 25] and [30 .. <lastpal>] into LOOKUP.DAT and have fog
pals be generated at pals [26 .. 29] (i.e. the additional lookups don't
shift the fog pals, making user maps depending on these numbers not look as
intended.)

git-svn-id: https://svn.eduke32.com/eduke32@4335 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:16:05 +00:00
helixhorned 7e7507746d Factor out common parts of loading LOOKUP.DAT into engine.c:loadlookups().
Also, error if didn't read enough data and account for TITLE and REALMS
swap between basepal number and on-disk order (sigh).

git-svn-id: https://svn.eduke32.com/eduke32@4334 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:16:03 +00:00
hendricks266 3b5dea7347 Fix warnings when building in C++11 mode, i.e. with CPLUSPLUS=1 CUSTOMOPT="--std=gnu++11".
git-svn-id: https://svn.eduke32.com/eduke32@4321 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 11:00:07 +00:00
hendricks266 7deb709ab6 Replace QuickLZ with LZ4.
git-svn-id: https://svn.eduke32.com/eduke32@4316 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:55:49 +00:00
helixhorned 0d0f3a1cd2 Add Makefile.common switch ALLOCACHE_AS_MALLOC, remove DEBUG_WITH_VALGRIND.
git-svn-id: https://svn.eduke32.com/eduke32@4298 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:41 +00:00
helixhorned 842cce37b7 Lunatic: Fix compilation of C++ build, but not starting up yet.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4286 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-31 21:13:03 +00:00
helixhorned bebdc6ff4f Follow-up to RTS cleanup: factor out 2x almost-same code into G_StartRTS().
git-svn-id: https://svn.eduke32.com/eduke32@4279 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-30 19:12:10 +00:00
helixhorned da6c7109c1 Reincarnate RTS sound functionality together with cleaning up related code.
- Make Win+F* also make play and RTS sound, since modern OS's window managers
  like to eat Alt-F*. (Some Win+F* may be inaccessible too, but together all
  10 should hopefully be covered.)
- Fix an issue where keys other than F1-F10 were considered as starting an RTS
  sound and crashing EDuke32 in the process

git-svn-id: https://svn.eduke32.com/eduke32@4278 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-30 19:12:08 +00:00
hendricks266 62abd504ef Print "32-bit"/"64-bit" along with the version number in the log.
git-svn-id: https://svn.eduke32.com/eduke32@4274 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-27 10:31:39 +00:00
helixhorned 4881a13f99 Engine-side per-map ART file support.
When a map named <filename>.map is loaded (<filename> may also contain directory
separators), the engine checks for existence of <filename>_XX.art in the virtual
file system, where XX is a 0-padded number from 00 to 19. It loads a consecutive
sequence of these ART files, i.e. aborts whenever a number in the sequence isn't
found (in contrast to normal ART loading).

Restrictions:
 - the per-map ART files must not reside in ZIP files
 - if a tile number is attempted to be overridden that has a dummytile or is
   cache1d-locked, per-map ART loading fails
On failure, the map is still loaded, but a diagnostic message is output to the
log/OSD.

Loaded per-map ART data are cleared whenever the map is "left". In particular:
 - whenever another map is loaded
 - in the editor: when a new map is started
 - in the game: after the bonus ending screen of a finished level, after going
   to the title screen via the menu

A final note: file names are supposed to be looked up and compared
case-sensitively. That is, <filename> must match EXACTLY between the map's and
per-map ART one; 'art' must be lowercase. Otherwise, the cookie monster will
come and eat you!

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4257 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:54:36 +00:00
helixhorned 3b1515e51b Stylistic/formatting tweaks in cache1d code.
git-svn-id: https://svn.eduke32.com/eduke32@4255 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:54:33 +00:00
hendricks266 f046a405e6 Fix a case where the bonus screen would immediately end with an input press because all code between iterations of the bonus screen would execute in less than 1/120th of a second, not leaving any time for totalclock to increment.
EDuke32. Where our code runs so fast, it breaks old code.

git-svn-id: https://svn.eduke32.com/eduke32@4252 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:05:39 +00:00
hendricks266 cf16225f5e Fix the display of the multiplayer results screen.
git-svn-id: https://svn.eduke32.com/eduke32@4251 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:05:23 +00:00
hendricks266 e263d0ada9 Run Net_SendClientInfo() after game state creation to properly set up the player's user_name.
git-svn-id: https://svn.eduke32.com/eduke32@4250 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:05:07 +00:00
hendricks266 3ed90ca4f2 Block off hacks for the primitive splitscreen CON mod with SPLITSCREEN_MOD_HACKS so they are no longer compiled.
These hacks could no longer be allowed to co-opt the fake multiplayer mode, used for local testing and mod development.

I have half a mind to remove the hacks outright because they could be likened to drilling bolts directly into your car engine just so you could mount a bowling ball as a hood ornament. However, I don't want to take away the splitscreen hack mod from anyone who uses it, and the work done on these hacks should be useful if proper splitscreen were implemented internally using per-player input and multiple renderer/audio passes.

git-svn-id: https://svn.eduke32.com/eduke32@4249 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:04:51 +00:00
hendricks266 90f4e7d7c8 Always run tsprites with statnum TSPR_TEMP though EVENT_ANIMATESPRITES, such as the "show opponent's weapon" in multiplayer.
git-svn-id: https://svn.eduke32.com/eduke32@4246 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:03:37 +00:00
hendricks266 1014af812f Allow the episode 4 cutscenes to be skipped in their entirety with one keypress, as in the original DOS game, instead of requiring input for each ANM file.
git-svn-id: https://svn.eduke32.com/eduke32@4243 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-12 14:02:30 +00:00
helixhorned 13c125db02 Lunatic: add 'engine' module, currently allowing to create custom shade tables.
Available in the game and editor. Provide test/shadexfog.lua, containing a
function to creating a set of 32 shade tables corresponding to different shades
of the same fog palookup table, together with some tests and convenience
functions.

Also,
- Add gv.LUNATIC_CLIENT{,_EDUKE32,_MAPSTER32}
- Add LUNATIC_FIRST_TIME in the global env for the game
- defs_m32.lua: add reload() convenience function
- Failed attempt at recreating the base shade table. It is NOT a linear ramp
  of the base palette colors to (0,0,0). That is, it's not created by
  build/util/transpal.exe!

git-svn-id: https://svn.eduke32.com/eduke32@4236 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:52:00 +00:00
helixhorned 70d84cd75b Lunatic: run EVENT_INIT after initial Lua state creation.
git-svn-id: https://svn.eduke32.com/eduke32@4231 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:51:50 +00:00
helixhorned 21d8e52f0a Remaining sanitizing of .yvel usage plus minor cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@4229 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-28 17:04:36 +00:00
helixhorned 2dd9b7e495 Clean up legacy ROR code and introduce LEGACY_ROR define in game.h.
Also, bound-check two .yvel meant as sprite indices in actors.c.

git-svn-id: https://svn.eduke32.com/eduke32@4228 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-28 17:04:34 +00:00
helixhorned efdd31d5a9 Guard retrieval of player index (.yvel) from APLAYER sprite.
It is unacceptable that yvel is on one hand modifiable without restriction from
scripting, but can be used as an array index without prior bound check in the C
code. Because that member has an overloaded meaning and is also used for
innocuous purposes such as the green color intensity of an SE light, it's
infeasible to restrict access from scripting. Consequently, we must add bound
checks on the C side. This is the first part of the effort to make .yvel safe,
adding two functions P_Get() and P_GetP(). There are a couple of other uses as
some kind of index.

git-svn-id: https://svn.eduke32.com/eduke32@4226 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-28 17:04:27 +00:00
helixhorned d26ae58627 Rename 'camsprite' to 'g_curViewscreen', other related cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@4220 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-26 19:45:12 +00:00
helixhorned c45ca57eb0 Minor stylistic tweaks of code related to weapon switching.
git-svn-id: https://svn.eduke32.com/eduke32@4215 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-26 19:44:56 +00:00
helixhorned 67c1157b64 Guard a sprite/actor access with sector[].hitag as index from OOB.
Unlikely but possible for rogue CON code.

git-svn-id: https://svn.eduke32.com/eduke32@4185 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-01 18:27:52 +00:00
helixhorned f63510cc33 In C_SetCfgName, don't use unsafe string functions with unknown-length input.
git-svn-id: https://svn.eduke32.com/eduke32@4144 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-08 18:08:47 +00:00
helixhorned 4cb24de24e In exprs like "Bmemcpy(&p->pos.x, &sprite[i].x, sizeof(vec3_t))", drop the ".x".
git-svn-id: https://svn.eduke32.com/eduke32@4132 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 18:21:07 +00:00
hendricks266 ccf7d2d470 Allow -g, -x, -h, -j, and for the game, -d, to take their file name after a space. This allows quotes to be used with them properly.
I updated the help windows to prefer these variants because they are superior to the -xSquished versions.
Also, factor out the command-line processing code for the above, plus con/def modules and clipmaps.

git-svn-id: https://svn.eduke32.com/eduke32@4128 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-03 04:02:23 +00:00
helixhorned 8248ef8446 CON: Add LOGO_FLAGS bits 4096-32768 to disable E1-E4 bonus scenes, respectively.
Each scene is disabled in its entirety, there's no way to disable only a
particular part. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4109 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-17 16:44:28 +00:00
helixhorned 7791f94073 Lunatic: make it possible to build with LuaJIT 2.1, add -Lopts=profile there.
git-svn-id: https://svn.eduke32.com/eduke32@4107 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-16 19:43:06 +00:00
helixhorned 1181121729 Revert "Move CONTROL_ProcessBinds() to CONTROL_GetInput()." [r3981]
That change confounded character-based input with e.g. HUD control
under certain circumstances, see
http://forums.duke4.net/topic/6845-eduke32-savegame-annoyances/

Also, BUILD_LUNATIC ... just for the hit.sect -> hit.sector change.

git-svn-id: https://svn.eduke32.com/eduke32@4093 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-11 13:43:39 +00:00
hendricks266 2ab39f2cca Clean up some GUI/WM minutiae. Should fix linking Mapster32 on *nix with HAVE_GTK=0.
git-svn-id: https://svn.eduke32.com/eduke32@4091 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-08 10:00:44 +00:00
hendricks266 d738fb7ad5 Fix the vsync menu option so that it actually works.
Variables at global scope which share a name tend to actually be the same variable. Not good when you pass such a variable to function that immediately returns if the passed parameter (the variable) equals said variable (itself).

git-svn-id: https://svn.eduke32.com/eduke32@4090 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-08 10:00:25 +00:00
hendricks266 333e0f26e2 Allow wm_msgbox() to use SDL_ShowSimpleMessageBox() under SDL2.
Unfortunately, SDL2 does not (yet?) provide a Yes/No box for wm_ynbox().

git-svn-id: https://svn.eduke32.com/eduke32@4085 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:05:24 +00:00
terminx 1baf9fa275 Add -usecwd parameter on Windows, to disable searching for Megaton Edition or GOG.com game data
git-svn-id: https://svn.eduke32.com/eduke32@4057 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-10 22:41:19 +00:00
helixhorned 1328c66f9c Lunatic: add option -Lopts=... from command line.
Permitting to enable various debugging options. See "eduke32 -debughelp"
for which ones those are: they were previously settable from defs_common.lua,
and a new option 'strict' has been added that makes accesses to void sprites
error. (That is, already "sprite[i]", not "sprite[i].some_member".)

git-svn-id: https://svn.eduke32.com/eduke32@4049 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-05 17:37:46 +00:00
helixhorned e0e3973b47 Bounds-check the tile number gotten from EVENT_GETMENUTILE.
git-svn-id: https://svn.eduke32.com/eduke32@4034 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-23 17:01:14 +00:00
terminx e8c2250d0a Rip out all traces of nedmalloc. Sorry, XP users--it's time to upgrade to something newer than an OS from 2001 if this affects you.
git-svn-id: https://svn.eduke32.com/eduke32@4027 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-20 21:49:44 +00:00