From 72cb6a15888c6178f6a169d5cf7916b29adacfb2 Mon Sep 17 00:00:00 2001 From: Miepee <38186597+Miepee@users.noreply.github.com> Date: Fri, 22 Dec 2023 23:42:45 +0100 Subject: [PATCH] Made GUI clearer on no launcher (#128) --- CHANGELOG.md | 1 + YAMS-LIB/Program.cs | 82 +++++++++++++++++- YAMS-LIB/sprites/Attribution.md | 3 +- .../sprites/misc/hud/sGUIMissileNormal.png | Bin 0 -> 252 bytes .../misc/hud/sGUIMissileNormalGreen.png | Bin 0 -> 287 bytes .../sGUIMissileSelected.png} | Bin YAMS-LIB/sprites/misc/hud/sGUIPBombNormal.png | Bin 0 -> 233 bytes .../sprites/misc/hud/sGUIPBombNormalGreen.png | Bin 0 -> 266 bytes .../sGUIPBombSelected.png} | Bin .../sprites/misc/hud/sGUISMissileNormal.png | Bin 0 -> 248 bytes .../misc/hud/sGUISMissileNormalGreen.png | Bin 0 -> 287 bytes .../sGUISMissileSelected.png} | Bin 12 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 YAMS-LIB/sprites/misc/hud/sGUIMissileNormal.png create mode 100644 YAMS-LIB/sprites/misc/hud/sGUIMissileNormalGreen.png rename YAMS-LIB/sprites/misc/{sGUIMissile.png => hud/sGUIMissileSelected.png} (100%) create mode 100644 YAMS-LIB/sprites/misc/hud/sGUIPBombNormal.png create mode 100644 YAMS-LIB/sprites/misc/hud/sGUIPBombNormalGreen.png rename YAMS-LIB/sprites/misc/{sGUIPBomb.png => hud/sGUIPBombSelected.png} (100%) create mode 100644 YAMS-LIB/sprites/misc/hud/sGUISMissileNormal.png create mode 100644 YAMS-LIB/sprites/misc/hud/sGUISMissileNormalGreen.png rename YAMS-LIB/sprites/misc/{sGUISMissile.png => hud/sGUISMissileSelected.png} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 002c150..09b3dec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added - An item collection screen will now be shown, when the user starts with random items. - When softlock prevention is active, then the first two crumble blocks in Super Missile Chamber will be shoot blocks instead. +- Clearer GUI symbols, when expansions have been collected, but not their corresponding launcher. ### Changed - When softlock prevention is active, then in the EMP Escape route room, instead of the bottom row of speedbooster blocks being gone, now every pillar but the leftmost one is gone. diff --git a/YAMS-LIB/Program.cs b/YAMS-LIB/Program.cs index 32d13ec..489906c 100644 --- a/YAMS-LIB/Program.cs +++ b/YAMS-LIB/Program.cs @@ -186,9 +186,15 @@ void AddAllSpritesFromDir(string dirPath) { Name = gmData.Strings.MakeString("tlWarpWaterfall"), Texture = gmData.TexturePageItems[nameToPageItemDict["tlWarpWaterfall"]] }); - gmData.Sprites.ByName("sGUIMissile").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUIMissile"]] }); - gmData.Sprites.ByName("sGUISMissile").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUISMissile"]] }); - gmData.Sprites.ByName("sGUIPBomb").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUIPBomb"]] }); + gmData.Sprites.ByName("sGUIMissile").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUIMissileSelected"]] }); + gmData.Sprites.ByName("sGUISMissile").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUISMissileSelected"]] }); + gmData.Sprites.ByName("sGUIPBomb").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUIPBombSelected"]] }); + gmData.Sprites.ByName("sGUIMissile").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUIMissileNormal"]] }); + gmData.Sprites.ByName("sGUISMissile").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUISMissileNormal"]] }); + gmData.Sprites.ByName("sGUIPBomb").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUIPBombNormal"]] }); + gmData.Sprites.ByName("sGUIMissile").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUIMissileNormalGreen"]] }); + gmData.Sprites.ByName("sGUISMissile").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUISMissileNormalGreen"]] }); + gmData.Sprites.ByName("sGUIPBomb").Textures.Add(new UndertaleSprite.TextureEntry { Texture = gmData.TexturePageItems[nameToPageItemDict["sGUIPBombNormalGreen"]] }); // Replace existing door sprites gmData.Sprites.ByName("sDoorA5Locks").Textures[0].Texture = gmData.TexturePageItems[nameToPageItemDict["sDoorBlue"]]; @@ -1317,8 +1323,29 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te UndertaleCode? chStepFireCode = gmData.Code.ByName("gml_Script_chStepFire"); chStepFireCode.ReplaceGMLInCode("&& global.pbombs > 0", "&& global.pbombs > 0 && global.PBombLauncher"); - // Change GUI For toggle, use a red item sprite instead of green, for hold use a red instead of yellow + // Change GUI For toggle, use a red item sprite instead of green, for hold use a red instead of yellow. For not selected, use a crossed out one. // Replace Missile GUI + drawGuiCode.ReplaceGMLInCode( + """ + if (global.currentweapon != 1 || oCharacter.state == 23 || oCharacter.state == 24 || oCharacter.state == 27 || oCharacter.state == 54 || oCharacter.state == 55 || oCharacter.sjball) + draw_sprite(sGUIMissile, 0, ((0 + xoff) + 1), 4) + """, + """ + if (((global.currentweapon != 1 || oCharacter.state == 23 || oCharacter.state == 24 || oCharacter.state == 27 || oCharacter.state == 54 || oCharacter.state == 55 || oCharacter.sjball) && (!global.missileLauncher))) + draw_sprite(sGUIMissile, 4, ((0 + xoff) + 1), 4) + else if (((global.currentweapon != 1 || oCharacter.state == 23 || oCharacter.state == 24 || oCharacter.state == 27 || oCharacter.state == 54 || oCharacter.state == 55 || oCharacter.sjball) && (global.missileLauncher))) + draw_sprite(sGUIMissile, 0, ((0 + xoff) + 1), 4) + + """); + drawGuiCode.ReplaceGMLInCode(""" + if (oCharacter.armmsl == 0) + draw_sprite(sGUIMissile, 1, ((0 + xoff) + 1), 4) + """, """ + if (oCharacter.armmsl == 0 && global.missileLauncher) + draw_sprite(sGUIMissile, 1, ((0 + xoff) + 1), 4) + else if (oCharacter.armmsl == 0 && !global.missileLauncher) + draw_sprite(sGUIMissile, 5, ((0 + xoff) + 1), 4) + """); drawGuiCode.ReplaceGMLInCode(""" if (oCharacter.armmsl == 1) draw_sprite(sGUIMissile, 2, ((0 + xoff) + 1), 4) @@ -1336,9 +1363,32 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te draw_sprite(sGUIMissile, 1, ((0 + xoff) + 1), 4) else if (global.currentweapon == 1 && !global.missileLauncher) draw_sprite(sGUIMissile, 3, ((0 + xoff) + 1), 4) + else if (global.currentweapon != 1 && !global.missileLauncher) + draw_sprite(sGUIMissile, 4, ((0 + xoff) + 1), 4) """); // Replace Super GUI + drawGuiCode.ReplaceGMLInCode( + """ + if (global.currentweapon != 2 || oCharacter.state == 23 || oCharacter.state == 24 || oCharacter.state == 27 || oCharacter.state == 54 || oCharacter.state == 55 || oCharacter.sjball) + draw_sprite(sGUISMissile, 0, (xoff + 1), 4) + """, + """ + if ((global.currentweapon != 2 || oCharacter.state == 23 || oCharacter.state == 24 || oCharacter.state == 27 || oCharacter.state == 54 || oCharacter.state == 55 || oCharacter.sjball) && !global.SMissileLauncher) + draw_sprite(sGUISMissile, 4, (xoff + 1), 4) + else if ((global.currentweapon != 2 || oCharacter.state == 23 || oCharacter.state == 24 || oCharacter.state == 27 || oCharacter.state == 54 || oCharacter.state == 55 || oCharacter.sjball) && global.SMissileLauncher) + draw_sprite(sGUISMissile, 0, (xoff + 1), 4) + + """); + drawGuiCode.ReplaceGMLInCode(""" + if (oCharacter.armmsl == 0) + draw_sprite(sGUISMissile, 1, (xoff + 1), 4) + """, """ + if (oCharacter.armmsl == 0 && global.SMissileLauncher) + draw_sprite(sGUISMissile, 1, (xoff + 1), 4) + else if (oCharacter.armmsl == 0 && !global.SMissileLauncher) + draw_sprite(sGUISMissile, 5, (xoff + 1), 4) + """); drawGuiCode.ReplaceGMLInCode(""" if (oCharacter.armmsl == 1) draw_sprite(sGUISMissile, 2, (xoff + 1), 4) @@ -1356,9 +1406,31 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te draw_sprite(sGUISMissile, 1, (xoff + 1), 4) else if (global.currentweapon == 2 && !global.SMissileLauncher) draw_sprite(sGUISMissile, 3, (xoff + 1), 4) + else if (global.currentweapon != 2 && !global.SMissileLauncher) + draw_sprite(sGUISMissile, 4, (xoff + 1), 4) """); // Replace PB GUI + drawGuiCode.ReplaceGMLInCode( + """ + if (oCharacter.state != 23 && oCharacter.state != 24 && oCharacter.state != 27 && oCharacter.state != 54 && oCharacter.state != 55 && oCharacter.sjball == 0) + draw_sprite(sGUIPBomb, 0, (xoff + 1), 4) + """, + """ + if ((global.PBombLauncher) && oCharacter.state != 23 && oCharacter.state != 24 && oCharacter.state != 27 && oCharacter.state != 54 && oCharacter.state != 55 && oCharacter.sjball == 0) + draw_sprite(sGUIPBomb, 0, (xoff + 1), 4) + else if ((!global.PBombLauncher) && oCharacter.state != 23 && oCharacter.state != 24 && oCharacter.state != 27 && oCharacter.state != 54 && oCharacter.state != 55 && oCharacter.sjball == 0) + draw_sprite(sGUIPBomb, 4, (xoff + 1), 4) + """); + drawGuiCode.ReplaceGMLInCode(""" + if (oCharacter.armmsl == 0) + draw_sprite(sGUIPBomb, 1, (xoff + 1), 4) + """, """ + if (oCharacter.armmsl == 0 && global.PBombLauncher) + draw_sprite(sGUIPBomb, 1, (xoff + 1), 4) + else if (oCharacter.armmsl == 0 && !global.PBombLauncher) + draw_sprite(sGUIPBomb, 5, (xoff + 1), 4) + """); drawGuiCode.ReplaceGMLInCode(""" if (oCharacter.armmsl == 1) draw_sprite(sGUIPBomb, 2, (xoff + 1), 4) @@ -1376,6 +1448,8 @@ void RotateTextureAndSaveToTexturePage(int rotation, UndertaleTexturePageItem te draw_sprite(sGUIPBomb, 1, (xoff + 1), 4) else if (global.currentweapon == 3 && !global.PBombLauncher) draw_sprite(sGUIPBomb, 3, (xoff + 1), 4) + else if (global.currentweapon != 3 && !global.PBombLauncher) + draw_sprite(sGUIPBomb, 4, (xoff + 1), 4) """); // Fix weapon selection with toggle diff --git a/YAMS-LIB/sprites/Attribution.md b/YAMS-LIB/sprites/Attribution.md index e3e32a0..bc1e8c7 100644 --- a/YAMS-LIB/sprites/Attribution.md +++ b/YAMS-LIB/sprites/Attribution.md @@ -5,7 +5,8 @@ the `LICENSE-GRAPHICS` file for the full license details. Authors are as follows: - Everything in the `doors` folder was made by [AbyssalCreature](https://github.com/AbyssalCreature) -- Everything in the `misc` folder was made by [AbyssalCreature](https://github.com/AbyssalCreature) +- Everything in the `misc` folder, with the exception of the `hud` subfolder, was made by [AbyssalCreature](https://github.com/AbyssalCreature) + - The `hud` subfolder in the `misc` folder was made by [Miepee](https://github.com/Miepee). - The DNA, Nothing, Power Bomb Launcher, Shiny Screw Attack, Shiny Hi-Jump, Shiny Ice beam, Shiny Missile, Super Missile Launcher and Unknown sprites (`items/dna`, `items/nothing`, `items/pbLauncher`, `items/screwAttackShiny`, `items/shinyHijump`, `items/shinyIcebeam`, `items/shinyMissile`, `items/superMissileLauncher` diff --git a/YAMS-LIB/sprites/misc/hud/sGUIMissileNormal.png b/YAMS-LIB/sprites/misc/hud/sGUIMissileNormal.png new file mode 100644 index 0000000000000000000000000000000000000000..e48e75b6dc28c7391cb356b0d10e66b85f0fa404 GIT binary patch literal 252 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3HF=pW8M9Db50q$YKTtz9S&aI8~cZ8YsBV z)5S4F<9u>TLc)*p4vYy&3j{VCkg&D2O}Mo^MQKJ@dPUEo4{FUiVTEop#P98`W*4i_ zUBW-TMYAn4??KhE4S#OOzhOHN)9{8Xh2c`pohzJa)2B>XaH5gt2Y(487uzka;}c`f z{7+6!epsYn<|EH6#LTKJ&2Z>M(Frz#q;9tqd-IyfP2Jm%ST(#n+AW@3#h9XHAQLdB w_pIp)Jy%b5as9X>Qny|NwwsEv>8LU>a5>Z#?UZ*|4smdKI;Vst07nE^4*&oF literal 0 HcmV?d00001 diff --git a/YAMS-LIB/sprites/misc/hud/sGUIMissileNormalGreen.png b/YAMS-LIB/sprites/misc/hud/sGUIMissileNormalGreen.png new file mode 100644 index 0000000000000000000000000000000000000000..0df9f4494acd299409d393603872fed0dc86f3a4 GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3HF=pW8M9Db50q$YKTtz9S&aI8~cZ8YpYyQq!NbGFm=`!Q*o@8{1vCjvG?Ukp^qu{g-fkd$u>?i2k7% zg);{p=uhAhy~}ug!9140nqoPZV&?0{8=_JUoS4AE!>l5%u$xJ;!6e@DoA{Z1G5n$; z$6hh9wH@V`kVq0OTaXcV@89%=Y^$Dax|~z7!_eqQazE>g`H2ii-}^c2;XjnZ^xIQn zciM*e6OYbWFiYR*D~IxK291T;{U7Xa++0_07}G3gt)aK0M&RUm!TN{W4kR&)#hsWT jI7dj+%OikoCj&#AnCr$?hs32o&oOwq`njxgN@xNA10`v? literal 0 HcmV?d00001 diff --git a/YAMS-LIB/sprites/misc/sGUIMissile.png b/YAMS-LIB/sprites/misc/hud/sGUIMissileSelected.png similarity index 100% rename from YAMS-LIB/sprites/misc/sGUIMissile.png rename to YAMS-LIB/sprites/misc/hud/sGUIMissileSelected.png diff --git a/YAMS-LIB/sprites/misc/hud/sGUIPBombNormal.png b/YAMS-LIB/sprites/misc/hud/sGUIPBombNormal.png new file mode 100644 index 0000000000000000000000000000000000000000..e5c365ec4cee873ab69aa9820951942c57056743 GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3HF=pW8M9Db50q$YKTtz9S&aI8~cZ8Ynp1 z)5S4F<9u>TLc)*p4vYy&3j{VS;J%YGf%Wo3wnIF-cI`^|_Vo00$*{Nz?zGj$HplWA zcp6MvjAPn1J1%H^Ey;Y?oGC7&v(&+mCDPctK;)sph3nVT1!~I$U3r#NzM6bJ!EzJR z#)q>-K5i`d_{g>Gy3;QXduK)u9+h@JiHnyRb;KNItzZ3e5sT8rjSQE0y4?bD6r`K3 dvzGXGGVGmbWpct;dK%D~44$rjF6*2UngF|zQak_v literal 0 HcmV?d00001 diff --git a/YAMS-LIB/sprites/misc/hud/sGUIPBombNormalGreen.png b/YAMS-LIB/sprites/misc/hud/sGUIPBombNormalGreen.png new file mode 100644 index 0000000000000000000000000000000000000000..3209ff3edc3d685ac89f4b2f965b697fde235fc4 GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3HF=pW8M9Db50q$YKTtz9S&aI8~cZ8YsBO z)5S4F<9u?;j1wQ`H!>YyQq!NbGFm=`!Q*pu%Z;l6Skh6EDes`jR$LCMq_9t9Fz<9wxZ3p*)i0ktj z6F)NZ^PD|(ebRxV6IqIlKc*E#nAS{Air{&?=jb!mEfZQR8B>fsjCof0*YpS`_wf8% z!KT1|qv-m6jU@~ literal 0 HcmV?d00001 diff --git a/YAMS-LIB/sprites/misc/sGUIPBomb.png b/YAMS-LIB/sprites/misc/hud/sGUIPBombSelected.png similarity index 100% rename from YAMS-LIB/sprites/misc/sGUIPBomb.png rename to YAMS-LIB/sprites/misc/hud/sGUIPBombSelected.png diff --git a/YAMS-LIB/sprites/misc/hud/sGUISMissileNormal.png b/YAMS-LIB/sprites/misc/hud/sGUISMissileNormal.png new file mode 100644 index 0000000000000000000000000000000000000000..fbfe7fa81ba244b21afe272a980e3aab559c8f9d GIT binary patch literal 248 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3HF=pW8M9Db50q$YKTtz9S&aI8~cZ8YsBR z)5S4F<9u>TLc)*p4vYy&3j{VS;J%YGf%Wn$p8kU+IXOBr)?HXtIa06Y<;OXk;vd$@?2>?0-R_Xu% literal 0 HcmV?d00001 diff --git a/YAMS-LIB/sprites/misc/hud/sGUISMissileNormalGreen.png b/YAMS-LIB/sprites/misc/hud/sGUISMissileNormalGreen.png new file mode 100644 index 0000000000000000000000000000000000000000..5c40f6d7a3213f9379a12b1f1982ce3f62582c5c GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3HF=pW8M9Db50q$YKTtz9S&aI8~cZ8YpYyQq!NbGFm=`!Q*pu%Z;E=JCl>*KS^b%4&92esD<48Z;@axENf!=_EopR5ZQvNSymAG-9 zXGK!NS$4rHgBXTx)(Ov^zO6sF?a(2{XF_eY9A8)H3Ap{JtUMB5VA7bwobA+QmGZUc i!4!``rzWEltPE#G-5OHY@a_Y8j=|H_&t;ucLK6UlxozM8 literal 0 HcmV?d00001 diff --git a/YAMS-LIB/sprites/misc/sGUISMissile.png b/YAMS-LIB/sprites/misc/hud/sGUISMissileSelected.png similarity index 100% rename from YAMS-LIB/sprites/misc/sGUISMissile.png rename to YAMS-LIB/sprites/misc/hud/sGUISMissileSelected.png