From 1567bc5911f59502f0af0de3be86a367364bb948 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 31 Mar 2019 13:34:55 +0200 Subject: [PATCH 01/10] - initial layout for new player setup menu. --- wadsrc/static/menudef.txt | 45 +++++++- wadsrc/static/zscript/ui/menu/optionmenu.zs | 9 +- wadsrc/static/zscript/ui/menu/playermenu.zs | 108 ++++++++++++++++++++ 3 files changed, 159 insertions(+), 3 deletions(-) diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 37053129d..61e2f0465 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -369,7 +369,7 @@ OptionMenu "OptionsMenu" protected Submenu "$OPTMNU_MOUSE", "MouseOptions" Submenu "$OPTMNU_JOYSTICK", "JoystickOptions" StaticText " " - Submenu "$OPTMNU_PLAYER", "PlayerMenu" + Submenu "$OPTMNU_PLAYER", "NewPlayerMenu" Submenu "$OPTMNU_GAMEPLAY", "GameplayOptions" Submenu "$OPTMNU_COMPATIBILITY", "CompatibilityOptions" Submenu "$OPTMNU_AUTOMAP", "AutomapOptions" @@ -401,6 +401,49 @@ OptionValue "Gender" 3, "$OPTVAL_OTHER" } +OptionValue "PlayerColor" +{} + +OptionValue "PlayerClass" +{} + +OptionValue "PlayerTeam" +{} + +OptionValue "PlayerSkin" +{} + +/* + IfGame(Doom, Heretic, Strife, Chex) + { + MouseWindow 0, 220 + PlayerDisplay 220, 48, "20 00 00", "80 00 40", 1, "PlayerDisplay" + } + IfGame(Hexen) + { + MouseWindow 0, 220 + PlayerDisplay 220, 48, "00 07 00", "40 53 40", 1, "PlayerDisplay" + } +*/ + +OptionMenu "NewPlayerMenu" +{ + Title "$MNU_PLAYERSETUP" + TextField "$PLYRMNU_NAME", menu_playername + Option "$PLYRMNU_TEAM", menu_playerteam, "PlayerTeam" + Option "$PLYRMNU_PLAYERCOLOR", menu_playercolorset, "PlayerColor" + Slider "$PLYRMNU_RED", menu_playercolor_red, 0, 255, 16 + Slider "$PLYRMNU_GREEN", menu_playercolor_green, 0, 255, 16 + Slider "$PLYRMNU_BLUE", menu_playercolor_blue, 0, 255, 16 + Option "$PLYRMNU_PLAYERCLASS", menu_playerclass, "PlayerClass" + Option "$PLYRMNU_PLAYERSKIN", menu_playerskin, "PlayerSkin" + Option "$PLYRMNU_PLAYERGENDER", menu_playergender, "Gender" + Slider "$PLYRMNU_AUTOAIM", menu_playerautoaim, 0, 35, 1 + Option "$PLYRMNU_SWITCHONPICKUP", menu_playerswitch, "OffOn" + Option "$PLYRMNU_ALWAYSRUN", cl_run, "OnOff" + Class "NewPlayerMenu" +} + ListMenu "PlayerMenu" { StaticTextCentered 160, 6, "$MNU_PLAYERSETUP" diff --git a/wadsrc/static/zscript/ui/menu/optionmenu.zs b/wadsrc/static/zscript/ui/menu/optionmenu.zs index ea4a7f07a..a6d8216c2 100644 --- a/wadsrc/static/zscript/ui/menu/optionmenu.zs +++ b/wadsrc/static/zscript/ui/menu/optionmenu.zs @@ -410,6 +410,12 @@ class OptionMenu : Menu // //============================================================================= + virtual int GetIndent() + { + int indent = max(0, (mDesc.mIndent + 40) - CleanWidth_1 / 2); + return screen.GetWidth() / 2 + indent * CleanXfac_1; + } + override void Drawer () { int y = mDesc.mPosition; @@ -433,8 +439,7 @@ class OptionMenu : Menu int fontheight = OptionMenuSettings.mLinespacing * CleanYfac_1; y *= CleanYfac_1; - int indent = max(0, (mDesc.mIndent + 40) - CleanWidth_1 / 2); - indent = screen.GetWidth() / 2 + indent * CleanXfac_1; + int indent = GetIndent(); int ytop = y + mDesc.mScrollTop * 8 * CleanYfac_1; int lastrow = screen.GetHeight() - OptionHeight() * CleanYfac_1; diff --git a/wadsrc/static/zscript/ui/menu/playermenu.zs b/wadsrc/static/zscript/ui/menu/playermenu.zs index 38c70353b..b08019a3b 100644 --- a/wadsrc/static/zscript/ui/menu/playermenu.zs +++ b/wadsrc/static/zscript/ui/menu/playermenu.zs @@ -593,3 +593,111 @@ class PlayerMenu : ListMenu } } + + +class NewPlayerMenu : OptionMenu +{ + TextureID mBackdrop; + PlayerClass mPlayerClass; + State mPlayerState; + int mPlayerTics; + bool mNoportrait; + int8 mRotation; + int8 mMode; // 0: automatic (used by class selection), 1: manual (used by player setup) + int8 mTranslate; + int mSkin; + int mClassNum; + Color mBaseColor; + Color mAddColor; + + const PLAYERDISPLAY_X = 220; + const PLAYERDISPLAY_Y = 60; + const PLAYERDISPLAY_W = 144; + const PLAYERDISPLAY_H = 160; + const PLAYERDISPLAY_SPACE = 180; + + override void Init(Menu parent, OptionMenuDescriptor desc) + { + Super.Init(parent, desc); + mBackdrop = TexMan.CheckForTexture("B@CKDROP", TexMan.Type_MiscPatch); // The weird name is to avoid clashes with mods. + mBaseColor = gameinfo.gametype == GAME_Hexen? 0x200000 : 0x000700; + mAddColor = gameinfo.gametype == GAME_Hexen? 0x800040 : 0x405340; + } + + override int GetIndent() + { + return Super.GetIndent() - 45*CleanXfac_1; + } + + override void Drawer() + { + Super.Drawer(); + DrawPlayerDisplay(); + + int x = screen.GetWidth()/(CleanXfac_1*2) + PLAYERDISPLAY_X + PLAYERDISPLAY_W/2; + int y = PLAYERDISPLAY_Y + PLAYERDISPLAY_H + 5; + String str = Stringtable.Localize("$PLYRMNU_PRESSSPACE"); + screen.DrawText (NewSmallFont, Font.CR_GOLD, x - NewSmallFont.StringWidth(str)/2, y, str, DTA_VirtualWidth, CleanWidth_1, DTA_VirtualHeight, CleanHeight_1, DTA_KeepRatio, true); + str = Stringtable.Localize(mRotation ? "$PLYRMNU_SEEFRONT" : "$PLYRMNU_SEEBACK"); + y += NewSmallFont.GetHeight(); + screen.DrawText (NewSmallFont, Font.CR_GOLD,x - NewSmallFont.StringWidth(str)/2, y, str, DTA_VirtualWidth, CleanWidth_1, DTA_VirtualHeight, CleanHeight_1, DTA_KeepRatio, true); + + } + + //============================================================================= + // + // + // + //============================================================================= + + void DrawPlayerDisplay() + { + + int x = screen.GetWidth()/2 + PLAYERDISPLAY_X * CleanXfac_1; + int y = PLAYERDISPLAY_Y * CleanYfac_1; + + int r = mBaseColor.r + mAddColor.r; + int g = mBaseColor.g + mAddColor.g; + int b = mBaseColor.b + mAddColor.b; + int m = max(r, g, b); + r = r * 255 / m; + g = g * 255 / m; + b = b * 255 / m; + Color c = Color(255, r, g, b); + + screen.DrawTexture(mBackdrop, false, x, y - 1, + DTA_DestWidth, PLAYERDISPLAY_W * CleanXfac_1, + DTA_DestHeight, PLAYERDISPLAY_H * CleanYfac_1, + DTA_Color, c, + DTA_KeepRatio, mNoPortrait, + DTA_Masked, true); + + Screen.DrawFrame (x, y, PLAYERDISPLAY_W*CleanXfac_1, PLAYERDISPLAY_H*CleanYfac_1-1); + + if (mPlayerState != NULL && mPlayerState != NULL) + { + Vector2 Scale; + TextureID sprite; + bool flip; + + let playdef = GetDefaultByType((class)(mPlayerClass.Type)); + [sprite, flip, Scale] = mPlayerState.GetSpriteTexture(mRotation, mSkin, playdef.Scale); + + if (sprite.IsValid()) + { + int trans = mTranslate? Translation.MakeID(TRANSLATION_Players, MAXPLAYERS) : 0; + let tscale = TexMan.GetScaledSize(sprite); + Scale.X *= CleanXfac_1 * tscale.X; + Scale.Y *= CleanYfac_1 * tscale.Y; + + screen.DrawTexture (sprite, false, + x + (PLAYERDISPLAY_X/2) * CleanXfac_1, y + (PLAYERDISPLAY_H-8) * CleanYfac_1, + DTA_DestWidthF, Scale.X, DTA_DestHeightF, Scale.Y, + DTA_TranslationIndex, trans, + DTA_KeepRatio, mNoPortrait, + DTA_FlipX, flip); + } + } + } + +} From bf58c6aaee894bd554835e4fe58e03ec41d6a655 Mon Sep 17 00:00:00 2001 From: Nemrtvi <26684396+Nemrtvi@users.noreply.github.com> Date: Wed, 3 Apr 2019 20:51:29 +0200 Subject: [PATCH 02/10] Accent spacings for Strife letters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GZDoom now has the line spacing to accomodate this. Also fixes an extra pixel in one of the French letters and touched up on the Russian Й. --- .../game-strife/fonts/defsmallfont/00C0.lmp | Bin 172 -> 180 bytes .../game-strife/fonts/defsmallfont/00C1.lmp | Bin 172 -> 180 bytes .../game-strife/fonts/defsmallfont/00C2.lmp | Bin 176 -> 185 bytes .../game-strife/fonts/defsmallfont/00C4.lmp | Bin 175 -> 179 bytes .../game-strife/fonts/defsmallfont/00C8.lmp | Bin 148 -> 155 bytes .../game-strife/fonts/defsmallfont/00C9.lmp | Bin 147 -> 155 bytes .../game-strife/fonts/defsmallfont/00CA.lmp | Bin 149 -> 155 bytes .../game-strife/fonts/defsmallfont/00CB.lmp | Bin 150 -> 154 bytes .../game-strife/fonts/defsmallfont/00CC.lmp | Bin 83 -> 87 bytes .../game-strife/fonts/defsmallfont/00CD.lmp | Bin 83 -> 87 bytes .../game-strife/fonts/defsmallfont/00CE.lmp | Bin 118 -> 122 bytes .../game-strife/fonts/defsmallfont/00CF.lmp | Bin 116 -> 120 bytes .../game-strife/fonts/defsmallfont/00D1.lmp | Bin 178 -> 192 bytes .../game-strife/fonts/defsmallfont/00D2.lmp | Bin 170 -> 178 bytes .../game-strife/fonts/defsmallfont/00D3.lmp | Bin 170 -> 178 bytes .../game-strife/fonts/defsmallfont/00D4.lmp | Bin 172 -> 180 bytes .../game-strife/fonts/defsmallfont/00D6.lmp | Bin 174 -> 178 bytes .../game-strife/fonts/defsmallfont/00D9.lmp | Bin 157 -> 164 bytes .../game-strife/fonts/defsmallfont/00DA.lmp | Bin 157 -> 164 bytes .../game-strife/fonts/defsmallfont/00DB.lmp | Bin 157 -> 164 bytes .../game-strife/fonts/defsmallfont/00DC.lmp | Bin 158 -> 162 bytes .../game-strife/fonts/defsmallfont/00DD.lmp | Bin 154 -> 174 bytes .../game-strife/fonts/defsmallfont/0150.lmp | Bin 177 -> 184 bytes .../game-strife/fonts/defsmallfont/0170.lmp | Bin 160 -> 170 bytes .../game-strife/fonts/defsmallfont/0178.lmp | Bin 156 -> 160 bytes .../game-strife/fonts/defsmallfont/0401.lmp | Bin 150 -> 154 bytes .../game-strife/fonts/defsmallfont/0419.lmp | Bin 175 -> 196 bytes 27 files changed, 0 insertions(+), 0 deletions(-) diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C0.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C0.lmp index f6a85de06032b0f416f102403ee91817f0f518dc..99b151f12e3b9d4f2c9f61b6c070385bef6a9105 100644 GIT binary patch literal 180 zcmd;L;ACK6U}7*}U|_IkU|{fLU|@)1U|`5*U|^_VU|?urU|^WYz`!t%fq`KaNF}p3 z2(Uq@|4hu@-jBS!LEOjQ-v61{y}ciMdp`!T85q62y}<&HA3uKL?fsvD10??V353J` u8F7JGYp{|5kcZa#$o literal 172 zcmd;L;9y{2U}P|0U|_IkU|{fLU|@)1U|>jRU|=X_U|^_YU|{HCU|^WWz`(Ewq>|Yi z1Xv-|e@13+??>L=Ans#t@BfVK-rkSBy&r?v3>@Ad*5k)dyuJT3us?q6{rCxl&GzI8 mhzAz-_I~mhqy?h)$>Yahy&!YEpFDX2(#pgNve4Vx`#%5*=RA%8 diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C1.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C1.lmp index 4f9cee771a4bc3c14be1ade0712588a0e5beb065..c7dc0efa6697601f057494c3173d406858107886 100644 GIT binary patch literal 180 zcmd;L;ACK6U}7*}U|_IkU|{fLU|@)1U|>jNU|=X>U|^_YU|{HGU|^WZz`(Eyq>|Yi z1lSL=Ans#t@Bd8f-rkSBy&uEbj~_pN;_dyPk=@(d`|%Snn*prmF-YBi t1`d!snC<jNU|=X@U|^_WU|{HAU|^Waz`(Ewq>|Yi z1Xv-|e@13+??>L=Ans#t@BfVK-rkSBy&uEbj~_pN0upEQ_I~^X%wzyDAA?l=XJCK) m_z9Tl{hxv3$rJAUU-rkQPyho27dp~~s`0*2v90y47@e>G#9nA3t nD}zXY*dP<0JbCQ>1f&V1htu2piMRKYCr>~oFtUT}2IKz#`3gl= literal 176 zcmd;L;9y{2U}P|0U|_IkU|{fLU|@)5U|`5#U|=X=U|^_cU|{HGU|^WRz`(E+q>|Yi z1Xv-|e@13+??>L=Ans#t@Ba)O-rkQMdwV~Ia2`E+3<6I;GVG5Zdp~~i7|dn^vAw}+ kz``IVNb{2?kDq`vfYft%dq44h^5h9f10x&AP7wYN0P|%+fdBvi diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C4.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C4.lmp index fc935dac907aa35a80c708f7a3bb70fedf2c6844..e3a5aa1cd61c91d173dfc832bbbad9bd6e4c660b 100644 GIT binary patch literal 179 zcmd;L;ACK6U}7*}U|_IkU|{fLU|@)5U|`5(U|=X?U|?uuU|{HDU|^WTz`(E)q>|Yi z1lSL=Ans#t@BfS(-rnAiy}ciUI1HR1xyO$mKYrrv{hxuu+xv<4<0oJa pBO6#9SQQ6Y6-bx&e~^|Z-cLY!V5WILdGZ9LpP3b8ueZ1Ne*iR+J&*tZ literal 175 zcmd;L;9y{2U}P|0U|_IkU|{fLU|@)5U|`5#U|=X=U|^_cU|{HGU|^WRz`(E+q>|Yi z1Xv-|e@13+??>L=Ans#t@Ba)O-rnAiy}chpIFBBAKYsl9@e_~?`;#Z$kDox;Y+zMj lHS8cYAT1!xPo8)`0cilK2btvkjKU|`5&U|^_WU|{HEU|^UGQpM^G0sooU zyuBYie(de-{hxu++uNIo-P`-|6Q}?uh<*&>gQPj1JbCO5f!_ZaIK91}fO${6z5g?E aczb(4_I?5~^gk0TND5>k6EjG_`#%6g3^XkO literal 148 zcmd;N;9y{2U}Vr?U|=v~U|?`$U|{fLU|@)5U|`5#U|=X^U|?uuU|{G5sbckpfd7na z-rkQMKlb+a{?EYS?d|>e35@gjvG-#T7cBDxBn%ROD0>28KJoVc&&clW{n+~n$guy6 Otllsd3rN7*`#%6ohcbl# diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C9.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C9.lmp index 5b484d57994f25060e780c617c35e9bc8c09ee2f..ba4cbb93a96ab0cb1ea58508f03d49c32169ef74 100644 GIT binary patch literal 155 zcmd;N;ACK6U}Df=U|=v~U|?`$U|{fNU|@)1U|`5#U|=X?U|?urU|^UGQpM^G0sooU zyuBYie(de-{hx{5+xzho2%C|^+uQpwi0keBpMew12JykX$B&jNU|=X_U|?uqU|{G5sbckpfd7na z-rkQMKlb+a{?Ewn?fv)(5*x(x_WsYn;qCqSu{Q{UIFBDc0WqI|Wu83oe(e1OWY&KM PHg9hzlaU!D;{6{0@V+uJ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CA.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CA.lmp index ee4f669e9dd826a881c3d2dc799942747b0ca266..c24063ee307f733756ba4c442373f17f95ed16af 100644 GIT binary patch literal 155 zcmd;N;ACK6U}Df=U|=v~U|?`!U|-ZS0rR}QpLjp^egZP{ SKO>trhzl~1i5Vo~{T~1ctv43{ literal 149 zcmd;N;9y{2U}Vr?U|=v~U|?`$U|{fLU|@)5U|`5#U|=X^U|?usU|{G0sbckpfd7na z-rkQMKlb+a{?EVxVm^U!9)W}(KY0w6dHmQL0zt~2fYdzpegc;9_I?6pdVBw8Wc3CK Jf>_WsYn@#vBF<0mlAlPBJfL0qtmw>OC6{TR#vDf52p{RGSbD|-Sm?mq*Y Rw>L=C+xtHwGf2eyKLFi_G*JKm diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CC.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CC.lmp index 6560c2ba70d714dfe9b7a896b2f633898339bd7e..f7dd1ee49f95de4bb4964efe03de4b51e34504cb 100644 GIT binary patch literal 87 zcmZQ&;ACK6U}BJAU|>*UU|`T^U|_IiU|{fOU|?Wi^!E1t&%p8cu{RX_XW)GDqJ0c4^aj{pDw literal 83 zcmZQ&;9y{2U}TVCU|>*UU|`T=U|_IjU|{fI01110d;e!(fBe`R0{$~_JbCi?(c{M; Xk^c-F-ri5Zz}x#jBO64CxA%Vl2Rj>A diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CD.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CD.lmp index 4bafd8b2ecfecacfa6a74a5628dd32ecc6aee9ef..87403a4f60ecdd3fca0309012d24a00adfb5b06d 100644 GIT binary patch literal 87 zcmZQ&;ACK6U}BJAU|`T-U|=v~U|?`zU|@~ literal 83 zcmZQ&;9y{2U}TVCU|>*ZU|=v|U|?`$U|{eCiL!Y^!G8u0Z|}#C9zTBk*xUO*1IOdX TPrv}gVSn-ju8Psy+xtHN5X2j8 diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CE.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CE.lmp index ff19a7c40dc354e683c5b5c5471b501a45e01097..2dcedf4fd3c6bace1516c49410ce287eb099a9d0 100644 GIT binary patch literal 122 zcmd;J;ACK6U}DfU|`T=U|=v~U|?`!U|{fPU|@)0U|`5#U|=W!sbKW>_WsYn?Ct#s wM6*A7^w=8={xfhqe(e3|@#DvjK@uR&6A%D#*q=Ost77){e&X%@pAl>h0Cor`X#fBK diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CF.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CF.lmp index e2534ddfa29ffcd27981994d784d99050a5010ba..99264f4294942e26af1a9de8185d6ad925269d1e 100644 GIT binary patch literal 120 zcmd;J;ACK6U}DfU|?Wm^!E1t&%o^M t{Rl*JczZwbhJgQ!9NymEj~+jM{Mg$Y!g&G$P-TxGsvvrwfK-4@0s!ldBTN7Q literal 116 zcmd;J;9y{2U}Vr>U|`T=U|=v~U|?`!U|{fLU|@)1U|>jNU|`4tsbKW>_WsYn?Ct#s qM6-K)Kk){G|BUS3-j5zXe*DsRbGP7-SHmx3@PFySF#UV35fmHpEo#{{VYBMn(Vt literal 178 zcmd;L;ACK6U}P|0U|_IiU|{fKU|@(~U|>jNU|=X>U|^_cU|{HBU|^WZz`(E!q>{rM z4*oN8czZv33+_@rLmJGjKe4;tewGF;vDIWEjXaMs|onAT0n|XG0YL diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D2.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D2.lmp index 80788d6f9fe07ba6056709783a810074ab461f72..ce2887a7bce48b4ad6d3d571d2736a3dde347587 100644 GIT binary patch literal 178 zcmd;L;ACK6U}7*}U|_IhU|?`zU|jQU|=X=U|?uvU|^WUz`!t%fq`Kq0|Nsy zi#HhjXJYgA_I~u(+uQp;1EaUMHxs+J_oF9IAOf6^AA5U0_VxyG|1+?Hgdcl*voV7O o|1+?9dp`k5!vq*PyumV$pLl!!2O0F_F^K66vE<1UkR@=70U2jH)c^nh literal 170 zcmd;L;9y{2U}P|0U|_IhU|?`zU|OCQpMmAclgE#}y;+&PL1OjOU|=X>U|?uwU|^WYz`!t{fq`K)0|Nsy zi#HhjXJiM_j~;t_d;e$P^!9$_{piUPDDTmu$KH>y5JbwHHWHQ8-Ctx<*Y5=KbKZpPT literal 172 zcmd;L;9y{2U}P|0U|_IhU|?`zU|2J!wgusnY3{n*=^mDw9aVe&bi YJOL?w`~+$Yi2DR&CfN8VU?$v30QX%y{r~^~ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D6.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D6.lmp index 8af056f02c0b3ebef078d3b3cdb4f50d66f74bfe..a339479da559dddb95d5ec923c4175f555e74cd6 100644 GIT binary patch literal 178 zcmd;L;ACK6U}7*}U|_IhU|?`%U|jOU|=X@U|?uuU|{HHU|^Wbz`(GQfq{XU z#TyL%GqQu|M~}U|z5g?CdV4?ee)QxCocF~0v9~vf`=1e{;jyjLU|=X_U|?uqU|{HBU|^U5QpM&C1^*cs zy}iAe*uA|UJ%0Sy+uQp;11E@n^5n^r$6y|q_V)G$^O(K8pLlz-F+;eF98gn0axgPs MY?uikaj3HY0M3;+m;e9( literal 157 zcmd;N;9y{2U}Vr?U|=w3U|?`zU|jKU|`5+U|^_aU|{HGU|^U5QpM&C1^*d2 zyuH02J%0Sy+uQp;1E;t5Bkw0qo;-OB<~@1@68826^O(VE*qEVQPOu_x7|+}L3D_8r RQm~mYQ<&JHR(X5>2LOroI(7g6 literal 157 zcmd;N;9y{2U}Vr?U|=w3U|?`&U|n26LD|Dp;AlAv_MS5*WwZ`w7SdkUEfQ KFatnrm@NP_aX3K$ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DC.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DC.lmp index da7971a2f56ef8a697f9889fc8c4ca463293d96e..78e2ad274063d15f7637d779f15dbe3455a3050e 100644 GIT binary patch literal 162 zcmd;N;ACK6U}Df=U|=w3U|?`zU|jKU|`5)U|^_bU|{HEU|^UAQpM&C1^*d2 zyuH02J%0Sy+uQp;1E;t5Bkw0qo;-OB|Yi z1pYIzczZwc_V)hI#Om$+jLU|=X@U|^_YU|{HEU|^U8QpxNM z0{?ETo=8^rz3!20;{6A+J$86@oepMmws n6EF)d08{_?iMRKE22POrCm;gE;{Yl41{41o7`?r{;no8HMt(pS literal 177 zcmd;L;9y{2U}P|0U|_IhU|?`zU|jKU|`5+U|^_aU|{HGU|^UDQpM&C1^*d2 zyuH02J%0Sy+uQp;1E;t5WA7(Vo;-OB<~@G=1gs9sV}1hSurY&_z?6by!IGRHr66M< UJdjejF^t~c-c0NurC|IY0Q4+8+5i9m literal 160 zcmd;N;9y{2U}Vr?U|=w3U|?`&U|nImfQ*31 PJbB`cFao3og8u^m;N3c2 diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0178.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0178.lmp index 99a9692b813b1078117151d6cb15c4929fb6ecef..1dcf6883ca72a4395cfc4044a11846f8c67ef8a4 100644 GIT binary patch literal 160 zcmd;L;ACK6U}7*}U|=w3U|?`yU|{fOU|@)3U|`5#U|=X`U|?uvU|^WQz`!sQq>{h1mbF-VdT&VBL(s`in$ Y_v0sE(?Eti@qPr702>TqFhMK=0HFLZ=>Px# literal 156 zcmd;L;9y{2U}P|0U|=w3U|?`yU|{fKU|jNU|=X^U|?usU|{HBU|^UEQpx1) z?d|=afyLX~`w@u2`sk7OlgA(y$CD@CU?zye=i diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0401.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0401.lmp index 98f428501b1490fff0bde868dd7a46ab82c576b6..624aa66b791b975e9c7af4b660716c5737fd724f 100644 GIT binary patch literal 154 zcmd;N;ACK6U}Df=U|=v~U|?`!U|_WsYn@#vBF<0mlAlPBJfL0qtmw>OC6{TR#vDf52p{RGSbD|-Sm?mq*Y Rw>L=C+xtHwGf2eyKLFi_G*JKm diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0419.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0419.lmp index 5ddbda41d64c35eab82c23f48faf22af86be63d5..3c5bf84fe3068b135d40444d60f3d9dba6e8080b 100644 GIT binary patch literal 196 zcmd;L;9_84U}7*}U|_IeU|{fNU|@)5U|`5(U|^_XU|?uxU|^WWz`(GSfq`K=NF}>B z4E$$c^!D~S-wa?IY|kG;KFSiQYL yeDD7Z9AE(`hwJg5`tR90XF&xNajBi2S^jOU|`5&U|^_XU|{HAU|^Waz`(Ewq>|km z2L3a$dwV~6{P^)>Z*MUB$&)8wHUkGl$>S&9-v2?I$KKu`w)cMqc5m+|FgB;Rw>L;V ZNb!G04iE=s7>Bp_6EFao3^fg`3;<>+J>>uZ From 5c86a1e6b5be9c1106756056ad0870c4bcc17d2e Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 4 Apr 2019 13:23:08 +0300 Subject: [PATCH 03/10] - fixed crash with push/insert to null dynarray when JIT is on https://forum.zdoom.org/viewtopic.php?t=64148 --- src/scripting/backend/dynarrays.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scripting/backend/dynarrays.cpp b/src/scripting/backend/dynarrays.cpp index b95e02f4d..d01a4557b 100644 --- a/src/scripting/backend/dynarrays.cpp +++ b/src/scripting/backend/dynarrays.cpp @@ -783,6 +783,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Find, ArrayFindPush(obj); } @@ -811,6 +812,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Delete, ArrayDelete) void ObjArrayInsert(FDynArray_Obj *self,int index, DObject *obj) { + if (self == nullptr) NullParam("\"self\""); GC::WriteBarrier(obj); self->Insert(index, obj); } From a3541f853c2f59901be1b5c7c7a0341521b9684e Mon Sep 17 00:00:00 2001 From: pkubaj Date: Thu, 4 Apr 2019 08:05:31 +0200 Subject: [PATCH 04/10] Fix build on big-endian platforms GCC 8 complains that it can't find relevant functions: /wrkdirs/usr/ports/games/gzdoom/work/gzdoom-g3.7.2/src/m_png.cpp:669:42: error: call of overloaded 'BigLong(uint32_t)' is ambiguous chunklen = BigLong((unsigned int)x[1]); ^ In file included from /wrkdirs/usr/ports/games/gzdoom/work/gzdoom-g3.7.2/src/m_png.cpp:44: /wrkdirs/usr/ports/games/gzdoom/work/gzdoom-g3.7.2/src/m_swap.h:212:15: note: candidate: 'long unsigned int BigLong(long unsigned int)' unsigned long BigLong(unsigned long) = delete; ^~~~~~~ /wrkdirs/usr/ports/games/gzdoom/work/gzdoom-g3.7.2/src/m_swap.h:213:6: note: candidate: 'long int BigLong(long int)' long BigLong(long) = delete; This is on FreeBSD/powerpc64. --- src/utility/m_swap.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/utility/m_swap.h b/src/utility/m_swap.h index a3e03bea2..f5b90770f 100644 --- a/src/utility/m_swap.h +++ b/src/utility/m_swap.h @@ -129,6 +129,16 @@ inline int BigLong(int &x) return x; } +inline unsigned int BigLong(unsigned int x) +{ + return x; +} + +inline int BigLong(int x) +{ + return x; +} + #else inline short LittleShort(short x) From 2886f22b8fd43e0b6da3b6c72537b7a390575cef Mon Sep 17 00:00:00 2001 From: pkubaj Date: Thu, 4 Apr 2019 13:20:24 +0200 Subject: [PATCH 05/10] Remove bad BigLong variants --- src/utility/m_swap.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/utility/m_swap.h b/src/utility/m_swap.h index f5b90770f..de9b7780a 100644 --- a/src/utility/m_swap.h +++ b/src/utility/m_swap.h @@ -119,16 +119,6 @@ inline unsigned short BigShort(unsigned short x) return x; } -inline unsigned int BigLong(unsigned int &x) -{ - return x; -} - -inline int BigLong(int &x) -{ - return x; -} - inline unsigned int BigLong(unsigned int x) { return x; From 025e50219f9aabf3e2c9be11960f7d9bb95f86f2 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 4 Apr 2019 16:37:51 +0300 Subject: [PATCH 06/10] - fixed missing command line in crash reports https://forum.zdoom.org/viewtopic.php?t=64149 --- src/win32/i_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index ee43eab0c..9af8bc4cf 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -1111,7 +1111,7 @@ void DoomSpecificInfo (char *buffer, size_t bufflen) int i; buffer += mysnprintf (buffer, buffend - buffer, GAMENAME " version %s (%s)", GetVersionString(), GetGitHash()); - buffer += mysnprintf (buffer, buffend - buffer, "\r\nCommand line: %s\r\n", GetCommandLine()); + buffer += mysnprintf (buffer, buffend - buffer, "\r\nCommand line: %s\r\n", GetCommandLineA()); for (i = 0; (arg = Wads.GetWadName (i)) != NULL; ++i) { From 0153c2aefae2ced57295db7640c459457dd64855 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 4 Apr 2019 17:49:53 +0200 Subject: [PATCH 07/10] - use the Unicode version of GetCommandLine for the crash log. --- src/win32/i_main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index 9af8bc4cf..4f42f7593 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -1111,7 +1111,8 @@ void DoomSpecificInfo (char *buffer, size_t bufflen) int i; buffer += mysnprintf (buffer, buffend - buffer, GAMENAME " version %s (%s)", GetVersionString(), GetGitHash()); - buffer += mysnprintf (buffer, buffend - buffer, "\r\nCommand line: %s\r\n", GetCommandLineA()); + FString cmdline(GetCommandLineW()); + buffer += mysnprintf (buffer, buffend - buffer, "\r\nCommand line: %s\r\n", cmdline.GetChars() ); for (i = 0; (arg = Wads.GetWadName (i)) != NULL; ++i) { From aed9c458db5be1676bd5b0fbe7caf545bebd0f79 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 5 Apr 2019 12:25:16 +0200 Subject: [PATCH 08/10] Revert "- initial layout for new player setup menu." This reverts commit 1567bc5911f59502f0af0de3be86a367364bb948. --- wadsrc/static/menudef.txt | 45 +------- wadsrc/static/zscript/ui/menu/optionmenu.zs | 9 +- wadsrc/static/zscript/ui/menu/playermenu.zs | 108 -------------------- 3 files changed, 3 insertions(+), 159 deletions(-) diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 40c3b130c..a8270496f 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -369,7 +369,7 @@ OptionMenu "OptionsMenu" protected Submenu "$OPTMNU_MOUSE", "MouseOptions" Submenu "$OPTMNU_JOYSTICK", "JoystickOptions" StaticText " " - Submenu "$OPTMNU_PLAYER", "NewPlayerMenu" + Submenu "$OPTMNU_PLAYER", "PlayerMenu" Submenu "$OPTMNU_GAMEPLAY", "GameplayOptions" Submenu "$OPTMNU_COMPATIBILITY", "CompatibilityOptions" Submenu "$OPTMNU_AUTOMAP", "AutomapOptions" @@ -401,49 +401,6 @@ OptionValue "Gender" 3, "$OPTVAL_OTHER" } -OptionValue "PlayerColor" -{} - -OptionValue "PlayerClass" -{} - -OptionValue "PlayerTeam" -{} - -OptionValue "PlayerSkin" -{} - -/* - IfGame(Doom, Heretic, Strife, Chex) - { - MouseWindow 0, 220 - PlayerDisplay 220, 48, "20 00 00", "80 00 40", 1, "PlayerDisplay" - } - IfGame(Hexen) - { - MouseWindow 0, 220 - PlayerDisplay 220, 48, "00 07 00", "40 53 40", 1, "PlayerDisplay" - } -*/ - -OptionMenu "NewPlayerMenu" -{ - Title "$MNU_PLAYERSETUP" - TextField "$PLYRMNU_NAME", menu_playername - Option "$PLYRMNU_TEAM", menu_playerteam, "PlayerTeam" - Option "$PLYRMNU_PLAYERCOLOR", menu_playercolorset, "PlayerColor" - Slider "$PLYRMNU_RED", menu_playercolor_red, 0, 255, 16 - Slider "$PLYRMNU_GREEN", menu_playercolor_green, 0, 255, 16 - Slider "$PLYRMNU_BLUE", menu_playercolor_blue, 0, 255, 16 - Option "$PLYRMNU_PLAYERCLASS", menu_playerclass, "PlayerClass" - Option "$PLYRMNU_PLAYERSKIN", menu_playerskin, "PlayerSkin" - Option "$PLYRMNU_PLAYERGENDER", menu_playergender, "Gender" - Slider "$PLYRMNU_AUTOAIM", menu_playerautoaim, 0, 35, 1 - Option "$PLYRMNU_SWITCHONPICKUP", menu_playerswitch, "OffOn" - Option "$PLYRMNU_ALWAYSRUN", cl_run, "OnOff" - Class "NewPlayerMenu" -} - ListMenu "PlayerMenu" { StaticTextCentered 160, 6, "$MNU_PLAYERSETUP" diff --git a/wadsrc/static/zscript/ui/menu/optionmenu.zs b/wadsrc/static/zscript/ui/menu/optionmenu.zs index a6d8216c2..ea4a7f07a 100644 --- a/wadsrc/static/zscript/ui/menu/optionmenu.zs +++ b/wadsrc/static/zscript/ui/menu/optionmenu.zs @@ -410,12 +410,6 @@ class OptionMenu : Menu // //============================================================================= - virtual int GetIndent() - { - int indent = max(0, (mDesc.mIndent + 40) - CleanWidth_1 / 2); - return screen.GetWidth() / 2 + indent * CleanXfac_1; - } - override void Drawer () { int y = mDesc.mPosition; @@ -439,7 +433,8 @@ class OptionMenu : Menu int fontheight = OptionMenuSettings.mLinespacing * CleanYfac_1; y *= CleanYfac_1; - int indent = GetIndent(); + int indent = max(0, (mDesc.mIndent + 40) - CleanWidth_1 / 2); + indent = screen.GetWidth() / 2 + indent * CleanXfac_1; int ytop = y + mDesc.mScrollTop * 8 * CleanYfac_1; int lastrow = screen.GetHeight() - OptionHeight() * CleanYfac_1; diff --git a/wadsrc/static/zscript/ui/menu/playermenu.zs b/wadsrc/static/zscript/ui/menu/playermenu.zs index 68d287c33..1aefb0ba0 100644 --- a/wadsrc/static/zscript/ui/menu/playermenu.zs +++ b/wadsrc/static/zscript/ui/menu/playermenu.zs @@ -593,111 +593,3 @@ class PlayerMenu : ListMenu } } - - -class NewPlayerMenu : OptionMenu -{ - TextureID mBackdrop; - PlayerClass mPlayerClass; - State mPlayerState; - int mPlayerTics; - bool mNoportrait; - int8 mRotation; - int8 mMode; // 0: automatic (used by class selection), 1: manual (used by player setup) - int8 mTranslate; - int mSkin; - int mClassNum; - Color mBaseColor; - Color mAddColor; - - const PLAYERDISPLAY_X = 220; - const PLAYERDISPLAY_Y = 60; - const PLAYERDISPLAY_W = 144; - const PLAYERDISPLAY_H = 160; - const PLAYERDISPLAY_SPACE = 180; - - override void Init(Menu parent, OptionMenuDescriptor desc) - { - Super.Init(parent, desc); - mBackdrop = TexMan.CheckForTexture("B@CKDROP", TexMan.Type_MiscPatch); // The weird name is to avoid clashes with mods. - mBaseColor = gameinfo.gametype == GAME_Hexen? 0x200000 : 0x000700; - mAddColor = gameinfo.gametype == GAME_Hexen? 0x800040 : 0x405340; - } - - override int GetIndent() - { - return Super.GetIndent() - 45*CleanXfac_1; - } - - override void Drawer() - { - Super.Drawer(); - DrawPlayerDisplay(); - - int x = screen.GetWidth()/(CleanXfac_1*2) + PLAYERDISPLAY_X + PLAYERDISPLAY_W/2; - int y = PLAYERDISPLAY_Y + PLAYERDISPLAY_H + 5; - String str = Stringtable.Localize("$PLYRMNU_PRESSSPACE"); - screen.DrawText (NewSmallFont, Font.CR_GOLD, x - NewSmallFont.StringWidth(str)/2, y, str, DTA_VirtualWidth, CleanWidth_1, DTA_VirtualHeight, CleanHeight_1, DTA_KeepRatio, true); - str = Stringtable.Localize(mRotation ? "$PLYRMNU_SEEFRONT" : "$PLYRMNU_SEEBACK"); - y += NewSmallFont.GetHeight(); - screen.DrawText (NewSmallFont, Font.CR_GOLD,x - NewSmallFont.StringWidth(str)/2, y, str, DTA_VirtualWidth, CleanWidth_1, DTA_VirtualHeight, CleanHeight_1, DTA_KeepRatio, true); - - } - - //============================================================================= - // - // - // - //============================================================================= - - void DrawPlayerDisplay() - { - - int x = screen.GetWidth()/2 + PLAYERDISPLAY_X * CleanXfac_1; - int y = PLAYERDISPLAY_Y * CleanYfac_1; - - int r = mBaseColor.r + mAddColor.r; - int g = mBaseColor.g + mAddColor.g; - int b = mBaseColor.b + mAddColor.b; - int m = max(r, g, b); - r = r * 255 / m; - g = g * 255 / m; - b = b * 255 / m; - Color c = Color(255, r, g, b); - - screen.DrawTexture(mBackdrop, false, x, y - 1, - DTA_DestWidth, PLAYERDISPLAY_W * CleanXfac_1, - DTA_DestHeight, PLAYERDISPLAY_H * CleanYfac_1, - DTA_Color, c, - DTA_KeepRatio, mNoPortrait, - DTA_Masked, true); - - Screen.DrawFrame (x, y, PLAYERDISPLAY_W*CleanXfac_1, PLAYERDISPLAY_H*CleanYfac_1-1); - - if (mPlayerState != NULL && mPlayerState != NULL) - { - Vector2 Scale; - TextureID sprite; - bool flip; - - let playdef = GetDefaultByType((class)(mPlayerClass.Type)); - [sprite, flip, Scale] = mPlayerState.GetSpriteTexture(mRotation, mSkin, playdef.Scale); - - if (sprite.IsValid()) - { - int trans = mTranslate? Translation.MakeID(TRANSLATION_Players, MAXPLAYERS) : 0; - let tscale = TexMan.GetScaledSize(sprite); - Scale.X *= CleanXfac_1 * tscale.X; - Scale.Y *= CleanYfac_1 * tscale.Y; - - screen.DrawTexture (sprite, false, - x + (PLAYERDISPLAY_X/2) * CleanXfac_1, y + (PLAYERDISPLAY_H-8) * CleanYfac_1, - DTA_DestWidthF, Scale.X, DTA_DestHeightF, Scale.Y, - DTA_TranslationIndex, trans, - DTA_KeepRatio, mNoPortrait, - DTA_FlipX, flip); - } - } - } - -} From 0ed847b51bb078b9ab24eb733cc4a11d839d70c0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 5 Apr 2019 00:59:32 +0200 Subject: [PATCH 09/10] - the resuming of the conversation interrupted by a slideshow must be performed by the game action handler If this is done within the intermission code, both intermission and menu will write to the same global variables and destroy their data, this became very apparent when it altered the screen scale for the conversation. --- src/d_event.h | 1 + src/g_game.cpp | 5 +++++ src/intermission/intermission.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/d_event.h b/src/d_event.h index 4aeb4979c..ef54c3a0f 100644 --- a/src/d_event.h +++ b/src/d_event.h @@ -76,6 +76,7 @@ enum gameaction_t : int ga_screenshot, ga_togglemap, ga_fullconsole, + ga_resumeconversation, }; diff --git a/src/g_game.cpp b/src/g_game.cpp index 0f783ad07..6bfe200e0 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -74,6 +74,7 @@ #include "gi.h" #include "a_dynlight.h" #include "i_system.h" +#include "p_conversation.h" #include "g_hub.h" #include "g_levellocals.h" @@ -1095,6 +1096,10 @@ void G_Ticker () AM_ToggleMap (); gameaction = ga_nothing; break; + case ga_resumeconversation: + P_ResumeConversation (); + gameaction = ga_nothing; + break; default: case ga_nothing: break; diff --git a/src/intermission/intermission.cpp b/src/intermission/intermission.cpp index cc2482220..3e03035c1 100644 --- a/src/intermission/intermission.cpp +++ b/src/intermission/intermission.cpp @@ -804,7 +804,7 @@ void DIntermissionController::Ticker () primaryLevel->SetMusic(); gamestate = GS_LEVEL; wipegamestate = GS_LEVEL; - P_ResumeConversation (); + gameaction = ga_resumeconversation; viewactive = true; Destroy(); break; From 1ef4c2d0f6ed3419373cf7ce4ddb69c861915c4e Mon Sep 17 00:00:00 2001 From: drfrag Date: Fri, 5 Apr 2019 20:52:43 +0200 Subject: [PATCH 10/10] - Hopefully fixed MinGW compilation for real. --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f0e91d8ee..5f028b527 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -384,8 +384,11 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) # Remove extra warnings when using the official DirectX headers. # Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid, # which is a royal pain. The previous version I had been using was fine with them. + # MinGW: switch to the Windows Unicode API. if( WIN32 ) set( CMAKE_CXX_FLAGS "-Wno-unknown-pragmas -Wno-comment -Wno-format ${CMAKE_CXX_FLAGS}" ) + set( CMAKE_CXX_FLAGS "-D_UNICODE -DUNICODE ${CMAKE_CXX_FLAGS}" ) + set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -municode" ) endif() # Detect FreeBSD and add flags