Build 4331
SVN-
in engine.savePaletteDat(), open file in binary mode. BUILD_LUNATIC.
SVN handles and Git names are merged into one person.
in engine.savePaletteDat(), open file in binary mode. BUILD_LUNATIC.
disallow saving map-text files in Mapster32 for now.
Very minor changes after an investigation into the possibility of Polymost on Wii.
Extend PALETTE.DAT format to allow carrying additional blending tables.
Lunatic: also, add an additional argument 'moreblends' to engine.savePaletteDat() and document that function. See test/shadexfog.lua for a "user-friendly" wrapper shadexfog.save() which prints success or errors.
move code in test/shadexfog.lua to engine.savePaletteDat() and complete it.
The function now writes out a full PALETTE.DAT: base balette, shade table and translucency table.
update dynsymlists. Move blendtable[] from build.h to engine.c.
BUILD_LUNATIC.
add a 'lastokcol' argument to engine.nearcolor() and document it.
On the C side, slightly rewrite (now) getclosestcol_lim() for clarity.
document engine.*blendtab() and engine.getrgb() functions.
remove sprite members 'detail' and 'filler', add 'blend', make r/w.
In the C code, rename sprite[].filler to 'blend'.
Also, fix a missed .filler -> g_ambiencePlaying[] rewrite in the editor. In C-CON, 'detail' is kept as alias to C-side (former) .filler / now .blend, but that name is *deprecated*.
engine.c: amend r4292, which introduced an even worse oob for NPOT xsize texs.
engine.c: in calc_bufplc(), cope with negative lwall[] values.
This should fix the crash encountered here: http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__184069 a-c.c also gets a new switch macro, DEBUG_WITH_VALGRIND.
sector.c: factor out goto soup in P_CheckSectors() into function.
sector.c: cleanup round 3, P_ActivateSwitch() refactoring.
sector.c and related cleanup, round 2.
- use SPRITES_OF* iterator macros - new function: E_SpriteIsValid(); add some safety checks (e.g. hitag used as sprite index) - the rest is mostly "the usual code transformations"
sector.c: cleanup round 1, trivial changes.
gltexinvalidatetype(INVALIDATE_ART) so that loading or unloading an ART set will take effect when using the OpenGL renderers.
make wall texture alignment [.]/[,] work with bottom-swapped walls.
In simple cases, it should be added. Combinations of alignment across TROR boundaries and bottom-swapping will probably not work right.
Improve determination of when a sprite should be drawn before a masked wall.
Concretely, in the "behind, outside" case, draw the sprite early if any of its 2 or 4 corner points are behind the masked wall, and inside the cone or on the other outside.
document engine.*shadetab() functions. DONT_BUILD.
Engine-side per-map ART file support.
When a map named <filename>.map is loaded (<filename> may also contain directory separators), the engine checks for existence of <filename>_XX.art in the virtual file system, where XX is a 0-padded number from 00 to 19. It loads a consecutive sequence of these ART files, i.e. aborts whenever a number in the sequence isn't found (in contrast to normal ART loading). Restrictions: - the per-map ART files must not reside in ZIP files - if a tile number is attempted to be overridden that has a dummytile or is cache1d-locked, per-map ART loading fails On failure, the map is still loaded, but a diagnostic message is output to the log/OSD. Loaded per-map ART data are cleared whenever the map is "left". In particular: - whenever another map is loaded - in the editor: when a new map is started - in the game: after the bonus ending screen of a finished level, after going to the title screen via the menu A final note: file names are supposed to be looked up and compared case-sensitively. That is, <filename> must match EXACTLY between the map's and per-map ART one; 'art' must be lowercase. Otherwise, the cookie monster will come and eat you! BUILD_LUNATIC.
Reintroduce SDL_Renderer for the classic renderer so that the Steam Overlay can function with it.
Block off hacks for the primitive splitscreen CON mod with SPLITSCREEN_MOD_HACKS so they are no longer compiled.
These hacks could no longer be allowed to co-opt the fake multiplayer mode, used for local testing and mod development. I have half a mind to remove the hacks outright because they could be likened to drilling bolts directly into your car engine just so you could mount a bowling ball as a hood ornament. However, I don't want to take away the splitscreen hack mod from anyone who uses it, and the work done on these hacks should be useful if proper splitscreen were implemented internally using per-player input and multiple renderer/audio passes.
Always run tsprites with statnum TSPR_TEMP though EVENT_ANIMATESPRITES, such as the "show opponent's weapon" in multiplayer.
SDK/Samples: Add "startpos.m32", a helper script for spawn points.
You can: -Cycle your position through all DM or coop spawn points. -Jump to the primary spawn point. -Dump full spawn point information to the log file.
Add EVENT_LOADMAP, EVENT_SAVEMAP, EVENT_PRELOADMAP, and EVENT_PRESAVEMAP.
Some are more useful than others.
remap16 method for engine.shadetab, 2nd attempt at recreating orig. one.
BUILD_LUNATIC.
document fundamentals of shade tables, but not 'engine' API yet.
Lunatic/m32: make Mapster23 actually start stand-alone, oops.
Lunatic/m32: include the Lua bytecode into the binary, exit if setup failed.
add 'engine' module, currently allowing to create custom shade tables.
Available in the game and editor. Provide test/shadexfog.lua, containing a function to creating a set of 32 shade tables corresponding to different shades of the same fog palookup table, together with some tests and convenience functions. Also, - Add gv.LUNATIC_CLIENT{,_EDUKE32,_MAPSTER32} - Add LUNATIC_FIRST_TIME in the global env for the game - defs_m32.lua: add reload() convenience function - Failed attempt at recreating the base shade table. It is NOT a linear ramp of the base palette colors to (0,0,0). That is, it's not created by build/util/transpal.exe!
fix setup under Mapster32, remove a few obsolete lines in defs_common.lua.
In the no-netcode build, don't expose four internal engine functions.
Also don't compile three multiplayer related OSD commands there.
allow access to sprite[].yvel through set_yvel() member, document.
BUILD_LUNATIC.
Clean up legacy ROR code and introduce LEGACY_ROR define in game.h.
Also, bound-check two .yvel meant as sprite indices in actors.c.
Guard retrieval of player index (.yvel) from APLAYER sprite.
It is unacceptable that yvel is on one hand modifiable without restriction from scripting, but can be used as an array index without prior bound check in the C code. Because that member has an overloaded meaning and is also used for innocuous purposes such as the green color intensity of an SE light, it's infeasible to restrict access from scripting. Consequently, we must add bound checks on the C side. This is the first part of the effort to make .yvel safe, adding two functions P_Get() and P_GetP(). There are a couple of other uses as some kind of index.
add example toggling forcefield wall to test.lua.
engine.c: clean up code related to ART loading. BUILD_LUNATIC.
error on invalid static data read like 'sprite.picnum'.
Generalize Sect_DamageCeiling to Sect_DamageCeilingOrFloor, use appropriately.
- in the function itself: for floor, currently, do nothing (but this commit is in preparation of the next one, again) - In Proj_MaybeDamageCF(), Proj_MaybeDamageCF2() and the A_RadiusDamage() use if the function, generalize to floors, but with the special case that parallaxed floors keep blocking projectiles, as before (in constrast to parallaxed ceilings). However, Sect_DamageCeilingOrFloor() is only called for non-parallaxed ceilings *and* floors.
sector.c: in ST9 handling code, prevent oob for improperly constructed doors.