Build 2390
SVN-
Generale
Significantly speed up non-power-of-two floor sprite texture mapping functions.
Mostra dettagli
(Classic renderer). We don't need 64-bit integers; also use the nice asm version of divscale32() if possible.
Nickname SVN e nomi Git sono unificati per persona.
Significantly speed up non-power-of-two floor sprite texture mapping functions.
(Classic renderer). We don't need 64-bit integers; also use the nice asm version of divscale32() if possible.
Try to find another mirror wall if the assigned one breaks.
This fixes mirrors consisting of more than one walls not drawing when the first assigned mirror wall breaks. It still does not let you have more than one mirror (i.e. mirror sectors) showing up at the same time in the scene. Affects classic and Polymost only.
Do bound check for "quick" sector/wall accesses from CON, i.e. in getvarvar.
This was causing oob sector accesses with code like this: getwall[hitwall].nextsector temp ifvarvare sector[temp].floorz sector[temp].ceilingz setvar tempb 1 (from DT's HYPERCORE). Also validate quote indices passed to CON's quote and userquote commands at runtime.
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.
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.
Fix sprites with picnums >= MAXSPRITES not drawing in classic.
This was discovered because viewscreens (TILE_VIEWSCR) ceased being drawn with the MAXTILES increase (reported by Hank, who also did the bisect).
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.
polymost.c: More informative failure message for gloadtile_cached().
make aspect ratio also control r_usenewaspect.
- RENDERER SETUP is now also accessible from classic, with only 2 options: 'aspect ratio' and 'ambient light level' - remove the latter option from the VIDEO SETUP menu - When compiled with OpenGL, the aspect ratio option cycles between 3 states: r_usenewaspect=1 (the modern way), and r_usenewaspect=0 but r_widescreen=0/1. In non-GL builds, there are only 2 states. - don't display black translucent overlay in COLOR CORRECTION menu
Fix non-OpenGL build.
In the user map selector, sort file names case-insensitively on Unix'y systems.
This makes more sense because the game selector draws the names with uppercase letters and the hotkeys to jump to a map starting with a particualar letter aren't case sensitive, either. Mapster32's selector will still display maps starting with upper case first.
engine.c: more formatting, removing of textually duplicate code.
engine.c: formatting changes
The bulk are whitespace changes; the only exception is a "if (expr) { stmt; }" --> "if (expr) stmt;"
Update samples/trueror1.map with some tests of sprites lying on TROR floors.
Also, there's a "ladder" that passes through a TROR portal, and the mirror in that map has been fixed for the classic renderer.
Fix extended ceiling/floor picnums taking on picnum 0 in Polymer.
The reason was that drawmasks(), which was where the resetting of the fake RoR textures happened under Polymer, can be called from polymer_displayrooms() when mirrors are present. I was assuming that drawmasks() was only ever called after the 'main' drawrooms and that hence the sequence of fake RoR tile tweaking was set, reset, set, reset, ... which it was not. Now, do the resetting explicitly after every drawmasks() in the editor.
When loading a map in-game, clear TROR wall members corresponding to up/down links.
I find this cleaner for two reasons. First, lotags won't get in the way of neartag(), so that doors and switches near constrained TROR walls can be pushed. Second, this removes the information leak so that CON coders aren't tempted to read that values directly before a proper API for that comes along. When writing out a map in-game (e.g. with dndebug), restore the respective members so that it can be loaded in the editor again.
engine.c: Rewrite tslopevlin (translucent slope vline texmapping) for clarity.
Fix player being not blocked by sprites lying on an extended floor.
getzrange() returns the floor rather than the sprite if their heights are equal. Now, make an exception for extended floors (analogously, ceilings).
engine.c: replace 0xXXXXXXXX literals with INT32_MIN/MAX; whitespace changes.
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
Fix sprite rendering glitches with r_usenewaspect=1 in 8-bit mode.
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.
Add some #includes to gameexec.h and sector.h so that they can be included directly
Factor out two pieces of identical code in actors.c into A_HandleBeingSpitOn().
This fixes a bug in passing: 'int32_t j' was assigned to as a temporary inside one instance of the code, but used as if it were the previous sprite index further on. Would only happen with projectiles that "work like" both SPIT and RPG_IMPACT.
fix crash with 'vidmode <bpp>' introduced in r2311.
When in menus, always draw a black (33%) translucent background.
Internally, there's a new function fade_screen_black() that implements the fading more efficiently than calling rotatesprite for classic, and uses tile 0 (assumed to have at least 64x32 size) in the GL modes. The black background of the user map selector is still done with rotatesprite and tile BLANK in every renderer.
Fix a sector[-1] access when starting to draw a wall in an empty map.
Fix demo progress bar in OpenGL modes by adding bit 1024 to rotatesprite calls.
The problems still remains that rotatesprite behaves differently in classic and OpenGL modes with clipping boundaries specified (and maybe in some other cases)
tweak dragging a single sprite so that they can be dragged 'uphill'.
The implementation uses the recently introduced updatesector_onlynextwall when setspritez fails.
fix for running with static main engine arrays.
In Mapster32, register the 'vidmode' OSD command in non-GL builds.
engine.c cleanup, making some variables static mostly
Fix a potential sector[-1] access when drawing a masked wall in Polymost.
Fix the insert cicle wall-points bug reported by Norvak.