Commit Graph

2844 Commits

Author SHA1 Message Date
helixhorned c081f3ab2e In kopen4loadfrommod, don't try g_modDir if it's the default "/".
I experienced the following on Windows XP: a few openfrompath() -->
findfrompath() calls were taking enormously long (4.5 secs) to complete, having
been passed a file name like "//bla/qwe.asd".  My guess is that Windows then
tried to interpret these as a network FS path in access(), and the 4.5 secs
represents a timeout value.

git-svn-id: https://svn.eduke32.com/eduke32@2703 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-28 18:15:22 +00:00
helixhorned 0088ed0591 Only check file name case when not in-game; don't warn for ALLUPPER or alllower.
The first means that the expensive (~0.5 ms) SHGetFileInfo() calls won't inter-
fere with smooth gameplay, but files that are opened only at game-time like
sounds won't be checked.  The second means that there are now less false
positives, i.e. warnings about files that would be found due to the
check-all-{upper,lower} hack.

git-svn-id: https://svn.eduke32.com/eduke32@2702 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-28 18:15:19 +00:00
helixhorned 689e1b7167 engine.c: make horizlookup/horizlookup2 have int32_t elts instead of intptr_t.
git-svn-id: https://svn.eduke32.com/eduke32@2701 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-26 21:58:31 +00:00
helixhorned 2e635a8a30 In tilted-view setup code, allocate TILE_TILT storage more tightly.
git-svn-id: https://svn.eduke32.com/eduke32@2700 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-26 21:58:29 +00:00
helixhorned 5efab4d850 build.c: factor out two identical code instances into handle_sprite_in_clipboard
git-svn-id: https://svn.eduke32.com/eduke32@2699 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-26 21:58:26 +00:00
helixhorned eeb42f20bf Disallow high-quality (640x480) tilted screen if MAXYDIM is less than 640.
This fixes the crash on Wii when looking sidewards (e.g. when dying), but
makes the tilted view look more pixelated.
The problem was that an attempt was made to render onto a 640x640 tile for
the rotated view, but the base engine arrays were too small for that.

git-svn-id: https://svn.eduke32.com/eduke32@2698 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-26 21:58:24 +00:00
helixhorned 2fc6e2e6b0 Various cleanup and rewrites.
- make allocatepermanenttile() return intptr_t
- the usual

git-svn-id: https://svn.eduke32.com/eduke32@2697 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-26 21:58:21 +00:00
helixhorned a485ee8ca0 Fix harmless "cast to pointer from integer of different size" warning with x64.
git-svn-id: https://svn.eduke32.com/eduke32@2696 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-25 18:39:25 +00:00
helixhorned eebddcd559 Cleanup & minor rewrites, among other things in premap.c:G_EnterLevel().
git-svn-id: https://svn.eduke32.com/eduke32@2695 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-25 18:39:22 +00:00
helixhorned 5af2088c06 With engine compiled for V7 limits, refuse loading maps exceeding them.
Also, correct the loadboard() return value checks in premap.c to be
aware of a returned -2 ("wrong map version").

git-svn-id: https://svn.eduke32.com/eduke32@2694 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-25 18:39:19 +00:00
helixhorned 000cfffe32 On Windows, don't try to lowercase/uppercase filenames.
Most of the time, Windows file name lookup is case-insensitive. Reading the
docs (see MSDN's CreateFile help, for example), it seems like case-sensitivity
can be controlled on a per-file basis where applicable (NTFS), but people
should be concerned about matching case in the DEFs/on disk *especially* in
that case.

Also, note that this hack will not always help on systems with case-sensitive
lookup.

git-svn-id: https://svn.eduke32.com/eduke32@2693 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-25 15:23:58 +00:00
helixhorned 68c701fb4a On Windows, check for case-mismatched file names on successful kopen4load().
When a file from the local file system is opened, its real file name is gotten
with SHGetFileInfo() and compared against the one that was passed. In the case
they're not identical, a warning is issued.

This is one step towards eliminating mismatched file names in DEFs etc., which
cause trouble on systems that look them up case-sensitively.  However, it's not
perfect because the issue is trickier than it appears on first sight.
For one thing, this will only check the last (i.e. file) part in the path,
falsely accepting mismatched directory names.  However for these, it reports
them ruthlessly, even for those names where the try-other-case hack (try all
uppercase, all lowercase) would find the correctly-cased file.

git-svn-id: https://svn.eduke32.com/eduke32@2692 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-25 15:23:55 +00:00
helixhorned f69d9f241d Fix some *printf format-char/vararg mismatches on x86_64 in net.c.
git-svn-id: https://svn.eduke32.com/eduke32@2691 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-25 15:23:53 +00:00
helixhorned a72a2dbf20 Bump BYTEVERSION because of the preceding change.
git-svn-id: https://svn.eduke32.com/eduke32@2690 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-25 15:23:50 +00:00
helixhorned 05af53ac4b Fix gamearrays on 64-bit platforms.
They were broken by r2666, which made their elements intptr_t instead of
int32_t, but this change was not reflected in related allocation code.
WARNING: players on 64-bit platforms should not attempt to load games saved
with r2665 or earlier.

git-svn-id: https://svn.eduke32.com/eduke32@2689 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-25 15:23:48 +00:00
hendricks266 7f920c5541 Add EVENT_LOADGAME and EVENT_SAVEGAME, self-explanatory. Also make EVENT_NEWGAME use myconnectindex for player ID instead of screenpeek.
git-svn-id: https://svn.eduke32.com/eduke32@2688 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-25 05:14:19 +00:00
hendricks266 af511ed275 Setting RETURN in EVENT_DISPLAYCROSSHAIR will now change the crosshair's picnum while allowing the game to position it, etc. As usual, setting RETURN to -1 disables hardcoded drawing of the crosshair completely.
git-svn-id: https://svn.eduke32.com/eduke32@2687 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-25 05:13:41 +00:00
terminx 0330821c37 Bump build date from 20110312 to 20120522.
git-svn-id: https://svn.eduke32.com/eduke32@2686 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-22 15:28:51 +00:00
hendricks266 f303ac2f2a EDuke32 Wii: Ready for action!
git-svn-id: https://svn.eduke32.com/eduke32@2685 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-20 07:25:25 +00:00
hendricks266 d015c4acdc Mac OS X: Add correct default values for 'gameexecutable' cfg string so that the Mapster32 test feature works with .app bundles.
Note: You may encounter a crash if you try to test your map and Mapster32 is running fullscreen.

git-svn-id: https://svn.eduke32.com/eduke32@2684 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-20 07:24:28 +00:00
hendricks266 9df8c00bdc Fix warnings in net.c and xdelta3.
git-svn-id: https://svn.eduke32.com/eduke32@2683 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-20 07:23:56 +00:00
terminx 6db214c112 Correct an oversight and make handleevents() call our own window processing function instead of the default Windows one.
git-svn-id: https://svn.eduke32.com/eduke32@2681 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-20 05:36:32 +00:00
terminx 977a6bea65 Minor formatting fix
git-svn-id: https://svn.eduke32.com/eduke32@2680 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-19 22:47:47 +00:00
helixhorned 341f8e7432 net: less-trivial, but not non-trivial changes
git-svn-id: https://svn.eduke32.com/eduke32@2679 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-19 16:25:52 +00:00
helixhorned a59e5f40fe net: trivial changes
git-svn-id: https://svn.eduke32.com/eduke32@2678 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-19 16:25:38 +00:00
helixhorned 4f72e0b7f5 net: factor out common packet handling code
git-svn-id: https://svn.eduke32.com/eduke32@2677 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-19 16:25:22 +00:00
plagman c8b4894975 netcode: unblock stuff
git-svn-id: https://svn.eduke32.com/eduke32@2676 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-19 15:12:08 +00:00
terminx 5207f91978 Fix the previous/next weapon events
git-svn-id: https://svn.eduke32.com/eduke32@2675 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-19 14:39:29 +00:00
helixhorned 5e60b989ab net.c tweaks, just for the sake of pushing them to SVN.
- alloc_multimapstate() helper
- make g_netMapRevision a uint32 and store save->revision in sequence order
  (without &(NET_REVISIONS-1))
- one assert, one XXX comment, stylistic changes

git-svn-id: https://svn.eduke32.com/eduke32@2674 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 21:41:08 +00:00
helixhorned 94f9c03123 PNG screenshots: don't save custom gAMA.
This should be more correct, since previously, the saved PNGs were way too
contrasty when looked from within a browser.  Now, they'll always be
slightly darker than in-game (assuming one has a gamma greater than 1).

git-svn-id: https://svn.eduke32.com/eduke32@2673 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 21:40:54 +00:00
helixhorned 1c530d4b2f With Clang, compile in GNU89 mode and fix clang detection in the Makefiles.
The default C99 mode is giving us linking errors from xdelta3.

git-svn-id: https://svn.eduke32.com/eduke32@2672 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 21:40:38 +00:00
helixhorned 8a4519324e Fix one ptr size mismatch and one format letter/arg mismatch on x86_64.
git-svn-id: https://svn.eduke32.com/eduke32@2671 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 21:40:20 +00:00
helixhorned b40ec07d36 Fix cheats giving inventory items and their events.
git-svn-id: https://svn.eduke32.com/eduke32@2670 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 12:46:25 +00:00
helixhorned f5fb70250a Lunatic: actions prototype, not enabled even in the dev build.
For Lunatic, we'll want to get rid of the t_data --> script indirections, since
the latter will be no more.  Thus, all parameters are saved in t_data directly.

For the normal build, there are no changes, only stylistic tweaks.

git-svn-id: https://svn.eduke32.com/eduke32@2669 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 12:46:10 +00:00
helixhorned 165c569cbe Lunatic: v7 engine support, event updates
git-svn-id: https://svn.eduke32.com/eduke32@2668 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 12:45:52 +00:00
helixhorned 2963e2874d Fix A_CheckEnemyTile() returning 1 for "fixed" sprites (see r1913).
Those sprites are usually decorative, and certainly not enemies!

git-svn-id: https://svn.eduke32.com/eduke32@2667 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 12:45:29 +00:00
terminx 83aa5d2c18 Fix building xdelta3.o
git-svn-id: https://svn.eduke32.com/eduke32@2666 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 02:49:03 +00:00
terminx 893649a31f Add xdelta3 source and headers to VS2010 project
git-svn-id: https://svn.eduke32.com/eduke32@2665 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 00:07:40 +00:00
terminx 1c1da97378 WIP multiplayer changes, still completely broken.
git-svn-id: https://svn.eduke32.com/eduke32@2664 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-17 23:54:43 +00:00
terminx 5941bf013c Update ENet with changes from the newest version from CVS (yes, they still use CVS)
git-svn-id: https://svn.eduke32.com/eduke32@2663 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-17 21:42:53 +00:00
terminx ad2f6a6560 Update QuickLZ to 1.5.1 beta 7
git-svn-id: https://svn.eduke32.com/eduke32@2662 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-17 21:36:50 +00:00
terminx 265ff9dbfd Add xdelta3, required for some broken multiplayer updates I plan on committing later
git-svn-id: https://svn.eduke32.com/eduke32@2661 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-17 21:27:19 +00:00
terminx 282036a048 Fix EVENT_CHECKTOUCHDAMAGE (the change to how events handle RETURN broke it)
git-svn-id: https://svn.eduke32.com/eduke32@2660 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-17 20:47:56 +00:00
terminx 763aceda83 Alternate implementation of EVENT_SOUND that better covers all hard coded sounds (menus, boss recognition sounds, etc)
git-svn-id: https://svn.eduke32.com/eduke32@2659 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-17 17:33:29 +00:00
terminx c0851da27b Fix breakage of EVENT_WEAPKEYx after r2656
git-svn-id: https://svn.eduke32.com/eduke32@2658 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-17 17:23:02 +00:00
terminx 778e463549 "Band-aid" fix for the issue with EDuke32 and Mapster32 visually locking up but continuing to run and play sounds after alt+tabbing away for a few seconds on Windows Vista/7. This may screw something else up, so please test thoroughly.
git-svn-id: https://svn.eduke32.com/eduke32@2657 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-17 17:19:52 +00:00
terminx 2ca8dc1c38 This should hopefully fix the disaster with events caused by my last couple of commits ;)
git-svn-id: https://svn.eduke32.com/eduke32@2656 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-16 00:45:10 +00:00
terminx 3548c50724 Fix a potential issue with nested event execution
git-svn-id: https://svn.eduke32.com/eduke32@2655 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-15 23:39:48 +00:00
terminx 245c8c1fef Another one line DynamicTileMap[x] -> DYNAMICTILEMAP(x) change from Helix that got obliterated during svn change merging. Fixing this changes nothing in builds with DYNTILEREMAP_ENABLE defined, so this change isn't meaningful to anyone who isn't recompiling the game to work on a low memory device or something of that nature.
git-svn-id: https://svn.eduke32.com/eduke32@2654 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-15 14:12:24 +00:00
terminx 298e4f9716 1 line fix for a change that accidentally got reverted when merging newer svn updates into an older local branch
git-svn-id: https://svn.eduke32.com/eduke32@2653 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-14 22:45:40 +00:00
terminx 4ba6da5007 Addition of 3 events:
EVENT_SOUND: triggered upon playback of any sound, this allows the "hard coded" sounds to be altered in a context-aware fashion instead of having to resort to clunky hacks like replacing them with a blank sound effect.  RETURN var
iable is set to the sound effect # of the sound to be played, or -1 to cancel playback.

EVENT_CHECKTOUCHDAMAGE: triggered in P_CheckTouchDamage() whenever the player collides with anything.  Value of RET
URN is set to the result provided by clipmove() and so can be decoded in the same way.  Value of RETURN when the event is over can also be manipulated to control some of the hard coded damage effects.

EVENT_CHECKFLOORDAMAGE: triggered in P_CheckFloorDamage(), RETURN is simply the picnum of the floor of the sector t
he player is in.  Can be used to cancel hard coded floor damage effects or to make other tiles exhibit the same eff
ects

Other misc fixes and cleanups, including a possible workaround for Duke Plus SECTOREFFECTOR light issues wherein all SE49 and SE50 that have a statnum of STAT_EFFECTOR are simply changed to STAT_LIGHT during the STAT_EFFECTOR loop
 now.


git-svn-id: https://svn.eduke32.com/eduke32@2652 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-14 18:12:27 +00:00
helixhorned 0b055de591 Add tilenum bound check to CON *actor blocks when parsing, fix the other ones.
The remaining checks now "continue;" when an oob tilenum is found where
an oob access would ensue else.  Also, it's now checked for negative
numbers (the message remains the same though).

git-svn-id: https://svn.eduke32.com/eduke32@2651 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-13 16:05:34 +00:00
helixhorned 88ca3a913a Lunatic: embed lpeg and the translator into the binary
git-svn-id: https://svn.eduke32.com/eduke32@2650 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-13 16:05:16 +00:00
helixhorned ebe227ec1b Lunatic translator: better line numbering
git-svn-id: https://svn.eduke32.com/eduke32@2649 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-13 16:04:45 +00:00
helixhorned 9786e7e625 Lunatic: better initial environment setup, preventing textual repetitions
git-svn-id: https://svn.eduke32.com/eduke32@2648 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-13 16:04:28 +00:00
helixhorned f576bcb01e Take care of fullscreen tinting not being stuck on the least-intense value.
git-svn-id: https://svn.eduke32.com/eduke32@2647 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-07 21:02:14 +00:00
helixhorned 144897d524 Assign light SEs (lotags 49 and 50) to an exclusive status number. EXPERIMENTAL!
The primary reason for doing this is that handing of moving sectors is
significantly simplified. Because moving sectors usually don't move containing
SEs/effector-statnum sprites, no special handing code is needed to move light
SEs with them. Thus, this commit sets light SEs to a new statnum when they're
spawned *from premap*, and a new G_Move*-like function (called G_DoPolymerLights)
is added to process every sprite in that status list.

This should "fix" light SEs moving together with a variety of moving sectors,
but CON programs expecting the old behavior may break, therefore this commit is
marked as experimental.

Additionally, a problem with the old implementation is identified: it seems like
the correct functioning is dependent upon the order of processing between the
sector movement effector and the light SE, so this makes it another good reason
for the change.  (A third one is that all lights can be processed with a per-
statnum loop, but CON coders should not do this until the change is considered
final).

git-svn-id: https://svn.eduke32.com/eduke32@2646 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-06 21:01:52 +00:00
helixhorned 2cef17641a A couple of misc. Wii changes.
- Make MAXXDIM and MAXYDIM macros be 860 and 490, respectively.  tueidj says
  max. screen size is 848x480, but there are oob access bugs in the classic
  renderer when running with the maximum possible resolution
- don't allocate additional sector/wall storage for Mapster (saves ~16k)
- Add ud.config.UseJoystick = 1 in config.c, but make it conditional on Wii
- remove one comment I no longer believe true, add one TODO comment

git-svn-id: https://svn.eduke32.com/eduke32@2645 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-06 20:23:20 +00:00
helixhorned 4d14fe184c Lunatic translator: a bit more syntax
git-svn-id: https://svn.eduke32.com/eduke32@2644 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-06 20:22:56 +00:00
helixhorned 3f798b048c Factor out almost all instances of setting ...->pals.[rgbf] into P_PalFrom.
This is so that it may be intercepted in the future.
The only code that's not replaced by the function call is with the CON
interface to g_player[].ps->pals via player[].pals X and .pals_time.
Also, comment out one instance because it's overwritten by a succeeding one.

git-svn-id: https://svn.eduke32.com/eduke32@2643 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:24:50 +00:00
helixhorned 2ac2cce38b In game code, replace remaining literal status numbers by their defines.
git-svn-id: https://svn.eduke32.com/eduke32@2642 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:24:33 +00:00
helixhorned 8ea5b89be6 Prevent an (unlikely) integer overflow in neartag with huge switch sprites.
git-svn-id: https://svn.eduke32.com/eduke32@2641 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:24:17 +00:00
helixhorned 7cd2c19801 Remove the 'inline' qualifier of some (not-so) short functions.
Besides being the compiler's job nowadays, they significantly inflate
the size of the debugging builds.

git-svn-id: https://svn.eduke32.com/eduke32@2640 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:24:02 +00:00
helixhorned 84e5fcdad8 Accumulated trivia, mostly "the usual".
Among other things, comment out very seldomly (or not at all)
used sprite member macros: SV, ZV, RX, RY, CX, CY, CD, PL.

git-svn-id: https://svn.eduke32.com/eduke32@2639 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:23:44 +00:00
helixhorned 7cdd9a04da Make the GAMMA_CALC macro use double instead of float and use it in menus.c.
git-svn-id: https://svn.eduke32.com/eduke32@2638 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:23:17 +00:00
helixhorned fd6e36af5a Add bit 16 to the two main setbrightness() users, add bit 2 to one of them.
(I.e. also restore r2232 again.)
The first one is the palette restore logic in G_DisplayRest, the second
is CON setgamepalette, to which the "don't gltexinvalidateall()" bit is
added to mimic the first. Hightile invalidations aren't really useful for
anything other than reloading them after a video mode change, IMO.

These changes mean that
 1) active full screen tints should (almost) always be kept with a basepal
    change. The only exceptions to this are when tints really have to be
    cleared, e.g. when changing the player view in co-op play.
 2) there should be no performance issues with simultaneously changing
    basepals while a tint is applied

git-svn-id: https://svn.eduke32.com/eduke32@2637 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:22:59 +00:00
helixhorned ebbb3e304d Tweak the conditions under which setbrightness() invalidates GL textures.
Previously, we checked whether the faded palette has changed (by way of CRC)
and invalidated the textures then unless the preserve flags were set.  This
however could lead to wrongly invalidating them under unfortunate circumstances,
e.g. basepal change from CON + tints at the same time before r2620 which
reverted r2232.

Now, only invalidate them if the corresponding preserve flags are clear AND
 * the base palette has really changed OR
 * the palette CRC changed and we were running on software gamma
The latter means that performance-killing invalidations may still happen on
GL platforms lacking HW gamma (for ATI, it's currently only disabled in 8-bit
fullscreen).

Also have a new global 'basepalreset' to fake a basepal change for
setbrightness(), currently used when changing renderers so that going from
Polymer to Polymost and back again will invalidate the Polymer textures
on the second change, potentially re-applying a basepal highpal. (Still
with me?)

git-svn-id: https://svn.eduke32.com/eduke32@2636 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:22:34 +00:00
helixhorned 1a2c5ee040 Gray out CONTRAST and BRIGHTNESS sliders if no hardware gamma is available.
The sliders themselves still permit changing values, but are drawn with a
'disabled' shade because they're non-functional with software gamma.

git-svn-id: https://svn.eduke32.com/eduke32@2635 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:22:19 +00:00
helixhorned bbc020bace winlayer: Remove code that worked around a (wrongly) not set have_ATI variable.
This was fixed with the preceding change; software mode will now always use
software gamma if an ATI/AMD card is detected.

git-svn-id: https://svn.eduke32.com/eduke32@2634 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:22:05 +00:00
helixhorned dcd66dad62 On Windows, determine if we're running on a ATI card at startup even in classic.
Previously, I knew no way of querying for graphics adapter vendors/names from
anything other than OpenGL.  Googling revealed a way to do this with the
Windows API.

git-svn-id: https://svn.eduke32.com/eduke32@2633 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-05 22:21:49 +00:00
helixhorned 008121cffd Some leftover stuff from the Wii patch.
- in actors.c, make a static array const (the original patch removed the
  staticness)
- remove one comment and change some compiled-out code
- remove commented out pre-Makefile.common stuff

Some changes were not adopted from tueidj's patch:
- whitespace cleanup
- ud.config.UseJoystick = 1 in config.c
- Makefile.common, as mentioned before
- proper read-in of g_numRealPalettes, because it was done with r2503

git-svn-id: https://svn.eduke32.com/eduke32@2632 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:41:35 +00:00
helixhorned 1bb6fb5cd4 Patch adding Wii support by tueidj, part 11: miscellaneous changes
- BIGX -> BIGX_, likely again because of a name clash
- make a loop in animlib.c iterate in forward direction

git-svn-id: https://svn.eduke32.com/eduke32@2631 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:41:13 +00:00
helixhorned 68e6141c32 Patch adding Wii support by tueidj, part 10: sound and endianness changes
This part is a mixture of the original patch and my changes.  It seems like
tueidj had some trouble
 1) getting OGG to work, which is why it's conditionally compiled out
 2) struggling with endianness with the mixing routines?  This may be also
    due to him missing to define two others BIGENDIAN macros (our code is
    in need of cleanup there).  Note the change in jaudiolib/src/mix.c!

Because I added my share to this part, I might have actually broken sound
mixing on big-endian platforms.

git-svn-id: https://svn.eduke32.com/eduke32@2630 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:40:53 +00:00
helixhorned 410ffae3ab Patch adding Wii support by tueidj, part 9: build.h sector/wall/spr/... limits
On the Wii, V7 (i.e. original) map limits are used and the maximum screen size
is 1600x1200.

git-svn-id: https://svn.eduke32.com/eduke32@2629 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:40:24 +00:00
helixhorned dfa212aaf9 Patch adding Wii support by tueidj, part 8: system-specific changes
- conditionally compiles out some code intended for the PC platforms
- compat.c: get home directory routine, access() implementation
- game.c: don't use ioctl(), lower cache1d size to 8 MiB, Wii-specific
  initialization code and application directory ("apps/eduke32")

git-svn-id: https://svn.eduke32.com/eduke32@2628 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:40:08 +00:00
helixhorned 4ec6ffcef8 Patch adding Wii support by tueidj, part 7: networking
This simply macro-defines various low-level networking functions.

git-svn-id: https://svn.eduke32.com/eduke32@2627 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:39:41 +00:00
helixhorned 830f73a316 Patch adding Wii support by tueidj, part 6: mutexes
For the Wii, SDL's mutex functionality is used.  The implementation in the
original patch was wrong though, so this part required non-trivial changes.

git-svn-id: https://svn.eduke32.com/eduke32@2626 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:39:20 +00:00
helixhorned f775faf435 Patch adding Wii support by tueidj, part 5: game-side input device changes
- the crosshair is displayed at the position read from the absolute pointing
  device
- in the menus, use the hat input (that was mapped to mouse buttons in part 4)
  for navigation

git-svn-id: https://svn.eduke32.com/eduke32@2625 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:39:02 +00:00
helixhorned a1d3c2dcea Patch adding Wii support by tueidj, part 4: joystick support
- sdlayer.c: custom "get joystick button names" routine
- jmact/mouse.c: packs some joystick events into the value returned by
  MOUSE_GetButtons(): bits used are 256, 512, 4096, 8192
- MOUSE_Init() --> Mouse_Init(), presumably because of a name clash?
- comments out right-shift of joystick analog values by 5, maybe this fixes
  the scale problems with the joystick on the PC too?

git-svn-id: https://svn.eduke32.com/eduke32@2624 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:38:43 +00:00
helixhorned bc70806d32 Patch adding Wii support by tueidj, part 3: SDL-level mouse changes
This part adds support for an absolute pointing device.

git-svn-id: https://svn.eduke32.com/eduke32@2623 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:38:14 +00:00
helixhorned bd8559f6c3 Patch adding Wii support by tueidj, part 2: Makefile changes
I didn't add Makefile.common, because it needs to be made conditional.

git-svn-id: https://svn.eduke32.com/eduke32@2622 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:37:53 +00:00
helixhorned 133acaecae Patch adding Wii support by tueidj, part 1: assembly pragmas
The original patch was communicated to me by Hendricks, but since it didn't
apply cleanly (it's based on r2182) I took the liberty of slightly messing
with it for inclusion into EDuke32.

Info: http://wiibrew.org/wiki/User:Tueidj/Duke3D

This first part (which wasn't changed from the original patch) implements
scaling arithmetic and miscellaneous pragmas, some in PPC assembly and a part
of them in C.  Of some interest is the fact that the Wii processor apparently
lacks support for 64-bit integers, so divscale() uses floating-point math.

git-svn-id: https://svn.eduke32.com/eduke32@2621 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:37:32 +00:00
helixhorned 226f04ddae Revert r2232, "don't reset full-screen tint on basepal change" in CON setgamepalette.
Because gltexinvalidate*() could be called too often when setgamepalette is used
while having a tint overlaid else.  Pending thorough analysis/reworking of the
32-bit mode base palette handling / texture invalidation.

git-svn-id: https://svn.eduke32.com/eduke32@2620 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-29 20:55:10 +00:00
helixhorned 6ac80f29ff When deleting GL skin textures, handle the case where they are aliased.
That is, have a second loop over all models run for each deleted tex and
null the texname.  This is ugly, sure, but it's better than calling
glDeleteTextures on stale names.

git-svn-id: https://svn.eduke32.com/eduke32@2619 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-29 20:54:52 +00:00
helixhorned 28bbde2377 Fix 'realloc' routine of GL texture name (id) debugging code.
git-svn-id: https://svn.eduke32.com/eduke32@2618 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-29 20:54:37 +00:00
helixhorned 530a183ea0 Prettify some code in mdsprite.c.
- factor out a longish expression
- whitespace, move a var down
- remove unneeded casts (recall: "usual arithmetic conversions")
- strcat -> Bstrcat, strcpy -> Bstrcpy

git-svn-id: https://svn.eduke32.com/eduke32@2617 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-29 20:54:22 +00:00
helixhorned f5ee6ca7eb Lunatic translator: nearing syntax completion while treading in murky waters.
- bump lpeg stack limit to 1024 (hack) for long if/if/if...else chains
- lexical: newline, EOF and whitespace; "bad" identifiers; hex literals,
           newline terminated strings (allow empty string)
- syntax: allow nesting of array expressions, it's easier than special-casing;
          handle issues with structs expecting parm2 (hackish); userdef;
          switch/case/default
- fix parsing some commands; mind prefixes!
- frontend: if failing match, print last keyword and its position; warn on
  "bad" identifiers (one per such); batch processing from command line
- Files that locate finds from my linux box now pass (except where there are
  really syntax errors).

git-svn-id: https://svn.eduke32.com/eduke32@2616 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-29 20:54:06 +00:00
helixhorned b2b8ab7890 CON palfrom: sanity-check current player and maybe print error message.
git-svn-id: https://svn.eduke32.com/eduke32@2615 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-28 21:56:38 +00:00
helixhorned 5dd8d20e7a Make two-way trains capable of carrying SE49 or SE50 sprites.
git-svn-id: https://svn.eduke32.com/eduke32@2614 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-28 21:56:23 +00:00
helixhorned 475b920e8e Fix 'mulscale' accepting defines or constants where writable var expected.
git-svn-id: https://svn.eduke32.com/eduke32@2613 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-22 19:11:01 +00:00
helixhorned cb8e0d1b57 Lunatic translator improvements.
git-svn-id: https://svn.eduke32.com/eduke32@2612 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-22 19:10:46 +00:00
helixhorned 6d9411f669 Lunatic: preliminaries for persistence
git-svn-id: https://svn.eduke32.com/eduke32@2611 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-22 19:10:29 +00:00
helixhorned 059e8ebe52 Fix a null pointer access in Polymer mouse picking.
Specifically, it was in the "determine searchwall when aiming at floor or
ceiling" part.  Now, if prsectors[]->ceil.plane (or ->floor.plane) is NULL,
we set the searchwall to the sector's firstwall and return.

git-svn-id: https://svn.eduke32.com/eduke32@2610 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-14 13:04:31 +00:00
helixhorned 4322dff22c Cleanup in game.c/actors.c part2, only whitespace changes.
git-svn-id: https://svn.eduke32.com/eduke32@2609 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-13 10:46:04 +00:00
helixhorned ab88ea66ef Some cleanup in game.c/actors.c, part 1.
git-svn-id: https://svn.eduke32.com/eduke32@2608 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-13 10:45:49 +00:00
helixhorned 7c8f2c2887 actors.c: factor out various duplicated code in G_MoveEffectors.
- 4 instances -> HandleSE31
- 4 instances -> MaybeTrainKillPlayer
- 2 instances -> MaybeTrainKillEnemies
- move a couple of variables into inner blocks and add 'const' for easier reading

In passing, fix a minor glitch where the squishing sound of an enemy that got
run over by an SE 6 or 14 car would appear to originate from the SE instead
of the enemy's last position.

git-svn-id: https://svn.eduke32.com/eduke32@2607 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-13 10:45:33 +00:00
helixhorned 90144e1dcc Polymer: when drawing art sky, temporarily set texcoord s wrapping to clamping.
This properly fixes the unwanted vertical lines.

git-svn-id: https://svn.eduke32.com/eduke32@2606 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-10 20:14:52 +00:00
helixhorned d1fed44da6 Mapster/classic: Make Ctrl-P toggle parallax rendering types in 3D mode again.
Of course, it's just for the heck of it, since this setting is not saved into
MAP files.  I kinda like the cylindrical projection...

git-svn-id: https://svn.eduke32.com/eduke32@2605 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-10 20:14:31 +00:00
helixhorned d44f8c761e Fix flipping masked walls in Mapster/classic.
This has been there since searchbottomwall introduction in r1466.

git-svn-id: https://svn.eduke32.com/eduke32@2604 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-10 20:14:17 +00:00
helixhorned 7cf95a9b0f Fix aspect correction in fullscreen mode.
Previously, we only set the viewingrange according to the physical screen's
dimensions, but didn't correct yxaspect for a potential non-square pixel
ratio.

git-svn-id: https://svn.eduke32.com/eduke32@2603 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-09 19:22:31 +00:00
helixhorned a03eadb22e Add samples/aspect.map for calibrating aspect-related settings and testing.
git-svn-id: https://svn.eduke32.com/eduke32@2602 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-09 19:22:15 +00:00
helixhorned db6225eb5d On Windows, auto-determine r_screenaspect on startup.
Consequently, it's not saved as a setting in either the game or editor
config files.  We do this by calling "GetSystemMetrics(SM_CXSCREEN)"
(accordingly for y) and calculating the cvar by dividing common factors,
since it has to be in the form WWHH.  This may fail for _really_ strange
screen dimensions, so a log message is printed at the very beginning.

git-svn-id: https://svn.eduke32.com/eduke32@2601 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-09 19:22:00 +00:00
helixhorned 8e0ea2e9c5 On Windows, don't allow map playtesting from Mapster when in fullscreen.
Because this doesn't even seem to work on XP, we're being spammed with
DDERR_SURFACELOST messages...

git-svn-id: https://svn.eduke32.com/eduke32@2600 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-09 19:21:39 +00:00
helixhorned cb888a3bdf Fix point deletion in Mapster32.
Previously, it was possible to leave a sector with less than three walls if
a point got deleted transitively by a TROR link.  Now, a proper check is done
for all deletion candidates and a message stating which wall and sector is
problematic is printed.  Thanks for Diaz for pointing out the brokenness.

git-svn-id: https://svn.eduke32.com/eduke32@2599 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-08 15:52:49 +00:00
helixhorned 714ecf0a21 generateicon: fix inconsistent format letter vs. vararg in fprintf.
git-svn-id: https://svn.eduke32.com/eduke32@2598 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-08 15:52:24 +00:00
hendricks266 5777eae026 Build tools:
- clearbufbyte --> Bmemset
 - add libm to $(UTILLIBS) to fix building of mkpalette
 - add self-explanatory Makefile commands: dxutils, sdlutils, printdxutils, printsdlutils

git-svn-id: https://svn.eduke32.com/eduke32@2597 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-08 07:23:24 +00:00
plagman c35e1005b0 Fix generateicon.
git-svn-id: https://svn.eduke32.com/eduke32@2596 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-08 04:25:06 +00:00
plagman 1824b820e1 I don't know if that was the intent, but it's better than not building.
git-svn-id: https://svn.eduke32.com/eduke32@2595 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-08 00:01:31 +00:00
helixhorned a18a89b513 Lunatic: prototype of The Translator.
Currently syntax only.  Parses the original scandcode 0x1d files, which is
harder than you'd imagine given the relatively simple structure.  Chokes on
new-gen custom stuff.

git-svn-id: https://svn.eduke32.com/eduke32@2594 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-07 20:10:03 +00:00
helixhorned dbd8745620 Fix CON parser accepting defines and numbers where writable var expected (4 cmds)
git-svn-id: https://svn.eduke32.com/eduke32@2593 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-07 20:09:44 +00:00
helixhorned 9a7d1ed1a5 A couple of less interesting changes.
- strip 'inline' from animateoffs() definition, remove declaration in build.h
- one min/max -> clamp
- one malloc/strlen/strcpy -> strdup

git-svn-id: https://svn.eduke32.com/eduke32@2592 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-05 19:49:54 +00:00
helixhorned c01109c483 m32script: fix some commands breaking too early in case of a failed validation.
If one next instruction happened to be interpreted, madness would ensue,
because the pointer wouldn't be aligned on the "opcode" part anymore.
Also, with "seti", set current sprite index only after a successful validation.

git-svn-id: https://svn.eduke32.com/eduke32@2591 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-05 19:49:30 +00:00
helixhorned 607774a982 New M32Script command "getspritelinktype" <spritenum> <<linktypevar>>.
This get into the writable variable the "linking type" of the sprite with index
<spritenum>.  The result is a bit field of ORed values:
 1: lotag has linking semantics
 2: hitag
 4: extra, 8: xvel, 16: yvel, 32: zvel, 64: owner  (custom only)

Custom setting about which sprites have what kind of linking can be programmed
via EVENT_LINKTAGS: it receives a sprite index as the 'current sprite' and is
supposed to return the bit field in RETURN.

An example which lists sprites and their linking hi- and lotags is provided in
the state 'listusedtags' in a.m32.

git-svn-id: https://svn.eduke32.com/eduke32@2590 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-05 19:49:12 +00:00
helixhorned b85d40ea63 Fix "ignored application parameter" message for short options.
git-svn-id: https://svn.eduke32.com/eduke32@2589 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-04 18:58:33 +00:00
helixhorned b7df5ffa5f Big clean up in defs.c and related content. The usual stuff...
- factor out many identical checks in a convenient function; some messages
  may read slightly differently now and tile ranges may be handled more strictly
  (error out if one of the limits is invalid)
- factor out two instances of identical (up to one arg) code into
  tile_from_truecolpic
- factor out setting picsiz[] and stuff into set_picsizanm
- some checks
- Make "undefmodelof" non-functional and warn.
- in "animtilerange", if the tile difference is >= 64, error out since we
  can't store it in picanm[]

git-svn-id: https://svn.eduke32.com/eduke32@2588 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-04 18:58:19 +00:00
helixhorned c0a8fb0588 Add dummy parsing of "nofloorpalrange" to defs.c.
git-svn-id: https://svn.eduke32.com/eduke32@2587 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-04 18:57:58 +00:00
helixhorned b3f485a568 Move some debugging stuff out of compat.h into glbuild.h and common.h.
git-svn-id: https://svn.eduke32.com/eduke32@2586 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-04 18:57:42 +00:00
helixhorned 78aa420de0 Fix "Thanks (...) for giving us big heads" message at the end of Ep4.
This was more or less done by trial and error rather than understanding what
exactly is going on there.  In any case, the code for all the different ending
scenes ought to be factored out instead of being duplicated with subtle
differences every time.

git-svn-id: https://svn.eduke32.com/eduke32@2585 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-04 18:57:20 +00:00
helixhorned f8796d1a1b When in GL modes, clear the screen first in some non-in-game places.
This is so that when hud_bgstretch is disabled (i.e. background pictures are
not stretched to the whole screen), the frame buffer has no leftover contents
from previous frames on the sides of the screen. This was particularly noticable
when using the console.
The "places" are the following:
 - before drawing an anim frame
 - before drawing a "full-screen" background
 - while displaying logo, titlescreen, loadscreen
(this leaves a couple others which I didn't test, and didn't tweak)

git-svn-id: https://svn.eduke32.com/eduke32@2584 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-04 18:57:06 +00:00
helixhorned cd2ae337a2 game.c: fadepal{,tile}'s limits are now always inclusive; rewrite to avoid code dup.
Also, do a setpalettefade(..., end) when breaking fadepaltile now, too.

git-svn-id: https://svn.eduke32.com/eduke32@2583 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-04 18:56:50 +00:00
helixhorned 2113959dd5 game.c: make fadepal/fadepaltile first calculate inclusive end limit.
When requesting an increasing ramp, the upper limit is taken to be exclusive.
When it is passed to G_FadePalette, only the lowest 6 bits are passed further
to setpalettefade, which means that a limit of 64 is incorrectly set as 0.
Also, when breaking from the fade loop, set the fade value to the end one for
fadepal!

git-svn-id: https://svn.eduke32.com/eduke32@2582 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-04 18:56:31 +00:00
helixhorned fa1521703c game.c: factor out a couple of often-used few-liners, make Ep3 ending cancelable.
git-svn-id: https://svn.eduke32.com/eduke32@2581 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-04 18:56:16 +00:00
plagman 54c3e217dc winlayer: remove Intel whitelist
Allow all drivers for now; if anything, we should start maintaining a
blacklist now that most Intel chips have decent enough support to be
able to run stuff satisfactorily.

git-svn-id: https://svn.eduke32.com/eduke32@2580 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-01 04:32:17 +00:00
plagman 17d91781c5 Fix OpenGL screenshots with unaligned widths such as 1366
git-svn-id: https://svn.eduke32.com/eduke32@2579 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-01 04:24:57 +00:00
plagman 223cc81373 sdlayer: don't snap the mouse in debug mode, redux..
git-svn-id: https://svn.eduke32.com/eduke32@2578 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-01 03:57:36 +00:00
plagman b237c27c1f Fix the MSVC build, common.c was only added to the GNU Makefile.
git-svn-id: https://svn.eduke32.com/eduke32@2577 1a8010ca-5511-0410-912e-c29ae57300e0
2012-04-01 00:26:01 +00:00
plagman db81c01b3e engine: fix unused variable permanentlock
git-svn-id: https://svn.eduke32.com/eduke32@2576 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-31 22:32:05 +00:00
helixhorned 015affaa27 CON showview/showviewunbiased: silently clamp 'horiz' to HORIZ_MIN..HORIZ_MAX.
git-svn-id: https://svn.eduke32.com/eduke32@2575 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-31 11:22:32 +00:00
helixhorned 34c0e85295 Allow the screen bounds difference in CON showview/-unbiased to be less than 2.
This requires one tweak in drawrooms' umost/dmost setup to prevent oob access.
Specifically, a coordinate difference of 0 is allowed.  In the classic renderer,
this would mean a one-pixel (real screen coords) height or width.  In Polymost,
it would currently mean a one-pixel height and zero-pixel width, but this might
be subject to change.

git-svn-id: https://svn.eduke32.com/eduke32@2574 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-31 11:22:19 +00:00
helixhorned 1ae1bfa479 New CON command 'showviewunbiased', mapping the screen coords w/o round-to-0 bias.
The showview command transforms the 320-based screen bound coordinates to the real
screen bounds like xreal = (x*xdim)/320, which shows a bias towards zero: for
example, for a 1680 screen width, the maximum permissible value 319 is mapped to
round_to_zero((319*1680)/320) == 1674.  (The rounding is implicit in the integer
division).  This makes it impossible for a view to cover the whole screen with any
other resolution than 320x200.  The new command transforms the bounds like
xreal = (x*(xdim-1))/319, which would map 319 to 1679 in the preceding example.

git-svn-id: https://svn.eduke32.com/eduke32@2573 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-31 11:22:00 +00:00
helixhorned 5b036273c9 Really fix PNG screenshots.
git-svn-id: https://svn.eduke32.com/eduke32@2572 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-29 21:30:01 +00:00
helixhorned 258c19f411 When requesting a non-fogged identity lookup from makepalookup(), alias to palookup[0].
(That is, the base shade table.) Before, we allocated each palookup buffer.
For a vanilla setup, this means that we're now saving 224*32*256 ~= 1.8 megs,
which might be interesting for low-memory gadgets.

git-svn-id: https://svn.eduke32.com/eduke32@2571 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-29 21:17:35 +00:00
helixhorned 98935fe7a9 Don't fall back on allocache if malloc'ing a palookup buffer or transluc table fails.
First, it's unlikely in our day and age.  Second, they're always free'd at the end,
so allocache'ing them is incorrect.

git-svn-id: https://svn.eduke32.com/eduke32@2570 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-29 21:17:19 +00:00
helixhorned 0be9b7e568 Make makepalookup() accept NULL for 'remapbuf', meaning "use identity mapping".
Also,
 - use this in game.c and astub.c palookup loading code
 - when makepalookup() is passed a 0 palnum, return early.  This means that
   'fogpal' will silently fail when attempting to change pal 0.
 - in 'makepalookup' DEF command, error out if passed a pal of 0.

git-svn-id: https://svn.eduke32.com/eduke32@2569 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-29 21:17:03 +00:00
helixhorned a7eb29027f DEF command 'makepalookup', allowing indpt. specification of fog and color remapping.
The syntax is as follows:
  makepalookup { <token-list...> }
where valid tokens are
  * pal <palnum>:  the palette number, 1 .. 250
  * red <num>, green, blue (or r, g, b):  the fog color components on a 0 to 63 scale.
    Components that are not present are assumed to be 0.
  * remappal <palnum>:  the palette number to take the index remapping from, i.e. 21
    for blue -> red.  When absent, defaults to 0.
  * remapself:  when present, specifies that the remappal is the same as the 'pal'.
    This is to prevent textual redundancy when overwriting existing palookups.

Examples (best tested with tile #251):
  1) makepalookup { pal 200  red 30  remappal 23 }
     This creates palookup 200 with a fog of (30,0,0) and a blue-to-yellow remapping
     (assuming it has not been changed before)
  2) makepalookup { pal 21  red 30  remapself }
     This 'fogifies' palookup 21 with a red fog.
  3) makepalookup { pal 21  red 30 }
     This overwrites palookup 21 with a red fog, but clears the blue-to-red remapping.

The fog aspect of this command affects the GL modes just like 'fogpal', but the
remapping has no effect for hightiles.

- Also, silently clamp 'fogpal' r,g,b values to the range 0 .. 63.

git-svn-id: https://svn.eduke32.com/eduke32@2568 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-29 21:16:41 +00:00
helixhorned 4e904839dc In OpenGL modes, save savegame screenshots as they appear on the screen.
Instead of drawing the rooms and masks with the classic renderer once.
The captured scene is transformed to use the base palette, so that the
screenshot will also show up in classic.  No aspect correction is done.

git-svn-id: https://svn.eduke32.com/eduke32@2567 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-29 21:16:20 +00:00
helixhorned c5d8aa29ee The obligatory portion of trivial stuff.
git-svn-id: https://svn.eduke32.com/eduke32@2566 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:45:25 +00:00
helixhorned 994bdd4759 Polymer: Fix a potential uninitialized mem read in debug msg when in void space.
git-svn-id: https://svn.eduke32.com/eduke32@2565 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:45:05 +00:00
helixhorned a7ec51e375 Clean up astub.c in a similar fashion to the preceding changes.
git-svn-id: https://svn.eduke32.com/eduke32@2564 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:44:47 +00:00
helixhorned b06ce8456a Make g_grpNamePtr memory-clean, extern clearGrpNamePtr().
git-svn-id: https://svn.eduke32.com/eduke32@2563 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:44:33 +00:00
helixhorned 55f3fdb9bc numgrpfiles --> NUMGRPFILES in Apple/GameListSource.game.m
git-svn-id: https://svn.eduke32.com/eduke32@2562 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:44:14 +00:00
helixhorned 3deb8d1d99 Clear up handling of g_*NamePtr in the game.
The primary change is that things have been made memory-clean.  Some of these
pointers may point to wildly different places during the course of the program
such as statically or dynamically allocated storage, the buffer returned by
getenv() (which must not be modified according to the docs), or an element of
argv[].  Consequently, we need to strdup, or better, dup_filename them if they
are ever to be passed to a function that modifies their pointed-to data.

Specifically:
 - added statics or consts according to usage
 - 3 new functions clear{Grp,Def,Script}NamePtr, only 'Def' one extern for now
 - in G_CheckCommandLine, don't strip 'const'; use Bstrncpyz where appropriate
 - remove multiple declarations

Also, warn if an application parameter has been ignored (not matched).

git-svn-id: https://svn.eduke32.com/eduke32@2561 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:44:00 +00:00
helixhorned 77918caf9c New helper function "char *dup_filename(const char *fn)" in common.h.
It allocates a buffer of size BMAX_PATH and copies the passed string into it.

git-svn-id: https://svn.eduke32.com/eduke32@2560 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:43:39 +00:00
helixhorned 0e3adea64e Replace various occurences of "Bstrncpy(buf, src, sz); buf[sz-1]=0;" with Bstrncpyz
git-svn-id: https://svn.eduke32.com/eduke32@2559 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:43:21 +00:00
helixhorned 0ea9feee2d Minor tweaks of makepalookup() and hicinit().
git-svn-id: https://svn.eduke32.com/eduke32@2558 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:42:49 +00:00
helixhorned 26d2cf7e01 Replace {get,clear}filenames and duplicate autoload code in astub.c/game.c.
This additionally fixes leaks that were caused by traversing the file name
list with the 'findfiles' pointer and not clearing them afterwards (even if
there was a handle to the list head via 'findfileshigh').

git-svn-id: https://svn.eduke32.com/eduke32@2557 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:42:32 +00:00
helixhorned 0c5c58cbbb Replace {get,clear}filenames with fnlist functions in build.c, menus.c and osdcmds.c
git-svn-id: https://svn.eduke32.com/eduke32@2556 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:42:16 +00:00
helixhorned a7f6f3bacc Factor out different {clear,get}filenames definitions into fnlist_t + functions.
Don't actually replace the instances in the code now.
Additions in common.h:
 - fnlist_t, which combines CACHE1D_FIND_REC *finddirs, *findfiles and
   int32_t numdirs, numfiles
 - the FNLIST_INITIALIZER macro, which MUST be used for automatic variables
 - fnlist_clearnames, fnlist_getnames functions
 - G_LoadGroupsInDir, G_DoAutoload, two often-occurring uses of these

git-svn-id: https://svn.eduke32.com/eduke32@2555 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:41:57 +00:00
helixhorned d77e388522 Factor out eleven (!) instances of identical code into check_file_exist().
git-svn-id: https://svn.eduke32.com/eduke32@2554 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:41:39 +00:00
helixhorned d8b9c9b188 Clean up defs.c a little.
- remove redundant bound checks
- add necessary bound checks
- make one comparison pair consistent (> vs. >=)
- one if-if --> clamp

git-svn-id: https://svn.eduke32.com/eduke32@2553 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-28 19:41:15 +00:00
helixhorned 68f0842b85 Fix a potential sprintf to a buffer passed to it as a string argument.
git-svn-id: https://svn.eduke32.com/eduke32@2552 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:06:05 +00:00
helixhorned af9db8cfa2 Mapster32: fix specifying a custom configuration file with -cfg.
We were writing into a string literal. Ouch!

git-svn-id: https://svn.eduke32.com/eduke32@2551 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:05:51 +00:00
helixhorned e350502cd0 Add "static inline" helper function "Bstrncpyz" to compat.h.
git-svn-id: https://svn.eduke32.com/eduke32@2550 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:05:38 +00:00
helixhorned e7f091cd90 Factor out various instances of getatoken() into common.c.
Alongside, these make into into the header:
 - the 'tokenlist' type (a typedef'd struct)
 - the T_EOF and T_ERROR enumeration values

git-svn-id: https://svn.eduke32.com/eduke32@2549 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:05:23 +00:00
helixhorned b7495ef5bd Guard scriptfile.h with an #ifndef sentinel.
git-svn-id: https://svn.eduke32.com/eduke32@2548 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:04:59 +00:00
helixhorned e74f8cada1 Replace all occurences of assert in our code with Bassert.
git-svn-id: https://svn.eduke32.com/eduke32@2547 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:04:44 +00:00
helixhorned 2cc9f751cd Add Bassert to compatibility macros/functions, currently only an assert wrapper.
git-svn-id: https://svn.eduke32.com/eduke32@2546 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:04:24 +00:00
helixhorned ebaf65951b Change input and return types of inline function clamp() from int to int32_t.
git-svn-id: https://svn.eduke32.com/eduke32@2545 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:04:06 +00:00
helixhorned 4d3e668352 Makefile.common: comment out usage of llvm versions of ar and ranlib with clang.
These are for LLVM bitcode, I think.  In any case, they're giving me errors.

git-svn-id: https://svn.eduke32.com/eduke32@2544 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:03:51 +00:00
helixhorned f0885f665b Capitalize numgrpfiles macro to NUMGRPFILES.
git-svn-id: https://svn.eduke32.com/eduke32@2543 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:03:40 +00:00
helixhorned ee5dd2cf32 Add common.[ch] which should be used for common non-engine types/functions/data.
As inauguration, move G_AddGroup, G_AddPath and struct strllist there.
The header is located in build/include, because in the future, code that resides
closer to (but is not strictly part of) the engine might need to be factored
into here.  The source file, however, is in the source/ directory.

git-svn-id: https://svn.eduke32.com/eduke32@2542 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:03:20 +00:00
hendricks266 6336856227 osxbuild.sh: more options and designation of presets
git-svn-id: https://svn.eduke32.com/eduke32@2541 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 05:07:42 +00:00
hendricks266 efb440ada0 All string literals sent as normal messages to the player in-game written in ALL CAPS have been converted by hand to more proper capitalization. (Critical errors have been left as-is, and the editor did not need changes.)
git-svn-id: https://svn.eduke32.com/eduke32@2540 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 05:07:12 +00:00
hendricks266 9d74cd700e Add "specularpower" and "specularfactor" as synonyms of "specpower" and "specfactor" respectively.
git-svn-id: https://svn.eduke32.com/eduke32@2539 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 05:06:31 +00:00
hendricks266 9f61e6e2d5 Superficial text changes:
- Help window text cleaned and made more consistent between game and editor
 - Added help entry for "-clipmap"
 - Log text for using CON, DEF, and RTS files has been made consistent
 - All instances of '%s' have been replaced with \"%s\" because ' is a valid filename character. (At least on Windows.)

git-svn-id: https://svn.eduke32.com/eduke32@2538 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 05:05:57 +00:00
hendricks266 3929d60744 OS X: Fix more warnings.
git-svn-id: https://svn.eduke32.com/eduke32@2537 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 05:04:21 +00:00
plagman 90e410cf47 polymer: cull sprite lights after computing sprite geometry
This was broken ever since updatesprite() had been forked off drawsprite() and
would cause static lights to never hit static sprites until one or the other
changed, after which the light would always get culled against outdated sprite
geometry.

git-svn-id: https://svn.eduke32.com/eduke32@2536 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 00:55:53 +00:00
plagman 3818282811 polymer: don't shadow-optimize light culling in cached sprites
Since updatesprite() only happens once for static sprites, avoiding
light culling if we hit it in a shadow pass means that sprite will
never be lit as long as that happens.

git-svn-id: https://svn.eduke32.com/eduke32@2535 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 00:55:41 +00:00
helixhorned ef7ad7b554 Lunatic: more complex gamevar-decl code.
git-svn-id: https://svn.eduke32.com/eduke32@2534 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 22:01:36 +00:00
helixhorned b897a59d82 Bound-check the 'picnum' argument to rotatesprite; tweak CON digitalnumber check.
There are instances where oob picnums may propagate to that function, so
protect it.  The digitanumber[z] bound check is actually made more permissive,
but could also just as well be removed now.

git-svn-id: https://svn.eduke32.com/eduke32@2533 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 22:01:21 +00:00
helixhorned 6cd11d0468 Accumulated trivia.
- engine.c: move some variables into a lower block
- premap.c: clearbufbyte --> Bmemset

git-svn-id: https://svn.eduke32.com/eduke32@2532 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 22:01:03 +00:00
helixhorned c4efd9b1fa Take over more correct G_AddGroup from game.c to astub.c.
The code in the editor was potentially doing a strcat on a strdup'd string.
Also, rename AddGamePath to G_AddPath in astub.c and add CODEDUP markers
because shared stuff like this ought to be factored out into a separate
source file some time.

git-svn-id: https://svn.eduke32.com/eduke32@2531 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 22:00:42 +00:00
helixhorned 694acef9fe Allow up to 7 skills, coded by M210 and taken over with modifications.
Skill names are defined via 'defineskillname' as before, but the index
of the last non-empty skill name (plus one) is taken as the skill count.
So, if you only define the 6th, there will be no effect.
Note that currently, there is no way to specify less than four skills
because the CON parser doesn't allow the empty string for the name (it'll
go beyond the line) and because the default skill names are initialized in
EDuke32 too, in addition to the CONs.

git-svn-id: https://svn.eduke32.com/eduke32@2530 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 22:00:27 +00:00
helixhorned e706258c43 Fix an assertion failure with dorotatesprite 4-pixels vline drawing.
See http://forums.duke4.net/topic/5362-crash-with-current-svn/

git-svn-id: https://svn.eduke32.com/eduke32@2529 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 13:55:03 +00:00
helixhorned 386d34e3b4 Fix static-main-arrays debug build, which is without the clipshape feature.
git-svn-id: https://svn.eduke32.com/eduke32@2528 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 13:54:46 +00:00
helixhorned adc8b302ea Factor out two practically identical instances of ceiling/floor setup code.
git-svn-id: https://svn.eduke32.com/eduke32@2527 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 13:54:31 +00:00
helixhorned 102e97659d Factor out assignment of various globals in 4 instances of wall drawing code.
This makes the differences in these codes stand out much more clearly.

git-svn-id: https://svn.eduke32.com/eduke32@2526 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-25 13:54:14 +00:00
helixhorned 549e9f6216 Make "LIBS+= $(L_SSP) -Wl,--enable-auto-import" conditional to Windows.
git-svn-id: https://svn.eduke32.com/eduke32@2525 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-24 15:59:53 +00:00
helixhorned cd3947f3f4 Correct 'nofloorpalrange' range clamping, move one get_hud_pal() farther down.
The nofloorpalrange beginning and end indices are silently clamped to 1 .. 255.

git-svn-id: https://svn.eduke32.com/eduke32@2524 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-24 15:59:39 +00:00
hendricks266 0122764017 - Makefiles:
- Fix typo, correctly adding SDL libs to the tools on OS X so that makesdlkeytrans builds.
  - Move all mention of $(LIBS) out of build/Makefile into build/Makefile.shared because no linking takes place in the engine itself so LIBS additions were lost. This should fix USE_LIBPNG=1 on Windows at least.
- Other assorted cleanup.

git-svn-id: https://svn.eduke32.com/eduke32@2523 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-24 08:30:28 +00:00
hendricks266 62dd05a2e5 Update credits in menus.c with people from the Credits wiki page. Also, fix the text and order of other entries.
git-svn-id: https://svn.eduke32.com/eduke32@2522 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-23 20:24:30 +00:00
hendricks266 fd71c5ef4c Build tools:
- Fix up and add building instructions for kmd2tool, getdxdidf, and makesdlkeytrans.
 - Add kmd2tool to "utils" build job.
 - Fix warning in and cross-platform building of generateicon.
 - Source and text cleanup!

git-svn-id: https://svn.eduke32.com/eduke32@2521 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-23 20:23:46 +00:00
hendricks266 64595adfb2 Makefiles:
- Properly handle the architecture definition when BUILD32_ON_64=1
 - Add proper $(*LDFLAGS) to which LTO and ARCH are correctly passed.
 - Cleanup of compiler flag variables.

This should fix to some degree building of the Build tools on OS X, and it may possibly fix the crashing of the OS X x86 32-bit build.

git-svn-id: https://svn.eduke32.com/eduke32@2520 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-23 20:22:10 +00:00
helixhorned d51d9a0fb8 Rather trivial changes in engine.c and crc32.c.
git-svn-id: https://svn.eduke32.com/eduke32@2519 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:48:06 +00:00
helixhorned b5894eb7e0 Make 'nofloorpalrange' def token affect HUD weapons.
git-svn-id: https://svn.eduke32.com/eduke32@2518 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:47:47 +00:00
helixhorned 5944a9ab0f New game def token "nofloorpal <pbeg> <pend>", disabling sprites taking on floor pals.
It has always annoyed me how floors with "shirt-color" type palookups like 21
affected the color of its containing sprites and HUD-drawn stuff.  This commit
allows one to specify an inclusive range of pals for which this should be
disabled for sprites (but not for HUD stuff, yet).

git-svn-id: https://svn.eduke32.com/eduke32@2517 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:47:29 +00:00
helixhorned 85ab7d2e39 Remove global 'uint8_t *anim_pal' which was only used once as a temporary.
git-svn-id: https://svn.eduke32.com/eduke32@2516 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:47:13 +00:00
helixhorned 3e1a8c523d In Mapster32, remove ReadGamePalette() and GAMEpalette[] and use engine's palette[].
git-svn-id: https://svn.eduke32.com/eduke32@2515 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:46:56 +00:00
helixhorned 55dc8fee40 Make engine.c's loadpalette return -1 if palette.dat is not found.
... and initengine now returns 1 if loadpalette() fails.

git-svn-id: https://svn.eduke32.com/eduke32@2514 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:46:39 +00:00
helixhorned 993b971107 editor: Factor out 'rainbow' drawing code and use bytesperline instead of xdimen.
git-svn-id: https://svn.eduke32.com/eduke32@2513 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:46:23 +00:00
helixhorned 46246b8ab7 Comment out computergetinput() and children, which are unused since ng netcode.
git-svn-id: https://svn.eduke32.com/eduke32@2512 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:46:07 +00:00
helixhorned 23bb14f8aa In in-game overhead map, don't draw invisible extended floors.
git-svn-id: https://svn.eduke32.com/eduke32@2511 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-22 22:45:41 +00:00
hendricks266 2c27c33da8 Makefile: Link to libz on OS X like on Windows.
git-svn-id: https://svn.eduke32.com/eduke32@2510 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:33:24 +00:00
hendricks266 5564537510 Makefile: Update/fix treatment of libpng libraries and headers under Windows and OS X.
git-svn-id: https://svn.eduke32.com/eduke32@2509 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:30:50 +00:00
hendricks266 dbbfb2d73b osxbuild.sh: Partial solution for non-building tools: remove "-j 3" parameter. (The -k [--keep-going] parameter has been added just to the tools for a small bit of good measure.)
git-svn-id: https://svn.eduke32.com/eduke32@2508 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:29:46 +00:00
hendricks266 a35dc578e0 Makefiles: Add $(STATICSTDCPP) variable which the user can set to 0 or 1 to explicitly set C++ standard library linking to static or shared respectively. By default it is transparently left blank.
An effect is only really seen in the buildtools written in C++, currently just arttool.
This is mainly of interest to distributors of the buildtools to avoid missing DLL errors.

git-svn-id: https://svn.eduke32.com/eduke32@2507 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:29:11 +00:00
hendricks266 270342463f More "malloc + strlen + strcpy --> strdup" in module parameter code.
git-svn-id: https://svn.eduke32.com/eduke32@2506 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:28:22 +00:00
helixhorned ea9abc58c9 Probably fix sheared PNG screenshots.
We shouldn't assume a particular bytes-per-line value and use ylookup[] instead.
Specifically, windowed modes on Windows use a frame buffer that always has odd
x dimension.

git-svn-id: https://svn.eduke32.com/eduke32@2505 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 18:32:16 +00:00
helixhorned 51398ca749 Rename 'numpalookups' to 'numshades' internally.
git-svn-id: https://svn.eduke32.com/eduke32@2504 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 18:32:00 +00:00
helixhorned 8a50b75de2 Weirdness removal in G_LoadExtraPalettes (which reads lookup.dat).
- replace bit tweaking for big endian archs with clear code
- allow palette lookups >= 128, previously we read into a signed byte

git-svn-id: https://svn.eduke32.com/eduke32@2503 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 18:31:37 +00:00