Commit Graph

119 Commits

Author SHA1 Message Date
helixhorned bdc02d36d9 Explicitly call A_DeleteSprite() from game code instead of relying on macro expansion.
git-svn-id: https://svn.eduke32.com/eduke32@2452 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:38:13 +00:00
helixhorned 139b2086c1 Rename P_ActivateSwitch()'s 3rd argument from 'switchtype' to 'switchissprite'.
git-svn-id: https://svn.eduke32.com/eduke32@2440 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-10 21:22:03 +00:00
helixhorned fbbefc0df9 sector.c: fix a possible oob access of a local array.
git-svn-id: https://svn.eduke32.com/eduke32@2411 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:14:01 +00:00
helixhorned 0919c186ba Pull the 'for (' ... ')' out of the TRAVERSE_{CONNECT,SPRITE_*} macros.
This plays more nicely with automatic formatters.  Also indent accordingly.

git-svn-id: https://svn.eduke32.com/eduke32@2379 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 19:33:33 +00:00
helixhorned 0309ba3141 QUOTE_NVG_OFF-p->heat_on --> QUOTE_NVG_OFF-!!p->heat_on in sector.c.
Because: 1) It used to be like this; 2) guard against bad CON input.

git-svn-id: https://svn.eduke32.com/eduke32@2378 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 19:33:09 +00:00
helixhorned 0f933a8522 Fix potential (certain?) oob access with ST28/SE21.
Encountered with Scent.map.  Since the SE21 are deleted after they have
been used, the search for them in the ST28 code in sector.c may come up
empty, in which case sector[-1] would be accessed.

git-svn-id: https://svn.eduke32.com/eduke32@2377 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 19:32:55 +00:00
helixhorned 80bd1bb4e4 engine: make neartag accept a sprite-blacklist function and use it in sector.c.
Internally, the last argument to neartag is now a pointer to a function
  int32_t (*blacklist_sprite_func)(int32_t i),
which is supposed to return 1 if sprite[i] should NOT be considered for hitting.

This is now used in the hard-coded neartag() calls in sector.c, but not in any
way in CON (there's neither a C blacklist function provided, nor is there a
possibility to define one in CON).  There, all sprites with picnums >=1 and <=10
(i.e. the effectors) will be blacklisted.  This remedies problems where such
sprites would get in the way of switches.

Note that a whitelist approach (only consider a predefined set, namely those
picnums which will be checked afterwards) has back-compatibility implications
since people may have used e.g. lotagged window sprites to cover a switch.

Also, the >=1 to <=10 range is [sic] (the static, not dynamic values are used),
since anyone redefining effector picnums is clearly out of their mind.

git-svn-id: https://svn.eduke32.com/eduke32@2373 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:54:24 +00:00
helixhorned b04e743236 Fix use of an uninitialized variable in P_FindWall->FindDistance2D with noclip.
git-svn-id: https://svn.eduke32.com/eduke32@2344 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-14 23:14:07 +00:00
helixhorned 53d9264f92 Fix a couple of out-of-bounds accesses when roaming around with noclip.
- guard cansee() against negative sectnums (return 0 immediately), since
  it's often called with the player sectnum as one argument
- in resetpspritevars(), don't inset APLAYER sprite if sectnum < 0, which
  can happen if a map is started in void space accidentally (e.g. from
  the editor)
- two checks before accessing sector[] with a player sectnum

git-svn-id: https://svn.eduke32.com/eduke32@2342 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-14 23:13:38 +00:00
helixhorned 5f23cb6bcd Debugging helper disabling a.nasm calls with OpenGL renderers.
Uncomment #define DEBUG_VALGRIND_NO_SMC in duke3d.h to be able to
 valgrind --smc-check=none (or the default stack-only)
with Polymost and Polymer renderers.

git-svn-id: https://svn.eduke32.com/eduke32@2337 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-12 13:47:33 +00:00
helixhorned 283e8d053f Conditionally compile out the dynamic-to-static tile remapping feature.
git-svn-id: https://svn.eduke32.com/eduke32@2297 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 14:38:23 +00:00
helixhorned 4fd25d1eab minor cosmetic tweaks in sector.[ch] and a off-by-one limit correction there
git-svn-id: https://svn.eduke32.com/eduke32@2195 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-21 18:43:39 +00:00
helixhorned ba858b3858 Fix a number of oob accesses with "switch switches".
Various code checked for switch tiles in the following manner,
  for (ii=0; ii<2; ii++)
      switch (DynamicTileMap[sprite[i].picnum-1+ii]) { case SOME_SWITCH: ... }
which blows for picnum 0.  Now, we simply disallow it.

git-svn-id: https://svn.eduke32.com/eduke32@2174 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-11 13:26:39 +00:00
helixhorned aae60f64c2 Eliminate all 'variable ... set but not used [-Wunused-but-set-variable]'
warnings with GCC 4.6 except one in kplib.c

git-svn-id: https://svn.eduke32.com/eduke32@2079 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-17 18:42:10 +00:00
helixhorned 25d64ceaca In camera viewscreen tiles, also draw upper and lower TROR levels. Works
in any renderer because it's drawn with the software one...
Also add a hack to make Polymer realize that viewscreen tiles can change
each tic so that they don't show a static image anymore.

git-svn-id: https://svn.eduke32.com/eduke32@2021 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-15 17:03:08 +00:00
helixhorned 24cbd241d7 - In the editor, make bunch-equal-making [J] stricter, because the way it was
handled could lead to a bunch whose floors and ceilings covered different
  areas. A fix for the reduced functionality arising from this change is
  underway.
- Rewrite a small portion of code using yax_vnextsec() in game.c.

git-svn-id: https://svn.eduke32.com/eduke32@2019 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-15 17:02:35 +00:00
helixhorned 5c2be94bff Make Ctrl-Alt-A also remove gray walls in the side-view mode. This makes TROR-heavy maps look much less cramped when used in conjunction with Ctrl-A.
git-svn-id: https://svn.eduke32.com/eduke32@1970 1a8010ca-5511-0410-912e-c29ae57300e0
2011-08-18 22:01:01 +00:00
hendricks266 8b5761c14d My first commit!
The main feature is the addition of -mx and -mh command-line parameters to EDuke32 and Mapster32. These parameters include a con and def "module" respectively. This translates into essentially including the file from the bottom of the compiled script.

I fixed the classic buggy behavior of the BROKEHYDROPLANT and REACTOR2 sprites.

I also fixed a small, long-standing bug where FRAMEEFFECT1 blurs are not affected by sector floorpal. You can see one example of this by shrinking the Enforcer on the upper inside of the toppled building in E3L11: Freeway.

I tweaked the Makefile so that it would automatically regenerate the keep.me files in the $(OBJ) and $(EOBJ) directories after they are deleted for cleaning.

One final change is a slight positioning cleanup of both programs' --help dialog boxes.

git-svn-id: https://svn.eduke32.com/eduke32@1937 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-21 22:39:29 +00:00
terminx ef61e48c25 Patch from Hendricks266 and whatever changes happened to be in my tree. I hope they work ;)
"The most noticeable change is the addition of the "includedefault" CON and DEF command, which will attempt to include eduke.con (or nam.con, or ww2gi.con), then game.con, or duke3d.def, or nam.def, or ww2gi.def. This is useful for TCs like my add-ons, where for my pseudo-mutators I currently say "include EDUKE.CON", but I also have to juggle this terrible order of paths, so that I can have an EDUKE.CON file in my HRP which says "include GAME.CON" to allow the mainline game to actually run, but also allow DukePlus to load its EDUKE.CON file (since it uses that and not an -x switch), and also allow any custom EDUKE.CON files in the root to be used."


git-svn-id: https://svn.eduke32.com/eduke32@1909 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-19 00:11:52 +00:00
terminx f037cdc827 Fix this fuckery: http://forums.duke4.net/index.php?showtopic=3646
git-svn-id: https://svn.eduke32.com/eduke32@1855 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-24 16:55:44 +00:00
terminx 323008432a Consolidate POLYMOST preprocessor define into USE_OPENGL, remove SUPERBUILD preprocessor define, add additional mode to neartag() to skip sprite searches and speed up processing (and enable for CON_OPERATE), fix issue with nearby single instance sounds not playing due to out of range sounds blocking their playback, fix issue with settings.cfg being reset to default bindings when running a mod that specifies its own cfg base name, improve CON structure member interface read/write performance, fix a bug with CON "move" pointer validation
git-svn-id: https://svn.eduke32.com/eduke32@1820 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-04 08:50:58 +00:00
terminx 043bb208b3 Multiplayer improvements
git-svn-id: https://svn.eduke32.com/eduke32@1802 1a8010ca-5511-0410-912e-c29ae57300e0
2011-02-25 21:50:19 +00:00
helixhorned 4a5e89f0dd Fixes former crash in drawline16 and swaps drawpixel with the unsafe variant there; fixes potential sector[-1] access in sliding Star Trek doors; make CC overridable in Makefiles so that other toolchains or static analyzers like scan-build/clang can be used; with its help, fix some issues, some more severe than others.
git-svn-id: https://svn.eduke32.com/eduke32@1736 1a8010ca-5511-0410-912e-c29ae57300e0
2010-12-17 14:22:15 +00:00
terminx a7eb0418d1 Global thermonuclear code rape
git-svn-id: https://svn.eduke32.com/eduke32@1677 1a8010ca-5511-0410-912e-c29ae57300e0
2010-08-02 08:13:51 +00:00
terminx e1649ec722 Polymer performance improvement and some game related bug fixes. Improves Polymer framerate by about 25% in most cases and fixes problems causing Duke Caribbean doors to malfunction.
git-svn-id: https://svn.eduke32.com/eduke32@1676 1a8010ca-5511-0410-912e-c29ae57300e0
2010-07-26 22:36:45 +00:00
terminx 1102b74a35 mostly multiplayer fixes among other things
git-svn-id: https://svn.eduke32.com/eduke32@1672 1a8010ca-5511-0410-912e-c29ae57300e0
2010-07-19 15:14:00 +00:00
terminx 9143833fc8 rotatesprite and multivoc have a rape baby
No, seriously.  Adds widescreen aware rotatesprite and works out half a dozen huge problems in the sound system, among other things.


git-svn-id: https://svn.eduke32.com/eduke32@1658 1a8010ca-5511-0410-912e-c29ae57300e0
2010-06-22 21:50:01 +00:00
terminx 4c3c64286a shading changes and fixes for a few crashes
git-svn-id: https://svn.eduke32.com/eduke32@1657 1a8010ca-5511-0410-912e-c29ae57300e0
2010-06-07 09:03:16 +00:00
terminx d76817a361 Fix a couple of stupid typos and remove some dead code from Mapster32
git-svn-id: https://svn.eduke32.com/eduke32@1656 1a8010ca-5511-0410-912e-c29ae57300e0
2010-05-29 05:03:02 +00:00
terminx ac7767986a Updated synthesis script, moved some non-essential files around, updated license headers on all non-BUILDLIC files, added memory cache on top of texcache to improve load times, moved some duplicated keyboard handling stuff from winlayer/sdlayer to baselayer, fixed keypad / in Mapster32 tile selector, fixed bug where p->rotscrnang and p->look_ang never reset to 0, added support for reloading maphack based polymer lights after mode changes/savegame loads, other minor changes
git-svn-id: https://svn.eduke32.com/eduke32@1652 1a8010ca-5511-0410-912e-c29ae57300e0
2010-05-25 10:56:00 +00:00
terminx 45d93544a6 Source code "cleanup," herein referred to as "rape"
git-svn-id: https://svn.eduke32.com/eduke32@1625 1a8010ca-5511-0410-912e-c29ae57300e0
2010-05-02 23:27:30 +00:00
terminx e65891aad6 Very few actual changes... mostly formatting fixes from astyle
git-svn-id: https://svn.eduke32.com/eduke32@1593 1a8010ca-5511-0410-912e-c29ae57300e0
2010-01-23 22:12:02 +00:00
terminx 66e7dd15c2 Clean out remaining changes from tree... this is mostly crap like variable name cleanup
git-svn-id: https://svn.eduke32.com/eduke32@1587 1a8010ca-5511-0410-912e-c29ae57300e0
2010-01-16 23:08:17 +00:00
terminx 3cb09fd6ba further multiplayer improvements
git-svn-id: https://svn.eduke32.com/eduke32@1574 1a8010ca-5511-0410-912e-c29ae57300e0
2009-12-30 23:07:00 +00:00
terminx 2bb322377e more multiplayer crap
git-svn-id: https://svn.eduke32.com/eduke32@1572 1a8010ca-5511-0410-912e-c29ae57300e0
2009-12-15 05:53:15 +00:00
terminx 44575d7e2c Ball-busting true client-server multiplayer prototype/alpha/whatever
git-svn-id: https://svn.eduke32.com/eduke32@1552 1a8010ca-5511-0410-912e-c29ae57300e0
2009-12-05 09:22:43 +00:00
terminx 252df802fb generic commit message describing nothing
git-svn-id: https://svn.eduke32.com/eduke32@1514 1a8010ca-5511-0410-912e-c29ae57300e0
2009-10-01 05:05:19 +00:00
terminx a9c8d071a6 Couple weeks worth of random bs changes
git-svn-id: https://svn.eduke32.com/eduke32@1490 1a8010ca-5511-0410-912e-c29ae57300e0
2009-08-28 23:08:00 +00:00
terminx dbd9e63d00 Fix a couple of minor issues
git-svn-id: https://svn.eduke32.com/eduke32@1488 1a8010ca-5511-0410-912e-c29ae57300e0
2009-08-09 05:32:17 +00:00
terminx 0358aee38e git-svn-id: https://svn.eduke32.com/eduke32@1487 1a8010ca-5511-0410-912e-c29ae57300e0 2009-08-06 10:12:13 +00:00
terminx 3964ca6766 fixes... mostly sound fuckery
git-svn-id: https://svn.eduke32.com/eduke32@1481 1a8010ca-5511-0410-912e-c29ae57300e0
2009-07-31 11:45:29 +00:00
terminx 68e35cb442 this commit is broken
git-svn-id: https://svn.eduke32.com/eduke32@1468 1a8010ca-5511-0410-912e-c29ae57300e0
2009-07-27 05:33:12 +00:00
terminx 98a359f3e1 Clean out tree... misc changes
git-svn-id: https://svn.eduke32.com/eduke32@1465 1a8010ca-5511-0410-912e-c29ae57300e0
2009-07-24 02:31:34 +00:00
terminx f0f56a6738 Added ifactorsound & stopactorsound, fixed qsprintf issues, removed dead unfinished fmod support code, fiddled with structure packing and data sizes to increase the max concurrent playbacks of the same sound from 4 to 8, fixed several sound bugs where when one player's jetpack or scuba sounds stopped in multiplayer, everyone's hitched, increased max sound voices to 96 (was 32)
git-svn-id: https://svn.eduke32.com/eduke32@1461 1a8010ca-5511-0410-912e-c29ae57300e0
2009-07-15 01:26:38 +00:00
terminx 20a251d155 git-svn-id: https://svn.eduke32.com/eduke32@1459 1a8010ca-5511-0410-912e-c29ae57300e0 2009-07-13 06:55:00 +00:00
terminx 1538f39289 fix building with MSVC after Helixhorned's commit
fix FastLZ mipmap corruption issue
fix Polymer MSVC warnings
rewrote qsprintf to take up to 32 parameters, either quotes or gamevars
added qstrncat to concatenate n characters of one quote to another
exposed internal sectorofwall() function to CON
changed CON parser to count ( ) ; and , as whitespace so people can make their code more readable
added ACTIVATOR and ACTIVATORLOCKED support to SE49 and SE50
added SPRITE_USEACTIVATOR flag to allow actor execution based on whether a sector is "locked" or not
rearranged a few structures for faster array lookups
fixed EVENT_HOLSTER


git-svn-id: https://svn.eduke32.com/eduke32@1457 1a8010ca-5511-0410-912e-c29ae57300e0
2009-07-12 01:55:34 +00:00
terminx 7c036eb073 Remove jmact/types.h in favor of standardized inttypes.h stuff
git-svn-id: https://svn.eduke32.com/eduke32@1346 1a8010ca-5511-0410-912e-c29ae57300e0
2009-04-26 05:57:42 +00:00
terminx 9dc32d2ded git-svn-id: https://svn.eduke32.com/eduke32@1344 1a8010ca-5511-0410-912e-c29ae57300e0 2009-04-24 06:04:13 +00:00
terminx 39607e84b1 nothing special
git-svn-id: https://svn.eduke32.com/eduke32@1230 1a8010ca-5511-0410-912e-c29ae57300e0
2009-02-28 07:44:54 +00:00
terminx 151189efab new version of astyle
git-svn-id: https://svn.eduke32.com/eduke32@1229 1a8010ca-5511-0410-912e-c29ae57300e0
2009-02-19 16:47:54 +00:00