Commit Graph

95 Commits

Author SHA1 Message Date
terminx 87d19d5cde More function name shit
git-svn-id: https://svn.eduke32.com/eduke32@6832 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:04:00 +00:00
terminx 19c43b84b3 Function names
git-svn-id: https://svn.eduke32.com/eduke32@6831 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:03:47 +00:00
terminx 1fd209444f Continuing the quest for clearer function names
git-svn-id: https://svn.eduke32.com/eduke32@6829 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:03:12 +00:00
terminx 0340e3cc0f Engine function name cleanup round 2
git-svn-id: https://svn.eduke32.com/eduke32@6828 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:02:51 +00:00
hendricks266 6eeb14a12f CON: Add spawnceilingglass, spawnwallglass, and spawnwallstainedglass commands.
Patch from Striker.

git-svn-id: https://svn.eduke32.com/eduke32@6824 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-11 03:33:59 +00:00
hendricks266 d41f233045 CON: Add resetplayerflag 8, which mandates reload and not savegame load in single player.
git-svn-id: https://svn.eduke32.com/eduke32@6823 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-11 03:33:54 +00:00
terminx 260fb278d9 EDUKE32_STANDALONE guard some HoloDuke behavior in CON_IFCANSEE and remove a branch from GAMEARRAY_BITMAP processing in CON_SETARRAY
git-svn-id: https://svn.eduke32.com/eduke32@6818 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-06 01:43:12 +00:00
terminx d10dcd971c More EDUKE32_STANDALONE guarding. Next commit will merge some of the guarded blocks together for simplicity.
git-svn-id: https://svn.eduke32.com/eduke32@6799 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-04 20:47:48 +00:00
hendricks266 084d363364 Replace individual developer email addresses in error messages
git-svn-id: https://svn.eduke32.com/eduke32@6778 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-22 04:48:36 +00:00
hendricks266 ed38f0a75d CON: Add gettiledata/settiledata. Same members as tiledata[] quick access struct. Not all fields writable.
Patch from Striker.

git-svn-id: https://svn.eduke32.com/eduke32@6766 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-15 01:19:27 +00:00
hendricks266 1460dec6d8 In case a requested quick load upon death cannot be completed, perform a pistol start instead of doing nothing
git-svn-id: https://svn.eduke32.com/eduke32@6761 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-11 03:47:11 +00:00
terminx a22394db8d Backport some CON profiling stuff from Lunatic. Use "printtimes" in the console.
git-svn-id: https://svn.eduke32.com/eduke32@6736 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-08 00:29:41 +00:00
terminx ee37c04623 Remove attempt at being compatible with the original ranges of ang and horiz values, and introduce a q16 version of drawrooms (and showroom)
git-svn-id: https://svn.eduke32.com/eduke32@6735 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-07 12:02:03 +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 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 92091a4425 CON: Change OSD_Printf to initprintf for addlog and addlogvar
git-svn-id: https://svn.eduke32.com/eduke32@6681 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-20 11:55:28 +00:00
hendricks266 26749bf881 CON: Add resetplayerflag 4, which always loads if possible
git-svn-id: https://svn.eduke32.com/eduke32@6677 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-20 11:55:13 +00:00
hendricks266 8ddcef89fc Fix FPS limiter in EVENT_SCREEN.
git-svn-id: https://svn.eduke32.com/eduke32@6648 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-12 02:32:39 +00:00
hendricks266 210f3e54ff Apply the FPS limiter to EVENT_SCREEN.
git-svn-id: https://svn.eduke32.com/eduke32@6641 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-10 22:58:34 +00:00
hendricks266 f228b68736 CON: Add if statements if(var(var)){a,b}(e).
Inspired by x86 assembly, these stand for "above" and "below", and perform unsigned versions of greater-than and less-than, respectively.

Useful for testing array bounds.

git-svn-id: https://svn.eduke32.com/eduke32@6640 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-31 05:23:48 +00:00
terminx cd02a9223e Use enum
git-svn-id: https://svn.eduke32.com/eduke32@6636 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-31 04:13:35 +00:00
terminx d9a5b4aa13 Restore previous behavior of "allsprites" iterator for CON_FOR and add "allspritesbystat" and "allspritesbysect"
git-svn-id: https://svn.eduke32.com/eduke32@6635 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-31 04:13:31 +00:00
hendricks266 b497a6cbde CON: Add STR_USERMAPFILENAME for qgetsysstr.
Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6629 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-30 01:03:50 +00:00
hendricks266 d41a013a57 CON: Add commands "swaptrackslot" and "preloadtrackslotforswap"
git-svn-id: https://svn.eduke32.com/eduke32@6623 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 11:14:04 +00:00
hendricks266 969c9b77d6 Turn get/setmusicposition into no-ops.
People were using these commands in spite of my explicit instructions not to.

Now that music track is saved properly, no one has any excuse to continue using these.

git-svn-id: https://svn.eduke32.com/eduke32@6621 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 11:13:55 +00:00
hendricks266 d792054ce2 Refactor all calls to S_PlayMusic.
This allows as much of the control flow as possible to fail gracefully without interruping currently playing music.

git-svn-id: https://svn.eduke32.com/eduke32@6619 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 11:13:43 +00:00
hendricks266 e1e5e338dc New commands: "divr", "divru", "divrd"
divr <dividend> <divisor>

Divide gamevar <dividend> by <divisor> and round (aka round to nearest) the result. A result of 0.5 will equal 1.

divru <dividend> <divisor>

Divide gamevar <dividend> by <divisor> and round up (aka round away from zero) the result.

Additionally "divrd" can be used to round down (aka round toward zero), which is equivalent to the current div command as tested on x86, ARM, and PowerPC.

Note that "shiftr" rounds up negative values.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6611 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 02:14:04 +00:00
hendricks266 1cbf5e36e1 New command "qstrcmp"
qstrcmp <quote1> <quote2> <var>

Compare two quotes. <var> returns zero if they are identical, -1 if the first quote comes first in alphabetical order, 1 if it comes later.

Note that the lexicographical order is rudimentary, for example "Player 2" is considered greater than "Player 10".

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6609 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 02:13:55 +00:00
hendricks266 b3fd642bf4 Replace "INT16_32768" macro with unsigned literal "32768u".
git-svn-id: https://svn.eduke32.com/eduke32@6600 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-28 04:30:34 +00:00
hendricks266 214109b506 Revert the parts of r3159 corresponding to redefining lotag and hitag as unsigned, so that they are once again signed.
Any issues in Duke's code relating to misunderstanding these types are now restricted to Duke itself rather than changing the engine and potentially introducing new issues in all Build games.

git-svn-id: https://svn.eduke32.com/eduke32@6581 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-15 23:13:50 +00:00
terminx 0ece42110c Fix breakage I introduced into CON_FOR while fixing breakage in CON_FOR. :(
git-svn-id: https://svn.eduke32.com/eduke32@6576 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-29 19:27:11 +00:00
terminx 7291688875 Use native_t instead of bssize_t in gameexec.cpp
git-svn-id: https://svn.eduke32.com/eduke32@6575 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-29 19:27:04 +00:00
terminx fcfac7c1d9 Fix issues with CON_FOR
git-svn-id: https://svn.eduke32.com/eduke32@6574 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-29 02:32:12 +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 948fe80304 Fix undefined behavior in gameexec.cpp
git-svn-id: https://svn.eduke32.com/eduke32@6542 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-09 02:56:05 +00:00
terminx de5f16b1c5 Fix events added in recent commits
git-svn-id: https://svn.eduke32.com/eduke32@6537 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-02 09:24:55 +00:00
hendricks266 74908b1def CON: Add screenpal command.
screenpal <r> <g> <b> <a>

Similar to palfrom, but works on screen events. Values range from 0 to 255.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6509 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:14 +00:00
hendricks266 f6678b336a CON: Add command "startscreen" and corresponding EVENT_SCREEN.
Use startscreen to take control away from the game and display content with rotatesprite.

RETURN is set to 1 when any key is pressed, and if it is nonzero when the event ends, the screen ends and the game resumes.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6508 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:11 +00:00
hendricks266 38df0b7e82 CON: Add "actorsound" command.
Patch from Striker.

git-svn-id: https://svn.eduke32.com/eduke32@6504 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:28:58 +00:00
hendricks266 bad61e3934 Replace arbitrary MAXGAMEEVENTS macro with the properly generated MAXEVENTS.
git-svn-id: https://svn.eduke32.com/eduke32@6503 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:28:54 +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
hendricks266 d6682d58d3 Expand use of VM_GetKeywordForID to all other references to vm_keywords[].
Fixes printing of incorrect keywords, reported by Trooper Dan.

git-svn-id: https://svn.eduke32.com/eduke32@6485 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-16 03:32:34 +00:00
hendricks266 b3455b7b4d Amend r6460 to move vm_keywords[] back to gamedef.cpp and factor the ID to keyword mapping into VM_GetKeywordForID().
git-svn-id: https://svn.eduke32.com/eduke32@6484 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-16 03:32:30 +00:00
hendricks266 95d93f770e Eliminate the force-disabling of glprojectionhacks during showview.
Please notify me if this change negatively affects your code.

git-svn-id: https://svn.eduke32.com/eduke32@6473 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-09 07:37:17 +00:00
terminx 938d444b35 This should fix the scrambled log output when the game crashes while executing a CON script somewhere
git-svn-id: https://svn.eduke32.com/eduke32@6460 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-04 22:30:53 +00:00
hendricks266 11ce89d294 Fix randomseed in multiplayer.
Merged from private network branch.

Patch by [IFOC]75, prepared by Striker.

git-svn-id: https://svn.eduke32.com/eduke32@6454 1a8010ca-5511-0410-912e-c29ae57300e0
2017-09-27 02:30:28 +00:00
terminx 98cd4a5c6c Use tokenmap_t struct to define all CON keywords
git-svn-id: https://svn.eduke32.com/eduke32@6432 1a8010ca-5511-0410-912e-c29ae57300e0
2017-08-27 10:20:23 +00:00
hendricks266 af679d2ca8 CON: Call I_ClearAllInput before Anim_Play when executing startcutscene.
git-svn-id: https://svn.eduke32.com/eduke32@6428 1a8010ca-5511-0410-912e-c29ae57300e0
2017-08-06 13:45:05 +00:00