Commit Graph

6414 Commits

Author SHA1 Message Date
terminx e4f0b74a4f Rename two misnamed variables
git-svn-id: https://svn.eduke32.com/eduke32@6264 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 21:16:43 +00:00
hendricks266 5ef942f4ec Shrink the tilesiz vector to use int16_t members as the original arrays were.
git-svn-id: https://svn.eduke32.com/eduke32@6263 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:21:13 +00:00
hendricks266 7afc8202d2 CON: Add EVENT_PRELOADGAME and EVENT_POSTLOADGAME.
git-svn-id: https://svn.eduke32.com/eduke32@6262 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:21:07 +00:00
hendricks266 df317aa741 CON: Add drawline256 and drawlinergb commands that call the internal functions used for the automap lines.
drawline256 <x0> <y0> <x1> <y1> <index>
drawlinergb <x0> <y0> <x1> <y1> <index> <rgb>

The coordinates are xdim<<12/ydim<<12 based, not 320<<16x200<<16.
<index> is a palette index, and for drawlinergb is used as a fallback in the software renderer.
<rgb> is encoded the same as PROJ_FLASH_COLOR.

git-svn-id: https://svn.eduke32.com/eduke32@6261 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:21:03 +00:00
hendricks266 4dbeb30907 Add internal drawlinergb function.
git-svn-id: https://svn.eduke32.com/eduke32@6260 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:20:58 +00:00
hendricks266 517517a1bb CON: Add getclosestcol command, which finds the closest palette index given
getclosestcol <return> <color> <limit>

<color> is encoded the same as PROJ_FLASH_COLOR.

<limit> is the index of the last palette color that should be considered. Use 255 for the whole palette, 254 to exclude the transparent color, 239 to exclude Duke 3D's fullbrights, etc.

git-svn-id: https://svn.eduke32.com/eduke32@6259 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:20:54 +00:00
hendricks266 ffc7de9911 CON: Add EVENT_DISPLAYOVERHEADMAPTEXT.
Set RETURN to any non-zero value to disable hardcoded display of text.

If you wish to replace the hardcoded text, you must check that userdef[].overhead_on == 2 yourself.

git-svn-id: https://svn.eduke32.com/eduke32@6258 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:20:50 +00:00
hendricks266 0d6842800b Replace specialized swap C functions with a templatized version.
git-svn-id: https://svn.eduke32.com/eduke32@6257 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:20:46 +00:00
hendricks266 adf62d216c scale(1<<##, b, c) --> divscale##(b, c)
git-svn-id: https://svn.eduke32.com/eduke32@6256 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:20:42 +00:00
hendricks266 bd9abf33ad scale(a, b, 1<<##) --> mulscale##(a, b)
git-svn-id: https://svn.eduke32.com/eduke32@6255 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:20:37 +00:00
hendricks266 965e40bda7 mulscale(a, b, ##) --> mulscale##(a, b)
git-svn-id: https://svn.eduke32.com/eduke32@6254 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:20:21 +00:00
terminx 81ca397802 Fix buggy swinging door behavior
git-svn-id: https://svn.eduke32.com/eduke32@6253 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 06:31:37 +00:00
terminx 4e3f55df9b Dicking around with inlined actor header functions
git-svn-id: https://svn.eduke32.com/eduke32@6252 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 06:31:32 +00:00
terminx 6d3978b471 Revise r6225
git-svn-id: https://svn.eduke32.com/eduke32@6251 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 06:31:26 +00:00
terminx bf944cf27a Potential CON performance improvements
git-svn-id: https://svn.eduke32.com/eduke32@6250 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 06:31:21 +00:00
terminx e14d7d2786 Clamp r_maxfps to a minimum of 30 if not 0
git-svn-id: https://svn.eduke32.com/eduke32@6249 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 06:31:12 +00:00
hendricks266 ccb6d27349 Polymost: Fix yoffset bouncing of face sprites with cstat 128.
git-svn-id: https://svn.eduke32.com/eduke32@6248 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 09:17:12 +00:00
hendricks266 945944b915 r6210 inadvertantly forced orientation bit 2 for internal gametext. Tidy up affected text.
git-svn-id: https://svn.eduke32.com/eduke32@6247 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 09:17:07 +00:00
terminx 81ac537bd1 More misc small cleanups. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6246 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 09:16:33 +00:00
terminx ac2f2bd902 :(
git-svn-id: https://svn.eduke32.com/eduke32@6245 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 09:16:27 +00:00
terminx 65a2c38ba8 Misc cleanups, mostly const correctness
git-svn-id: https://svn.eduke32.com/eduke32@6244 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 09:16:21 +00:00
terminx 50bc1aa2ba Can Duke3D CON version compatibility messages in standalone builds
git-svn-id: https://svn.eduke32.com/eduke32@6243 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 09:16:13 +00:00
terminx 0dd837919e Revise r6239
git-svn-id: https://svn.eduke32.com/eduke32@6242 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 04:32:23 +00:00
terminx 0efb2e146e Revise r6235
git-svn-id: https://svn.eduke32.com/eduke32@6241 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 04:32:16 +00:00
terminx 977c09fa28 Revert test change I accidentally committed
git-svn-id: https://svn.eduke32.com/eduke32@6240 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 04:01:03 +00:00
terminx b73c449f31 Further reorganization of actor_t. BYTEVERSION bumped.
git-svn-id: https://svn.eduke32.com/eduke32@6239 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:59:39 +00:00
terminx 4a7806150c Make r_showfps 2 work a little bit better
git-svn-id: https://svn.eduke32.com/eduke32@6238 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:59:32 +00:00
terminx eae02b26a1 Respect r_maxfps in menus and on startup/bonus/end screens
git-svn-id: https://svn.eduke32.com/eduke32@6237 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:59:26 +00:00
terminx 4489e110de More minor optimizations. Breaks savegames.
git-svn-id: https://svn.eduke32.com/eduke32@6236 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:59:19 +00:00
terminx 302d6bdfd8 Minor optimizations
git-svn-id: https://svn.eduke32.com/eduke32@6235 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:59:11 +00:00
terminx f698b1e733 Gamevar cleanup
git-svn-id: https://svn.eduke32.com/eduke32@6234 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:59:06 +00:00
terminx 49edb0e9f6 Use macros for special gamevar access range checking
git-svn-id: https://svn.eduke32.com/eduke32@6233 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:59:00 +00:00
terminx 54a0d8d4ae Consty McConst
git-svn-id: https://svn.eduke32.com/eduke32@6232 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:54 +00:00
terminx dac7679633 Replace 2 memcpys with assignments
git-svn-id: https://svn.eduke32.com/eduke32@6231 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:48 +00:00
terminx a3fbe4c542 Add clipdist member to player struct to control how close the player can get to walls
git-svn-id: https://svn.eduke32.com/eduke32@6230 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:43 +00:00
terminx 4ae5f2e298 Remove "BUILD_NOP6", old cruft for running on ancient x86 processors without MMX.
git-svn-id: https://svn.eduke32.com/eduke32@6229 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:36 +00:00
terminx d1c0366916 Minor classic mode optimization
git-svn-id: https://svn.eduke32.com/eduke32@6228 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:31 +00:00
terminx bcb6d3830b Only show "using dynamic tile remapping" message in debug builds. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6227 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:26 +00:00
terminx c26fcfa786 Remove unused member from actor_t
git-svn-id: https://svn.eduke32.com/eduke32@6226 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:21 +00:00
terminx 6319b6fb60 Change hard-coded subway effect damage to generic explosive damage that can be handled by CON. Fixes subway kills not counting toward the dead monster count and allows CON scripts to handle subway damage however they like.
git-svn-id: https://svn.eduke32.com/eduke32@6225 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:13 +00:00
terminx 8cda268514 Fix issue with hud_bgstretch cvar overwriting adjacent values in memory
git-svn-id: https://svn.eduke32.com/eduke32@6224 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:08 +00:00
terminx e3f3a8ce33 Move Mapster32 autoexec to before the map specified on the command line is loaded, to allow EVENT_PRELOADMAP and EVENT_LOADMAP to work when loading a map from the command line. This makes the console output of autoexec a little worse but the OSD will be fixed at a later time.
git-svn-id: https://svn.eduke32.com/eduke32@6223 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:01 +00:00
hendricks266 e2c44ae253 CON: Handle the save and savenn commands after the full tic is processed, instead of in the middle of it during execution. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6222 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-22 22:49:22 +00:00
hendricks266 262e863b33 Polymodes: Only try texcache_fetchmulti on detail texture slots.
git-svn-id: https://svn.eduke32.com/eduke32@6221 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-22 01:32:10 +00:00
hendricks266 b25ec936b3 Polymodes: Check that texture entries have a non-skybox filename before using it in texcache_fetchmulti.
Fixes crash reported by Sgt Jack V.

git-svn-id: https://svn.eduke32.com/eduke32@6220 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-22 01:32:05 +00:00
hendricks266 f03d704ddb Polymost: Don't cut off a row and/or column of texels when drawing floor-aligned sprites with odd dimensions.
git-svn-id: https://svn.eduke32.com/eduke32@6219 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-21 13:47:04 +00:00
hendricks266 ad46ac785f Add new tint flag 256, which always skips hightile when picking an image source.
git-svn-id: https://svn.eduke32.com/eduke32@6218 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-21 13:46:59 +00:00
hendricks266 986a545ff5 Polymodes: Explicitly opt out of hicfindsubst falling back to pal 0 instead of checking against the reserved palnum range.
git-svn-id: https://svn.eduke32.com/eduke32@6217 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-21 13:46:54 +00:00
hendricks266 a032b829bf Factor out hictinting array accesses.
git-svn-id: https://svn.eduke32.com/eduke32@6216 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-21 13:46:50 +00:00
hendricks266 70245fc4f1 Create a new struct for hictinting that uses a uint16_t for flags.r
git-svn-id: https://svn.eduke32.com/eduke32@6215 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-21 13:46:44 +00:00