Build 2615
SVN-
General
CON palfrom: sanity-check current player and maybe print error message.
-
General
Make two-way trains capable of carrying SE49 or SE50 sprites.
SVN handles and Git names are merged into one person.
CON palfrom: sanity-check current player and maybe print error message.
Make two-way trains capable of carrying SE49 or SE50 sprites.
Fix 'mulscale' accepting defines or constants where writable var expected.
Lunatic translator improvements.
preliminaries for persistence
Fix a null pointer access in Polymer mouse picking.
Specifically, it was in the "determine searchwall when aiming at floor or ceiling" part. Now, if prsectors[]->ceil.plane (or ->floor.plane) is NULL, we set the searchwall to the sector's firstwall and return.
Cleanup in game.c/actors.c part2, only whitespace changes.
Some cleanup in game.c/actors.c, part 1.
actors.c: factor out various duplicated code in G_MoveEffectors.
- 4 instances -> HandleSE31 - 4 instances -> MaybeTrainKillPlayer - 2 instances -> MaybeTrainKillEnemies - move a couple of variables into inner blocks and add 'const' for easier reading In passing, fix a minor glitch where the squishing sound of an enemy that got run over by an SE 6 or 14 car would appear to originate from the SE instead of the enemy's last position.
when drawing art sky, temporarily set texcoord s wrapping to clamping.
This properly fixes the unwanted vertical lines.
Mapster/classic: Make Ctrl-P toggle parallax rendering types in 3D mode again.
Of course, it's just for the heck of it, since this setting is not saved into MAP files. I kinda like the cylindrical projection...
Fix flipping masked walls in Mapster/classic.
This has been there since searchbottomwall introduction in r1466.
Fix aspect correction in fullscreen mode.
Previously, we only set the viewingrange according to the physical screen's dimensions, but didn't correct yxaspect for a potential non-square pixel ratio.
Add samples/aspect.map for calibrating aspect-related settings and testing.
On Windows, auto-determine r_screenaspect on startup.
Consequently, it's not saved as a setting in either the game or editor config files. We do this by calling "GetSystemMetrics(SM_CXSCREEN)" (accordingly for y) and calculating the cvar by dividing common factors, since it has to be in the form WWHH. This may fail for _really_ strange screen dimensions, so a log message is printed at the very beginning.
On Windows, don't allow map playtesting from Mapster when in fullscreen.
Because this doesn't even seem to work on XP, we're being spammed with DDERR_SURFACELOST messages...
Fix point deletion in Mapster32.
Previously, it was possible to leave a sector with less than three walls if a point got deleted transitively by a TROR link. Now, a proper check is done for all deletion candidates and a message stating which wall and sector is problematic is printed. Thanks for Diaz for pointing out the brokenness.
fix inconsistent format letter vs. vararg in fprintf.
Build tools:
- clearbufbyte --> Bmemset - add libm to $(UTILLIBS) to fix building of mkpalette - add self-explanatory Makefile commands: dxutils, sdlutils, printdxutils, printsdlutils
Fix generateicon.
I don't know if that was the intent, but it's better than not building.
prototype of The Translator.
Currently syntax only. Parses the original scandcode 0x1d files, which is harder than you'd imagine given the relatively simple structure. Chokes on new-gen custom stuff.
Fix CON parser accepting defines and numbers where writable var expected (4 cmds)
A couple of less interesting changes.
- strip 'inline' from animateoffs() definition, remove declaration in build.h - one min/max -> clamp - one malloc/strlen/strcpy -> strdup
fix some commands breaking too early in case of a failed validation.
If one next instruction happened to be interpreted, madness would ensue, because the pointer wouldn't be aligned on the "opcode" part anymore. Also, with "seti", set current sprite index only after a successful validation.
New M32Script command "getspritelinktype" <spritenum> <<linktypevar>>.
This get into the writable variable the "linking type" of the sprite with index <spritenum>. The result is a bit field of ORed values: 1: lotag has linking semantics 2: hitag 4: extra, 8: xvel, 16: yvel, 32: zvel, 64: owner (custom only) Custom setting about which sprites have what kind of linking can be programmed via EVENT_LINKTAGS: it receives a sprite index as the 'current sprite' and is supposed to return the bit field in RETURN. An example which lists sprites and their linking hi- and lotags is provided in the state 'listusedtags' in a.m32.
Fix "ignored application parameter" message for short options.
Big clean up in defs.c and related content. The usual stuff...
- factor out many identical checks in a convenient function; some messages may read slightly differently now and tile ranges may be handled more strictly (error out if one of the limits is invalid) - factor out two instances of identical (up to one arg) code into tile_from_truecolpic - factor out setting picsiz[] and stuff into set_picsizanm - some checks - Make "undefmodelof" non-functional and warn. - in "animtilerange", if the tile difference is >= 64, error out since we can't store it in picanm[]
Add dummy parsing of "nofloorpalrange" to defs.c.
Move some debugging stuff out of compat.h into glbuild.h and common.h.
Fix "Thanks (...) for giving us big heads" message at the end of Ep4.
This was more or less done by trial and error rather than understanding what exactly is going on there. In any case, the code for all the different ending scenes ought to be factored out instead of being duplicated with subtle differences every time.
remove Intel whitelist
Allow all drivers for now; if anything, we should start maintaining a blacklist now that most Intel chips have decent enough support to be able to run stuff satisfactorily.
Fix OpenGL screenshots with unaligned widths such as 1366
don't snap the mouse in debug mode, redux..
Fix the MSVC build, common.c was only added to the GNU Makefile.
fix unused variable permanentlock
CON showview/showviewunbiased: silently clamp 'horiz' to HORIZ_MIN..HORIZ_MAX.
Allow the screen bounds difference in CON showview/-unbiased to be less than 2.
This requires one tweak in drawrooms' umost/dmost setup to prevent oob access. Specifically, a coordinate difference of 0 is allowed. In the classic renderer, this would mean a one-pixel (real screen coords) height or width. In Polymost, it would currently mean a one-pixel height and zero-pixel width, but this might be subject to change.
New CON command 'showviewunbiased', mapping the screen coords w/o round-to-0 bias.
The showview command transforms the 320-based screen bound coordinates to the real screen bounds like xreal = (x*xdim)/320, which shows a bias towards zero: for example, for a 1680 screen width, the maximum permissible value 319 is mapped to round_to_zero((319*1680)/320) == 1674. (The rounding is implicit in the integer division). This makes it impossible for a view to cover the whole screen with any other resolution than 320x200. The new command transforms the bounds like xreal = (x*(xdim-1))/319, which would map 319 to 1679 in the preceding example.
Really fix PNG screenshots.
When requesting a non-fogged identity lookup from makepalookup(), alias to palookup[0].
(That is, the base shade table.) Before, we allocated each palookup buffer. For a vanilla setup, this means that we're now saving 224*32*256 ~= 1.8 megs, which might be interesting for low-memory gadgets.
Don't fall back on allocache if malloc'ing a palookup buffer or transluc table fails.
First, it's unlikely in our day and age. Second, they're always free'd at the end, so allocache'ing them is incorrect.
Make makepalookup() accept NULL for 'remapbuf', meaning "use identity mapping".
Also, - use this in game.c and astub.c palookup loading code - when makepalookup() is passed a 0 palnum, return early. This means that 'fogpal' will silently fail when attempting to change pal 0. - in 'makepalookup' DEF command, error out if passed a pal of 0.
DEF command 'makepalookup', allowing indpt. specification of fog and color remapping.
The syntax is as follows: makepalookup { <token-list...> } where valid tokens are * pal <palnum>: the palette number, 1 .. 250 * red <num>, green, blue (or r, g, b): the fog color components on a 0 to 63 scale. Components that are not present are assumed to be 0. * remappal <palnum>: the palette number to take the index remapping from, i.e. 21 for blue -> red. When absent, defaults to 0. * remapself: when present, specifies that the remappal is the same as the 'pal'. This is to prevent textual redundancy when overwriting existing palookups. Examples (best tested with tile #251): 1) makepalookup { pal 200 red 30 remappal 23 } This creates palookup 200 with a fog of (30,0,0) and a blue-to-yellow remapping (assuming it has not been changed before) 2) makepalookup { pal 21 red 30 remapself } This 'fogifies' palookup 21 with a red fog. 3) makepalookup { pal 21 red 30 } This overwrites palookup 21 with a red fog, but clears the blue-to-red remapping. The fog aspect of this command affects the GL modes just like 'fogpal', but the remapping has no effect for hightiles. - Also, silently clamp 'fogpal' r,g,b values to the range 0 .. 63.
In OpenGL modes, save savegame screenshots as they appear on the screen.
Instead of drawing the rooms and masks with the classic renderer once. The captured scene is transformed to use the base palette, so that the screenshot will also show up in classic. No aspect correction is done.
The obligatory portion of trivial stuff.
Fix a potential uninitialized mem read in debug msg when in void space.
Clean up astub.c in a similar fashion to the preceding changes.
Make g_grpNamePtr memory-clean, extern clearGrpNamePtr().
numgrpfiles --> NUMGRPFILES in Apple/GameListSource.game.m