Commit Graph

60 Commits

Author SHA1 Message Date
hendricks266 150ddded12 New userdef structure: "statusbarflags", "statusbarrange", "statusbarcustom"
"statusbarflags" is a bitfield. Values are:
STATUSBAR_NONONE = 1
STATUSBAR_NOMINI = 2
STATUSBAR_NOFULL = 4
STATUSBAR_NOSHRINK = 8
STATUSBAR_NOFRAGBAR = 16
STATUSBAR_NOOVERLAY = 32
STATUSBAR_NOMODERN = 64
Default value is 8. In case you modify it, you also have to set the other status bar related userdefs in EVENT_SETDEFAULTS. Default values in EDuke32 are: screen_size = 4; statusbarmode = 1; althud = 1;

"statusbarrange" is used to add more alternatives for the status bar without breaking the option in the menu. If used, the mini status bar (screen_size = 4) will cycle through "statusbarcustom" when changing the screen size.

Also fix the size of the viewport when the screen is shrunk and the scale of the status bar is not 100%.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6587 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-26 04:34:51 +00:00
hendricks266 85d0a3c520 New userdef structure "menubackground"
Set to 0 to disable the black transparent mask below the in-game menu.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6585 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-26 04:34:43 +00:00
hendricks266 cf64b480f1 Add new events at various points that display hardcoded screens.
New event "EVENT_MAINMENUSCREEN"

Triggered before the main menu is displayed. Set RETURN to -1 to disable the screens that appear before the main menu.

New event "EVENT_NEWGAMESCREEN"

Triggered when a new game is started. Set RETURN to -1 to disable The Birth intro animation.

New event "EVENT_ENDLEVELSCREEN"

Triggered when a level ends. Set RETURN to -1 to disable the bonus and deathmatch score screens after a level ends.

New event "EVENT_EXITGAMESCREEN"

Triggered when a running game is ended. Set RETURN to -1 to disable the deathmatch score screen when you quit mid-game.

New event "EVENT_EXITPROGRAMSCREEN"

Triggered when the program is closed. Set RETURN to -1 to disable the shareware or TEN screen,sif they were enabled in LOGO_FLAGS.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6584 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-26 04:34:38 +00:00
hendricks266 bcb41aac3e New player structures "frags" and "deaths"
player[<killer>].frags <victim>

Equals how many times player <killer> killed <victim>. Note that the sum of these values will not equal the total kills or deaths for a player since another player may disconnect, so use "frag" or "deaths" instead.

player[<id>].deaths

Equals the total number of times the player died in the round, not including suicides.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6563 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-12 05:14:19 +00:00
hendricks266 756fa2bbd8 New userdef structure "screenfade"
Set to zero to disable the hard-coded fade to black transition between screens, menu or when the level ends.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6556 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-12 05:13:53 +00:00
hendricks266 ea36d5289a New event "EVENT_SETDEFAULTS".
Use this event to change the value of userdefs when initializing cfg settings with defaults.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6554 1a8010ca-5511-0410-912e-c29ae57300e0
2017-12-12 05:13:46 +00:00
hendricks266 6164e3dae8 Revise view background / border drawing code.
New event "EVENT_UPDATESCREENAREA"

Use this event to change the size of the game view, similar to when you press + or -.

New event "EVENT_DISPLAYBORDER"

Set RETURN to change the background tile of the game view, set -1 to disable the background and border.

New userdef structures "screenarea_x1", "screenarea_y1", "screenarea_x2", "screenarea_y2"

Use these structures to change the boundaries of the view in EVENT_UPDATESCREENAREA.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6518 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:44 +00:00
hendricks266 1c107bd877 CON: Add EVENT_RECOGSOUND.
Set RETURN to -1 to disable the sound played when an enemy awaken. You have to use a command to play a sound, because the bosses use globalsound.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6517 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:40 +00:00
hendricks266 102a720402 CON: Add EVENT_OPENMENUSOUND.
Set RETURN to the sound played when the menu is opened. -1 to cancel.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6516 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:37 +00:00
hendricks266 c9981e76af CON: Add EVENT_DISPLAYEND and EVENT_DISPLAYROOMSEND.
EVENT_DISPLAYROOMSEND: Triggered right after the game world is rendered and before any sprite above the screen.
EVENT_DISPLAYEND: Triggered after the game draws everything above the screen, including menus. A counterpart to EVENT_DISPLAYSTART.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6512 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:23 +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 dbd8b72d10 CON: Add EVENT_SKIPCUTSCENE.
Used with startcutscene. RETURN is set to 1 when any key is pressed, and is used to control when a cutscene ends.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6507 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:07 +00:00
hendricks266 1377afe414 CON: Add EVENT_PRECUTSCENE.
Used with startcutscene. RETURN sets the frame of an ANM before it is rendered.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6506 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:04 +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 7bdd0e1361 Crash fix
git-svn-id: https://svn.eduke32.com/eduke32@6493 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-31 02:09:39 +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
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 fc0eabebb6 Add player[].connected.
Patch from Striker.

git-svn-id: https://svn.eduke32.com/eduke32@6453 1a8010ca-5511-0410-912e-c29ae57300e0
2017-09-27 02:30:24 +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 df70cbbbeb CON: Add "stopallmusic" command.
git-svn-id: https://svn.eduke32.com/eduke32@6427 1a8010ca-5511-0410-912e-c29ae57300e0
2017-08-06 13:45:02 +00:00
hendricks266 cbb18f5c70 CON: Add starttrackslot <volume> <level>
Clobbering ud.volume_number is a hack no one should need to use any more.

Only this command supports specifying -1 for volume to access the main menu, briefing, etc themes.

git-svn-id: https://svn.eduke32.com/eduke32@6414 1a8010ca-5511-0410-912e-c29ae57300e0
2017-08-01 09:48:59 +00:00
hendricks266 bc1ed207d6 CON parser: Merge some cases for code size savings.
git-svn-id: https://svn.eduke32.com/eduke32@6413 1a8010ca-5511-0410-912e-c29ae57300e0
2017-08-01 09:48:55 +00:00
hendricks266 0f54975751 Yet another round of trailing whitespace.
git-svn-id: https://svn.eduke32.com/eduke32@6400 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-29 20:39:46 +00:00
terminx 7c7f550100 Useless change to force a synthesis build
git-svn-id: https://svn.eduke32.com/eduke32@6398 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-28 20:24:54 +00:00
terminx b00266b47f CON-solidation
Sorry for the shitty pun

git-svn-id: https://svn.eduke32.com/eduke32@6382 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-27 09:13:21 +00:00
terminx dad337add8 Fix gcc 7.1.0 warnings
git-svn-id: https://svn.eduke32.com/eduke32@6370 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-18 20:53:41 +00:00
terminx af0a291a59 Improve C_AddDefaultDefinitions()
git-svn-id: https://svn.eduke32.com/eduke32@6367 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-18 20:53:15 +00:00
hendricks266 494c778feb Fix some int/int32_t mismatches. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6362 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-15 21:56:21 +00:00
terminx f4e1012081 "qputs" alias for "redefinequote"
git-svn-id: https://svn.eduke32.com/eduke32@6358 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-12 04:10:29 +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 c980410ecc Remove special limitations on CON customization access to the DNCGS cheat.
git-svn-id: https://svn.eduke32.com/eduke32@6349 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-10 13:43:50 +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 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 2b7cd33fc2 script command aliases
git-svn-id: https://svn.eduke32.com/eduke32@6336 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-07 22:50:47 +00:00
hendricks266 ad32eaeee0 Don't execute setcfgname if the provided name is the same as the one already in place.
git-svn-id: https://svn.eduke32.com/eduke32@6317 1a8010ca-5511-0410-912e-c29ae57300e0
2017-07-05 05:37:52 +00:00
hendricks266 0d7518891b CON: Add wall.blend to structure access.
git-svn-id: https://svn.eduke32.com/eduke32@6277 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-25 11:23:58 +00:00
hendricks266 7afc8202d2 CON: Add EVENT_PRELOADGAME and EVENT_POSTLOADGAME.
git-svn-id: https://svn.eduke32.com/eduke32@6262 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:21:07 +00:00
hendricks266 df317aa741 CON: Add drawline256 and drawlinergb commands that call the internal functions used for the automap lines.
drawline256 <x0> <y0> <x1> <y1> <index>
drawlinergb <x0> <y0> <x1> <y1> <index> <rgb>

The coordinates are xdim<<12/ydim<<12 based, not 320<<16x200<<16.
<index> is a palette index, and for drawlinergb is used as a fallback in the software renderer.
<rgb> is encoded the same as PROJ_FLASH_COLOR.

git-svn-id: https://svn.eduke32.com/eduke32@6261 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:21:03 +00:00
hendricks266 517517a1bb CON: Add getclosestcol command, which finds the closest palette index given
getclosestcol <return> <color> <limit>

<color> is encoded the same as PROJ_FLASH_COLOR.

<limit> is the index of the last palette color that should be considered. Use 255 for the whole palette, 254 to exclude the transparent color, 239 to exclude Duke 3D's fullbrights, etc.

git-svn-id: https://svn.eduke32.com/eduke32@6259 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:20:54 +00:00
hendricks266 ffc7de9911 CON: Add EVENT_DISPLAYOVERHEADMAPTEXT.
Set RETURN to any non-zero value to disable hardcoded display of text.

If you wish to replace the hardcoded text, you must check that userdef[].overhead_on == 2 yourself.

git-svn-id: https://svn.eduke32.com/eduke32@6258 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 09:20:50 +00:00
terminx bf944cf27a Potential CON performance improvements
git-svn-id: https://svn.eduke32.com/eduke32@6250 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-24 06:31:21 +00:00
terminx 50bc1aa2ba Can Duke3D CON version compatibility messages in standalone builds
git-svn-id: https://svn.eduke32.com/eduke32@6243 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 09:16:13 +00:00
terminx a3fbe4c542 Add clipdist member to player struct to control how close the player can get to walls
git-svn-id: https://svn.eduke32.com/eduke32@6230 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:43 +00:00
terminx bcb6d3830b Only show "using dynamic tile remapping" message in debug builds. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6227 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-23 03:58:26 +00:00
hendricks266 05945c920b Add new userdef members gametext_tracking, mgametext_tracking, and menutext_tracking.
git-svn-id: https://svn.eduke32.com/eduke32@6213 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-20 09:28:59 +00:00
hendricks266 8deddc19b0 Clean up warnings in standalone mode.
git-svn-id: https://svn.eduke32.com/eduke32@6190 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-17 11:42:20 +00:00
hendricks266 81a6f29dd4 CON: Add undefinegamefunc.
git-svn-id: https://svn.eduke32.com/eduke32@6187 1a8010ca-5511-0410-912e-c29ae57300e0
2017-06-17 11:42:08 +00:00