Commit Graph

4552 Commits

Author SHA1 Message Date
helixhorned f077d57547 Amend r3822 ("Make deletion of an amb. sound MUSICANDSFX stop its sound again.")
We shouldn't be using its actor[].t_data[8] because that one is used by the
sprite rotation-fixing system (which fixes STAT_FX sprites to the positions
relative to the pivot, too).
Test case source/lunatic/test/delmusicsfx.lua still passes with this
modification.

git-svn-id: https://svn.eduke32.com/eduke32@4352 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:53 +00:00
helixhorned b8bd2069ea Rename SPRITE_* flag enum constants to SFLAG_*, for consistency with CON.
git-svn-id: https://svn.eduke32.com/eduke32@4351 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:52 +00:00
helixhorned 6f34193bb6 Give sprite cstat bit 2048 (NOSHADE, Mapster32 key [N]) a macro name.
git-svn-id: https://svn.eduke32.com/eduke32@4350 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:51 +00:00
helixhorned 7a7fb71169 Mapster32: include .blend in sprite display/edit/search (Shift+TAB/F8/Alt+F8).
git-svn-id: https://svn.eduke32.com/eduke32@4349 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:49 +00:00
helixhorned 597400e0f3 Mapster32: don't save comments to mapster32.cfg's command-line history.
git-svn-id: https://svn.eduke32.com/eduke32@4348 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:48 +00:00
helixhorned b02aa43036 Lunatic: generalize shadexfog.create_trans() further.
It now accepts a number of tables to create as 3rd arg. The function that
create_trans() takes as the 2nd argument is now being passed
(r,g,b, R,G,B, tablei, numtables).
Rewrite create_additive_trans() in terms of it.
Rename create_128_trans() -> create_alpha_trans().

git-svn-id: https://svn.eduke32.com/eduke32@4347 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:48 +00:00
helixhorned 1b1cb73e1c A couple of very minor code beauty tweaks.
git-svn-id: https://svn.eduke32.com/eduke32@4346 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:47 +00:00
helixhorned caeb012843 engine.c: in loadlookups(), error out if attempting to load at a reserved pal.
git-svn-id: https://svn.eduke32.com/eduke32@4345 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 19:38:45 +00:00
hendricks266 a21f340553 Mapster32: Introduce m32_settings.cfg, analogous to settings.cfg, so that you can save your cvars and aliases for the editor.
One potential use is to add r_togglecomposition "0" if you don't like Aero turning on and off every time you switch between 2D mode and 32-bit 3D mode.

git-svn-id: https://svn.eduke32.com/eduke32@4344 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 08:03:02 +00:00
hendricks266 14db3b178d Build system: Detect the SVN revision and generate rev.h directly from the Makefile, if applicable.
git-svn-id: https://svn.eduke32.com/eduke32@4343 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 08:02:41 +00:00
hendricks266 0df08d2204 Synthesis: Merge "sdk" package back into the game.
git-svn-id: https://svn.eduke32.com/eduke32@4342 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 08:02:23 +00:00
hendricks266 d67e977fb1 Further optimize our SDL_Renderer for 8-bit by making the SDL_Texture SDL_TEXTUREACCESS_STATIC, saving some RAM without any loss of functionality.
git-svn-id: https://svn.eduke32.com/eduke32@4341 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 08:02:13 +00:00
terminx 2aa167af01 Fix texcache
git-svn-id: https://svn.eduke32.com/eduke32@4340 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 01:27:03 +00:00
terminx ea602827cd Indicate MSVC in build string
git-svn-id: https://svn.eduke32.com/eduke32@4339 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 01:26:34 +00:00
helixhorned 2afb680d22 engine.c: always setup blending table whenever drawing translucent objects.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4338 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-19 19:47:28 +00:00
helixhorned caed55e9a4 Lunatic: engine.setupDebugBasePal(), auto-detect 2nd+ shadexfog.translate().
engine.setupDebugBasePal() set up the water base palette such each of the first
15 "ramps" of 16 consecutive colors has a single, "representative" color. For
example, color indices 0-15 and black, 16-31 are dark gray.
In shadexfog.lua, list remappings from LOOKUP.DAT that are expressible as
remappings of 16-tuples.

git-svn-id: https://svn.eduke32.com/eduke32@4337 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-19 19:47:25 +00:00
helixhorned b79fa42903 Lunatic: add engine.saveLookupDat() and document, related tweaks.
- Mapster32: before loading LOOKUP.DAT, set palookup[0][239]=239 to
  make an identity map of the base shade table's shade 0
- Rewrite color index remapping case of makepalookup() for clarity

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4336 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:16:06 +00:00
helixhorned df25e3cd7c In loadlookups(), look for gap of 4 consecutive unused pals for fog pals.
As opposed to the previous way, where the first fog pals was <numlookups>+1,
where <numlookups> is the first byte value of LOOKUP.DAT. This allows to
pack e.g. lookups [1 .. 25] and [30 .. <lastpal>] into LOOKUP.DAT and have fog
pals be generated at pals [26 .. 29] (i.e. the additional lookups don't
shift the fog pals, making user maps depending on these numbers not look as
intended.)

git-svn-id: https://svn.eduke32.com/eduke32@4335 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:16:05 +00:00
helixhorned 7e7507746d Factor out common parts of loading LOOKUP.DAT into engine.c:loadlookups().
Also, error if didn't read enough data and account for TITLE and REALMS
swap between basepal number and on-disk order (sigh).

git-svn-id: https://svn.eduke32.com/eduke32@4334 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:16:03 +00:00
helixhorned 37ffae149e Lunatic: rewrite shadexfog.create_128_trans to allow creating fewer tables.
It must be a power of two in [2 .. 128]. Rewrite test/sprite_access.con's
liztroop example to account for that.
Also, add function shadexfog.create_trans() which aceepts a function
(r,g,b,R,G,B) -> blended (r,g,b) and rewrite shadexfog.create_additive_trans()
in terms of it.

git-svn-id: https://svn.eduke32.com/eduke32@4333 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:16:01 +00:00
helixhorned e68d5a14b3 Lunatic: in shade table 'remap16' method, allow sparse table, document it.
Add shadexfog.createremap() convenience function.

git-svn-id: https://svn.eduke32.com/eduke32@4332 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-16 19:15:59 +00:00
helixhorned 00a6a058ef Lunatic: in engine.savePaletteDat(), open file in binary mode. BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4331 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-13 15:39:28 +00:00
helixhorned 38d939372d synthesis.sh: add Mapster32 to Lunatic preview package. BUILD_LUNATIC.
There's no separate SDK package, unlike for the regular builds.

git-svn-id: https://svn.eduke32.com/eduke32@4330 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-12 21:03:07 +00:00
helixhorned 15e141452e Lunatic: disallow saving map-text files in Mapster32 for now.
git-svn-id: https://svn.eduke32.com/eduke32@4329 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-12 21:03:06 +00:00
helixhorned 23ecf8cce0 Amend r4318: Lunatic doesn't need the safety check.
git-svn-id: https://svn.eduke32.com/eduke32@4328 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-12 21:02:59 +00:00
terminx faa8133cda Support "r_windowpositioning" in SDL builds.
git-svn-id: https://svn.eduke32.com/eduke32@4327 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-11 17:55:45 +00:00
hendricks266 70caa24f24 MSVC: Set up support for SDL2. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4326 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-11 07:39:09 +00:00
terminx 497dc1fc7f Fix 64-bit MSVC builds. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4325 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-11 07:17:45 +00:00
hendricks266 990c99acc2 Fix 32-bit MSVC builds. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4324 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-11 06:14:03 +00:00
hendricks266 e50c4069b3 Synthesis: Start building Lunatic in 64-bit too. BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4323 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 11:00:34 +00:00
hendricks266 c2cb6a9754 Networking updates.
- Added preprocessor value NETVERSION, to be incremented in the source whenever changes are made to the network protocol.
- Implemented proper server-side version verification of all clients upon connection.
- Implemented connection refusal when we reach MAXPLAYERS. (Should be expanded to implement server player caps.)
- Protected against OOB array accesses if an invalid player id is received.
- Renamed all "Recieve" to "Receive".

git-svn-id: https://svn.eduke32.com/eduke32@4322 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 11:00:25 +00:00
hendricks266 3b5dea7347 Fix warnings when building in C++11 mode, i.e. with CPLUSPLUS=1 CUSTOMOPT="--std=gnu++11".
git-svn-id: https://svn.eduke32.com/eduke32@4321 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 11:00:07 +00:00
hendricks266 8f9ffcf23f MSVC: Add support for x64 building and all synthesis libs (libpng/zlib, libvpx, libFLAC).
External ogg/vorbis are no longer required.

git-svn-id: https://svn.eduke32.com/eduke32@4320 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:59:42 +00:00
hendricks266 fd3712ab22 Windows: Full library refresh.
git-svn-id: https://svn.eduke32.com/eduke32@4319 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:58:38 +00:00
hendricks266 8146f6014c Don't crash if for some reason your CONs don't define actors like SHOTSPARK1, which has its strength value used in hardcoded behavior.
git-svn-id: https://svn.eduke32.com/eduke32@4318 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:56:27 +00:00
hendricks266 5d92bef194 Very minor changes after an investigation into the possibility of Polymost on Wii.
git-svn-id: https://svn.eduke32.com/eduke32@4317 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:56:14 +00:00
hendricks266 7deb709ab6 Replace QuickLZ with LZ4.
git-svn-id: https://svn.eduke32.com/eduke32@4316 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:55:49 +00:00
hendricks266 8db0c9c729 Fix errors and warnings with LLVM/clang 3.4 Windows.
git-svn-id: https://svn.eduke32.com/eduke32@4315 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:55:13 +00:00
hendricks266 854c266cf7 Update commented SDL2 key debug log output.
git-svn-id: https://svn.eduke32.com/eduke32@4314 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:54:50 +00:00
helixhorned 0aa7b11dca C-CON: add *actor[].blend as an alias to .detail, *tspr[].tsprblend analogously.
See lunatic/test/sprite_access.con for a LIZTROOP that periodically smoothly
alpha-fades in and out. (Assuming that the 128 alpha blending tables from
shadexfog.create_128_trans(1) are installed.)

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4313 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-09 19:22:36 +00:00
helixhorned 846fcdf31c 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.

git-svn-id: https://svn.eduke32.com/eduke32@4312 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-09 19:22:35 +00:00
helixhorned 075d817ed7 Lunatic: 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.

git-svn-id: https://svn.eduke32.com/eduke32@4311 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-09 19:22:33 +00:00
terminx 83d23092cd Fix building on MinGW (MinGW-w64 was OK). DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4310 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 21:25:29 +00:00
helixhorned eec27960ea Lunatic: update dynsymlists. Move blendtable[] from build.h to engine.c.
BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4309 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:59 +00:00
helixhorned a9fb9e6356 Lunatic: add a 'lastokcol' argument to engine.nearcolor() and document it.
On the C side, slightly rewrite (now) getclosestcol_lim() for clarity.

git-svn-id: https://svn.eduke32.com/eduke32@4308 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:58 +00:00
helixhorned 5726a15bb3 Lunatic: document engine.*blendtab() and engine.getrgb() functions.
git-svn-id: https://svn.eduke32.com/eduke32@4307 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:57 +00:00
helixhorned 0637c2b6a8 M32script: remove sprite members 'detail' and 'filler', add 'blend', make r/w.
git-svn-id: https://svn.eduke32.com/eduke32@4306 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:56 +00:00
helixhorned ad8d6795e2 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*.

git-svn-id: https://svn.eduke32.com/eduke32@4305 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:55 +00:00
helixhorned b1b0da2852 Polymer: factor out polymer_invalidateartmap(), use it in invalidatetile().
This fixes updating the viewscreen in Polymer's ART mapping mode.

git-svn-id: https://svn.eduke32.com/eduke32@4304 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:53 +00:00
helixhorned e379cd3655 Polymer: factor out polymer_invalidatesprite(), use when viewscreen tex changed.
Also, rewrite invalidatetile() for clarity.

git-svn-id: https://svn.eduke32.com/eduke32@4303 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-08 14:37:52 +00:00