Commit graph

5238 commits

Author SHA1 Message Date
hendricks266
49c85f644d C-CON: Add quick access for the remaining structures without it.
git-svn-id: https://svn.eduke32.com/eduke32@5088 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-25 06:27:57 +00:00
hendricks266
5c8a2e3ea6 C-CON: Enumify quick structure access.
git-svn-id: https://svn.eduke32.com/eduke32@5087 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-25 06:27:42 +00:00
hendricks266
4682da7a22 C-CON: Factor fast struct access and get<struct> out into single functions.
git-svn-id: https://svn.eduke32.com/eduke32@5086 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-25 06:27:25 +00:00
hendricks266
feef0ded2d C-CON: Add PLAYER_PALETTE to quick player struct access, and add a setter that calls P_SetGamePalette().
git-svn-id: https://svn.eduke32.com/eduke32@5085 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-25 06:27:08 +00:00
hendricks266
ab58a33ec6 Menus: Add a Cheats menu to options.
It's old-school.

git-svn-id: https://svn.eduke32.com/eduke32@5084 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 10:49:03 +00:00
hendricks266
6d04da0b49 Menus: Rename MenuPassword_t to MenuTextForm_t, modularize more of its attributes into the data structure, and polish its display and behavior.
git-svn-id: https://svn.eduke32.com/eduke32@5083 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 10:48:34 +00:00
terminx
203b795cc9 Additional fix for building with newest MSYS2 packages. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5082 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 03:34:01 +00:00
terminx
a9c32b758d Build fix. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5081 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 03:33:57 +00:00
terminx
c9ce545ab8 A lot of CON rewrites/optimizations. Converts projectile system to dynamic allocation, saving a bunch of memory (something like sizeof(projectile_t) * MAXTILES * 2). This commit also contains changes that reduce overhead for CON commands that take a lot of parameters, by way of adding a Gv_GetManyVars() to replace long strings of subsequent calls to Gv_GetVarX().
Savegame version has been bumped due to the projectile changes. There is no way this commit doesn't cause at least one bug, so DONT_BUILD. ;)

git-svn-id: https://svn.eduke32.com/eduke32@5080 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:55 +00:00
terminx
9cb68410a0 Engine memory reductions/optimizations:
-faketilesiz[MAXTILES] removed in favor of simple faketile[(MAXTILES+7)>>3] bitfield
-h_xsize/h_ysize (tile size overrides from .def) are now uint16_t instead of int32_t
-hudmem[2][MAXTILES] removed in favor of adding a hudmem ptr to mdmodel_t
-tilefromtexture performance improvements
-more tsectortype/twalltype usage in various engine functions that read but never write
-continued Polymost cleanups and refactors. Please report any odd rendering errors.

git-svn-id: https://svn.eduke32.com/eduke32@5079 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:48 +00:00
terminx
d718d354c1 Fix building on case-sensitive filesystems on OS X, DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5078 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:43 +00:00
terminx
eee8d14a8b Minor kplib optimizations, DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5077 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:40 +00:00
terminx
110b713a64 Win32 debug build filename case checking now uses GetShortPathNameA()/GetLongPathNameA() instead of the slow SHGetFileInfo(). Since this works by requesting the shortened 8.3 filename for a file and then requesting the proper long version of that result, it has the side effect of breaking the functionality on NTFS volumes where the user has explicitly disabled the creation of 8.3 filenames. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5076 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:36 +00:00
terminx
aa4d98982c Large batch of Polymost changes, including:
-lots of stylistic rewrites
-further improvements to anti-fighting code for wall and floor sprites (introduces three new cvars, r_wspr_offset, r_wspr_offset_variance, and r_fspr_offset)
-fixed brief HOM when traversing through a one-way masked wall
-seldomly used "alphahack" feature for hightile textures now represents alpha cutoff internally as a single byte instead of a float
-fixes a handful of issues where geometry failed to draw at certain coordinates from certain angles in certain resolutions
-renames a couple of cvars

git-svn-id: https://svn.eduke32.com/eduke32@5075 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:33 +00:00
terminx
93d8d2dbdb Abort animvpx playback if uploading the texture for a frame throws a GL error. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5074 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:27 +00:00
terminx
7732db71af int64_t -> uint64_t in swap64bit(). DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5073 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:25 +00:00
terminx
112652c5b9 Polymer tsectortype usage. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5072 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:21 +00:00
terminx
8cc2cd8585 Minor stylistic changes, fix FPS counter and other 2D drawing in Polymer.
git-svn-id: https://svn.eduke32.com/eduke32@5071 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:18 +00:00
terminx
fa55f368c9 Remove unused buffer to fix warning, DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5070 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:15 +00:00
terminx
f4e5e39634 Further gamevar changes/optimizations. This also fixes a bug Fox reported with the "shortcut" access to structure members that's tacked on to GetVar, where if the value of the index you're trying to access happened to equal the ID of the current sprite, it would act as if the variable passed was THISACTOR.
git-svn-id: https://svn.eduke32.com/eduke32@5069 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:12 +00:00
terminx
8fc08a71fa Swap position of "load game" and "options" on main menu so that "load game" follows "new game", for consistency with the slightly different menu you get while in-game.
git-svn-id: https://svn.eduke32.com/eduke32@5068 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:08 +00:00
terminx
7845f5e2fe "Stylistic changes"
Translation: I made some stuff const because I felt like it.

git-svn-id: https://svn.eduke32.com/eduke32@5067 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:05 +00:00
terminx
c725da4829 More Android changes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5066 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:40:01 +00:00
terminx
61f35b827a Remove WeaponChoice* from eduke32.cfg and transition setting to "wchoice" cvar. This commit also removes an Android hack and changes the order of some of the in-game "F" key handling, just because it bugged me that some of them were out of order.
git-svn-id: https://svn.eduke32.com/eduke32@5065 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-24 00:39:52 +00:00
hendricks266
201e353771 Amend "renamefile" def token to ensure its proper use. renamefile <GRP/SSI CRC32> <file number> <new filename>
git-svn-id: https://svn.eduke32.com/eduke32@5064 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 08:30:41 +00:00
hendricks266
6e64696605 Expand the quote #13 auto-replacement to catch "OPEN" and "ANY BUTTON" in addition to "SPACE".
git-svn-id: https://svn.eduke32.com/eduke32@5063 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 06:28:40 +00:00
hendricks266
27777f96c3 Add the Duke DC and Duke Caribbean SSI files to the list of group files automatically detected and added to the startup window.
git-svn-id: https://svn.eduke32.com/eduke32@5062 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 06:28:27 +00:00
hendricks266
ddf7720451 Defs: Add token "renamefile", which renames a file in a GRP or SSI file, in memory. 8.3 restrictions apply.
git-svn-id: https://svn.eduke32.com/eduke32@5061 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 06:28:08 +00:00
hendricks266
2f0f38b6e6 cache1d: Add support for loading SSI files.
git-svn-id: https://svn.eduke32.com/eduke32@5060 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 06:27:49 +00:00
hendricks266
8a2b19dd50 cache1d: Allow loading GRP files from within other GRP files.
git-svn-id: https://svn.eduke32.com/eduke32@5059 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 06:27:35 +00:00
hendricks266
496f4582d6 cache1d: Enumify the magic constants for "file is in a zip" and "file is in the filesystem".
git-svn-id: https://svn.eduke32.com/eduke32@5058 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 06:27:18 +00:00
hendricks266
a81be01914 Modify the modern mini-HUD so that:
1. Instead of the Mighty Foot using the Protective Boots inventory item as its icon, display no icon at all.
2. Adjust the ammo icon so that it is drawn at one-quarter size if its y-size is >=50 instead of >50. This fixes the display of Water Pistol Ammo in Duke Caribbean.

git-svn-id: https://svn.eduke32.com/eduke32@5057 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-23 06:26:59 +00:00
hendricks266
97025d9fc7 Add "globalflags" def token. Flag 1 is a kill switch for the tileshades and artmapping features. Flag 2 is kill switch for the GL fullbright rendering pass.
git-svn-id: https://svn.eduke32.com/eduke32@5056 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-09 20:32:36 +00:00
hendricks266
74b264dcb1 Change HICTINT_USEONART so that it applies tints to pal 0 of 8-bit tiles instead of their palswapped selves. Add HICTINT_APPLYOVERPALSWAP which applies tints to palswapped 8-bit tiles. Add HICTINT_APPLYOVERALTPAL, which applies tints to alt-pals of hightile textures.
git-svn-id: https://svn.eduke32.com/eduke32@5055 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-09 20:32:11 +00:00
hendricks266
92afedcb11 Replace the drawing code for the level stats with nearly equivalent code that can be much more easily reproduced in CON.
git-svn-id: https://svn.eduke32.com/eduke32@5054 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-09 07:37:38 +00:00
hendricks266
30669ab8ce Defs: When undefining a model, reset the angadd of its HUD settings to zero.
This fixes weapons not being displayed in Vaca+.

git-svn-id: https://svn.eduke32.com/eduke32@5053 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-09 07:37:23 +00:00
hendricks266
f2a2e1d8b3 Amend r5048 to also reset ototalclock and lockclock, and to reset all three at the top of G_PlaybackDemo.
git-svn-id: https://svn.eduke32.com/eduke32@5052 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 23:40:08 +00:00
hendricks266
1f93451ea0 Partially revert r5020. It's okay to update totalclocklock in G_DrawRooms(), but we must continue updating it in drawrooms() so as to not break the editor and every other BUILD game.
¿Por qué no los dos?

git-svn-id: https://svn.eduke32.com/eduke32@5051 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 23:39:51 +00:00
hendricks266
6ed8f27e77 Expand the grpinfo feature to allow defining GRPs requiring NAM, NAPALM, or WWII GI.
git-svn-id: https://svn.eduke32.com/eduke32@5050 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:59:03 +00:00
hendricks266
362a782820 In G_PlaybackDemo(), update totalclocklock when G_DrawRooms() is not called and therefore does not update it. This fixes ART animations displaying in the main menu.
git-svn-id: https://svn.eduke32.com/eduke32@5049 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:58:49 +00:00
hendricks266
9403200a07 Reset totalclock to zero for each MAIN_LOOP_RESTART.
git-svn-id: https://svn.eduke32.com/eduke32@5048 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:58:36 +00:00
hendricks266
f821434195 CON: Add EVENT_DISPLAYROOMSCAMERA and EVENT_DISPLAYSTART.
EVENT_DISPLAYROOMSCAMERA functions exactly like EVENT_DISPLAYROOMS, including RETURN values, but for the ud.camerasprite >= 0 case.
EVENT_DISPLAYSTART is executed immediately after the screen background is cleared and drawn. Ensure its RETURN value is zero, because it is currently not being used.

WARNING: Consult the devs before using EVENT_DISPLAYSTART. Its position in the display code sequence is not finalized.

git-svn-id: https://svn.eduke32.com/eduke32@5047 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:58:24 +00:00
hendricks266
ef28cac919 CON: Add EVENT_DISPLAYCAMERAOSD. Set RETURN to -1 to disable it.
From this event, if "getactor[THISACTOR].htg_t 0" is zero, then the camera is functional. Nonzero values indicate the camera has been destroyed, which is only possible when the CAMERASDESTRUCTABLE parameter of gamestartup has been enabled.

git-svn-id: https://svn.eduke32.com/eduke32@5046 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:58:06 +00:00
hendricks266
35bee70ee6 CON: Add EVENT_DISPLAYLEVELSTATS. Set RETURN to -1 to disable them.
git-svn-id: https://svn.eduke32.com/eduke32@5045 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:57:47 +00:00
hendricks266
c86bd80dd7 C-CON: Add read-only userdef members "gametypeflags" and "m_gametypeflags", which return GametypeFlags[ud.coop] and GametypeFlags[ud.m_coop] respectively.
git-svn-id: https://svn.eduke32.com/eduke32@5044 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:57:28 +00:00
hendricks266
d7409a5a95 C-CON: Add read-only userdef members "usevoxels", "usehightile", and "usemodels".
git-svn-id: https://svn.eduke32.com/eduke32@5043 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:57:13 +00:00
hendricks266
d5ed8aa728 Restore the shade of a tiled MENUTILE to 8, rather than 16.
git-svn-id: https://svn.eduke32.com/eduke32@5042 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:56:57 +00:00
hendricks266
7d701ae7e2 Disable EF_HIDEFROMMP pending proper consideration when multiplayer is closer to being ready.
git-svn-id: https://svn.eduke32.com/eduke32@5041 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:56:45 +00:00
hendricks266
9079be2e27 Fix a compiler warning with USE_OPENGL=0.
git-svn-id: https://svn.eduke32.com/eduke32@5040 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:56:29 +00:00
hendricks266
b61908cbf3 CON: Add "resetplayerflags". Flag 1 means "don't ask the user if they want to load".
git-svn-id: https://svn.eduke32.com/eduke32@5039 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-04 02:15:15 +00:00