diff --git a/.gitignore b/.gitignore index 1dab934..a394bfe 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,11 @@ *.tar *.zip +# Configurations # +################## +# ignore the autogenerated electric config files +*.cfg + # Logs and databases # ###################### *.log diff --git a/electric.bas b/electric.bas index 908fe39..50dd217 100644 --- a/electric.bas +++ b/electric.bas @@ -1,8 +1,8 @@ -'Electric v1.0:0015 +CONST versionvrsn = "v1.1:0002-indev" 'Update this each build! _TITLE "Electric" DIM SHARED ignore`, ignorethrot`, swidth, sheight, xoffset%, yoffset%, graphsetting, gamepad, screenanchorx%, screenanchory% -OPEN "electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) +OPEN "cfg\electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) GET #1, 1, swidth GET #1, 2, sheight GET #1, 3, fs @@ -59,8 +59,8 @@ IF electricicon& THEN _FREEIMAGE electricicon& END IF IF fs = 1 THEN _FULLSCREEN -quartz& = _LOADFONT("segment14.otf", sheight / 24, "") -cyberbit& = _LOADFONT("cyberbit.ttf", sheight / 32, "") +quartz& = _LOADFONT("fonts\segment14.otf", sheight / 24, "") +cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") _PRINTMODE _KEEPBACKGROUND RANDOMIZE TIMER TYPE control @@ -151,7 +151,7 @@ TYPE debris rotation AS SINGLE END TYPE -menumusic& = _SNDOPEN("not-from-this-world_z1Fsz8Su.ogg", "sync,vol") +menumusic& = _SNDOPEN("menu_music.ogg", "sync,vol") _SNDVOL menumusic&, vol IF menumusic& THEN _SNDPLAY menumusic& DO @@ -171,7 +171,7 @@ DO center "Tell me a fun fact!", 8 wot funfact$, 0, 9 * _FONTHEIGHT, swidth END IF - _PRINTSTRING (0, sheight - _FONTHEIGHT), "v.1.0:0015" + _PRINTSTRING (0, sheight - _FONTHEIGHT), versionvrsn IF menu(4) THEN IF _SNDPLAYING(menumusic&) THEN _SNDSTOP menumusic& env @@ -179,7 +179,7 @@ DO END IF IF menu(5) THEN options - OPEN "electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) + OPEN "cfg\electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) GET #1, 19, vol CLOSE #1 IF menumusic& THEN _SNDVOL menumusic&, vol @@ -188,8 +188,8 @@ DO _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& _FREEIMAGE premetal& _FONT 16 - quartz& = _LOADFONT("segment14.otf", sheight / 24, "") - cyberbit& = _LOADFONT("cyberbit.ttf", sheight / 32, "") + quartz& = _LOADFONT("fonts\segment14.otf", sheight / 24, "") + cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") END IF IF menu(6) THEN credit IF menu(7) THEN @@ -222,8 +222,8 @@ _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& _FREEIMAGE premetal& _PUTIMAGE (0, 0), brushedmetal& _FONT 16 -quartz& = _LOADFONT("segment14.otf", sheight / 24, "") -cyberbit& = _LOADFONT("cyberbit.ttf", sheight / 32, "") +quartz& = _LOADFONT("fonts\segment14.otf", sheight / 24, "") +cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") _FONT quartz& center "CREDITS", 1 _FONT cyberbit& @@ -232,7 +232,7 @@ center "Patrick 'Cheese-Water' Marsee", 5 center "In-Game Music:", 7 center "N/A", 8 center "Title Music:", 10 -center "Neil Cross", 11 +center "N/A", 11 center "Other Stuff:", 13 center "QB64 - IDE", 14 center "GIMP - Graphics", 15 @@ -1277,7 +1277,7 @@ tooltips&(1) = _LOADIMAGE("aimer_tooltip.png") tooltips&(2) = _LOADIMAGE("energy_armor_tooltip.png") tooltips&(3) = _LOADIMAGE("srb_tooltip.png") tooltips&(4) = _LOADIMAGE("flare_tooltip.png") -OPEN "electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) +OPEN "cfg\electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) GET #1, 5, red GET #1, 6, green GET #1, 7, blue @@ -1317,9 +1317,9 @@ _DEST 0 IF team < 1 THEN team = 1 IF team > 4 THEN team = 4 planeshadow& = shadow&(plane&) -quartz& = _LOADFONT("segment14.otf", 16) -bigquartz& = _LOADFONT("segment14.otf", 32) -cyberbit& = _LOADFONT("cyberbit.ttf", 24, "") +quartz& = _LOADFONT("fonts\segment14.otf", 16) +bigquartz& = _LOADFONT("fonts\segment14.otf", 32) +cyberbit& = _LOADFONT("fonts\cyberbit.ttf", 24, "") numplanes% = team * 4 - 1 DIM points(3) AS score DIM planes(15) AS airplane @@ -1712,7 +1712,7 @@ END SUB SUB options 'The options menu DIM steering AS control, throttle AS control, primary AS control, secondary AS control, scrdown AS control, scrup AS control, pick AS control -OPEN "electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) +OPEN "cfg\electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) GET #1, 1, swidth GET #1, 2, sheight GET #1, 3, fs @@ -1739,8 +1739,8 @@ GET #1, 23, secondary.axis GET #1, 24, scrdown.axis GET #1, 25, scrup.axis GET #1, 26, pick.axis -quartz& = _LOADFONT("segment14.otf", sheight / 24, "") -cyberbit& = _LOADFONT("cyberbit.ttf", sheight / 32, "") +quartz& = _LOADFONT("fonts\segment14.otf", sheight / 24, "") +cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") premetal& = _LOADIMAGE("electricplane2.png") brushedmetal& = _NEWIMAGE(swidth, sheight, 32) _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& @@ -1776,8 +1776,8 @@ DO PUT #1, 2, sheight _PRINTMODE _KEEPBACKGROUND _FONT 16 - quartz& = _LOADFONT("segment14.otf", sheight / 24, "") - cyberbit& = _LOADFONT("cyberbit.ttf", sheight / 32, "") + quartz& = _LOADFONT("fonts\segment14.otf", sheight / 24, "") + cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") END IF IF menu(5) THEN IF fs = 0 THEN fs = 1 ELSE fs = 0 @@ -1895,8 +1895,8 @@ _FREEIMAGE brushedmetal& END SUB SUB pickres 'screen resolution picking dialogue -quartz& = _LOADFONT("segment14.otf", sheight / 16, "") -cyberbit& = _LOADFONT("cyberbit.ttf", sheight / 32, "") +quartz& = _LOADFONT("fonsts\segment14.otf", sheight / 16, "") +cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") premetal& = _LOADIMAGE("brushedmetal.png") brushedmetal& = _NEWIMAGE(swidth, sheight, 32) _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& @@ -1930,8 +1930,8 @@ DO _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& _FREEIMAGE premetal& _FONT 16 - quartz& = _LOADFONT("segment14.otf", sheight / 16, "") - cyberbit& = _LOADFONT("cyberbit.ttf", sheight / 32, "") + quartz& = _LOADFONT("fonts\segment14.otf", sheight / 16, "") + cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") END IF NEXT IF menu(21) THEN diff --git a/Segment14.otf b/fonts/Segment14.otf similarity index 100% rename from Segment14.otf rename to fonts/Segment14.otf diff --git a/cyberbit.ttf b/fonts/cyberbit.ttf similarity index 100% rename from cyberbit.ttf rename to fonts/cyberbit.ttf