Commit Graph

2856 Commits

Author SHA1 Message Date
helixhorned cea07d0125 In CON showview, if drawing off-screen, clear the view with pal 0 and bail out.
This fixes the glitches/corruption whereever showview is used from
EVENT_DISPLAYROOMS while the scene is actually rendered to a tile instead of the
frame buffer, for example because we have a tilted view or "pixel doubling"
enabled.  Fixing it for real (i.e. so that the showview actually completes)
will require more effort.

git-svn-id: https://svn.eduke32.com/eduke32@2706 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-29 20:01:44 +00:00
helixhorned 32c76d14b4 mdsprite.c: patch up bad array access in loadkvx, remove const from kopen4load arg.
vbit was being accessed with an int32 e.g. at address 3200 when only 3203 were
allocated.  We simply alloc +1 byte.

git-svn-id: https://svn.eduke32.com/eduke32@2705 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-29 20:01:40 +00:00
helixhorned efa0079474 On Windows, check file name case with 'sound' and 'music' CON commands.
This is done by kopen4loadfrommod'ing and immediately closing the file
(since the checker is still run from there when not ingame).
On my system, times were like 0.12 ms, 0.2 ms and 0.5 ms for each
openfrompath/findfrompath, openfrompath/Bopen and SHGetFileInfo
respectively, so it shouldn't have a too noticable impact on initial
loading times.

git-svn-id: https://svn.eduke32.com/eduke32@2704 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-28 18:15:26 +00:00
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
hendricks266 299f7b5378 Add .gitignore generated from `git svn show-ignore`.
git-svn-id: https://svn.eduke32.com/eduke32@2682 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-20 07:23:12 +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