Commit Graph

49 Commits

Author SHA1 Message Date
terminx 32057d2e19 Direct struct access for tsprite, and break special gamevar access out of Gv_GetVar() and into a separate function like it already was with Gv_GetVarX()
git-svn-id: https://svn.eduke32.com/eduke32@7201 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:11:21 +00:00
terminx 18916ddaf6 Clean up Gv_AddSystemVars() and Gv_RefreshPointers()
git-svn-id: https://svn.eduke32.com/eduke32@7200 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:11:14 +00:00
terminx 893bcbd603 Direct access for the actor structs
git-svn-id: https://svn.eduke32.com/eduke32@7198 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:11:04 +00:00
terminx 34c6fcc69f gamedef.cpp and friends: use preprocessor defines instead of hard-coded values for gamevar IDs that are really constants or arrays or structs
git-svn-id: https://svn.eduke32.com/eduke32@7197 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:10:57 +00:00
terminx eb546f111e WIP: direct CON read/write access to structure members via pointer and offset instead of translation function. This is only enabled for wall and sector structure members in this commit.
git-svn-id: https://svn.eduke32.com/eduke32@7194 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:10:39 +00:00
terminx a0562d5e69 Formatting
git-svn-id: https://svn.eduke32.com/eduke32@7190 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:10:15 +00:00
terminx 3cfda9858d Use tabledivide64() in Gv_GetArrayCountFromFile()
git-svn-id: https://svn.eduke32.com/eduke32@7157 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:06:33 +00:00
terminx ad7d61baa1 Use range-based loops for simplicity
git-svn-id: https://svn.eduke32.com/eduke32@7130 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:33:40 +00:00
terminx 2132fe978a The LZ4 versions of kdfread and kdfwrite don't have the size limitations that the LZW versions have
git-svn-id: https://svn.eduke32.com/eduke32@7075 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-16 06:09:32 +00:00
terminx 2f410776ec Parentheses around ternary conditions so CppCheck will stfu
git-svn-id: https://svn.eduke32.com/eduke32@7036 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-07 05:23:00 +00:00
terminx 8a2651ac55 Remove apScriptEvents from savegames
git-svn-id: https://svn.eduke32.com/eduke32@6979 1a8010ca-5511-0410-912e-c29ae57300e0
2018-09-28 04:27:17 +00:00
hendricks266 a442c4f7bf CON: Remix resizearray in the following ways:
Make only one allocation instead of two.
Calculate array byte sizes in a way compatible with GAMEARRAY_BOOLEAN.
Clear the expanded part of grown arrays using correct counts for non-int32 sizes.
Support resizing an array to 0 to free it.

git-svn-id: https://svn.eduke32.com/eduke32@6900 1a8010ca-5511-0410-912e-c29ae57300e0
2018-05-23 05:58:12 +00:00
hendricks266 aba749c3bd WWII GI: Update the default values of the weapon gamevars to correctly match the original game.
git-svn-id: https://svn.eduke32.com/eduke32@6868 1a8010ca-5511-0410-912e-c29ae57300e0
2018-05-02 07:12:52 +00:00
terminx 21c9f6dd7e Use references in some gamevar stuff
git-svn-id: https://svn.eduke32.com/eduke32@6853 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-23 06:36:02 +00:00
terminx 7d0249b9ee I don't know if this is actually better or not but it feels like it should be
git-svn-id: https://svn.eduke32.com/eduke32@6819 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-06 01:43:17 +00:00
pogokeen 136dd514e1 Switched Duke3D to use new LZ4 dfwrite()/kdfread() implementations to improve compression/decompression speed.
SV_MINOR_VER is incremented as using this alternate compression algorithm is not backwards compatible with older saves/demos.

git-svn-id: https://svn.eduke32.com/eduke32@6789 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-23 21:41:02 +00:00
terminx 3b6bb3b7a3 Fix up CON to work with Q16.16 values
git-svn-id: https://svn.eduke32.com/eduke32@6727 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-07 04:21:31 +00:00
terminx a76750df55 Q16.16 for player angle, too
git-svn-id: https://svn.eduke32.com/eduke32@6725 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-07 04:21:18 +00:00
terminx 4d8bb170a3 Use Q16.16 fixed point for player horiz
git-svn-id: https://svn.eduke32.com/eduke32@6724 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-07 04:21:05 +00:00
hendricks266 ab3c4366e4 Fix "setvarvar: Gv_GetVarX(): invalid player ID -1" message for certain userdef accesses
git-svn-id: https://svn.eduke32.com/eduke32@6717 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-03 08:22:55 +00:00
hendricks266 9878d0c322 Revise the userdef code to accept multiple values.
Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6705 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-26 20:19:55 +00:00
hendricks266 d9b0479343 ZDoom-style saves
git-svn-id: https://svn.eduke32.com/eduke32@6569 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-18 11:24:53 +00:00
terminx c52e003e2a Fix issue with arrays, saved map states, and savegames
git-svn-id: https://svn.eduke32.com/eduke32@6492 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-31 02:09:25 +00:00
terminx 3b9587cfa2 Fix issue with savemapstate/loadmapstate and gamearrays
git-svn-id: https://svn.eduke32.com/eduke32@6487 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-16 21:17:47 +00:00
terminx 332b037c39 Expose "show2dsector" to CON
git-svn-id: https://svn.eduke32.com/eduke32@6433 1a8010ca-5511-0410-912e-c29ae57300e0
2017-08-27 10:20:29 +00:00
hendricks266 8c5fe26b14 CON: Fix playervar quick structure access.
git-svn-id: https://svn.eduke32.com/eduke32@6404 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-29 20:40:00 +00:00
hendricks266 32ed49e5c5 Slightly change readarrayfromfile so that attempting to read arrays of a size that does not evenly divide into the requested type rounds up instead of down and zero-pads the difference.
This should help hackish persuits such as reading map files through this command.

git-svn-id: https://svn.eduke32.com/eduke32@6394 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-28 08:27:38 +00:00
hendricks266 201ee80f87 Fix readarrayfromfile with bitmaps and uint32s. Also improve it.
git-svn-id: https://svn.eduke32.com/eduke32@6393 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-28 08:27:35 +00:00
hendricks266 6e7daf6d1b Introduce GAMEARRAY_SIZE_MASK.
git-svn-id: https://svn.eduke32.com/eduke32@6392 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-28 08:27:31 +00:00
terminx eeaf1f1d54 Build fix
git-svn-id: https://svn.eduke32.com/eduke32@6387 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-27 10:08:52 +00:00
terminx ef8bd42b49 Another attempt at fixing the problems caused by my recent changes to gamearrays
git-svn-id: https://svn.eduke32.com/eduke32@6372 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-20 08:57:50 +00:00
terminx efcdd0cde0 derp
git-svn-id: https://svn.eduke32.com/eduke32@6371 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-19 06:06:19 +00:00
terminx 484f640f71 Maybe, possibly, unfuck gamearrays.
git-svn-id: https://svn.eduke32.com/eduke32@6368 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-18 20:53:22 +00:00
terminx 3141084a65 More array work: support for reading and writing the new array types from disk. Not tested.
git-svn-id: https://svn.eduke32.com/eduke32@6357 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-11 04:03:01 +00:00
terminx 01d92aeed2 Syntax changes for gamevar and gamearray declarations:
Gamevar: default value and flags are now optional. A var declared without a value will default to 0 and a var declared without flags will default to global. Multiple flags can now be stacked one after another in a var declaration, and the most useful ones (GAMEVAR_PERPLAYER, GAMEVAR_PERACTOR, GAMEVAR_NODEFAULT, and GAMEVAR_NORESET) are now pre-defined tokens for easy use.

Gamearray: flags field now allows stacking of multiple flags as described above. Arrays can now be defined with specific data types, including int16_t, uint8_t, and a new bit-packed boolean data type. The tokens GAMEARRAY_RESTORE, GAMEARRAY_INT16, GAMEARRAY_UINT8, and GAMEARRAY_BOOLEAN are pre-defined for use of this feature.

This is all still pretty experimental.

git-svn-id: https://svn.eduke32.com/eduke32@6356 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-11 04:02:52 +00:00
hendricks266 bbff77b20e Add a THISACTOR for tiledata and paldata, referring to the current actor's picnum and pal.
git-svn-id: https://svn.eduke32.com/eduke32@6351 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-10 13:43:57 +00:00
terminx 3706ac1b43 Allow scripts to change MAXSPRITESONSCREEN before calls to drawrooms() and friends
git-svn-id: https://svn.eduke32.com/eduke32@6347 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-08 19:42:11 +00:00
terminx 4c981137be Check constants before THISACTOR in Gv_GetManyVars(). Seems much more likely to be true.
git-svn-id: https://svn.eduke32.com/eduke32@6346 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-08 19:42:01 +00:00
terminx da0cc1b9bd Some work on CON arrays. Hopefully nothing is broken!
git-svn-id: https://svn.eduke32.com/eduke32@6343 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-08 19:41:43 +00:00
terminx 19c58edb40 Add support for bitmap gamearrays and expose gotpic to CON
git-svn-id: https://svn.eduke32.com/eduke32@6342 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-08 19:41:36 +00:00
terminx b3b40c9581 Allow writing to 8 and 16-bit CON arrays
git-svn-id: https://svn.eduke32.com/eduke32@6338 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-08 05:18:43 +00:00
terminx 224475402f Remove errant EDUKE32_PREDICT_FALSE
git-svn-id: https://svn.eduke32.com/eduke32@6333 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-07 22:50:29 +00:00
hendricks266 01b6047377 Trailing whitespace.
git-svn-id: https://svn.eduke32.com/eduke32@6303 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-27 11:01:22 +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
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
hendricks266 f781f21ccd Address some longstanding warnings with printf when building with MinGW's GCC 6 and newer.
Building with said newer versions may fix the -Wodr warning when building for release.

git-svn-id: https://svn.eduke32.com/eduke32@6140 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-05 10:05:12 +00:00
hendricks266 417b047cf3 Bring the previous commit into effect.
git-svn-id: https://svn.eduke32.com/eduke32@6056 1a8010ca-5511-0410-912e-c29ae57300e0
2017-02-01 10:20:54 +00:00
hendricks266 1cc9d13ccf The great repository rearrangement of 2017.
Files moved but not modified. Changes to follow in a subsequent commit.

You down with CPP?

git-svn-id: https://svn.eduke32.com/eduke32@6055 1a8010ca-5511-0410-912e-c29ae57300e0
2017-02-01 10:01:11 +00:00
Renamed from polymer/eduke32/source/gamevars.c (Browse further)