From 3fb431bde58ef4abe1c36c1d6fe7e8a0e754e368 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Tue, 23 Feb 2021 02:41:02 +0100 Subject: [PATCH] Further minimap expansion, and more. --- cvarinfo.txt | 35 +++- language.def_menu | 70 ++++++- language.es_menu | 70 ++++++- language.version | 4 +- menudef.txt | 51 ++++- zscript/swwm_handler.zsc | 40 +++- zscript/swwm_hud.zsc | 399 ++++++++++++++++++++++++++++++++------ zscript/swwm_thinkers.zsc | 14 +- zscript/swwm_utility.zsc | 22 +++ 9 files changed, 629 insertions(+), 76 deletions(-) diff --git a/cvarinfo.txt b/cvarinfo.txt index 6e89bcbb5..ed819643c 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -100,10 +100,41 @@ nosave int swwm_numcolor_dmg = 6; // font color for damage numbers (default: re nosave int swwm_numcolor_hp = 7; // font color for health numbers (default: blue) nosave int swwm_numcolor_ap = 3; // font color for armor numbers (default: green) server int swwm_drlaskill = 3; // [DRLA Monsters] skill setting for monster spawns -nosave bool swwm_showminimap = true; // show a minimap below the score counter -nosave noarchive float swwm_minimapzoom = 1; // zoom level of minimap nosave bool swwm_itemsparkles = false; // visual aid for low visibility items +// minimap settings +nosave bool swwm_mm_enable = true; // show a minimap below the score counter +nosave noarchive float swwm_mm_zoom = 1; // zoom level of minimap +nosave bool swwm_mm_rotate = true; // rotate minimap +nosave bool swwm_mm_grid = false; // show blockmap grid plus (0,0) crosshair +nosave int swwm_mm_colorset = 0; // 0: SWWM GZ, 1: GZDoom, 2: Doom, 3: Strife, 4: Raven +nosave color swwm_mm_backcolor = "10 10 10"; +nosave color swwm_mm_cdwallcolor = "30 50 70"; +nosave color swwm_mm_efwallcolor = "80 a0 c0"; +nosave color swwm_mm_fdwallcolor = "50 70 90"; +nosave color swwm_mm_gridcolor = "30 20 40"; +nosave color swwm_mm_interlevelcolor = "ff 00 60"; +nosave color swwm_mm_intralevelcolor = "00 60 ff"; +nosave color swwm_mm_lockedcolor = "00 80 00"; +nosave color swwm_mm_notseencolor = "20 20 30"; +nosave color swwm_mm_portalcolor = "40 30 20"; // unused +nosave color swwm_mm_secretsectorcolor = "80 00 ff"; +nosave color swwm_mm_secretwallcolor = "60 40 80"; +nosave color swwm_mm_specialwallcolor = "ff a0 00"; +nosave color swwm_mm_thingcolor = "ff ff ff"; +nosave color swwm_mm_thingcolor_citem = "00 ff ff"; +nosave color swwm_mm_thingcolor_friend = "80 ff a0"; +nosave color swwm_mm_thingcolor_item = "ff c0 00"; +nosave color swwm_mm_thingcolor_monster = "ff 60 40"; +nosave color swwm_mm_thingcolor_ncmonster = "a0 40 20"; +nosave color swwm_mm_thingcolor_shootable = "ff a0 a0"; // thingcolor as fallback +nosave color swwm_mm_thingcolor_vipitem = "80 60 ff"; // unexploredsecretcolor as fallback +nosave color swwm_mm_tswallcolor = "30 20 40"; +nosave color swwm_mm_unexploredsecretcolor = "40 00 80"; +nosave color swwm_mm_wallcolor = "c0 e0 ff"; +nosave color swwm_mm_xhaircolor = "80 80 ff"; +nosave color swwm_mm_yourcolor = "80 ff 00"; + server noarchive bool swwm_iseriouslywanttoplaythiswithbd = false; // self-explanatory // cross-session achievement cvars (0: locked, 1: unlocked, 2: notified) diff --git a/language.def_menu b/language.def_menu index 3d64bc565..082192563 100644 --- a/language.def_menu +++ b/language.def_menu @@ -207,8 +207,44 @@ SWWM_DRLASKILL_NIGHTMARE = "Nightmare"; SWWM_DRLASKILL_TECHNOPHOBIA = "Technophobia"; SWWM_DRLASKILL_ARMAGEDDON = "Armageddon"; SWWM_DRLASKILL_ADAPTIVE = "Adaptive"; -SWWM_SHOWMINIMAP = "Show Minimap"; SWWM_ITEMSPARKLES = "Item Sparkles"; +SWWM_MMTITLE = "Minimap Settings"; +SWWM_MM_ENABLE = "Show Minimap"; +SWWM_MM_ROTATE = "Rotate Minimap"; +SWWM_MM_GRID = "Show Grid"; +SWWM_MM_COLORSET = "Minimap Color Set"; +SWWM_OWNCOLORS = "Our Colors"; +SWWM_GZDOOMCOLORS = "GZDoom Custom"; +SWWM_DOOMCOLORS = "Vanilla Doom"; +SWWM_STRIFECOLORS = "Vanilla Strife"; +SWWM_RAVENCOLORS = "Vanilla Raven"; +SWWM_MM_RESET = "Reset to Defaults"; +SWWM_MM_BACKCOLOR = "Background"; +SWWM_MM_YOURCOLOR = "You"; +SWWM_MM_WALLCOLOR = "1-sided walls"; +SWWM_MM_FDWALLCOLOR = "2-sided walls with different floors"; +SWWM_MM_CDWALLCOLOR = "2-sided walls with different ceilings"; +SWWM_MM_EFWALLCOLOR = "2-sided walls with 3D floors"; +SWWM_MM_GRIDCOLOR = "Map grid"; +SWWM_MM_XHAIRCOLOR = "Center point"; +SWWM_MM_NOTSEENCOLOR = "Not-yet-seen walls"; +SWWM_MM_LOCKEDCOLOR = "Locked doors"; +SWWM_MM_INTRALEVELCOLOR = "Teleported to the same map"; +SWWM_MM_INTERLEVELCOLOR = "Teleporter to a different map"; +SWWM_MM_SECRETSECTORCOLOR = "Secret sector"; +SWWM_MM_UNEXPLOREDSECRETCOLOR = "Unexplored secret"; +SWWM_MM_SPECIALWALLCOLOR = "Special trigger lines"; +SWWM_MM_PORTALCOLOR = "Portal Overlays"; +SWWM_MM_TSWALLCOLOR = "Invisible 2-sided walls"; +SWWM_MM_SECRETWALLCOLOR = "Secret walls"; +SWWM_MM_THINGCOLOR = "Actors"; +SWWM_MM_THINGCOLOR_MONSTER = "Monsters"; +SWWM_MM_THINGCOLOR_NCMONSTER = "Non-counting Monsters"; +SWWM_MM_THINGCOLOR_FRIEND = "Friends"; +SWWM_MM_THINGCOLOR_ITEM = "Items"; +SWWM_MM_THINGCOLOR_CITEM = "Count Items"; +SWWM_MM_THINGCOLOR_VIPITEM = "Important Items"; +SWWM_MM_THINGCOLOR_SHOOTABLE = "Shootable Actors"; TOOLTIP_SWWM_VOICETYPE = "Sets the voice pack for the player."; TOOLTIP_SWWM_MUTEVOICE = "Control what gets muted, if you'd rather have a more silent protagonist."; TOOLTIP_SWWM_FLASHSTRENGTH = "Screen flashes usually happen when firing some weapons, you can lower this if these effects are harmful for you."; @@ -299,8 +335,38 @@ TOOLTIP_SWWM_NUMCOLOR_DMG = "Select the color for damage numbers."; TOOLTIP_SWWM_NUMCOLOR_HP = "Select the color for health numbers."; TOOLTIP_SWWM_NUMCOLOR_AP = "Select the color for armor numbers."; TOOLTIP_SWWM_DRLASKILL = "[DRLA Monsters] Sets the skill level for enemy spawns."; -TOOLTIP_SWWM_SHOWMINIMAP = "Displays a minimap under the score counter."; TOOLTIP_SWWM_ITEMSPARKLES = "Nearby items will have particles around them, as a visual aid."; +TOOLTIP_SWWM_MM_ENABLE = "Displays a minimap under the score counter."; +TOOLTIP_SWWM_MM_ROTATE = "Rotates the minimap view."; +TOOLTIP_SWWM_MM_GRID = "Shows a 128x128 grid on the minimap."; +TOOLTIP_SWWM_MM_COLORSET = "Choose what palette to use for the minimap."; +TOOLTIP_EVENT_SWWMRESETMMCOLORS = "Resets all these colors to their original values."; +TOOLTIP_SWWM_MM_BACKCOLOR = "Color of the minimap drawing area."; +TOOLTIP_SWWM_MM_YOURCOLOR = "Color of the central arrow."; +TOOLTIP_SWWM_MM_WALLCOLOR = "Color of all one-sided lines that have nothing special."; +TOOLTIP_SWWM_MM_FDWALLCOLOR = "Color of lines where the floor height changes."; +TOOLTIP_SWWM_MM_CDWALLCOLOR = "Color of lines where the ceiling height changes."; +TOOLTIP_SWWM_MM_EFWALLCOLOR = "Color of lines where there's a 3D floor boundary."; +TOOLTIP_SWWM_MM_GRIDCOLOR = "Color of the blockmap grid."; +TOOLTIP_SWWM_MM_XHAIRCOLOR = "Color of the central map point."; +TOOLTIP_SWWM_MM_NOTSEENCOLOR = "Color of walls that Omnisight revealed, but haven't yet been seen."; +TOOLTIP_SWWM_MM_LOCKEDCOLOR = "Color for locked doors (unless they have one defined)."; +TOOLTIP_SWWM_MM_INTRALEVELCOLOR = "Color of teleporters within the map."; +TOOLTIP_SWWM_MM_INTERLEVELCOLOR = "Color of teleporters that go to another map, or exits."; +TOOLTIP_SWWM_MM_SECRETSECTORCOLOR = "Color of revealed secret sectors."; +TOOLTIP_SWWM_MM_UNEXPLOREDSECRETCOLOR = "Color of secret sectors that haven't been explored yet."; +TOOLTIP_SWWM_MM_SPECIALWALLCOLOR = "Color of special lines that the player can activate."; +TOOLTIP_SWWM_MM_PORTALCOLOR = "Color of map lines belonging to a static portal (not implemented)."; +TOOLTIP_SWWM_MM_TSWALLCOLOR = "Color of lines with no height difference, hidden unless using cheats."; +TOOLTIP_SWWM_MM_SECRETWALLCOLOR = "Color of lines that are flagged as secret, only shown using cheats."; +TOOLTIP_SWWM_MM_THINGCOLOR = "Color for general things in the map."; +TOOLTIP_SWWM_MM_THINGCOLOR_MONSTER = "Color for hostiles."; +TOOLTIP_SWWM_MM_THINGCOLOR_NCMONSTER = "Color for hostiles that don't count towards map tally."; +TOOLTIP_SWWM_MM_THINGCOLOR_FRIEND = "Color for allies."; +TOOLTIP_SWWM_MM_THINGCOLOR_ITEM = "Color for items."; +TOOLTIP_SWWM_MM_THINGCOLOR_CITEM = "Color for items that count towards map tally."; +TOOLTIP_SWWM_MM_THINGCOLOR_VIPITEM = "Color for very important items."; +TOOLTIP_SWWM_MM_THINGCOLOR_SHOOTABLE = "Color for things that can be damaged."; // knowledge base SWWM_COMINGSOON = "(coming soon)"; SWWM_MISSTAB = "Mission"; diff --git a/language.es_menu b/language.es_menu index d94c647ef..f16605a0b 100644 --- a/language.es_menu +++ b/language.es_menu @@ -204,8 +204,44 @@ SWWM_DRLASKILL_NIGHTMARE = "Pesadilla"; SWWM_DRLASKILL_TECHNOPHOBIA = "Tecnofobia"; SWWM_DRLASKILL_ARMAGEDDON = "Armagedón"; SWWM_DRLASKILL_ADAPTIVE = "Adaptado"; -SWWM_SHOWMINIMAP = "Mostrar Minimapa"; SWWM_ITEMSPARKLES = "Partículas de Ítem"; +SWWM_MMTITLE = "Opciones de Minimapa"; +SWWM_MM_ENABLE = "Mostrar Minimapa"; +SWWM_MM_ROTATE = "Rotar Minimapa"; +SWWM_MM_GRID = "Mostrar Cuadrícula"; +SWWM_MM_COLORSET = "Set de Colores de Minimapa"; +SWWM_OWNCOLORS = "Colores Propios"; +SWWM_GZDOOMCOLORS = "Personalizado de GZDoom"; +SWWM_DOOMCOLORS = "Doom Vanilla"; +SWWM_STRIFECOLORS = "Strife Vanilla"; +SWWM_RAVENCOLORS = "Raven Vanilla"; +SWWM_MM_RESET = "Restaurar Predeterminado"; +SWWM_MM_BACKCOLOR = "Fondo"; +SWWM_MM_YOURCOLOR = "Tú"; +SWWM_MM_WALLCOLOR = "Paredes de 1 lado"; +SWWM_MM_FDWALLCOLOR = "Paredes de 2 lados con pisos distintos"; +SWWM_MM_CDWALLCOLOR = "Paredes de 2 lados con techos distintos"; +SWWM_MM_EFWALLCOLOR = "Paredes de 2 lados con suelos 3D"; +SWWM_MM_GRIDCOLOR = "Cuadrícula del mapa"; +SWWM_MM_XHAIRCOLOR = "Punto central"; +SWWM_MM_NOTSEENCOLOR = "Paredes sin ver"; +SWWM_MM_LOCKEDCOLOR = "Puerdas bloqueadas"; +SWWM_MM_INTRALEVELCOLOR = "Telepuerto al mismo mapa"; +SWWM_MM_INTERLEVELCOLOR = "Telepuerto a un mapa diferente"; +SWWM_MM_SECRETSECTORCOLOR = "Sector secreto"; +SWWM_MM_UNEXPLOREDSECRETCOLOR = "Sector secreto inexplorado"; +SWWM_MM_SPECIALWALLCOLOR = "Lineas especiales de activación"; +SWWM_MM_PORTALCOLOR = "Sobreposición de portal"; +SWWM_MM_TSWALLCOLOR = "Paredes de 2 lados invisibles"; +SWWM_MM_SECRETWALLCOLOR = "Paredes secretas"; +SWWM_MM_THINGCOLOR = "Actores"; +SWWM_MM_THINGCOLOR_MONSTER = "Monstruos"; +SWWM_MM_THINGCOLOR_NCMONSTER = "Monstruos no contados"; +SWWM_MM_THINGCOLOR_FRIEND = "Amigos"; +SWWM_MM_THINGCOLOR_ITEM = "Objetos"; +SWWM_MM_THINGCOLOR_CITEM = "Objetos contados"; +SWWM_MM_THINGCOLOR_VIPITEM = "Objetos importantes"; +SWWM_MM_THINGCOLOR_SHOOTABLE = "Actores vulnerables"; TOOLTIP_SWWM_VOICETYPE = "Selecciona el pack de voz para el jugador."; TOOLTIP_SWWM_MUTEVOICE = "Controla lo que se mutea, si prefieres tener un protagonista más silencioso."; TOOLTIP_SWWM_FLASHSTRENGTH = "Los destellos en pantalla suelen ocurrir al disparar algunas armas, puedes reducirlo si este tipo de efectos te causan malestar."; @@ -296,8 +332,38 @@ TOOLTIP_SWWM_NUMCOLOR_DMG = "Selecciona el color para los números de daño."; TOOLTIP_SWWM_NUMCOLOR_HP = "Selecciona el color para los números de salud."; TOOLTIP_SWWM_NUMCOLOR_AP = "Selecciona el color para los números de armadura."; TOOLTIP_SWWM_DRLASKILL = "[DRLA Monsters] Elige el nivel de dificultad para spawns de enemigos."; -TOOLTIP_SWWM_SHOWMINIMAP = "Muestra un minimapa bajo el contador de puntuación."; TOOLTIP_SWWM_ITEMSPARKLES = "Los ítems cercanos tendrán partículas alrededor, para mejor visibilidad."; +TOOLTIP_SWWM_MM_ENABLE = "Muestra un minimapa bajo el contador de puntuación."; +TOOLTIP_SWWM_MM_ROTATE = "Gira la vista del minimapa."; +TOOLTIP_SWWM_MM_GRID = "Muestra una cuadrícula de 128x128 en el minimapa."; +TOOLTIP_SWWM_MM_COLORSET = "Selecciona que paleta usar para el minimapa."; +TOOLTIP_EVENT_SWWMRESETMMCOLORS = "Resetea estos colores a sus valores originales."; +TOOLTIP_SWWM_MM_BACKCOLOR = "Color del área de dibujo del mapa."; +TOOLTIP_SWWM_MM_YOURCOLOR = "Color de la flecha central."; +TOOLTIP_SWWM_MM_WALLCOLOR = "Color de todas las líneas de una cara que no tienen nada de especial."; +TOOLTIP_SWWM_MM_FDWALLCOLOR = "Color de las líneas donde cambia la altura del suelo."; +TOOLTIP_SWWM_MM_CDWALLCOLOR = "Color de las líneas donde cambia la altura del techo."; +TOOLTIP_SWWM_MM_EFWALLCOLOR = "Color de las líneas donde hay un borde de suelo 3D."; +TOOLTIP_SWWM_MM_GRIDCOLOR = "Color de la cuadrícula de blockmap."; +TOOLTIP_SWWM_MM_XHAIRCOLOR = "Color del punto central del mapa."; +TOOLTIP_SWWM_MM_NOTSEENCOLOR = "Color de las paredes reveladas por Omnivisión, pero que no han sido vistas aún."; +TOOLTIP_SWWM_MM_LOCKEDCOLOR = "Color para puertas bloqueadas (a menos que tengan uno definido)."; +TOOLTIP_SWWM_MM_INTRALEVELCOLOR = "Color para teletransportes dentro del mapa."; +TOOLTIP_SWWM_MM_INTERLEVELCOLOR = "Color para teletransportes a otro mapa, o salidas."; +TOOLTIP_SWWM_MM_SECRETSECTORCOLOR = "Color de sectores secretos revelados."; +TOOLTIP_SWWM_MM_UNEXPLOREDSECRETCOLOR = "Color de sectores secretos que aun no han sido explorados."; +TOOLTIP_SWWM_MM_SPECIALWALLCOLOR = "Color de líneas especiales que el jugador puede activar."; +TOOLTIP_SWWM_MM_PORTALCOLOR = "Color de líneas de mapa que forman parte de un portal estático (no implementado)."; +TOOLTIP_SWWM_MM_TSWALLCOLOR = "Color de líneas sin diferencia de altura, ocultas a menos que se usen trucos."; +TOOLTIP_SWWM_MM_SECRETWALLCOLOR = "Color de líneas marcadas como secretas, solo mostradas usando trucos."; +TOOLTIP_SWWM_MM_THINGCOLOR = "Color para cosas generales en el mapa."; +TOOLTIP_SWWM_MM_THINGCOLOR_MONSTER = "Color para hostiles."; +TOOLTIP_SWWM_MM_THINGCOLOR_NCMONSTER = "Color para hostiles que no cuentan para el tanteo del mapa."; +TOOLTIP_SWWM_MM_THINGCOLOR_FRIEND = "Color para aliados."; +TOOLTIP_SWWM_MM_THINGCOLOR_ITEM = "Color para ítems."; +TOOLTIP_SWWM_MM_THINGCOLOR_CITEM = "Color para ítems que cuentan para el tanteo del mapa."; +TOOLTIP_SWWM_MM_THINGCOLOR_VIPITEM = "Color para ítems muy importantes."; +TOOLTIP_SWWM_MM_THINGCOLOR_SHOOTABLE = "Color para cosas que pueden ser dañadas."; // knowledge base SWWM_COMINGSOON = "(próximamente)"; SWWM_MISSTAB = "Misión"; diff --git a/language.version b/language.version index 854732da9..5c43e87fd 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r303 \cu(Mon 22 Feb 21:51:49 CET 2021)\c-"; -SWWM_SHORTVER="\cw0.9.11b-pre r303 \cu(2021-02-22 21:51:49)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r304 \cu(Tue 23 Feb 02:41:02 CET 2021)\c-"; +SWWM_SHORTVER="\cw0.9.11b-pre r304 \cu(2021-02-23 02:41:02)\c-"; diff --git a/menudef.txt b/menudef.txt index aff99a8b0..9a279beb8 100644 --- a/menudef.txt +++ b/menudef.txt @@ -77,6 +77,9 @@ OptionMenu "SWWMOptionMenu" Class "SWWMOptionMenu" Title "$SWWM_MTITLE" + Submenu "$SWWM_MMTITLE", "SWWMMinimapMenu" + StaticText " " + StaticText "$SWWM_PTITLE", "Blue" SWWMVoiceOption "$SWWM_VOICETYPE", "swwm_voicetype" Option "$SWWM_MUTELEVEL", "swwm_mutevoice", "SWWMVoice" @@ -99,7 +102,6 @@ OptionMenu "SWWMOptionMenu" Slider "$SWWM_CHATLEN", "swwm_chatduration", 1, 30, 1, 0 Slider "$SWWM_MSGLEN", "swwm_msgduration", 1, 30, 1, 0 Slider "$SWWM_PICKLEN", "swwm_pickduration", 1, 30, 1, 0 - Option "$SWWM_SHOWMINIMAP", "swwm_showminimap", "YesNo" Option "$SWWM_TARGET", "swwm_targeter", "YesNo" Option "$SWWM_TARGETTAG", "swwm_targettags", "YesNo" Option "$SWWM_DAMAGETARGET", "swwm_damagetarget", "SWWMDamageTarget" @@ -188,6 +190,53 @@ OptionMenu "SWWMOptionMenu" StaticText " " } +OptionValue "SWWMMinimapColorset" +{ + 0, "$SWWM_OWNCOLORS" + 1, "$SWWM_GZDOOMCOLORS" + 2, "$SWWM_DOOMCOLORS" + 3, "$SWWM_STRIFECOLORS" + 4, "$SWWM_RAVENCOLORS" +} + +OptionMenu "SWWMMinimapMenu" +{ + Class "SWWMOptionMenu" + Title "$SWWM_MMTITLE" + + Option "$SWWM_MM_ENABLE", "swwm_mm_enable", "YesNo" + Option "$SWWM_MM_ROTATE", "swwm_mm_rotate", "YesNo" + Option "$SWWM_MM_GRID", "swwm_mm_grid", "YesNo" + Option "$SWWM_MM_COLORSET", "swwm_mm_colorset", "SWWMMinimapColorset" + SafeCommand "$SWWM_MM_RESET", "event swwmresetmmcolors" + StaticText " " + ColorPicker "$SWWM_MM_BACKCOLOR", "swwm_mm_backcolor" + ColorPicker "$SWWM_MM_YOURCOLOR", "swwm_mm_yourcolor" + ColorPicker "$SWWM_MM_WALLCOLOR", "swwm_mm_wallcolor" + ColorPicker "$SWWM_MM_FDWALLCOLOR", "swwm_mm_fdwallcolor" + ColorPicker "$SWWM_MM_CDWALLCOLOR", "swwm_mm_cdwallcolor" + ColorPicker "$SWWM_MM_EFWALLCOLOR", "swwm_mm_efwallcolor" + ColorPicker "$SWWM_MM_GRIDCOLOR", "swwm_mm_gridcolor" + ColorPicker "$SWWM_MM_XHAIRCOLOR", "swwm_mm_xhaircolor" + ColorPicker "$SWWM_MM_NOTSEENCOLOR", "swwm_mm_notseencolor" + ColorPicker "$SWWM_MM_LOCKEDCOLOR", "swwm_mm_lockedcolor" + ColorPicker "$SWWM_MM_INTRALEVELCOLOR", "swwm_mm_intralevelcolor" + ColorPicker "$SWWM_MM_INTERLEVELCOLOR", "swwm_mm_interlevelcolor" + ColorPicker "$SWWM_MM_SECRETSECTORCOLOR", "swwm_mm_secretsectorcolor" + ColorPicker "$SWWM_MM_UNEXPLOREDSECRETCOLOR", "swwm_mm_unexploredsecretcolor" + ColorPicker "$SWWM_MM_SPECIALWALLCOLOR", "swwm_mm_specialwallcolor" + //ColorPicker "$SWWM_MM_PORTALCOLOR", "swwm_mm_portalcolor" + ColorPicker "$SWWM_MM_TSWALLCOLOR", "swwm_mm_tswallcolor" + ColorPicker "$SWWM_MM_SECRETWALLCOLOR", "swwm_mm_secretwallcolor" + ColorPicker "$SWWM_MM_THINGCOLOR", "swwm_mm_thingcolor" + ColorPicker "$SWWM_MM_THINGCOLOR_MONSTER", "swwm_mm_thingcolor_monster" + ColorPicker "$SWWM_MM_THINGCOLOR_NCMONSTER", "swwm_mm_thingcolor_ncmonster" + ColorPicker "$SWWM_MM_THINGCOLOR_FRIEND", "swwm_mm_thingcolor_friend" + ColorPicker "$SWWM_MM_THINGCOLOR_ITEM", "swwm_mm_thingcolor_item" + ColorPicker "$SWWM_MM_THINGCOLOR_CITEM", "swwm_mm_thingcolor_citem" + ColorPicker "$SWWM_MM_THINGCOLOR_VIPITEM", "swwm_mm_thingcolor_vipitem" + ColorPicker "$SWWM_MM_THINGCOLOR_SHOOTABLE", "swwm_mm_thingcolor_shootable" +} AddOptionMenu "OptionsMenu" { Submenu "$SWWM_MTITLE", "SWWMOptionMenu" diff --git a/zscript/swwm_handler.zsc b/zscript/swwm_handler.zsc index 43b2d3bc2..7fe77540f 100644 --- a/zscript/swwm_handler.zsc +++ b/zscript/swwm_handler.zsc @@ -68,6 +68,31 @@ Class SWWMStaticHandler : StaticEventHandler Font.GetFont('SWWMBigFont'); } + override void ConsoleProcess( ConsoleEvent e ) + { + static const Name mmvars[] = + { + 'swwm_mm_backcolor', 'swwm_mm_cdwallcolor', + 'swwm_mm_efwallcolor', 'swwm_mm_fdwallcolor', + 'swwm_mm_gridcolor', 'swwm_mm_interlevelcolor', + 'swwm_mm_intralevelcolor', 'swwm_mm_lockedcolor', + 'swwm_mm_notseencolor', 'swwm_mm_portalcolor', + 'swwm_mm_secretsectorcolor', 'swwm_mm_secretwallcolor', + 'swwm_mm_specialwallcolor', 'swwm_mm_thingcolor', + 'swwm_mm_thingcolor_citem', 'swwm_mm_thingcolor_friend', + 'swwm_mm_thingcolor_item', 'swwm_mm_thingcolor_monster', + 'swwm_mm_thingcolor_ncmonster', 'swwm_mm_thingcolor_shootable', + 'swwm_mm_thingcolor_vipitem', 'swwm_mm_tswallcolor', + 'swwm_mm_unexploredsecretcolor', 'swwm_mm_wallcolor', + 'swwm_mm_xhaircolor', 'swwm_mm_yourcolor' + }; + if ( e.Name ~== "swwmresetmmcolors" ) + { + for ( int i=0; i MPlus // Miniwi -> k6x8 @@ -417,13 +422,13 @@ Class SWWMStatusBar : BaseStatusBar if ( CPlayer.ReadyWeapon is 'SWWMWeapon' ) SWWMWeapon(CPlayer.ReadyWeapon).HudTick(); bool thesight = CPlayer.mo.FindInventory("Omnisight"); - double desiredzoom = clamp(swwm_minimapzoom,.5,thesight?2.:1.); - if ( (minimapzoom != swwm_minimapzoom) || (oldminimapzoom != swwm_minimapzoom) ) + double desiredzoom = clamp(swwm_mm_zoom,.5,thesight?2.:1.); + if ( (minimapzoom != swwm_mm_zoom) || (oldminimapzoom != swwm_mm_zoom) ) { oldminimapzoom = minimapzoom; double diff = .1*(desiredzoom-minimapzoom); minimapzoom += diff; - if ( abs(minimapzoom-desiredzoom) <= double.epsilon ) + if ( abs(minimapzoom-desiredzoom) <= .01 ) minimapzoom = desiredzoom; } let cam = players[consoleplayer].camera; @@ -841,6 +846,164 @@ Class SWWMStatusBar : BaseStatusBar } // minimap helper code + private void GetMinimapColors() + { + mm_colorset = swwm_mm_colorset; + switch ( mm_colorset ) + { + case 1: + // gzdoom + mm_backcolor = am_backcolor; + mm_cdwallcolor = am_cdwallcolor; + mm_efwallcolor = am_efwallcolor; + mm_fdwallcolor = am_fdwallcolor; + mm_gridcolor = am_gridcolor; + mm_interlevelcolor = am_interlevelcolor; + mm_intralevelcolor = am_intralevelcolor; + mm_lockedcolor = am_lockedcolor; + mm_notseencolor = am_notseencolor; + mm_portalcolor = am_portalcolor; + mm_secretsectorcolor = am_secretsectorcolor; + mm_secretwallcolor = am_secretwallcolor; + mm_specialwallcolor = am_specialwallcolor; + mm_thingcolor = am_thingcolor; + mm_thingcolor_citem = am_thingcolor_citem; + mm_thingcolor_friend = am_thingcolor_friend; + mm_thingcolor_item = am_thingcolor_item; + mm_thingcolor_monster = am_thingcolor_monster; + mm_thingcolor_ncmonster = am_thingcolor_ncmonster; + mm_thingcolor_shootable = am_thingcolor; + mm_thingcolor_vipitem = am_unexploredsecretcolor; + mm_tswallcolor = am_tswallcolor; + mm_unexploredsecretcolor = am_unexploredsecretcolor; + mm_wallcolor = am_wallcolor; + mm_xhaircolor = am_xhaircolor; + mm_yourcolor = am_yourcolor; + mm_displaylocks = true; + break; + case 2: + // doom + mm_backcolor = "00 00 00"; + mm_cdwallcolor = "fc fc 00"; + mm_efwallcolor = "bc 78 48"; + mm_fdwallcolor = "bc 78 48"; + mm_gridcolor = "4c 4c 4c"; + mm_interlevelcolor = 0; + mm_intralevelcolor = 0; + mm_lockedcolor = "fc fc 00"; + mm_notseencolor = "6c 6c 6c"; + mm_portalcolor = "40 40 40"; + mm_secretsectorcolor = 0; + mm_secretwallcolor = 0; + mm_specialwallcolor = 0; + mm_thingcolor = "74 fc 6c"; + mm_thingcolor_citem = "74 fc 6c"; + mm_thingcolor_friend = "74 fc 6c"; + mm_thingcolor_item = "74 fc 6c"; + mm_thingcolor_monster = "74 fc 6c"; + mm_thingcolor_ncmonster = "74 fc 6c"; + mm_thingcolor_shootable = "74 fc 6c"; + mm_thingcolor_vipitem = "74 fc 6c"; + mm_tswallcolor = "80 80 80"; + mm_unexploredsecretcolor = 0; + mm_wallcolor = "fc 00 00"; + mm_xhaircolor = "80 80 80"; + mm_yourcolor = "ff ff ff"; + mm_displaylocks = false; + break; + case 3: + // strife + mm_backcolor = "00 00 00"; + mm_cdwallcolor = "77 73 73"; + mm_efwallcolor = "37 3b 5b"; + mm_fdwallcolor = "37 3b 5b"; + mm_gridcolor = "4c 4c 4c"; + mm_interlevelcolor = 0; + mm_intralevelcolor = 0; + mm_lockedcolor = "77 73 73"; + mm_notseencolor = "6c 6c 6c"; + mm_portalcolor = "40 40 40"; + mm_secretsectorcolor = 0; + mm_secretwallcolor = 0; + mm_specialwallcolor = 0; + mm_thingcolor = "bb 3b 00"; + mm_thingcolor_citem = "db ab 00"; + mm_thingcolor_friend = "fc 00 00"; + mm_thingcolor_item = "db ab 00"; + mm_thingcolor_monster = "fc 00 00"; + mm_thingcolor_ncmonster = "fc 00 00"; + mm_thingcolor_shootable = "bb 3b 00"; + mm_thingcolor_vipitem = "db ab 00"; + mm_tswallcolor = "77 73 73"; + mm_unexploredsecretcolor = 0; + mm_wallcolor = "c7 ce ce"; + mm_xhaircolor = "80 80 80"; + mm_yourcolor = "ef ef ef"; + mm_displaylocks = false; + break; + case 4: + // raven + mm_backcolor = "6c 54 40"; + mm_cdwallcolor = "67 3b 1f"; + mm_efwallcolor = "d0 b0 85"; + mm_fdwallcolor = "d0 b0 85"; + mm_gridcolor = "46 32 10"; + mm_interlevelcolor = 0; + mm_intralevelcolor = 0; + mm_lockedcolor = "67 3b 1f"; + mm_notseencolor = "00 00 00"; + mm_portalcolor = "50 50 50"; + mm_secretsectorcolor = 0; + mm_secretwallcolor = 0; + mm_specialwallcolor = 0; + mm_thingcolor = "ec ec ec"; + mm_thingcolor_citem = "ec ec ec"; + mm_thingcolor_friend = "ec ec ec"; + mm_thingcolor_item = "ec ec ec"; + mm_thingcolor_monster = "ec ec ec"; + mm_thingcolor_ncmonster = "ec ec ec"; + mm_thingcolor_shootable = "ec ec ec"; + mm_thingcolor_vipitem = "ec ec ec"; + mm_tswallcolor = "58 5d 56"; + mm_unexploredsecretcolor = 0; + mm_wallcolor = "4b 32 10"; + mm_xhaircolor = "00 00 00"; + mm_yourcolor = "ff ff ff"; + mm_displaylocks = true; + break; + default: + // swwm + mm_backcolor = swwm_mm_backcolor; + mm_cdwallcolor = swwm_mm_cdwallcolor; + mm_efwallcolor = swwm_mm_efwallcolor; + mm_fdwallcolor = swwm_mm_fdwallcolor; + mm_gridcolor = swwm_mm_gridcolor; + mm_interlevelcolor = swwm_mm_interlevelcolor; + mm_intralevelcolor = swwm_mm_intralevelcolor; + mm_lockedcolor = swwm_mm_lockedcolor; + mm_notseencolor = swwm_mm_notseencolor; + mm_portalcolor = swwm_mm_portalcolor; + mm_secretsectorcolor = swwm_mm_secretsectorcolor; + mm_secretwallcolor = swwm_mm_secretwallcolor; + mm_specialwallcolor = swwm_mm_specialwallcolor; + mm_thingcolor = swwm_mm_thingcolor; + mm_thingcolor_citem = swwm_mm_thingcolor_citem; + mm_thingcolor_friend = swwm_mm_thingcolor_friend; + mm_thingcolor_item = swwm_mm_thingcolor_item; + mm_thingcolor_monster = swwm_mm_thingcolor_monster; + mm_thingcolor_ncmonster = swwm_mm_thingcolor_ncmonster; + mm_thingcolor_shootable = swwm_mm_thingcolor_shootable; + mm_thingcolor_vipitem = swwm_mm_thingcolor_vipitem; + mm_tswallcolor = swwm_mm_tswallcolor; + mm_unexploredsecretcolor = swwm_mm_unexploredsecretcolor; + mm_wallcolor = swwm_mm_wallcolor; + mm_xhaircolor = swwm_mm_xhaircolor; + mm_yourcolor = swwm_mm_yourcolor; + mm_displaylocks = true; + break; + } + } + private bool ShouldDisplaySpecial( int special ) { // thanks graf/randi/whoever @@ -928,6 +1091,8 @@ Class SWWMStatusBar : BaseStatusBar private int CheckSecret( Line l ) { + if ( !mm_secretsectorcolor || !mm_unexploredsecretcolor ) + return 0; if ( l.frontsector && (l.frontsector.flags&Sector.SECF_WASSECRET) ) { if ( am_map_secrets && !(l.frontsector.flags&Sector.SECF_SECRET) ) return 1; @@ -951,6 +1116,108 @@ Class SWWMStatusBar : BaseStatusBar return true; } + private void DrawMapGrid( Vector2 basepos ) + { + double zoomlevel = oldminimapzoom*(1.-FracTic)+minimapzoom*FracTic; + double zoomview = MAPVIEWDIST*zoomlevel, zoomclip = CLIPDIST*zoomlevel; + Vector2 cpos = CPlayer.Camera.prev.xy*(1.-FracTic)+CPlayer.Camera.pos.xy*FracTic; + // find farthest visible southwest grid point from camera position + int maxlines = int(zoomview/64); + Vector2 gpt = (cpos-(zoomview,zoomview))/128; + gpt.x = int(gpt.x)*128; + gpt.y = int(gpt.y)*128; + for ( int i=0; i zoomview ) + continue; + // flip Y + rv1.y *= -1; + rv2.y *= -1; + // rotate by view + if ( swwm_mm_rotate ) + { + rv1 = Actor.RotateVector(rv1,ViewRot.x-90); + rv2 = Actor.RotateVector(rv2,ViewRot.x-90); + } + // clip to frame + bool visible; + [visible, rv1, rv2] = SWWMUtility.LiangBarsky((-1,-1)*zoomclip,(1,1)*zoomclip,rv1,rv2); + if ( !visible ) continue; + // scale to minimap frame + rv1 *= (HALFMAPSIZE/zoomclip)*hs.x; + rv2 *= (HALFMAPSIZE/zoomclip)*hs.x; + // offset to minimap center + rv1 += basepos; + rv2 += basepos; + // draw the line + Screen.DrawThickLine(int(rv1.x),int(rv1.y),int(rv2.x),int(rv2.y),max(1.,hs.x*.25),mm_gridcolor); + } + for ( int i=0; i zoomview ) + continue; + // flip Y + rv1.y *= -1; + rv2.y *= -1; + // rotate by view + if ( swwm_mm_rotate ) + { + rv1 = Actor.RotateVector(rv1,ViewRot.x-90); + rv2 = Actor.RotateVector(rv2,ViewRot.x-90); + } + // clip to frame + bool visible; + [visible, rv1, rv2] = SWWMUtility.LiangBarsky((-1,-1)*zoomclip,(1,1)*zoomclip,rv1,rv2); + if ( !visible ) continue; + // scale to minimap frame + rv1 *= (HALFMAPSIZE/zoomclip)*hs.x; + rv2 *= (HALFMAPSIZE/zoomclip)*hs.x; + // offset to minimap center + rv1 += basepos; + rv2 += basepos; + // draw the line + Screen.DrawThickLine(int(rv1.x),int(rv1.y),int(rv2.x),int(rv2.y),max(1.,hs.x*.25),mm_gridcolor); + } + // draw the origin crosshair + Vector2 tv[4]; + tv[0] = (-16,0); + tv[1] = (16,0); + tv[2] = (0,-16); + tv[3] = (0,16); + for ( int i=0; i<4; i+=2 ) + { + Vector2 rv1 = tv[i]-cpos; + Vector2 rv2 = tv[i+1]-cpos; + if ( min(min(abs(rv1.x),abs(rv2.x)),min(abs(rv1.y),abs(rv2.y))) > zoomview ) + continue; + // flip Y + rv1.y *= -1; + rv2.y *= -1; + // rotate by view + if ( swwm_mm_rotate ) + { + rv1 = Actor.RotateVector(rv1,ViewRot.x-90); + rv2 = Actor.RotateVector(rv2,ViewRot.x-90); + } + // clip to frame + bool visible; + [visible, rv1, rv2] = SWWMUtility.LiangBarsky((-1,-1)*zoomclip,(1,1)*zoomclip,rv1,rv2); + if ( !visible ) continue; + // scale to minimap frame + rv1 *= (HALFMAPSIZE/zoomclip)*hs.x; + rv2 *= (HALFMAPSIZE/zoomclip)*hs.x; + // offset to minimap center + rv1 += basepos; + rv2 += basepos; + // draw the line + Screen.DrawThickLine(int(rv1.x),int(rv1.y),int(rv2.x),int(rv2.y),max(1.,hs.x*.75),mm_xhaircolor); + } + } + private void DrawMapLines( Vector2 basepos ) { double zoomlevel = oldminimapzoom*(1.-FracTic)+minimapzoom*FracTic; @@ -969,8 +1236,11 @@ Class SWWMStatusBar : BaseStatusBar rv1.y *= -1; rv2.y *= -1; // rotate by view - rv1 = Actor.RotateVector(rv1,ViewRot.x-90); - rv2 = Actor.RotateVector(rv2,ViewRot.x-90); + if ( swwm_mm_rotate ) + { + rv1 = Actor.RotateVector(rv1,ViewRot.x-90); + rv2 = Actor.RotateVector(rv2,ViewRot.x-90); + } // clip to frame bool visible; [visible, rv1, rv2] = SWWMUtility.LiangBarsky((-1,-1)*zoomclip,(1,1)*zoomclip,rv1,rv2); @@ -982,48 +1252,56 @@ Class SWWMStatusBar : BaseStatusBar rv1 += basepos; rv2 += basepos; // get the line color - Color col = am_wallcolor; + Color col = mm_wallcolor; if ( (l.flags&Line.ML_MAPPED) || am_cheat ) { int secwit = CheckSecret(l); int lock = SWWMUtility.GetLineLock(l); - if ( secwit == 1 ) col = am_secretsectorcolor; - else if ( secwit == 2 ) col = am_unexploredsecretcolor; + if ( secwit == 1 ) col = mm_secretsectorcolor; + else if ( secwit == 2 ) col = mm_unexploredsecretcolor; else if ( l.flags&Line.ML_SECRET ) { - if ( am_cheat && l.backsector ) - col = am_secretwallcolor; - else col = am_wallcolor; + if ( am_cheat && l.backsector && mm_secretwallcolor ) + col = mm_secretwallcolor; + else col = mm_wallcolor; } - else if ( (l.special == Exit_Normal) + else if ( mm_interlevelcolor + && ((l.special == Exit_Normal) || (l.special == Exit_Secret) || (l.special == Teleport_NewMap) - || (l.special == Teleport_EndGame) ) - col = am_interlevelcolor; - else if ( (l.activation&SPAC_PlayerActivate) - && (l.special == Teleport) + || (l.special == Teleport_EndGame)) ) + col = mm_interlevelcolor; + else if ( mm_intralevelcolor && + (l.activation&SPAC_PlayerActivate) + && ((l.special == Teleport) || (l.special == Teleport_NoFog) || (l.special == Teleport_ZombieChanger) - || (l.special == Teleport_Line) ) - col = am_intralevelcolor; - else if ( (lock > 1) && (lock < 256) && SWWMUtility.IsValidLockNum(lock) ) - col = SWWMUtility.GetLockColor(lock); - else if ( ShowTriggerLine(l) ) - col = am_specialwallcolor; + || (l.special == Teleport_Line)) ) + col = mm_intralevelcolor; + else if ( mm_displaylocks + && (lock > 1) && (lock < 256) + && SWWMUtility.IsValidLockNum(lock) ) + { + let lcol = SWWMUtility.GetLockColor(lock); + if ( lcol ) col = lcol; + else col = mm_lockedcolor; + } + else if ( mm_specialwallcolor && ShowTriggerLine(l) ) + col = mm_specialwallcolor; else if ( l.frontsector && l.backsector ) { - if ( !CmpFloorPlanes(l) ) col = am_fdwallcolor; - else if ( !CmpCeilingPlanes(l) ) col = am_cdwallcolor; - else if ( CheckFFBoundary(l) ) col = am_efwallcolor; + if ( !CmpFloorPlanes(l) ) col = mm_fdwallcolor; + else if ( !CmpCeilingPlanes(l) ) col = mm_cdwallcolor; + else if ( CheckFFBoundary(l) ) col = mm_efwallcolor; else { if ( (am_cheat == 0) || (am_cheat >= 4) ) continue; - col = am_tswallcolor; + col = mm_tswallcolor; } } } - else col = am_notseencolor; + else col = mm_notseencolor; // draw the line Screen.DrawThickLine(int(rv1.x),int(rv1.y),int(rv2.x),int(rv2.y),max(1.,hs.x*.5),col); } @@ -1036,7 +1314,7 @@ Class SWWMStatusBar : BaseStatusBar Vector2 cpos = CPlayer.Camera.prev.xy*(1.-FracTic)+CPlayer.Camera.pos.xy*FracTic; for ( SWWMSimpleTracker t=hnd.strackers; t; t=t.next ) { - Color col = am_thingcolor; + Color col = mm_thingcolor; bool isitem = false; bool plainactor = false; Vector2 pos; @@ -1049,16 +1327,21 @@ Class SWWMStatusBar : BaseStatusBar radius = t.target.radius; if ( t.isitem ) { - if ( ((t.target is 'Chancebox') && (t.target.CurState == t.target.SpawnState)) || (t.target is 'SWWMCollectible') || (t.target is 'GoldShell') ) col = "Purple"; - else if ( t.target.bCOUNTITEM || (t.target is 'Key') ) col = am_thingcolor_citem; - else col = am_thingcolor_item; + if ( SWWMUtility.IsVipItem(t.target) ) col = mm_thingcolor_vipitem; + else if ( SWWMUtility.IsScoreItem(t.target) ) col = mm_thingcolor_citem; + else col = mm_thingcolor_item; isitem = true; } else if ( t.target.player ) col = t.target.player.GetColor(); - else if ( t.target.bFRIENDLY ) col = am_thingcolor_friend; - else if ( t.target.bCOUNTKILL ) col = am_thingcolor_monster; - else if ( t.target.bISMONSTER ) col = am_thingcolor_ncmonster; - else plainactor = true; + else if ( t.target.bFRIENDLY ) col = mm_thingcolor_friend; + else if ( t.target.bCOUNTKILL ) col = mm_thingcolor_monster; + else if ( t.target.bISMONSTER ) col = mm_thingcolor_ncmonster; + else + { + if ( SWWMUtility.IsVipItem(t.target) ) col = mm_thingcolor_vipitem; // chanceboxes + else if ( t.target.bSHOOTABLE ) col = mm_thingcolor_shootable; + plainactor = true; + } } else { @@ -1067,16 +1350,21 @@ Class SWWMStatusBar : BaseStatusBar radius = t.radius; if ( t.isitem ) { - if ( t.vipitem ) col = "Purple"; - else if ( t.countitem ) col = am_thingcolor_citem; - else col = am_thingcolor_item; + if ( t.vipitem ) col = mm_thingcolor_vipitem; + else if ( t.countitem ) col = mm_thingcolor_citem; + else col = mm_thingcolor_item; isitem = true; } if ( t.isplayer ) col = t.playercol; - else if ( t.friendly ) col = am_thingcolor_friend; - else if ( t.countkill ) col = am_thingcolor_monster; - else if ( t.ismonster ) col = am_thingcolor_ncmonster; - else plainactor = true; + else if ( t.friendly ) col = mm_thingcolor_friend; + else if ( t.countkill ) col = mm_thingcolor_monster; + else if ( t.ismonster ) col = mm_thingcolor_ncmonster; + else + { + if ( t.vipitem ) col = mm_thingcolor_vipitem; // chanceboxes + else if ( t.shootable ) col = mm_thingcolor_shootable; + plainactor = true; + } } int mtime = 35; if ( thesight && !t.expired && t.target ) mtime += 105; @@ -1110,13 +1398,13 @@ Class SWWMStatusBar : BaseStatusBar // oriented triangle nidx = 3; tv[0] = rv+Actor.RotateVector((radius,0),angle); - tv[1] = rv+Actor.RotateVector((-radius,radius),angle); - tv[2] = rv+Actor.RotateVector((-radius,-radius),angle); + tv[1] = rv+Actor.RotateVector((-radius*.5,radius*.7),angle); + tv[2] = rv+Actor.RotateVector((-radius*.5,-radius*.7),angle); } // flip Y for ( int j=0; j