Commit Graph

1788 Commits

Author SHA1 Message Date
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 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 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 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 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 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 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 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 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 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