From bff5c1965253e817134213b2ac40711d0fcd2003 Mon Sep 17 00:00:00 2001 From: YoShibyl Date: Thu, 12 Dec 2024 17:07:52 -0500 Subject: [PATCH] Debug Info Overlay v1.0 --- DebugInfoOverlay.qb.xen | Bin 0 -> 2156 bytes src/DebugInfoOverlay.q | 156 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 DebugInfoOverlay.qb.xen create mode 100644 src/DebugInfoOverlay.q diff --git a/DebugInfoOverlay.qb.xen b/DebugInfoOverlay.qb.xen new file mode 100644 index 0000000000000000000000000000000000000000..f4831dca6bd513a6a411999496fd9342c42be980 GIT binary patch literal 2156 zcmYk84Nw#58ONV@H}MUS4}q{th>}e-fK%cohA;0Rd;|y)l?cd3j}wDnE(oNO@S!rL z-u3iq5B0QFd!3%5?cLS$>Yb;aA57_Z)>ezBc3RI;D%Vocks*eI5CL(!5juA}^X|ug z{fDd|vl_S4TN+G_Sw?t&X7Dx&7X}o)^@C!LT~e)jO|U z2ukIbPrL*m%mE;T972>;@P!GF(-81^eS_%3UXHrA-C2$4yk}3pkpOk`O*5uCl^^}w zhn2#BuXBy7)(uKUz{lm*)wDRQO`ADaQEOdugMAxUo!4ZqX{f8^fMU4rMOexeQZCim zav8;KJ`k0UsmBe*J=bRZYZ2B}3L|CdT3M=iN&kqVet}Fj{kmY$9@(~POM|Pk#@3)r^YNJAk}fy>0)ymrp?3c zdZW(w^bBKhz=A>nrrQl?)OI}SkI78hB|9Qh`27Xt)05XynW0R7CN5H#Q_Kn8$rLji z&w}oFD)(;ICn@cH$zxL;+4zuc$$R=){T0J0edRwylq}@eE$?IUb_z*Ya-OVpZmQds z8`BZq{rV4*+EWiF?^)5+Y@=NeL{R4l;mn*0pGf-`4z?Y zi6tLV-h*7vAF0zvu4UmtYUpuynb)@*&8{4u^4s=U5aOu4*AFT%4U-x`Xw*j~Otf(a zsD0a~TQSwUAhGfe{}1WS^v{ zL1Y505C+hC#l40TQR#_8S+cMhr91?fs!cTsy`}aV#^d@GIG#8f>XwO-^|_$eWVHZ| z%E<(7qU`{M&q}yatS6KU)5sE66Xz&(HrBnwXgNDjJ=p~`=A=66l4Hw$@#pj-GK{dE z`yE6E5KWYmQ=ghlz0`*Ah&~LE7HID#C5Z0ojP*tdEgA3tiXN7Qfm}owhev@qsuK{btJB;MQ|2@Xa>4M_-_&0*%iB9sILD*Sbd~R6&n@$+^36VA z4(-SYRcRHGlGPIQ`^%#LOe*!t2(^}L1nRKlc`UxJi`LBelDRSUlGKm!Z3cfvNRUPS zUw#F`l=uL8C8ww~<5e+=Ukj__!xfqdeWYp`R%wIaO}DWjX+#o}kZ&INfap_oDHo-Y zHUr13b$ROCOu?Yj!>)0TMbzqIZEE8=jbm|qlBPs^$)ZLp_0~q>G@yUdLMAeWe|e|m z;pXG=<~W76DD^HX*Ty-FNo+n_k?1fsvJi}_6LF5z^NhpT%iduHL#%(<3L;bfvL{XV z@?zM25|-LP474bkIANvUGApxBg6J)C=<|K%X)swI13epdPBf3_^1t0ERYrwCZGgwK z8LAx(E{>1kR(o@`_7}C$$yPFyzGaYrrT3SxQd+3Ho`d~7TKegnoj~p9WUszKP3;`$ zp2cJ-6~vcMh_W@=_MXD=dn4-Kykp!%+nD^Rr<(PNMKQSstvy4#t?9mCX{oL%u)Bh( zFt1Y*i@_>AlNIuA-fTus;apsNdAq>V?s<@J6l~~2YLL~r(Tw}x4S?=} zol^jKfM32Bqiv3DtbhWq{x5w^r zFJ~BAGvAiX9C18!4xYH+WBGe!4JD@Y_u=zZWHT)1{{(m~#}=Q;UvCUrDqZf^oHg4T Hg6IDO=b6z* literal 0 HcmV?d00001 diff --git a/src/DebugInfoOverlay.q b/src/DebugInfoOverlay.q new file mode 100644 index 0000000..e590a12 --- /dev/null +++ b/src/DebugInfoOverlay.q @@ -0,0 +1,156 @@ +dbginfo_enabled = 1 + +dbginfo_globalvar_1 = '0' +dbginfo_globalvar_2 = '0' +dbginfo_globalvar_3 = '0' +dbginfo_globalvar_4 = '0' + +ExampleVar = 69 + +script DebugInfoOverlay_startup + is_toggling_dbginfo = 0 + change ExampleVar = 69 + + // Load settings.ini stuff + FGH3Config sect='Mods' 'DebugInfoOverlay_Enabled' #"0x1ca1ff20"=($dbginfo_enabled) out=dbginfo_cfgshow + change dbginfo_enabled = + FGH3Config sect='Mods' 'DebugInfoOverlay_Enabled' set= + + // These 4 must be done manually like so + FGH3Config sect='Mods' 'DebugInfoOverlay_GlobalVar1' #"0x1ca1ff20"=($dbginfo_globalvar_1) out=dbg_inivar1 + change dbginfo_globalvar_1 = + FGH3Config sect='Mods' 'DebugInfoOverlay_GlobalVar1' set=($dbginfo_globalvar_1) + FGH3Config sect='Mods' 'DebugInfoOverlay_GlobalVar2' #"0x1ca1ff20"=($dbginfo_globalvar_2) out=dbg_inivar2 + change dbginfo_globalvar_2 = + FGH3Config sect='Mods' 'DebugInfoOverlay_GlobalVar2' set=($dbginfo_globalvar_2) + FGH3Config sect='Mods' 'DebugInfoOverlay_GlobalVar3' #"0x1ca1ff20"=($dbginfo_globalvar_3) out=dbg_inivar3 + change dbginfo_globalvar_3 = + FGH3Config sect='Mods' 'DebugInfoOverlay_GlobalVar3' set=($dbginfo_globalvar_3) + FGH3Config sect='Mods' 'DebugInfoOverlay_GlobalVar4' #"0x1ca1ff20"=($dbginfo_globalvar_4) out=dbg_inivar4 + change dbginfo_globalvar_4 = + FGH3Config sect='Mods' 'DebugInfoOverlay_GlobalVar4' set=($dbginfo_globalvar_4) + + begin + dbginfo_init + WinPortSioGetControlPress \{deviceNum = 3 actionNum = 0} + if ( = 323 & = 0) // 323 is Tab key + if ($dbginfo_enabled = 1) + change dbginfo_enabled = 0 + FGH3Config sect='Mods' 'DebugInfoOverlay_Enabled' set=0 + else + change dbginfo_enabled = 1 + FGH3Config sect='Mods' 'DebugInfoOverlay_Enabled' set=1 + endif + is_toggling_dbginfo = 1 + elseif ( = -1 & = 1) + is_toggling_dbginfo = 0 + endif + parse_dbginfo + if ($player1_status.current_run = 69) + change ExampleVar = 'Nice' + endif + wait \{1 gameframe} + repeat +endscript + +script dbginfo_init + if ScreenElementExists id = root_window + if NOT ScreenElementExists id = dbginfo_txt7 + i = 0 + begin + FormatText checksumname=dbginfo_txti 'dbginfo_txt%d' d = + CreateScreenElement { + Type = TextElement + parent = root_window + id = + font = text_a1 + Scale = 0.35 + rgba = [255 255 255] + text = '' + just = [top left] + z_priority = 999999 + Pos = ((0.0,16.0) * + (3,3)) + } + i = (+1) + repeat 12 + endif + endif +endscript + +script parse_dbginfo + dbginfo_scale = 0.4 + if ($dbginfo_enabled = 0) + dbginfo_scale = 0 + endif + i = 0 + begin + dbg_line = '\c1' + GetSongTimeMs + switch + case 0 // haha caseoh + dbg_line = ('\ccDebug Info Overlay v' + ($DebugInfoOverlay_mod_info.version) + ' \cb(Tab to toggle)') + case 1 + FormatText textname=dbg_line '\c1SongTime: %a' a = (