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/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..ac2407a --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,35 @@ + +v1.1:0001 +--------- +Initial upload +First build using QB64 1.1 toolchain + +V1.1:0002 +--------- +Changed how versioning works within the code itself +Removed some non-free components +added a .gitignore with .exe and .cfg + +v1.1:0003 +--------- +Created a cfg folder and a fonts folder +reconfigured the code to take advantage of those new folders + +v1.1:0004 +--------- +Killed the cfg folder. It didn't make sense to have a folder for just one file +Added bg folder +Added sfx folder +Added ui folder + Added tooltips subfolder +Removed some unused asset files +Fixed the license +Added changelog! + +v1.1:0006 +--------- +Changed resolution detection method to work cross-platform + +v1.1:0007 +--------- +Fixed case-sensitivity issue for font loading in Linux diff --git a/LGPL-2.1.TXT b/COPYING.LESSER.TXT similarity index 100% rename from LGPL-2.1.TXT rename to COPYING.LESSER.TXT diff --git a/COPYING.LESSER.rtf b/COPYING.LESSER.rtf deleted file mode 100644 index 63cbc71..0000000 --- a/COPYING.LESSER.rtf +++ /dev/null @@ -1,324 +0,0 @@ -{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;} -{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;} -{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;} -{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} -{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f59\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f60\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;} -{\f62\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f63\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f64\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f65\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);} -{\f66\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f67\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f409\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f410\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;} -{\f412\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f413\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f416\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f417\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);} -{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} -{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;} -{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;} -{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} -{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} -{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;} -{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} -{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} -{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; -\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22 }{\*\defpap \ql \li0\ri0\sa160\sl259\slmult1 -\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 -\ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* -\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1 -\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}}{\*\listtable -{\list\listtemplateid2051727030{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fs20\fbias0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc23 -\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01o;}{\levelnumbers;}\f2\fs20\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative -\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;} -\f10\fs20\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li5040 -\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 } -{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid304550363} -{\list\listtemplateid1996383688{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fs20\fbias0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc23 -\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01o;}{\levelnumbers;}\f2\fs20\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative -\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;} -\f10\fs20\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li5040 -\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 } -{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid771361042} -{\list\listtemplateid1381769148{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fs20\fbias0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc23 -\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01o;}{\levelnumbers;}\f2\fs20\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0 -\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;} -\f10\fs20\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li5040 -\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 } -{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid1364861597} -{\list\listtemplateid-556999362{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fs20\fbias0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc23 -\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01o;}{\levelnumbers;}\f2\fs20\fbias0 \fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative -\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;} -\f10\fs20\fbias0 \fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li5040 -\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li5760\jclisttab\tx5760\lin5760 } -{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fs20\fbias0 \fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid1972124374}} -{\*\listoverridetable{\listoverride\listid771361042\listoverridecount0\ls1}{\listoverride\listid304550363\listoverridecount0\ls2}{\listoverride\listid1364861597\listoverridecount0\ls3}{\listoverride\listid1972124374\listoverridecount0\ls4}}{\*\pgptbl -{\pgp\ipgp2\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}}{\*\rsidtbl \rsid15480\rsid6822841}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info -{\author Daniel Marsee}{\operator Daniel Marsee}{\creatim\yr2014\mo8\dy20\hr22\min9}{\revtim\yr2014\mo8\dy20\hr22\min9}{\version1}{\edmins0}{\nofpages3}{\nofwords1096}{\nofchars6253}{\*\company University of Dayton}{\nofcharsws7335}{\vern57437}} -{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect -\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen -\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1 -\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct -\asianbrkrule\rsidroot6822841\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0 -{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang -{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang -{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} -\pard\plain \ltrpar\qc \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0\pararsid6822841 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 -\f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af0\afs27 \ltrch\fcs0 \b\f0\fs27\insrsid6822841\charrsid6822841 GNU LESSER GENERAL PUBLIC LICENSE -\par }\pard \ltrpar\qc \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 Version 3, 29 June 2007 -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 Copyright \'a9 - 2007 Free Software Foundation, Inc. <}{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 HYPERLINK "http://fsf.org/" }}{\fldrslt {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 -\f0\fs24\ul\cf2\insrsid6822841\charrsid6822841 http://fsf.org/}}}\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 > -\par Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -\par This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel3\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \ab\af0\afs24 \ltrch\fcs0 \b\f0\fs24\insrsid6822841\charrsid6822841 -{\*\bkmkstart section0}{\*\bkmkend section0}0. Additional Definitions. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 As used herein, \'93this License -\'94 refers to version 3 of the GNU Lesser General Public License, and the \'93GNU GPL\'94 refers to version 3 of the GNU General Public License. -\par \'93The Library\'94 refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. -\par An \'93Application\'94 is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. -\par A \'93Combined Work\'94 is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the \'93Linked Version\'94. -\par The \'93Minimal Corresponding Source\'94 - for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. -\par The \'93Corresponding Application Code\'94 - for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel3\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \ab\af0\afs24 \ltrch\fcs0 \b\f0\fs24\insrsid6822841\charrsid6822841 -{\*\bkmkstart section1}{\*\bkmkend section1}1. Exception to Section 3 of the GNU GPL. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 -You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel3\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \ab\af0\afs24 \ltrch\fcs0 \b\f0\fs24\insrsid6822841\charrsid6822841 -{\*\bkmkstart section2}{\*\bkmkend section2}2. Conveying Modified Versions. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 -If you modify a copy of the Library, a -nd, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\sb100\sa100\sbauto1\saauto1\widctlpar -\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls1\adjustright\rin0\lin720\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 a) under this Li -cense, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab}b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel3\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \ab\af0\afs24 \ltrch\fcs0 \b\f0\fs24\insrsid6822841\charrsid6822841 -{\*\bkmkstart section3}{\*\bkmkend section3}3. Object Code Incorporating Material from Library Header Files. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 -The object code form of an Application may incorporate material from a header file that is part of the Library. You ma -y convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), - you do both of the following: -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\sb100\sa100\sbauto1\saauto1\widctlpar -\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin720\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 -a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab}b) Accompany the object code with a copy of the GNU GPL and this license document. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel3\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \ab\af0\afs24 \ltrch\fcs0 \b\f0\fs24\insrsid6822841\charrsid6822841 -{\*\bkmkstart section4}{\*\bkmkend section4}4. Combined Works. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 -You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such mo -difications, if you also do each of the following: -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\sb100\sa100\sbauto1\saauto1\widctlpar -\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls3\adjustright\rin0\lin720\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 -a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab}b) Accompany the Combined Work with a copy of the GNU GPL and this license document. -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab} -c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab}d) Do one of the following: -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f2\fs20\insrsid6822841\charrsid6822841 \hich\af2\dbch\af0\loch\f2 o\tab}}\pard \ltrpar\ql \fi-360\li1440\ri0\sb100\sa100\sbauto1\saauto1\widctlpar -\jclisttab\tx1440\wrapdefault\aspalpha\aspnum\faauto\ls3\ilvl1\adjustright\rin0\lin1440\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 -0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Applicat -ion with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f2\fs20\insrsid6822841\charrsid6822841 \hich\af2\dbch\af0\loch\f2 o\tab}1) Use a suitable shared library mechanism for linking with the Library. A suitab -le mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\sb100\sa100\sbauto1\saauto1\widctlpar -\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls3\adjustright\rin0\lin720\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 e) Provide Install -ation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by - -recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you mus -t provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel3\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \ab\af0\afs24 \ltrch\fcs0 \b\f0\fs24\insrsid6822841\charrsid6822841 -{\*\bkmkstart section5}{\*\bkmkend section5}5. Combined Libraries. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 -You may place library facilities that are a work based on the -Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\sb100\sa100\sbauto1\saauto1\widctlpar -\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin720\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 a) Accompany the -combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f3\fs20\insrsid6822841\charrsid6822841 \loch\af3\dbch\af0\hich\f3 \'b7\tab}b) Give prominent notice with the combined library that part of it is a work based on the Library, a -nd explaining where to find the accompanying uncombined form of the same work. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel3\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \ab\af0\afs24 \ltrch\fcs0 \b\f0\fs24\insrsid6822841\charrsid6822841 -{\*\bkmkstart section6}{\*\bkmkend section6}6. Revised Versions of the GNU Lesser General Public License. -\par }\pard \ltrpar\ql \li0\ri0\sb100\sa100\sbauto1\saauto1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6822841 {\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\insrsid6822841\charrsid6822841 -The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from -time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -\par Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License \'93or any later version\'94 - applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. -If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. -\par If the Library as you received - it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. - -\par }\pard \ltrpar\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid15480 -\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a -9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad -5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 -b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 -0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 -a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f -c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 -0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 -a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 -6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b -4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b -4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100aa5225dfc60600008b1a0000160000007468656d652f7468656d652f -7468656d65312e786d6cec595d8bdb46147d2ff43f08bd3bfe92fcb1c41b6cd9ceb6d94d42eca4e4716c8fadc98e344633de8d0981923c160aa569e943037deb -43691b48a02fe9afd936a54d217fa17746b63c638fbb9b2585a5640d8b343af7ce997bafce1d4997afdc8fa87384134e58dc708b970aae83e3211b9178d2706f -f7bbb99aeb7081e211a22cc60d778eb97b65f7c30f2ea31d11e2083b601ff31dd4704321a63bf93c1fc230e297d814c7706dcc920809384d26f951828ec16f44 -f3a542a1928f10895d274611b8bd311e932176fad2a5bbbb74dea1701a0b2e078634e949d7d8b050d8d1615122f89c0734718e106db830cf881df7f17de13a14 -7101171a6e41fdb9f9ddcb79b4b330a2628bad66d7557f0bbb85c1e8b0a4e64c26836c52cff3bd4a33f3af00546ce23ad54ea553c9fc29001a0e61a52917dda7 -dfaab7dafe02ab81d2438bef76b55d2e1a78cd7f798373d3973f03af40a97f6f03dfed06104503af4029dedfc07b5eb51478065e81527c65035f2d34db5ed5c0 -2b5048497cb8812ef89572b05c6d061933ba6785d77daf5b2d2d9caf50500d5975c929c62c16db6a2d42f758d2058004522448ec88f9148fd110aa3840940c12 -e2ec93490885374531e3305c2815ba8532fc973f4f1da988a01d8c346bc90b98f08d21c9c7e1c3844c45c3fd18bcba1ae4cdcb1fdfbc7cee9c3c7a71f2e89793 -c78f4f1efd9c3a32acf6503cd1ad5e7fffc5df4f3f75fe7afeddeb275fd9f15cc7fffed367bffdfaa51d082b5d85e0d5d7cffe78f1ecd5379ffff9c3130bbc99 -a0810eef930873e73a3e766eb10816a6426032c783e4ed2cfa2122ba45339e701423398bc57f478406fafa1c5164c1b5b019c13b09488c0d787576cf20dc0b93 -9920168fd7c2c8001e30465b2cb146e19a9c4b0b737f164fec9327331d770ba123dbdc018a8dfc766653d05662731984d8a07993a258a0098eb170e4357688b1 -6575770931e27a408609e36c2c9cbbc46921620d499f0c8c6a5a19ed9108f232b711847c1bb139b8e3b418b5adba8d8f4c24dc15885ac8f73135c27815cd048a -6c2efb28a27ac0f791086d247bf364a8e33a5c40a6279832a733c29cdb6c6e24b05e2de9d7405eec693fa0f3c84426821cda7cee23c674649b1d06218aa6366c -8fc4a18efd881f428922e7261336f80133ef10790e7940f1d674df21d848f7e96a701b9455a7b42a107965965872791533a37e7b733a4658490d08bfa1e71189 -4f15f73559f7ff5b5907217df5ed53cbaa2eaaa0371362bda3f6d6647c1b6e5dbc03968cc8c5d7ee369ac53731dc2e9b0decbd74bf976ef77f2fdddbeee7772f -d82b8d06f9965bc574abae36eed1d67dfb9850da13738af7b9daba73e84ca32e0c4a3bf5cc8ab3e7b8690887f24e86090cdc2441cac64998f88488b017a229ec -ef8bae7432e10bd713ee4c19876dbf1ab6fa96783a8b0ed8287d5c2d16e5a3692a1e1c89d578c1cfc6e15143a4e84a75f50896b9576c27ea51794940dabe0d09 -6d329344d942a2ba1c9441520fe610340b09b5b277c2a26e615193ee97a9da6001d4b2acc0d6c9810d57c3f53d30012378a242148f649ed2542fb3ab92f92e33 -bd2d984605c03e625901ab4cd725d7adcb93ab4b4bed0c99364868e566925091513d8c87688417d52947cf42e36d735d5fa5d4a02743a1e683d25ad1a8d6fe8d -c579730d76ebda40635d2968ec1c37dc4ad9879219a269c31dc3633f1c4653a81d2eb7bc884ee0ddd95024e90d7f1e6599265cb4110fd3802bd149d520220227 -0e2551c395cbcfd24063a5218a5bb104827061c9d541562e1a3948ba99643c1ee3a1d0d3ae8dc848a7a7a0f0a95658af2af3f383a5259b41ba7be1e8d819d059 -720b4189f9d5a20ce0887078fb534ca33922f03a3313b255fdad35a685eceaef13550da5e3884e43b4e828ba98a77025e5191d7596c5403b5bac1902aa8564d1 -080713d960f5a01add34eb1a2987ad5df7742319394d34573dd35015d935ed2a66ccb06c036bb13c5f93d7582d430c9aa677f854bad725b7bed4bab57d42d625 -20e059fc2c5df70c0d41a3b69acca026196fcab0d4ecc5a8d93b960b3c85da599a84a6fa95a5dbb5b8653dc23a1d0c9eabf383dd7ad5c2d078b9af549156df3d -f44f136c700fc4a30d2f81675470954af8f09020d810f5d49e24950db845ee8bc5ad0147ce2c210df741c16f7a41c90f72859adfc97965af90abf9cd72aee9fb -e562c72f16daadd243682c228c8a7efacda50bafa2e87cf1e5458d6f7c7d89966fdb2e0d599467eaeb4a5e11575f5f8aa5ed5f5f1c02a2f3a052ead6cbf55625 -572f37bb39afddaae5ea41a5956b57826abbdb0efc5abdfbd0758e14d86b9603afd2a9e52ac520c8799582a45fabe7aa5ea9d4f4aacd5ac76b3e5c6c6360e5a9 -7c2c6201e155bc76ff010000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f -7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be -9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980 -ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5b -babac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c0200001300000000000000000000000000000000005b436f6e74656e -745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f -2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000190200007468656d652f7468656d652f74 -68656d654d616e616765722e786d6c504b01022d0014000600080000002100aa5225dfc60600008b1a00001600000000000000000000000000d6020000746865 -6d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b0100002700000000000000000000000000d00900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000cb0a00000000} -{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d -617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 -6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 -656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} -{\*\latentstyles\lsdstimax371\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong; -\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Table;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 1; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 2; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 2; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 3; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 2; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 6; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 2; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 6; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 2; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Contemporary;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Elegant;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Professional; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 2; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Theme;\lsdsemihidden1 \lsdlocked0 Placeholder Text; -\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2; -\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List; -\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 1; -\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 Revision; -\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1; -\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 \lsdlocked0 Colorful List Accent 1; -\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2; -\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2; -\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2; -\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3; -\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3; -\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4; -\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4; -\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4; -\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5; -\lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; -\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5; -\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6; -\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6; -\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; -\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; -\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4; -\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4; -\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1; -\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1; -\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2; -\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2; -\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3; -\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4; -\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4; -\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5; -\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5; -\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6; -\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6; -\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark; -\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1; -\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1; -\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2; -\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3; -\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3; -\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4; -\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4; -\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5; -\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; -\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; -\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;}}{\*\datastore 010500000200000018000000 -4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 -d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000408c -08f4e4bccf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 -000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/HANDBOOK.txt b/HANDBOOK.txt new file mode 100644 index 0000000..aab9601 --- /dev/null +++ b/HANDBOOK.txt @@ -0,0 +1,185 @@ +Electric v1.1:0004 + +For less information, see the "About" page for Electric on cheesewatergames.tk. + +Rules 'n' stuff + +As far as an objective, there isn't really an end goal, just get as many points as possible, and try not to die. + +How to main menu + +ELECTRIC +title of the game +Play +I don't think I need to explain +Options +Go to the Options menu, which actually has options in it this time +Credits +View the credits +Exit +Exit the game + +How to options menu + +OPTIONS +Letting you know that this is the Options menu +Set Screen Resolution (* x *) +Change resolution -- You probably won't need this, since it autodetects +Toggle Fullscreen (*) +Turn fullscreen on or off -- default is on +Fancyness (*) +If you're running it on a netbook or similar device, some of the graphical fancies can give it a hard time -- default is low +Plane Color (*, *, *) -- * +Change the color of your plane. Use RGB. -- default is (0, 0, 255) -- Electric Blue +Enemy AI (*) +Change how good the enemy AI is. "Good" always aims directly at the target, while "Really Good" leads. In "Really Good," the AI can also use the markets, though their selection is limited. -- default is good. +Input Device: * +Change input between mouse and keybord or selected controller. -- default is mouse & keybord (0). +Controls (If you're using a controller) +Change default controls (some input devices have unique buttons and axis). Standard set by Logitech Attack 3. +Planes per team: (*) +Number of planes per color -- default is 1 +Music volume (*) +Changes music volume in menu and game. Change takes effect when you leave the options menu. -- Default is 100%. +Restore Defaults +You might want to select this after an update. +Back +Go back to the main menu. + +How to play + + How to control + + Keyboard: + "w" + increasae throttle,an increment of 10% + "s" + decrease throttle, a decrement of 10% + "a" + turn counter-clockwise + "d" + turn clockwise + "" + fire primary weapons + "f" + fire missiles + "1"-"3" + toggle primary weapons -- more than one can be on at a time + "4"-"5" + toggle missiles -- more than one can be on at a time + "6"-"9" + toggle mods -- more than one can be on at a time + Controller: + (All controls not listed still require the keyboard. Example used is Logitch Attack 3.) + "Axis 3" + throttle (0 - 100 = -1 - 1. Increase or decrease throttle control.) + "Axis 1" + steering (positive = clockwise, negative = counter- clockwise. Tilt joystick left and right.) + "Button 1" + fire primary weapons (trigger) + "Button 2" + fire missiles (button labelled "2") + "Button 3" + toggle selected weapon/mod + "Button 4" + select previous mod/weapon + "Button 5" + select next mod/weapon + + How to HUD + + PWR + "power" -- throttle (higher throttle takes more energy) + GEN + "generator" -- rate that power recharges, relative to full throttle. When PWR < GEN, the battery charges. When PWR > GEN, the battery drains. + BAT + "battery" -- amount of juice in the battery. When it runs out, the throttle cannot exceed 50%, and you cannot fire weapons. + SPD + "speed" – speed measured in miles per hour. + ARM + "armor" -- health. If it reaches 0, you blow up and respawn. + AMO + "ammo" -- machine gun bullets, out of 10000 + PTS + "points" -- one is gained every time you fire a killshot. + CR. + "credits" -- credits that you buy stuff at the market with. + _ + _,-|_|-,_ + |_|-|_|-|_| + -'-'-'-'- + |_|_|_|_| + Weapon hud + The five red squares hold primary weapons. The three blue squares hold missiles. The four green squares hold mods. + If a square is "on," a grey square appears inside of it. Weapons and missiles start "on," and mods start "off." + __________ + |> v| + | | + | | + | | + |^ <| + ---------- + Tacmap + The four colored triangles show the location and orientation of their respective planes in the battlefeild. + + How to market + + fly into the western wall (assuming it's "Open!) + Along the top, there are three tabs, labled "Weapons," "mods," and "stats." + Clicking on these tabs takes the player to different parts of the market. The default is "weapons." + You will observe a list of available products, how many credits you have, and how much time you have left to stay in the market. (BTW, you get a credit for every point earned.) + In "weapons" + Laser + Cr. 3, 300 RPM, 960 pixels/sec, 5 damage/shot, .25 energy/shot, no special atributes + Vulcan + Cr. 3, 3600 RPM, 1200 pixels/sec, .5 damage/shot, 1 bullet/shot, 4 degrees spread angle + Spread + Cr. 3, 450 RPM, 960 pixels/sec, 2.5 damage/shot, .3 energy/shot, 3 shots fired at once, one forward, and 30 degrees on either side. + Plasma + Cr. 3, 600 RPM, 1080 pixels/sec, 10 damage/shot, .5 energy/shot, no special atributes + Gauss + Cr. 3, 450 RPM, 1200 pixels/sec, .5 damage/shot, 8 bullets/shot, fires like a shotgun + Avenger + Cr. 5, 3600 RPM, 1200 pixels/sec, 1 damage/shot, 1 bullet/shot, reqoil slows down plane + Homing Plasma + Cr. 5, Charged, 720 pixels/sec, homes + Pulse + Cr. 5, Charged, 960 pixels/sec, continues after hitting something, doubling power each time + 10 Heat-Seeker Missiles + Cr. 4, 60 RPM, 960 pixels/sec, 50 damage/shot, 1 missile/shot, homes, range 2880 pixels (flies for 3 seconds) + 10 Radar-Guided Missiles + Cr. 5, 60 RPM, 960 pixels/sec, 50 damage/shot, 1 missile/shot, homes and leads, range 5760 pixels (flies for 6 seconds) + 4 Cruise Missiles + Cr. 6, 60 RPM, 960 pixels/sec, 300 damage/shot, 300 pixel radius, 1 missile/shot, homes poorly, range 8640 pixels (flies for 9 seconds) + + Click on a product to purchase, and it will go to the storage grid. + Click on a product in the storage grid to pick it up. + Click on one of the red spaces on the weapon hud to put primary weapons there. It must be symmetrical, so you need two of the same kind of product in storage to place it in any of the wing slots(2, 3). Otherwise, it must go in the nose(1). + Click on one of the blue spaces on the weapon hud to put missiles there. Note that missiles in slot 5 fire at 120 RPM. + In "mods" + Aimer + Cr. 3, Displays where enemies will be when your shots arrive, draws a line in the direction the player is aiming, and missile targeting boundaries. + Energy ==> Armor + Cr. 3, Regenerates armor, but sucks down as much electricity. + Solid Rocket Booster + Cr. 3, Gives a speed boost when you are in an emergency. Lasts 3 seconds. One use only. Stackable. + Flare Pack + Cr. 3, releases 4 flares that confuse missiles. Works 4 out of 5 times. Stackable. + + Click on a product to purchase, and it will go to the storage grid. + Click on a product in the storage grid to pick it up. + Click on one of the green spaces on the mod hud to put it there. + In "stats" + Generator + Cr. 5, Makes the generator more powerful + Battery Life + Cr. 5, Makes the battery last longer, but also recharge slower (it's still worth it) + Armor + Cr. 5, Makes the plane take less damage from shots + 1000 Bullets + Cr. 1, 1000 machine gun bullets that the Vulcan uses. + + Click on a product to apply it. + When hovering over an item with the mouse, a short summary of the item will appear below STORAGE. + Click "Exit" in the lower righthand corner to go back out. + Once out, the market cannot be entered until enough time has passed ("enough" = time spent in the market * 2) diff --git a/README.md b/README.md index 7edb9c1..395879b 100644 --- a/README.md +++ b/README.md @@ -1,187 +1,96 @@ -Electric v1.0:0015 +# ELECTRIC -DO NOT INSTALL OVER BETA II (v0.8)! It will break things. +## ABOUT Electric -For less information, see the "About" page for Electric on cheesewatergames.tk. +Electric is a 2-D, top-down in-flight shooter. +Fight enemy forces as four air forces converge and battle in an intense team deathmatch vs. smart AI planes. -Rules 'n' stuff +* Fly with a team, or take on enemies solo. +* Upgrade your plane to stay at the top of the battlefield. +* Use your favorite controller, or play with the classic keyboard. +* Customize your team with colors and liveries. -As far as an objective, there isn't really an end goal, just get as many points as possible, and try not to die. +## ABOUT THIS PROJECT -How to main menu +This repo is for the post-release maintenance of Electric. +Any new patches for bugfixes, enhancements, or cleanup will come from here. -ELECTRIC -title of the game -Play -I don't think I need to explain -Options -Go to the Options menu, which actually has options in it this time -Credits -View the credits -Exit -Exit the game +### What we will do: -How to options menu +* Improve performance over Electric 1.0 +* Fix bugs present in Electric 1.0 +* Add features missing from Electric 1.0 that still fit with the spirit of the original +* Add Mac/Linux support +* Make code more efficient +* Create original music -OPTIONS -Letting you know that this is the Options menu -Set Screen Resolution (* x *) -Change resolution -- You probably won't need this, since it autodetects -Toggle Fullscreen (*) -Turn fullscreen on or off -- default is on -Fancyness (*) -If you're running it on a netbook or similar device, some of the graphical fancies can give it a hard time -- default is low -Plane Color (*, *, *) -- * -Change the color of your plane. Use RGB. -- default is (0, 0, 255) -- Electric Blue -Enemy AI (*) -Change how good the enemy AI is. "Good" always aims directly at the target, while "Really Good" leads. In "Really Good," the AI can also use the markets, though their selection is limited. -- default is good. -Input Device: * -Change input between mouse and keybord or selected controller. -- default is mouse & keybord (0). -Controls (If you're using a controller) -Change default controls (some input devices have unique buttons and axis). Standard set by Logitech Attack 3. -Planes per team: (*) -Number of planes per color -- default is 1 -Music volume (*) -Changes music volume in menu and game. Change takes effect when you leave the options menu. -- Default is 100%. -Restore Defaults -You might want to select this after an update. -Back -Go back to the main menu. +### What we will not do: -How to play +* Change fundamental game mechanics +* Deviate from the original purpose of the game +* Deviate from the original look and feel of the game +* Be an "early access" style rolling game - How to control +## INSTALLING - Keyboard: - "w" - increasae throttle,an increment of 10% - "s" - decrease throttle, a decrement of 10% - "a" - turn counter-clockwise - "d" - turn clockwise - "" - fire primary weapons - "f" - fire missiles - "1"-"3" - toggle primary weapons -- more than one can be on at a time - "4"-"5" - toggle missiles -- more than one can be on at a time - "6"-"9" - toggle mods -- more than one can be on at a time - Controller: - (All controls not listed still require the keyboard. Example used is Logitch Attack 3.) - "Axis 3" - throttle (0 - 100 = -1 - 1. Increase or decrease throttle control.) - "Axis 1" - steering (positive = clockwise, negative = counter- clockwise. Tilt joystick left and right.) - "Button 1" - fire primary weapons (trigger) - "Button 2" - fire missiles (button labelled "2") - "Button 3" - toggle selected weapon/mod - "Button 4" - select previous mod/weapon - "Button 5" - select next mod/weapon +### Installer code will not be available at this time for this project. +1. You will need to compile the source code (electric.bas) yourself while maintaining the original directory structure +You'll need Windows and an IDE called QB64 to build this, as it is written in a dialect of QuickBASIC + * Yes, it'll run on modern computers - How to HUD +2. You may either use the download button above to get a compressed version of this code, or you can use a Git client. +To use the Git client to clone this repository, issure the following command: +`git clone http://creamery.cheesewatergames.tk/rdmarsee/Electric.git` - PWR - "power" -- throttle (higher throttle takes more energy) - GEN - "generator" -- rate that power recharges, relative to full throttle. When PWR < GEN, the battery charges. When PWR > GEN, the battery drains. - BAT - "battery" -- amount of juice in the battery. When it runs out, the throttle cannot exceed 50%, and you cannot fire weapons. - SPD - "speed" – speed measured in miles per hour. - ARM - "armor" -- health. If it reaches 0, you blow up and respawn. - AMO - "ammo" -- machine gun bullets, out of 10000 - PTS - "points" -- one is gained every time you fire a killshot. - CR. - "credits" -- credits that you buy stuff at the market with. - _ - _,-|_|-,_ - |_|-|_|-|_| - -'-'-'-'- - |_|_|_|_| - Weapon hud - The five red squares hold primary weapons. The three blue squares hold missiles. The four green squares hold mods. - If a square is "on," a grey square appears inside of it. Weapons and missiles start "on," and mods start "off." - __________ - |> v| - | | - | | - | | - |^ <| - ---------- - Tacmap - The four colored triangles show the location and orientation of their respective planes in the battlefeild. +3. Download and install QB64 +4. Open your QB64 IDE and navigate to the Electric folder +5. Open "electric.bas" +6. In the QB64 window, select Run->Save EXE in the source folder - How to market +### Optional: +You may want to increase the size of the window in Options->Display and increasing Width and Height +To build and run, select Run->Start -or- hit F5 on your keyboard. +The Electric executible will now be in the Electric folder, ready to be run directly wihtout QB64. - fly into the western wall (assuming it's "Open!) - Along the top, there are three tabs, labled "Weapons," "mods," and "stats." - Clicking on these tabs takes the player to different parts of the market. The default is "weapons." - You will observe a list of available products, how many credits you have, and how much time you have left to stay in the market. (BTW, you get a credit for every point earned.) - In "weapons" - Laser - Cr. 3, 300 RPM, 960 pixels/sec, 5 damage/shot, .25 energy/shot, no special atributes - Vulcan - Cr. 3, 3600 RPM, 1200 pixels/sec, .5 damage/shot, 1 bullet/shot, 4 degrees spread angle - Spread - Cr. 3, 450 RPM, 960 pixels/sec, 2.5 damage/shot, .3 energy/shot, 3 shots fired at once, one forward, and 30 degrees on either side. - Plasma - Cr. 3, 600 RPM, 1080 pixels/sec, 10 damage/shot, .5 energy/shot, no special atributes - Gauss - Cr. 3, 450 RPM, 1200 pixels/sec, .5 damage/shot, 8 bullets/shot, fires like a shotgun - Avenger - Cr. 5, 3600 RPM, 1200 pixels/sec, 1 damage/shot, 1 bullet/shot, reqoil slows down plane - Homing Plasma - Cr. 5, Charged, 720 pixels/sec, homes - Pulse - Cr. 5, Charged, 960 pixels/sec, continues after hitting something, doubling power each time - 10 Heat-Seeker Missiles - Cr. 4, 60 RPM, 960 pixels/sec, 50 damage/shot, 1 missile/shot, homes, range 2880 pixels (flies for 3 seconds) - 10 Radar-Guided Missiles - Cr. 5, 60 RPM, 960 pixels/sec, 50 damage/shot, 1 missile/shot, homes and leads, range 5760 pixels (flies for 6 seconds) - 4 Cruise Missiles - Cr. 6, 60 RPM, 960 pixels/sec, 300 damage/shot, 300 pixel radius, 1 missile/shot, homes poorly, range 8640 pixels (flies for 9 seconds) +## BRANCHES +There are currently two branches you may clone. - Click on a product to purchase, and it will go to the storage grid. - Click on a product in the storage grid to pick it up. - Click on one of the red spaces on the weapon hud to put primary weapons there. It must be symmetrical, so you need two of the same kind of product in storage to place it in any of the wing slots(2, 3). Otherwise, it must go in the nose(1). - Click on one of the blue spaces on the weapon hud to put missiles there. Note that missiles in slot 5 fire at 120 RPM. - In "mods" - Aimer - Cr. 3, Displays where enemies will be when your shots arrive, draws a line in the direction the player is aiming, and missile targeting boundaries. - Energy ==> Armor - Cr. 3, Regenerates armor, but sucks down as much electricity. - Solid Rocket Booster - Cr. 3, Gives a speed boost when you are in an emergency. Lasts 3 seconds. One use only. Stackable. - Flare Pack - Cr. 3, releases 4 flares that confuse missiles. Works 4 out of 5 times. Stackable. +### Master - This is the default, and preferred branch. +* Master will be kept clean and stable. If you follow proper procedure, it will always build on QB64 1.1 +* Master will also keep runtime errors to a minimum. + * In fact, if you find a runtime error using Master, please log an issue to the issue tracker + * You may also report any gameplay bugs or grievances for this branch + * Do not report bugs or suggestions here that apply only to Electric 1_1. They'll be ignored. - Click on a product to purchase, and it will go to the storage grid. - Click on a product in the storage grid to pick it up. - Click on one of the green spaces on the mod hud to put it there. - In "stats" - Generator - Cr. 5, Makes the generator more powerful - Battery Life - Cr. 5, Makes the battery last longer, but also recharge slower (it's still worth it) - Armor - Cr. 5, Makes the plane take less damage from shots - 1000 Bullets - Cr. 1, 1000 machine gun bullets that the Vulcan uses. +### 1_1 - This is where the rapid development takes place. +* Changes that may potentially break the game from time to time will be made here +* Expect runtime errors and occasional build errors. +* Again, any runtime or build errors you see, please log in the issues tracker under this branch + * Do not log gameplay bugs or grievances in this branch - we're already working on them. - Click on a product to apply it. - When hovering over an item with the mouse, a short summary of the item will appear below STORAGE. - Click "Exit" in the lower righthand corner to go back out. - Once out, the market cannot be entered until enough time has passed ("enough" = time spent in the market * 2) +### In the future, there will be a 1_2 branch. +At that time, 1.1 will become dormant and all new development will be focused towards 1.2 +* Exceptions for the 1_1 dormancy will be to fix critical bugs +* There will be a final, binary release of 1_1 on the website. + +### The game will be legacied after version 1_2 + +## FORKING +Feel free to fork this project for your own purposes. WITH SOME MINOR EXCEPTIONS +No matter how much you modify it, PLEASE give Cheese-Water Games credit for providing the original code. +Also, please don't simply re-release our code as-is under a different name. At least modify something. + +## THANK YOU!!! + + +#### ABOUT CHEESE-WATER GAMES + +Cheese-Water Games is the website for games made by Cheese-Water. + +Why Cheese-Water? It’s a long story, so I won’t bore you with it. + +I am a learning indie programmer who is trying very hard to make a future for myself. I am learning as I go, and, through this site, I invite you along for the ride. Things won’t always be pretty, but hopefully, will always be better than before. + +… + +Normally, a classic programmer would probably end this with “Hello, world,” but I think I prefer “Oi, Earth!” diff --git a/blendgrasswoods02.png b/bg/blendgrasswoods02.png similarity index 100% rename from blendgrasswoods02.png rename to bg/blendgrasswoods02.png diff --git a/blendgrasswoodsbackslash.png b/bg/blendgrasswoodsbackslash.png similarity index 100% rename from blendgrasswoodsbackslash.png rename to bg/blendgrasswoodsbackslash.png diff --git a/blendgrasswoodsbottom.png b/bg/blendgrasswoodsbottom.png similarity index 100% rename from blendgrasswoodsbottom.png rename to bg/blendgrasswoodsbottom.png diff --git a/blendgrasswoodsbottomleft.png b/bg/blendgrasswoodsbottomleft.png similarity index 100% rename from blendgrasswoodsbottomleft.png rename to bg/blendgrasswoodsbottomleft.png diff --git a/blendgrasswoodsbottomleft2.png b/bg/blendgrasswoodsbottomleft2.png similarity index 100% rename from blendgrasswoodsbottomleft2.png rename to bg/blendgrasswoodsbottomleft2.png diff --git a/blendgrasswoodsbottomleftcurve.png b/bg/blendgrasswoodsbottomleftcurve.png similarity index 100% rename from blendgrasswoodsbottomleftcurve.png rename to bg/blendgrasswoodsbottomleftcurve.png diff --git a/blendgrasswoodsbottomright.png b/bg/blendgrasswoodsbottomright.png similarity index 100% rename from blendgrasswoodsbottomright.png rename to bg/blendgrasswoodsbottomright.png diff --git a/blendgrasswoodsbottomright2.png b/bg/blendgrasswoodsbottomright2.png similarity index 100% rename from blendgrasswoodsbottomright2.png rename to bg/blendgrasswoodsbottomright2.png diff --git a/blendgrasswoodsbottomrightcurve.png b/bg/blendgrasswoodsbottomrightcurve.png similarity index 100% rename from blendgrasswoodsbottomrightcurve.png rename to bg/blendgrasswoodsbottomrightcurve.png diff --git a/blendgrasswoodsbottomtopleft.png b/bg/blendgrasswoodsbottomtopleft.png similarity index 100% rename from blendgrasswoodsbottomtopleft.png rename to bg/blendgrasswoodsbottomtopleft.png diff --git a/blendgrasswoodsbottomtopright.png b/bg/blendgrasswoodsbottomtopright.png similarity index 100% rename from blendgrasswoodsbottomtopright.png rename to bg/blendgrasswoodsbottomtopright.png diff --git a/blendgrasswoodsbottomwithcorners.png b/bg/blendgrasswoodsbottomwithcorners.png similarity index 100% rename from blendgrasswoodsbottomwithcorners.png rename to bg/blendgrasswoodsbottomwithcorners.png diff --git a/blendgrasswoodsclearing.png b/bg/blendgrasswoodsclearing.png similarity index 100% rename from blendgrasswoodsclearing.png rename to bg/blendgrasswoodsclearing.png diff --git a/blendgrasswoodscornersbottom.png b/bg/blendgrasswoodscornersbottom.png similarity index 100% rename from blendgrasswoodscornersbottom.png rename to bg/blendgrasswoodscornersbottom.png diff --git a/blendgrasswoodscornersleft.png b/bg/blendgrasswoodscornersleft.png similarity index 100% rename from blendgrasswoodscornersleft.png rename to bg/blendgrasswoodscornersleft.png diff --git a/blendgrasswoodscornersright.png b/bg/blendgrasswoodscornersright.png similarity index 100% rename from blendgrasswoodscornersright.png rename to bg/blendgrasswoodscornersright.png diff --git a/blendgrasswoodscornerstop.png b/bg/blendgrasswoodscornerstop.png similarity index 100% rename from blendgrasswoodscornerstop.png rename to bg/blendgrasswoodscornerstop.png diff --git a/blendgrasswoodsforwardslash.png b/bg/blendgrasswoodsforwardslash.png similarity index 100% rename from blendgrasswoodsforwardslash.png rename to bg/blendgrasswoodsforwardslash.png diff --git a/blendgrasswoodshoriz.png b/bg/blendgrasswoodshoriz.png similarity index 100% rename from blendgrasswoodshoriz.png rename to bg/blendgrasswoodshoriz.png diff --git a/blendgrasswoodsleft.png b/bg/blendgrasswoodsleft.png similarity index 100% rename from blendgrasswoodsleft.png rename to bg/blendgrasswoodsleft.png diff --git a/blendgrasswoodsleftbottomright.png b/bg/blendgrasswoodsleftbottomright.png similarity index 100% rename from blendgrasswoodsleftbottomright.png rename to bg/blendgrasswoodsleftbottomright.png diff --git a/blendgrasswoodslefttopright.png b/bg/blendgrasswoodslefttopright.png similarity index 100% rename from blendgrasswoodslefttopright.png rename to bg/blendgrasswoodslefttopright.png diff --git a/blendgrasswoodsleftwithcorners.png b/bg/blendgrasswoodsleftwithcorners.png similarity index 100% rename from blendgrasswoodsleftwithcorners.png rename to bg/blendgrasswoodsleftwithcorners.png diff --git a/blendgrasswoodsright.png b/bg/blendgrasswoodsright.png similarity index 100% rename from blendgrasswoodsright.png rename to bg/blendgrasswoodsright.png diff --git a/blendgrasswoodsrightbottomleft.png b/bg/blendgrasswoodsrightbottomleft.png similarity index 100% rename from blendgrasswoodsrightbottomleft.png rename to bg/blendgrasswoodsrightbottomleft.png diff --git a/blendgrasswoodsrighttopleft.png b/bg/blendgrasswoodsrighttopleft.png similarity index 100% rename from blendgrasswoodsrighttopleft.png rename to bg/blendgrasswoodsrighttopleft.png diff --git a/blendgrasswoodsrightwithcorners.png b/bg/blendgrasswoodsrightwithcorners.png similarity index 100% rename from blendgrasswoodsrightwithcorners.png rename to bg/blendgrasswoodsrightwithcorners.png diff --git a/blendgrasswoodstop.png b/bg/blendgrasswoodstop.png similarity index 100% rename from blendgrasswoodstop.png rename to bg/blendgrasswoodstop.png diff --git a/blendgrasswoodstopbottomleft.png b/bg/blendgrasswoodstopbottomleft.png similarity index 100% rename from blendgrasswoodstopbottomleft.png rename to bg/blendgrasswoodstopbottomleft.png diff --git a/blendgrasswoodstopbottomright.png b/bg/blendgrasswoodstopbottomright.png similarity index 100% rename from blendgrasswoodstopbottomright.png rename to bg/blendgrasswoodstopbottomright.png diff --git a/blendgrasswoodstopleft.png b/bg/blendgrasswoodstopleft.png similarity index 100% rename from blendgrasswoodstopleft.png rename to bg/blendgrasswoodstopleft.png diff --git a/blendgrasswoodstopleft2.png b/bg/blendgrasswoodstopleft2.png similarity index 100% rename from blendgrasswoodstopleft2.png rename to bg/blendgrasswoodstopleft2.png diff --git a/blendgrasswoodstopleftcurve.png b/bg/blendgrasswoodstopleftcurve.png similarity index 100% rename from blendgrasswoodstopleftcurve.png rename to bg/blendgrasswoodstopleftcurve.png diff --git a/blendgrasswoodstopright.png b/bg/blendgrasswoodstopright.png similarity index 100% rename from blendgrasswoodstopright.png rename to bg/blendgrasswoodstopright.png diff --git a/blendgrasswoodstopright2.png b/bg/blendgrasswoodstopright2.png similarity index 100% rename from blendgrasswoodstopright2.png rename to bg/blendgrasswoodstopright2.png diff --git a/blendgrasswoodstoprightcurve.png b/bg/blendgrasswoodstoprightcurve.png similarity index 100% rename from blendgrasswoodstoprightcurve.png rename to bg/blendgrasswoodstoprightcurve.png diff --git a/blendgrasswoodstopwithcorners.png b/bg/blendgrasswoodstopwithcorners.png similarity index 100% rename from blendgrasswoodstopwithcorners.png rename to bg/blendgrasswoodstopwithcorners.png diff --git a/blendgrasswoodsubottom.png b/bg/blendgrasswoodsubottom.png similarity index 100% rename from blendgrasswoodsubottom.png rename to bg/blendgrasswoodsubottom.png diff --git a/blendgrasswoodsuleft.png b/bg/blendgrasswoodsuleft.png similarity index 100% rename from blendgrasswoodsuleft.png rename to bg/blendgrasswoodsuleft.png diff --git a/blendgrasswoodsuright.png b/bg/blendgrasswoodsuright.png similarity index 100% rename from blendgrasswoodsuright.png rename to bg/blendgrasswoodsuright.png diff --git a/blendgrasswoodsutop.png b/bg/blendgrasswoodsutop.png similarity index 100% rename from blendgrasswoodsutop.png rename to bg/blendgrasswoodsutop.png diff --git a/blendgrasswoodsvert.png b/bg/blendgrasswoodsvert.png similarity index 100% rename from blendgrasswoodsvert.png rename to bg/blendgrasswoodsvert.png diff --git a/brushedmetal.png b/bg/brushedmetal.png similarity index 100% rename from brushedmetal.png rename to bg/brushedmetal.png diff --git a/electricplane2.png b/bg/electricplane2.png similarity index 100% rename from electricplane2.png rename to bg/electricplane2.png diff --git a/grass03.png b/bg/grass03.png similarity index 100% rename from grass03.png rename to bg/grass03.png diff --git a/woods02.png b/bg/woods02.png similarity index 100% rename from woods02.png rename to bg/woods02.png diff --git a/death.wav b/death.wav deleted file mode 100644 index 35cd46b..0000000 Binary files a/death.wav and /dev/null differ diff --git a/electric.bas b/electric.bas index 908fe39..2231acc 100644 --- a/electric.bas +++ b/electric.bas @@ -1,3115 +1,3115 @@ -'Electric v1.0:0015 - -_TITLE "Electric" -DIM SHARED ignore`, ignorethrot`, swidth, sheight, xoffset%, yoffset%, graphsetting, gamepad, screenanchorx%, screenanchory% -OPEN "electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) -GET #1, 1, swidth -GET #1, 2, sheight -GET #1, 3, fs -GET #1, 4, graphsetting -GET #1, 9, gamepad -GET #1, 19, vol -IF swidth > 0 AND sheight > 0 THEN - SCREEN _NEWIMAGE(swidth, sheight, 32) -ELSE - desktop& = _SCREENIMAGE - IF desktop& THEN - swidth = _WIDTH(desktop&) - sheight = _HEIGHT(desktop&) - ELSE - swidth = 800 - sheight = 600 - END IF - SCREEN _NEWIMAGE(swidth, sheight, 32) - IF desktop& THEN _FREEIMAGE desktop& - fs = 1 - blue = 255 - steering = 1 - throttle = 3 - primary = 1 - secondary = 2 - team = 1 - scrdown = 5 - scrup = 4 - pick = 3 - vol = 0.8 - PUT #1, 1, swidth - PUT #1, 2, sheight - PUT #1, 3, fs - PUT #1, 7, blue - PUT #1, 10, steering - PUT #1, 11, throttle - PUT #1, 12, primary - PUT #1, 13, secondary - PUT #1, 15, team - PUT #1, 16, scrdown - PUT #1, 17, scrup - PUT #1, 18, pick - PUT #1, 19, vol -END IF -CLOSE #1 -electricicon& = _LOADIMAGE("electricicon.png") -premetal& = _LOADIMAGE("electricplane2.png") -brushedmetal& = _NEWIMAGE(swidth, sheight, 32) -_PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& -_FREEIMAGE premetal& -IF electricicon& THEN - _CLEARCOLOR _RGB(0, 0, 0), electricicon& - _ICON electricicon& - _FREEIMAGE electricicon& -END IF -IF fs = 1 THEN _FULLSCREEN -quartz& = _LOADFONT("segment14.otf", sheight / 24, "") -cyberbit& = _LOADFONT("cyberbit.ttf", sheight / 32, "") -_PRINTMODE _KEEPBACKGROUND -RANDOMIZE TIMER -TYPE control - number AS SINGLE - axis AS SINGLE '1 if axis, 0 if button -END TYPE -TYPE score - points AS INTEGER - losses AS INTEGER - total AS INTEGER -END TYPE -TYPE res - x AS INTEGER - y AS INTEGER - caption AS STRING * 64 -END TYPE -TYPE airplane - team AS INTEGER - x AS SINGLE - y AS SINGLE - dir AS SINGLE 'in degrees - force AS SINGLE - speed AS SINGLE - battery AS SINGLE - generator AS SINGLE - armor AS SINGLE - lasthit AS INTEGER - credits AS INTEGER - yaw AS SINGLE - market AS INTEGER - markettime AS INTEGER - waittime AS INTEGER - ammo AS INTEGER - ai AS INTEGER - maxbatt AS SINGLE - maxarm AS SINGLE - respawntime AS INTEGER - image AS LONG - blip AS LONG -END TYPE -TYPE aug - kind AS INTEGER - ifon AS INTEGER - energy AS SINGLE - fuel AS INTEGER 'only used for SRBs - ammo AS INTEGER 'only used for stackable mods -END TYPE -TYPE weapon - wep AS INTEGER - ifon AS INTEGER - firing AS INTEGER - remaining AS INTEGER - total AS INTEGER - ammo AS INTEGER - energy AS SINGLE - kind AS INTEGER -END TYPE -TYPE shot - x AS SINGLE - y AS SINGLE - dir AS SINGLE - fired AS INTEGER - kind AS INTEGER - speed AS INTEGER - damage AS SINGLE - shape AS INTEGER - color AS LONG - target AS INTEGER 'only used in Homing Plasma - charge AS INTEGER 'only used in charging weapons -END TYPE -TYPE missile - x AS SINGLE - y AS SINGLE - dir AS SINGLE - fired AS INTEGER - duration AS INTEGER - target AS INTEGER - kind AS INTEGER -END TYPE -TYPE debris - x AS SINGLE - y AS SINGLE - life AS INTEGER - dir AS SINGLE - speed AS SINGLE - image AS LONG - angle AS SINGLE - rotation AS SINGLE -END TYPE - -menumusic& = _SNDOPEN("not-from-this-world_z1Fsz8Su.ogg", "sync,vol") -_SNDVOL menumusic&, vol -IF menumusic& THEN _SNDPLAY menumusic& -DO - _LIMIT 60 - CLS - _PUTIMAGE (0, 0), brushedmetal& - _FONT quartz& - COLOR _RGB(255, 200, 0) - center "ELECTRIC", 1 - _FONT cyberbit& - COLOR _RGB(255, 255, 255) - center "Play", 4 - center "Options", 5 - center "Credits", 6 - center "Exit", 7 - IF specialstring$ = "funfact" THEN - center "Tell me a fun fact!", 8 - wot funfact$, 0, 9 * _FONTHEIGHT, swidth - END IF - _PRINTSTRING (0, sheight - _FONTHEIGHT), "v.1.0:0015" - IF menu(4) THEN - IF _SNDPLAYING(menumusic&) THEN _SNDSTOP menumusic& - env - IF menumusic& THEN _SNDPLAY menumusic& - END IF - IF menu(5) THEN - options - OPEN "electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) - GET #1, 19, vol - CLOSE #1 - IF menumusic& THEN _SNDVOL menumusic&, vol - premetal& = _LOADIMAGE("electricplane2.png") - brushedmetal& = _NEWIMAGE(swidth, sheight, 32) - _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, "") - END IF - IF menu(6) THEN credit - IF menu(7) THEN - CLS - _FONT 16 - IF quartz& > 0 THEN _FREEFONT (quartz&) - IF cyberbit& > 0 THEN _FREEFONT (cyberbit&) - IF brushedmetal& < -1 THEN _FREEIMAGE brushedmetal& - IF _SNDPLAYING(menumusic&) THEN _SNDSTOP menumusic& - _SNDCLOSE menumusic& - SYSTEM - END IF - IF specialstring$ = "funfact" THEN - IF menu(8) THEN funfact$ = getfact$ - ELSE - special$ = INKEY$ - IF special$ <> "" THEN specialstring$ = specialstring$ + special$ - IF LEN(specialstring$) >= 8 THEN specialstring$ = "" - END IF - clickonce - cursor - _DISPLAY -LOOP -_FREEFONT quartz& - -SUB credit -premetal& = _LOADIMAGE("electricplane2.png") -brushedmetal& = _NEWIMAGE(swidth, sheight, 32) -_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, "") -_FONT quartz& -center "CREDITS", 1 -_FONT cyberbit& -center "Programmer:", 4 -center "Patrick 'Cheese-Water' Marsee", 5 -center "In-Game Music:", 7 -center "N/A", 8 -center "Title Music:", 10 -center "Neil Cross", 11 -center "Other Stuff:", 13 -center "QB64 - IDE", 14 -center "GIMP - Graphics", 15 -center "sfxr - Sound Effects", 16 -center "Press any key to return.", 18 -_FONT 16 -_FREEFONT quartz& -_FREEFONT cyberbit& -_FREEIMAGE brushedmetal& -_DISPLAY -SLEEP -END SUB - -SUB center (text$, row%) 'centers text "text$" on row "row" -lentext% = _PRINTWIDTH(text$) -textheight% = _FONTHEIGHT -_PRINTSTRING ((swidth - lentext%) / 2, row% * textheight%), text$ -END SUB - -FUNCTION menu (choice%) 'draws the box around menu item if the mouse is over it, returns -1 if clicked. "choice" is the 16-pixel tall row, starting with 0. -DO - mousey% = _MOUSEY - click% = _MOUSEBUTTON(1) -LOOP WHILE _MOUSEINPUT -textheight% = _FONTHEIGHT -IF textheight% * choice% <= mousey% AND mousey% <= textheight% * choice% + textheight% - 1 THEN - LINE (0, textheight% * choice%)-(swidth - 1, textheight% * choice% + textheight% - 1), _RGB(255, 255, 255), B - IF ignore` = 0 AND click% THEN menu = -1: ignore` = -1 -END IF -END FUNCTION - -SUB wot (text$, startx%, starty%, endx%) 'Makes a small text box between "startx%" and "endx%" (pixels), and starting on "starty%" (pixels) that prints "text$". -changetext$ = text$ -textlen% = LEN(text$) -textwidth% = _PRINTWIDTH(text$) -textheight% = _FONTHEIGHT -linewidth% = endx% - startx% -numline% = 0 -DO WHILE textwidth% > linewidth% - a% = a% + 1 - IF _PRINTWIDTH(LEFT$(changetext$, a%)) > linewidth% THEN - FOR k% = a% TO 1 STEP -1 - IF MID$(changetext$, k%, 1) = " " THEN - textlen% = textlen% - k% - _PRINTSTRING (startx%, starty% + textheight% * numline%), LEFT$(changetext$, k%) - changetext$ = RIGHT$(changetext$, textlen%) - textwidth% = _PRINTWIDTH(changetext$) - numline% = numline% + 1 - a% = 0 - EXIT FOR - END IF - NEXT - END IF -LOOP -_PRINTSTRING (startx%, starty% + textheight% * numline%), changetext$ -END SUB - -FUNCTION controllerparse$ (part%, num%) -numdevice% = _DEVICES -IF num% <= numdevice% AND num% >= 1 THEN - DIM stringparts$(8) - numpart% = 0 - devicestring$ = _DEVICE$(num%) - FOR a% = 1 TO LEN(devicestring$) - b$ = MID$(devicestring$, a%, 1) - IF b$ = "[" THEN numpart% = numpart% + 1 - IF b$ <> "[" AND b$ <> "]" THEN stringparts$(numpart%) = stringparts$(numpart%) + b$ - NEXT - controllerparse$ = stringparts$(part%) -ELSE - controllerparse$ = "ERROR: No such controller!" -END IF -END FUNCTION - -SUB clickonce 'Placed at the end of a loop that uses mouse inputs to make sure it doesn't click multiple times while the mousebutton is held. -DO - click% = _MOUSEBUTTON(1) -LOOP WHILE _MOUSEINPUT -IF ignore` = -1 AND click% = 0 AND _KEYDOWN(27) = 0 THEN ignore` = 0 -END SUB - -FUNCTION trigger (x1%, y1%, x2%, y2%, x3%, y3%) 'Generates output if coordinates("x3", "y3") fall within ("x1", "y1")-("x2", "y2"). -IF x1% <= x3% AND x3% <= x2% AND y1% <= y3% AND y3% <= y2% THEN trigger = -1 -END FUNCTION - -FUNCTION pi 'It's pi. -pi = 4 * ATN(1) -END FUNCTION - -FUNCTION rad (degrees) 'Converts degrees to radians. -rad = degrees * pi / 180 -END FUNCTION - -FUNCTION deg (radians) 'Converts radians to degrees. -deg = radians / pi * 180 -END FUNCTION - -'FUNCTION mousedir (x, y) 'returns the angle of the mouse relative to coordinates("x", "y"). Not used in this program, but I keep it around in case that changes. -'DO -' mousex = _MOUSEX -' mousey = _MOUSEY -'LOOP WHILE _MOUSEINPUT -'distx = mousex - x -'disty = mousey - y -'angle = ATN(disty / distx) -'IF distx < 0 THEN angle = angle + rad(180) -'mousedir = angle -'END FUNCTION - -FUNCTION recolor& (image&, old~&, new~&) 'requires an image, the color to change, and the new color. -redo& = _COPYIMAGE(image&) 'makes a copy of the image so that it doesn't mess up the original one -_SOURCE image& 'set the source as the original image -_DEST redo& 'set the destination as the new image -FOR x% = 0 TO _WIDTH(image&) - 1 'loop all x values - FOR y% = 0 TO _HEIGHT(image&) - 1 'loop all y values - IF POINT(x%, y%) = old~& THEN PSET (x%, y%), new~& 'if the color at coordinates ("x", "y") = the old color, then make it the new color on the new image - NEXT 'close the y loop -NEXT 'close the x loop -recolor& = _COPYIMAGE(redo&) 'return the new image -_SOURCE 0 'set the source back to the main window -_DEST 0 'set the destination back to the main window -_FREEIMAGE redo& 'free the new image because we already returned it and this saves memory -END FUNCTION - -FUNCTION colorgreyspectrum& (image&, new~&) 'the secondary livery -change& = _COPYIMAGE(image&) -_SOURCE image& -_DEST change& -FOR x% = 0 TO _WIDTH(image&) - 1 - FOR y% = 0 TO _HEIGHT(image&) - 1 - FOR grey% = 0 TO 127 - IF POINT(x%, y%) = _RGB(grey%, grey%, grey%) THEN - red% = _RED32(new~&) * (grey% / 127) - green% = _GREEN32(new~&) * (grey% / 127) - blue% = _BLUE32(new~&) * (grey% / 127) - PSET (x%, y%), _RGB(red%, green%, blue%) - EXIT FOR - END IF - NEXT - FOR grey% = 128 TO 255 - IF POINT(x%, y%) = _RGB(grey%, grey%, grey%) THEN - red% = _RED32(new~&) + (255 - _RED32(new~&)) / 128 * (grey% - 127) - green% = _GREEN32(new~&) + (255 - _GREEN32(new~&)) / 128 * (grey% - 127) - blue% = _BLUE32(new~&) + (255 - _BLUE32(new~&)) / 128 * (grey% - 127) - PSET (x%, y%), _RGB(red%, green%, blue%) - EXIT FOR - END IF - NEXT - NEXT -NEXT -_DEST 0 -_SOURCE 0 -colorgreyspectrum& = _COPYIMAGE(change&) -_FREEIMAGE change& -END FUNCTION - -'FUNCTION darken& (image&, amount) 'Darkens image "image&" by "amount" amount -'redo& = _COPYIMAGE(image&) -'_SOURCE image& -'_DEST redo& -'FOR x% = 0 TO _WIDTH(image&) - 1 -' FOR y% = 0 TO _HEIGHT(image&) - 1 -' PSET (x%, y%), _RGB(_RED32(POINT(x, y)) / amount, _GREEN32(POINT(x, y)) / amount, _BLUE32(POINT(x, y)) \ amount) -' NEXT -'NEXT -'darken& = _COPYIMAGE(redo&) -'_SOURCE 0 -'_DEST 0 -'_FREEIMAGE redo& -'END FUNCTION - -FUNCTION shadow& (image&) 'Creates a shadow that looks like "image&", excluding black. -redo& = _NEWIMAGE(_WIDTH(image), _HEIGHT(image), 32) -_SOURCE image& -_DEST redo& -FOR x% = 0 TO _WIDTH(image&) - 1 - FOR y% = 0 TO _HEIGHT(image&) - 1 - oldcolor& = _RGB(_RED32(POINT(x%, y%)), _GREEN32(POINT(x%, y%)), _BLUE32(POINT(x%, y%))) - IF oldcolor& = _RGB(0, 0, 0) THEN PSET (x%, y%), _RGB(255, 255, 255) - IF oldcolor& <> _RGB(0, 0, 0) THEN PSET (x%, y%), _RGBA(0, 0, 0, 127) - NEXT -NEXT -_CLEARCOLOR _RGB(255, 255, 255), redo& -shadow& = _COPYIMAGE(redo&) -_SOURCE 0 -_DEST 0 -_FREEIMAGE redo& -END FUNCTION - -FUNCTION sinecolor% (outer AS INTEGER, inner AS INTEGER, x AS INTEGER, y AS INTEGER, sinx AS INTEGER, siny AS INTEGER) -IF outer = inner THEN - sinecolor% = outer -ELSE - IF inner > outer THEN - sinecolor% = (SIN(pi / x * sinx) + (SIN(pi / y * siny) - 1)) * (inner - outer) + outer - ELSE sinecolor% = (1 - (SIN(pi / x * sinx) + (SIN(pi / y * siny) - 1))) * (outer - inner) + inner - END IF -END IF -END FUNCTION - -FUNCTION blob& (x%, y%, outer~&, inner~&) 'generates the round sprites for explosions and the like -effect& = _NEWIMAGE(x%, y%, 32) -_DEST effect& -FOR sinx% = 0 TO x% - 1 - FOR siny% = 0 TO y% - 1 - PSET (sinx%, siny%), _RGBA(sinecolor%(_RED32(outer~&), _RED32(inner~&), x%, y%, sinx%, siny%), sinecolor%(_GREEN32(outer~&), _GREEN32(inner~&), x%, y%, sinx%, siny%), sinecolor%(_BLUE32(outer~&), _BLUE32(inner~&), x%, y%, sinx%, siny%), (SIN(pi / x% * sinx%) + (SIN(pi / y% * siny%) - 1)) * 255) - NEXT -NEXT -blob& = _COPYIMAGE(effect&) -_FREEIMAGE effect& -END FUNCTION - -SUB aimer (planes() AS airplane, plane%, numplanes%) 'The aimer mod. -angle = planes(plane%).dir -FOR a% = 1 TO numplanes% - IF planes(a%).team <> planes(plane%).team THEN - distx% = planes(a%).x - planes(plane%).x - disty% = planes(a%).y - planes(plane%).y - totaldist = SQR(distx% ^ 2 + disty% ^ 2) - newposx% = totaldist / 16 * planes(a%).speed * COS(planes(a%).dir) - newposy% = totaldist / 16 * planes(a%).speed * SIN(planes(a%).dir) - distx% = distx% + newposx% - disty% = disty% + newposy% - CIRCLE (distx% + planes(plane%).x + xoffset%, disty% + planes(plane%).y + yoffset%), 16, _RGB(255, 0, 0) - END IF -NEXT -LINE (planes(plane%).x + xoffset%, planes(plane%).y + yoffset%)-(planes(plane%).x + COS(planes(plane%).dir) * (swidth / 2 - 100) + xoffset%, planes(plane%).y + SIN(planes(plane%).dir) * (swidth / 2 - 100) + yoffset%), _RGB(255, 0, 0) -LINE (planes(plane%).x + xoffset%, planes(plane%).y + yoffset%)-(planes(plane%).x + COS(planes(plane%).dir - pi / 6) * (swidth / 2 - 100) + xoffset%, planes(plane%).y + SIN(planes(plane%).dir - pi / 6) * (swidth / 2 - 100) + yoffset%), _RGB(255, 0, 0) -LINE (planes(plane%).x + xoffset%, planes(plane%).y + yoffset%)-(planes(plane%).x + COS(planes(plane%).dir + pi / 6) * (swidth / 2 - 100) + xoffset%, planes(plane%).y + SIN(planes(plane%).dir + pi / 6) * (swidth / 2 - 100) + yoffset%), _RGB(255, 0, 0) -END SUB - -SUB converter (plane AS airplane, ifon%) 'The energy ==> armor mod. -IF plane.armor < plane.maxarm THEN - plane.armor = plane.armor + .01 * plane.maxarm / 10 -ELSE - ifon% = 0 -END IF -END SUB - -SUB srb (plane AS airplane, contrails%(), numcontrail%, booster AS aug) 'The solid rocket booster mod. -makecontrail plane.x, plane.y, contrails%(), numcontrail% -IF booster.fuel > 0 THEN - plane.speed = plane.speed + 0.05 - booster.fuel = booster.fuel - 1 -ELSE - booster.ammo = booster.ammo - 1 - IF booster.ammo > 0 THEN - booster.fuel = 180 - booster.ifon = 0 - ELSE - DIM blankspace AS aug - booster = blankspace - END IF -END IF -END SUB - -'SUB scope (plane AS airplane) The defunct scope mod, preserved for old times sake. -'screenanchorx% = plane.x + COS(plane.dir) * (sheight / 2 - 16) -'screenanchory% = plane.y + SIN(plane.dir) * (sheight / 2 - 16) -'xoffset% = -screenanchorx% + swidth / 2 - 100 -'yoffset% = -screenanchory% + sheight / 2 -'END SUB - -SUB flare (plane%, planes AS airplane, missiles() AS missile, nummissile%, flr AS aug, flares(), numflare%) 'The flare mod. -IF flr.ammo > 0 THEN - flr.ammo = flr.ammo - 1 - IF numflare% < 125 THEN - FOR j = 0 TO 3 - numflare% = numflare% + 1 - flares(numflare%, 0) = planes.x 'x position - flares(numflare%, 1) = planes.y 'y position - flares(numflare%, 2) = 0 'time - flaredirx = RND * 4 - 2 - flarediry = RND * 4 - 2 - flares(numflare%, 3) = ATN((SIN(planes.dir) * planes.speed + flarediry) / (COS(planes.dir) * planes.speed + flaredirx)) 'direction - IF COS(planes.dir) * planes.speed + flaredirx < 0 THEN flares(numflare%, 3) = flares(numflare%, 3) + pi - flares(numflare%, 4) = SQR((SIN(planes.dir) * planes.speed + flarediry) ^ 2 + (COS(planes.dir) * planes.speed + flaredirx) ^ 2) 'speed - NEXT - END IF - IF nummissile% > 0 THEN - FOR i = 1 TO nummissile% - IF missiles(i).target = plane% THEN - chance% = INT(RND * 5) - IF chance% <> 0 THEN missiles(i).target = -1 - END IF - NEXT - END IF - flr.ifon = 0 - IF flr.ammo <= 0 THEN - DIM blankspace AS aug - flr = blankspace - END IF -END IF -END SUB - -SUB makeshot (lazers() AS shot, numlazer%, plane AS airplane, fired%, shot%, position%, inmarket AS INTEGER) 'makes the specified "shot" in front of plane "plane", and makes the firing sound. -STATIC vulcansound% -IF numlazer% < 4999 THEN - SELECT CASE position% - CASE 1 - x = plane.x + COS(plane.dir) * 32 - y = plane.y + SIN(plane.dir) * 32 - CASE 2 - x = plane.x + COS(plane.dir) * 28 + COS(plane.dir + pi / 2) * 4 - y = plane.y + SIN(plane.dir) * 28 + SIN(plane.dir + pi / 2) * 4 - makeshot lazers(), numlazer%, plane, fired%, shot%, 6, inmarket - CASE 3 - x = plane.x + COS(plane.dir) * 24 + COS(plane.dir + pi / 2) * 8 - y = plane.y + SIN(plane.dir) * 24 + SIN(plane.dir + pi / 2) * 8 - makeshot lazers(), numlazer%, plane, fired%, shot%, 7, inmarket - CASE 6 - x = plane.x + COS(plane.dir) * 28 + COS(plane.dir - pi / 2) * 4 - y = plane.y + SIN(plane.dir) * 28 + SIN(plane.dir - pi / 2) * 4 - CASE 7 - x = plane.x + COS(plane.dir) * 24 + COS(plane.dir - pi / 2) * 8 - y = plane.y + SIN(plane.dir) * 24 + SIN(plane.dir - pi / 2) * 8 - END SELECT - numlazer% = numlazer% + 1 - lazers(numlazer%).x = x - lazers(numlazer%).y = y - lazers(numlazer%).dir = plane.dir - lazers(numlazer%).fired = fired% - lazers(numlazer%).kind = shot% - SELECT CASE shot% - CASE 1 - IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 THEN - zap& = _SNDOPEN("laser.wav", "sync") - IF zap& THEN _SNDPLAY zap& - _SNDCLOSE zap& - END IF - lazers(numlazer%).speed = 16 - lazers(numlazer%).damage = .5 - lazers(numlazer%).shape = 0 - lazers(numlazer%).color = _RGB(255, 0, 0) - CASE 2 - lazers(numlazer%).dir = lazers(numlazer%).dir + rad(RND * 4 - 2) - vulcansound% = vulcansound% + 1 - IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 AND vulcansound% >= 5 THEN - zap& = _SNDOPEN("shoot.wav", "sync") - IF zap& THEN _SNDPLAY zap& - _SNDCLOSE zap& - vulcansound% = vulcansound% - 5 - END IF - lazers(numlazer%).speed = 20 - lazers(numlazer%).damage = .05 - lazers(numlazer%).shape = 1 - lazers(numlazer%).color = _RGB(0, 0, 0) - CASE 3 - lazers(numlazer%).speed = 16 - lazers(numlazer%).damage = .25 - lazers(numlazer%).shape = 2 - lazers(numlazer%).color = _RGB(0, 100, 200) - FOR spread% = 0 TO 1 - numlazer% = numlazer% + 1 - lazers(numlazer%).x = x - lazers(numlazer%).y = y - lazers(numlazer%).dir = plane.dir - pi / 6 + spread% * pi / 3 - lazers(numlazer%).fired = fired% - lazers(numlazer%).kind = 3 - lazers(numlazer%).speed = 16 - lazers(numlazer%).damage = .25 - lazers(numlazer%).shape = 2 - lazers(numlazer%).color = _RGB(0, 100, 200) - NEXT - IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 THEN - zap& = _SNDOPEN("laser.wav", "sync") - IF zap& THEN _SNDPLAY zap& - _SNDCLOSE zap& - END IF - CASE 4 - lazers(numlazer%).speed = 18 - lazers(numlazer%).damage = 1 - lazers(numlazer%).shape = 3 - lazers(numlazer%).color = _RGB(0, 255, 0) - IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 THEN - zap& = _SNDOPEN("plasma.wav", "sync") - IF zap& THEN _SNDPLAY zap& - _SNDCLOSE zap& - END IF - CASE 5 - lazers(numlazer%).dir = lazers(numlazer%).dir + rad(RND * 4 - 2) - IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 THEN - zap& = _SNDOPEN("gauss.wav", "sync") - IF zap& THEN _SNDPLAY zap& - _SNDCLOSE zap& - END IF - lazers(numlazer%).speed = 20 - lazers(numlazer%).damage = .05 - lazers(numlazer%).shape = 1 - lazers(numlazer5).color = _RGB(0, 0, 0) - FOR spread% = 0 TO 6 - numlazer% = numlazer% + 1 - lazers(numlazer%).x = x - lazers(numlazer%).y = y - lazers(numlazer%).dir = plane.dir + rad(RND * 4 - 2) - lazers(numlazer%).fired = fired% - lazers(numlazer%).kind = 5 - lazers(numlazer%).speed = 20 - lazers(numlazer%).damage = .05 - lazers(numlazer%).shape = 1 - lazers(numlazer%).color = _RGB(0, 0, 0) - NEXT - CASE 6 - lazers(numlazer%).dir = lazers(numlazer%).dir + rad(RND * 4 - 2) - vulcansound% = vulcansound% + 1 - IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 AND vulcansound% >= 5 THEN - zap& = _SNDOPEN("shoot.wav", "sync") - IF zap& THEN _SNDPLAY zap& - _SNDCLOSE zap& - vulcansound% = vulcansound% - 5 - END IF - lazers(numlazer%).speed = 20 - lazers(numlazer%).damage = .1 - lazers(numlazer%).shape = 1 - lazers(numlazer%).color = _RGB(0, 0, 0) - plane.speed = plane.speed - .01 - END SELECT -END IF -END SUB - -SUB makecharge (lazers() AS shot, numlazer%, plane%, planes() AS airplane, shot%, power, position%, numplanes%) 'basically makeshot for charging weapons -IF numlazer% < 4999 THEN - SELECT CASE position% - CASE 1 - x = planes(plane%).x + COS(planes(plane%).dir) * 16 - y = planes(plane%).y + SIN(planes(plane%).dir) * 16 - CASE 2 - x = planes(plane%).x + COS(planes(plane%).dir) * 12 + COS(planes(plane%).dir + pi / 2) * 4 - y = planes(plane%).y + SIN(planes(plane%).dir) * 12 + SIN(planes(plane%).dir + pi / 2) * 4 - makecharge lazers(), numlazer%, plane%, planes(), shot%, power, 6, numplanes% - CASE 3 - x = planes(plane%).x + COS(planes(plane%).dir) * 8 + COS(planes(plane%).dir + pi / 2) * 8 - y = planes(plane%).y + SIN(planes(plane%).dir) * 8 + SIN(planes(plane%).dir + pi / 2) * 8 - makecharge lazers(), numlazer%, plane%, planes(), shot%, power, 7, numplanes% - CASE 6 - x = planes(plane%).x + COS(planes(plane%).dir) * 12 + COS(planes(plane%).dir - pi / 2) * 4 - y = planes(plane%).y + SIN(planes(plane%).dir) * 12 + SIN(planes(plane%).dir - pi / 2) * 4 - CASE 7 - x = planes(plane%).x + COS(planes(plane%).dir) * 8 + COS(planes(plane%).dir - pi / 2) * 8 - y = planes(plane%).y + SIN(planes(plane%).dir) * 8 + SIN(planes(plane%).dir - pi / 2) * 8 - END SELECT - numlazer% = numlazer% + 1 - lazers(numlazer%).x = x - lazers(numlazer%).y = y - lazers(numlazer%).dir = planes(plane%).dir - lazers(numlazer%).fired = plane% - lazers(numlazer%).kind = shot% - lazers(numlazer%).charge = power * 5 - SELECT CASE shot% - CASE 7 - lazers(numlazer%).speed = 12 - lazers(numlazer%).shape = 3 - lazers(numlazer%).color = _RGB(0, 255, 0) - lazers(numlazer%).target = -1 - IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight THEN - zap& = _SNDOPEN("bolt.wav", "sync") - IF zap& THEN _SNDPLAY zap& - _SNDCLOSE zap& - END IF - smallangle = pi / 4 - FOR k% = 0 TO numplanes% - IF planes(k%).team <> planes(plane%).team OR planes(k%).armor <> 0 THEN - distx% = planes(k%).x - lazers(numlazer%).x - disty% = planes(k%).y - lazers(numlazer%).y - dist = SQR(distx% ^ 2 + disty% ^ 2) - angle2 = ATN(disty% / distx%) - IF distx% < 0 THEN angle2 = angle2 + pi - IF angle2 < 0 THEN angle2 = angle2 + 2 * pi - angledist = ABS(lazers(numlazer%).dir - angle2) - IF angledist <= pi / 6 AND dist > 48 AND angledist < smallangle THEN - smallangle = angledist - lazers(numlazer%).target = k% - END IF - END IF - NEXT - CASE 8 - lazers(numlazer%).speed = 16 - lazers(numlazer%).shape = 4 - lazers(numlazer%).color = _RGB(127, 0, 255) - IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight THEN - zap& = _SNDOPEN("bolt.wav", "sync") - IF zap& THEN _SNDPLAY zap& - _SNDCLOSE zap& - END IF - END SELECT -END IF -END SUB - -SUB makemissile (missiles() AS missile, nummissile%, plane%, planes() AS airplane, shot%, numplanes%) 'makes the specified missile "shot" in front of plane "plane", makes the firing sound, and chooses its target. -IF nummissile% < 49 THEN - nummissile% = nummissile% + 1 - missiles(nummissile%).x = planes(plane%).x - missiles(nummissile%).y = planes(plane%).y - IF missiles(nummissile%).x + xoffset% > 0 AND missiles(nummissile%).x + xoffset% < swidth - 200 AND missiles(nummissile%).y + yoffset% > 0 AND missiles(nummissile%).y + yoffset% < sheight THEN - whoosh& = _SNDOPEN("missile.wav", "sync") - IF whoosh& THEN _SNDPLAY whoosh& - _SNDCLOSE whoosh& - END IF - missiles(nummissile%).dir = planes(plane%).dir - missiles(nummissile%).fired = plane% - missiles(nummissile%).duration = 0 - missiles(nummissile%).target = -1 - missiles(nummissile%).kind = shot% - smallangle = pi / 4 - FOR k% = 0 TO numplanes% - IF planes(k%).team <> planes(plane%).team OR planes(k%).armor > 0 THEN - distx% = planes(k%).x - missiles(nummissile%).x - disty% = planes(k%).y - missiles(nummissile%).y - dist = SQR(distx% ^ 2 + disty% ^ 2) - angle2 = ATN(disty% / distx%) ' In this case, there is no angle1. angle2 is the angle between the missile and its target. - IF distx% < 0 THEN angle2 = angle2 + pi - IF angle2 < 0 AND missiles(nummissile%).dir >= pi / 6 AND missiles(nummissile%).dir <= 11 * pi / 6 THEN 'When I refer to "fixing" an angle, I mean to add 2 * pi if it's negative. - angle2 = angle2 + 2 * pi ' only fix angle2 if the missile isn't pinting east. - ELSE IF missiles(nummissile%).dir > 11 * pi / 6 THEN missiles(nummissile%).dir = missiles(nummissile%).dir - 2 * pi 'if it is pointing east, un-fix the missile's angle instead. - END IF - angledist = ABS(missiles(nummissile%).dir - angle2) - IF angledist <= pi / 6 AND dist > 48 AND angledist < smallangle THEN - smallangle = angledist - missiles(nummissile%).target = k% - END IF - END IF - NEXT -END IF -END SUB - -SUB lazer (lazers() AS shot, planes() AS airplane, points() AS score, numlazer%, explosions%(), numexplosion%, numplanes%, difficulty, plas&, spread&, pulse&, mods() AS aug, debriss() AS debris, numdebris%) 'Handles all of the bullets and their collisions. Note: When I discovered that it should be spelled "laser," it was already too late. It would have taken hours to change all the references to "lazer," "makelazer," "numlazer," and "lazers()." -IF numlazer% > 0 THEN - FOR k% = 1 TO numlazer% - lazers(k%).x = lazers(k%).x + COS(lazers(k%).dir) * lazers(k%).speed - lazers(k%).y = lazers(k%).y + SIN(lazers(k%).dir) * lazers(k%).speed - SELECT CASE lazers(k%).shape - CASE 0: LINE (lazers(k%).x + xoffset%, lazers(k%).y + yoffset%)-(lazers(k%).x - COS(lazers(k%).dir) * 16 + xoffset%, lazers(k%).y - SIN(lazers(k%).dir) * 16 + yoffset%), lazers(k%).color - CASE 1: LINE (lazers(k%).x + xoffset%, lazers(k%).y + yoffset%)-(lazers(k%).x + xoffset% + 1, lazers(k%).y + yoffset% + 1), lazers(k%).color, BF - CASE 2: _PUTIMAGE (lazers(k%).x - 4 + xoffset%, lazers(k%).y - 4 + yoffset%), spread& - CASE 3: _PUTIMAGE (lazers(k%).x - 4 + xoffset%, lazers(k%).y - 4 + yoffset%), plas& - CASE 4: _PUTIMAGE (lazers(k%).x - 4 + xoffset%, lazers(k%).y - 4 + yoffset%), pulse& - END SELECT - FOR p% = 0 TO numplanes% - IF trigger(planes(p%).x - 16, planes(p%).y - 16, planes(p%).x + 15, planes(p%).y + 15, lazers(k%).x, lazers(k%).y) AND planes(p%).armor > 0 AND p% <> lazers(k%).fired THEN - IF lazers(k%).x + xoffset% > 0 AND lazers(k%).x + xoffset% < swidth - 200 AND lazers(k%).y + yoffset% > 0 AND lazers(k%).y + yoffset% < sheight THEN - hit& = _SNDOPEN("hit.wav", "sync") - IF hit& <> 0 THEN _SNDPLAY hit& - _SNDCLOSE hit& - END IF - IF planes(p%).team <> planes(lazers(k%).fired).team THEN - planes(p%).lasthit = lazers(k%).fired - ELSE - IF planes(p%).team = 0 AND lazers(k%).fired = 0 THEN PRINT "Hey, Einstein! I'm on your side!" - END IF - planes(p%).armor = planes(p%).armor - lazers(k%).damage - makeexplosion lazers(k%).x, lazers(k%).y, explosions%(), numexplosion%, 15, 0 - IF lazers(k%).kind <> 8 THEN removeshot lazers(), k%, numlazer% - IF lazers(k%).kind = 8 THEN lazers(k%).charge = lazers(k%).charge * 2 - crash planes(), explosions%(), points(), numexplosion%, numplanes%, difficulty, mods(), debriss(), numdebris% - END IF - NEXT - IF lazers(k%).x < 0 OR lazers(k%).x > 4095 OR lazers(k%).y < 0 OR lazers(k%).y > 4095 THEN removeshot lazers(), k%, numlazer% - NEXT -END IF -END SUB - -SUB charge (lazers() AS shot, planes() AS airplane, numlazer%) 'Like lazer, but for charged shots -IF numlazer% > 0 THEN - FOR k% = 1 TO numlazer% - IF lazers(k%).kind = 7 OR lazers(k%).kind = 8 THEN - lazers(k%).damage = lazers(k%).charge / 100 - IF lazers(k%).kind = 7 THEN - IF lazers(k%).target <> -1 THEN - angle = lazers(k%).dir - distx% = planes(lazers(k%).target).x - lazers(k%).x - disty% = planes(lazers(k%).target).y - lazers(k%).y - angle2 = ATN(disty% / distx%) - IF distx% < 0 THEN angle2 = angle2 + pi - IF angle2 < 0 THEN angle2 = angle2 + 2 * pi - IF ABS(angle - angle2) > rad(3) THEN - IF angle >= pi THEN - IF angle - angle2 < pi AND angle - angle2 > 0 THEN lazers(k%).dir = lazers(k%).dir - rad(1.5) ELSE lazers(k%).dir = lazers(k%).dir + rad(1.5) - END IF - IF angle < pi THEN - IF angle2 - angle < pi AND angle2 - angle > 0 THEN lazers(k%).dir = lazers(k%).dir + rad(1.5) ELSE lazers(k%).dir = lazers(k%).dir - rad(1.5) - END IF - END IF - IF lazers(k%).dir >= 2 * pi THEN lazers(k%).dir = 0 - IF lazers(k%).dir < 0 THEN lazers(k%).dir = lazers(k%).dir + 2 * pi - END IF - END IF - IF lazers(k%).charge <= 0 THEN removeshot lazers(), k%, numlazer% - lazers(k%).charge = lazers(k%).charge - 1 - END IF - NEXT -END IF -END SUB - -SUB removeshot (lazers() AS shot, k%, numlazer%) 'removes bullets after they hit stuff -FOR a% = k% TO numlazer% - lazers(a%) = lazers(a% + 1) -NEXT -numlazer% = numlazer% - 1 -END SUB - -SUB missile (missiles() AS missile, planes() AS airplane, points() AS score, nummissile%, contrails%(), numcontrail%, image&, explosions%(), numexplosion%, numplanes%, difficulty, mods() AS aug, debriss() AS debris, numdebris%) 'Handles missiles and their collisions. -IF nummissile% > 0 THEN - FOR k% = 1 TO nummissile% - IF graphsetting = 1 THEN makecontrail missiles(k%).x, missiles(k%).y, contrails%(), numcontrail% - missiles(k%).x = missiles(k%).x + COS(missiles(k%).dir) * 16 - missiles(k%).y = missiles(k%).y + SIN(missiles(k%).dir) * 16 - makecontrail missiles(k%).x, missiles(k%).y, contrails%(), numcontrail% - IF missiles(k%).target <> -1 THEN - angle = missiles(k%).dir - distx% = planes(missiles(k%).target).x - missiles(k%).x - disty% = planes(missiles(k%).target).y - missiles(k%).y - IF missiles(k%).kind = 10 THEN - totaldist = SQR(distx% ^ 2 + disty% ^ 2) - newposx% = totaldist / 16 * planes(missiles(k%).target).speed * COS(planes(missiles(k%).target).dir) - newposy% = totaldist / 16 * planes(missiles(k%).target).speed * SIN(planes(missiles(k%).target).dir) - distx% = distx% + newposx% - disty% = disty% + newposy% - END IF - CIRCLE (distx% + missiles(k%).x + xoffset%, disty% + missiles(k%).y + yoffset%), 16, _RGB(255, 0, 0) - IF missiles(k%).target = 0 THEN _PRINTSTRING (swidth / 2 - 100 - _PRINTWIDTH("MISSILE INCOMING!"), sheight / 2 - 32), "MISSILE INCOMING!" - angle2 = ATN(disty% / distx%) - IF distx% < 0 THEN angle2 = angle2 + pi - IF angle2 < 0 THEN angle2 = angle2 + 2 * pi - IF missiles(k%).kind = 11 THEN turn = .5 ELSE turn = 1.5 - IF ABS(angle - angle2) > rad(3) THEN - IF angle >= pi THEN - IF angle - angle2 < pi AND angle - angle2 > 0 THEN missiles(k%).dir = missiles(k%).dir - rad(turn) ELSE missiles(k%).dir = missiles(k%).dir + rad(turn) - END IF - IF angle < pi THEN - IF angle2 - angle < pi AND angle2 - angle > 0 THEN missiles(k%).dir = missiles(k%).dir + rad(turn) ELSE missiles(k%).dir = missiles(k%).dir - rad(turn) - END IF - END IF - IF missiles(k%).dir >= 2 * pi THEN missiles(k%).dir = 0 - IF missiles(k%).dir < 0 THEN missiles(k%).dir = missiles(k%).dir + 2 * pi - END IF - rotator missiles(k%).x + xoffset%, missiles(k%).y + yoffset%, missiles(k%).dir, image&, 0, 0, 15, 15, 16 - IF missiles(k%).kind <> 11 THEN - FOR p% = 0 TO numplanes% - IF trigger(planes(p%).x - 16, planes(p%).y - 16, planes(p%).x + 15, planes(p%).y + 15, missiles(k%).x, missiles(k%).y) AND planes(p%).armor > 0 AND p% <> missiles(k%).fired THEN - IF missiles(k%).x + xoffset% > 0 AND missiles(k%).x + xoffset% < swidth - 200 AND missiles(k%).y + yoffset% > 0 AND missiles(k%).y + yoffset% < sheight THEN - hit& = _SNDOPEN("missilehit.wav", "sync") - IF hit& <> 0 THEN _SNDPLAY hit& - _SNDCLOSE hit& - END IF - IF planes(p%).team <> planes(missiles(k%).fired).team THEN - planes(p%).lasthit = missiles(k%).fired - ELSE - IF planes(p%).team = 0 AND missiles(k%).fired = 0 THEN PRINT "Hey, Einstein! I'm on your side!" - END IF - planes(p%).armor = planes(p%).armor - 5 - makeexplosion missiles(k%).x, missiles(k%).y, explosions%(), numexplosion%, 30, 0 - removemissile missiles(), k%, nummissile% - crash planes(), explosions%(), points(), numexplosion%, numplanes%, difficulty, mods(), debriss(), numdebris% - END IF - NEXT - ELSE - IF missiles(k%).target <> -1 THEN - angle = angle + 180 - angle2 = angle2 + 180 - IF ABS(angle - angle2) >= pi / 2 THEN - FOR p% = 0 TO numplanes% - distx% = planes(p%).x - missiles(k%).x - disty% = planes(p%).y - missiles(k%).y - totaldist = SQR(distx% ^ 2 + disty% ^ 2) - IF totaldist < 300 THEN - hit& = _SNDOPEN("cruze.wav", "sync") - IF hit& <> 0 THEN _SNDPLAY hit& - _SNDCLOSE hit& - planes(p%).armor = planes(p%).armor - (30 - totaldist / 10) - IF planes(p%).team <> planes(missiles(k%).fired).team THEN - planes(p%).lasthit = missiles(k%).fired - ELSE - IF planes(p%).team = 0 AND missiles(k%).fired = 0 THEN PRINT "Hey, Einstein! I'm on your side!" - END IF - END IF - NEXT - makeexplosion missiles(k%).x, missiles(k%).y, explosions%(), numexplosion%, 120, 1 - removemissile missiles(), k%, nummissile% - crash planes(), explosions%(), points(), numexplosion%, numplanes%, difficulty, mods(), debriss(), numdebris% - END IF - END IF - END IF - missiles(k%).duration = missiles(k%).duration + 1 - IF missiles(k%).x < 0 OR missiles(k%).x > 4095 OR missiles(k%).y < 0 OR missiles(k%).y > 4095 THEN removemissile missiles(), k%, nummissile% - IF missiles(k%).kind = 9 THEN IF missiles(k%).duration >= 180 THEN removemissile missiles(), k%, nummissile% - IF missiles(k%).kind = 10 THEN IF missiles(k%).duration >= 360 THEN removemissile missiles(), k%, nummissile% - IF missiles(k%).kind = 11 THEN IF missiles(k%).duration >= 540 THEN removemissile missiles(), k%, nummissile% - NEXT -END IF -END SUB - -SUB removemissile (missiles() AS missile, k%, nummissile%) 'Removes missiles. -FOR a% = k% TO nummissile% - missiles(a%) = missiles(a% + 1) -NEXT -missiles(nummissile%).target = -1 -nummissile% = nummissile% - 1 -END SUB - -SUB makecontrail (x%, y%, contrails%(), numcontrail%) 'Makes smoke puffs. -IF numcontrail% < 4999 THEN - numcontrail% = numcontrail% + 1 - contrails%(numcontrail%, 0) = x% - contrails%(numcontrail%, 1) = y% - contrails%(numcontrail%, 2) = 0 -END IF -END SUB - -SUB makeexplosion (x%, y%, explosions%(), numexplosion%, duration%, kind%) 'Makes the explosions. -IF numexplosion% < 199 THEN - numexplosion% = numexplosion% + 1 - explosions%(numexplosion%, 0) = x% ' x position - explosions%(numexplosion%, 1) = y% ' y position - explosions%(numexplosion%, 2) = 0 ' time in existence - explosions%(numexplosion%, 3) = duration% ' end of life - explosions%(numexplosion%, 4) = kind% ' kind of explostion -END IF -END SUB - -SUB maketrail (x%, y%, trails%(), numtrail%, wing%) -IF numtrail% < 999 THEN - numtrail% = numtrail% + 1 - trails%(numtrail%, 0) = x% ' x position - trails%(numtrail%, 1) = y% ' y position - trails%(numtrail%, 2) = 0 ' time in existence - trails%(numtrail%, 3) = wing% ' wing to follow -END IF -END SUB - -SUB makedebris (plane AS airplane, debriss() AS debris, numdebris%) -IF numdebris% <= 252 THEN - FOR k = 0 TO 3 - numdebris% = numdebris% + 1 - debriss(numdebris%).x = plane.x - debriss(numdebris%).y = plane.y - debriss(numdebris%).life = 0 'time in existence - debrisdirx = RND * 4 - 2 - debrisdiry = RND * 4 - 2 - debriss(numdebris%).dir = ATN((SIN(plane.dir) * plane.speed + debrisdiry) / (COS(plane.dir) * plane.speed + debrisdirx)) 'direction - IF COS(plane.dir) * plane.speed + debrisdirx < 0 THEN debriss(numdebris%).dir = debriss(numdebris%).dir + pi - debriss(numdebris%).speed = SQR((SIN(plane.dir) * plane.speed + debrisdiry) ^ 2 + (COS(plane.dir) * plane.speed + debrisdirx) ^ 2) 'speed - debriss(numdebris%).image = _NEWIMAGE(_HEIGHT(plane.image) / 2, _HEIGHT(plane.image) / 2, 32) 'use height for both since we want a square - SELECT CASE k - 'remember that the image of the plane that we want is a square in the center of plane.image, not the whole thing - CASE 0: _PUTIMAGE , plane.image, debriss(numdebris%).image, (64, 0)-STEP(15, 15) - CASE 1: _PUTIMAGE , plane.image, debriss(numdebris%).image, (64 + _HEIGHT(plane.image) / 2, 0)-STEP(15, 15) - CASE 2: _PUTIMAGE , plane.image, debriss(numdebris%).image, (64, _HEIGHT(plane.image) / 2)-STEP(15, 15) - CASE 3: _PUTIMAGE , plane.image, debriss(numdebris%).image, (64 + _HEIGHT(plane.image) / 2, _HEIGHT(plane.image) / 2)-STEP(15, 15) - END SELECT - debriss(numdebris%).angle = debriss(numdebriss%).dir - debriss(numdebris%).rotation = RND * 4 - 2 - NEXT -END IF -END SUB - -SUB contrail (contrails%(), numcontrail%, contraileffect&) 'makes the smoke puffs wiggle, and removes them when it's time. -IF numcontrail% > 0 THEN - FOR k% = 1 TO numcontrail% - contrails%(k%, 0) = contrails%(k%, 0) + INT(RND * 3) - 1 - contrails%(k%, 1) = contrails%(k%, 1) + INT(RND * 3) - 1 - contrails%(k%, 2) = contrails%(k%, 2) + 1 - IF graphsetting = 0 AND contrails%(k%, 2) >= 60 THEN remove contrails%(), k%, numcontrail%, 2 - IF contrails%(k%, 2) >= 180 THEN remove contrails%(), k%, numcontrail%, 2 - IF contrails%(k%, 0) + xoffset% > 0 AND contrails%(k%, 0) + xoffset% < swidth - 200 AND contrails%(k%, 1) + yoffset% > 0 AND contrails%(k%, 1) + yoffset% < sheight THEN - _PUTIMAGE (contrails%(k%, 0) + xoffset% - 8, contrails%(k%, 1) + yoffset% - 8), contraileffect& - END IF - NEXT -END IF -END SUB - -SUB explosion (explosions%(), numexplosion%, explosioneffect&) 'Makes the explosions animate, and removes them when it's time. -IF numexplosion% > 0 THEN - FOR k% = 1 TO numexplosion% - IF explosions%(k%, 0) + xoffset% > 0 AND explosions%(k%, 0) + xoffset% < swidth - 200 AND explosions%(k%, 1) + yoffset% > 0 AND explosions%(k%, 1) + yoffset% < sheight THEN - IF explosions%(k%, 4) = 0 THEN - _PUTIMAGE (explosions%(k%, 0) + xoffset% - explosions%(k%, 2), explosions%(k%, 1) + yoffset% - explosions%(k%, 2))-(explosions%(k%, 0) + xoffset% + explosions%(k%, 2) - 1, explosions%(k%, 1) + yoffset% + explosions%(k%, 2) - 1), explosioneffect& - END IF - IF explosions%(k%, 4) = 1 THEN - LINE (0, 0)-(swidth - 201, sheight - 1), _RGBA(0, 0, 0, 127 - (explosions%(k%, 2) / explosions%(k%, 3) * 127)), BF - IF explosions%(k%, 2) <= 30 THEN LINE (0, 0)-(swidth - 201, sheight - 1), _RGBA(255, 255, 255, 255 - (explosions%(k%, 2) / 30 * 255)), BF - END IF - END IF - explosions%(k%, 2) = explosions%(k%, 2) + 1 - IF explosions%(k%, 2) >= explosions%(k%, 3) THEN remove explosions%(), k%, numexplosion%, 4 - NEXT -END IF -END SUB - -SUB trail (trails%(), numtrail%, numplanes%) -DIM traillinks(32, 32) AS INTEGER -IF numtrail% > 0 THEN - FOR p% = 0 TO numplanes% * 2 + 1 '# of wings - numlink% = 0 - FOR k% = 1 TO numtrail% - IF trails%(k%, 3) = p% THEN - traillinks(p%, numlink%) = k% - numlink% = numlink% + 1 - IF numlink% >= 30 THEN numlink% = 30 - END IF - NEXT - IF numlink% > 0 THEN - FOR l% = 1 TO numlink% - 1 - IF trails%(traillinks(p%, l%), 0) + xoffset% > 0 AND trails%(traillinks(p%, l%), 0) + xoffset% < swidth - 200 AND trails%(traillinks(p%, l%), 1) + yoffset% > 0 AND trails%(traillinks(p%, l%), 1) + yoffset% < sheight THEN - IF trails%(traillinks(p%, l%), 2) >= trails%(traillinks(p%, l% - 1), 2) - 2 THEN LINE (trails%(traillinks(p%, l%), 0) + xoffset%, trails%(traillinks(p%, l%), 1) + yoffset%)-(trails%(traillinks(p%, l% - 1), 0) + xoffset%, trails%(traillinks(p%, l% - 1), 1) + yoffset%), _RGB(191, 191, 191) - END IF - NEXT - END IF - NEXT - FOR a% = 1 TO numtrail% - trails%(a%, 2) = trails%(a%, 2) + 1 - IF trails%(a%, 2) >= 30 THEN remove trails%(), a%, numtrail%, 3 - NEXT -END IF -END SUB - -SUB flareeffect (flares(), numflare%, contrails%(), numcontrail%, flareimage&) -IF numflare% > 0 THEN - FOR i = 1 TO numflare% - flares(i, 0) = flares(i, 0) + COS(flares(i, 3)) * flares(i, 4) - flares(i, 1) = flares(i, 1) + SIN(flares(i, 3)) * flares(i, 4) - _PUTIMAGE (flares(i, 0) - 4 + xoffset%, flares(i, 1) - 4 + yoffset%), flareimage& - makecontrail flares(i, 0), flares(i, 1), contrails%(), numcontrail% - flares(i, 2) = flares(i, 2) + 1 - IF flares(i, 2) >= 60 THEN - FOR b = i TO numflare% - FOR a = 0 TO 4 - flares(b, a) = flares(b + 1, a) - NEXT - NEXT - numflare% = numflare% - 1 - END IF - NEXT -END IF -END SUB - -SUB debriseffect (debriss() AS debris, numdebris%, explosions%(), numexplosion%) -IF numdebris% > 0 THEN - FOR i = 1 TO numdebris% - debriss(i).x = debriss(i).x + COS(debriss(i).dir) * debriss(i).speed - debriss(i).y = debriss(i).y + SIN(debriss(i).dir) * debriss(i).speed - debriss(i).angle = debriss(i).angle + (debriss(i).rotation / 60) - rotator debriss(i).x + xoffset%, debriss(i).y + yoffset%, debriss(i).angle, debriss(i).image, 0, 0, 15, 15, 16 - IF debriss(i).life / 5 = debriss(i).life \ 5 THEN makeexplosion debriss(i).x, debriss(i).y, explosions%(), numexplosion%, 15, 0 - IF debriss(i).life >= 60 THEN - FOR a = i TO numdebris% - debriss(i) = debriss(i + 1) - NEXT - numdebris% = numdebris% - 1 - END IF - debriss(i).life = debriss(i).life + 1 - NEXT -END IF -END SUB - -SUB remove (object%(), num%, maxnum%, dims%) 'removes things -FOR b% = 0 TO dims% - FOR a% = num% TO maxnum% - object%(a%, b%) = object%(a% + 1, b%) - NEXT -NEXT -maxnum% = maxnum% - 1 -END SUB - -SUB cursor 'makes the little circle mouse pointer. -DO - mousex% = _MOUSEX - mousey% = _MOUSEY -LOOP WHILE _MOUSEINPUT -CIRCLE (mousex%, mousey%), 2, _RGB(255, 255, 255) -END SUB - -SUB env 'the main body of the game. -CLS -center "Loading...", 4 -_DISPLAY -DIM topo%(15, 15) -DIM ground&(43) -ground&(0) = _LOADIMAGE("grass03.png") -ground&(1) = _LOADIMAGE("woods02.png") -'ground&(2) = _LOADIMAGE("water.png") -ground&(3) = _LOADIMAGE("blendgrasswoodsbottomright.png") -ground&(4) = _LOADIMAGE("blendgrasswoodsbottomleft.png") -ground&(5) = _LOADIMAGE("blendgrasswoodstopright.png") -ground&(6) = _LOADIMAGE("blendgrasswoodstopleft.png") -ground&(7) = _LOADIMAGE("blendgrasswoodsbottom.png") -ground&(8) = _LOADIMAGE("blendgrasswoodsleft.png") -ground&(9) = _LOADIMAGE("blendgrasswoodstop.png") -ground&(10) = _LOADIMAGE("blendgrasswoodsright.png") -ground&(11) = _LOADIMAGE("blendgrasswoodstopright2.png") -ground&(12) = _LOADIMAGE("blendgrasswoodsbottomright2.png") -ground&(13) = _LOADIMAGE("blendgrasswoodsbottomleft2.png") -ground&(14) = _LOADIMAGE("blendgrasswoodstopleft2.png") -ground&(15) = _LOADIMAGE("blendgrasswoodsubottom.png") -ground&(16) = _LOADIMAGE("blendgrasswoodsuleft.png") -ground&(17) = _LOADIMAGE("blendgrasswoodsutop.png") -ground&(18) = _LOADIMAGE("blendgrasswoodsuright.png") -ground&(19) = _LOADIMAGE("blendgrasswoodscornerstop.png") -ground&(20) = _LOADIMAGE("blendgrasswoodscornersright.png") -ground&(21) = _LOADIMAGE("blendgrasswoodscornersbottom.png") -ground&(22) = _LOADIMAGE("blendgrasswoodscornersleft.png") -ground&(23) = _LOADIMAGE("blendgrasswoodsclearing.png") -ground&(24) = _LOADIMAGE("blendgrasswoodstopbottomright.png") -ground&(25) = _LOADIMAGE("blendgrasswoodstopbottomleft.png") -ground&(26) = _LOADIMAGE("blendgrasswoodsbottomtopright.png") -ground&(27) = _LOADIMAGE("blendgrasswoodsbottomtopleft.png") -ground&(28) = _LOADIMAGE("blendgrasswoodsrightbottomleft.png") -ground&(29) = _LOADIMAGE("blendgrasswoodsrighttopleft.png") -ground&(30) = _LOADIMAGE("blendgrasswoodsleftbottomright.png") -ground&(31) = _LOADIMAGE("blendgrasswoodslefttopright.png") -ground&(32) = _LOADIMAGE("blendgrasswoodshoriz.png") -ground&(33) = _LOADIMAGE("blendgrasswoodsvert.png") -ground&(34) = _LOADIMAGE("blendgrasswoodstopwithcorners.png") -ground&(35) = _LOADIMAGE("blendgrasswoodsrightwithcorners.png") -ground&(36) = _LOADIMAGE("blendgrasswoodsbottomwithcorners.png") -ground&(37) = _LOADIMAGE("blendgrasswoodsleftwithcorners.png") -ground&(38) = _LOADIMAGE("blendgrasswoodstoprightcurve.png") -ground&(39) = _LOADIMAGE("blendgrasswoodsbottomrightcurve.png") -ground&(40) = _LOADIMAGE("blendgrasswoodsbottomleftcurve.png") -ground&(41) = _LOADIMAGE("blendgrasswoodstopleftcurve.png") -ground&(42) = _LOADIMAGE("blendgrasswoodsforwardslash.png") -ground&(43) = _LOADIMAGE("blendgrasswoodsbackslash.png") -pointx% = INT(RND * 16) -pointy% = INT(RND * 16) -topo%(pointx%, pointy%) = 1 -size% = 64 -DO UNTIL size% = 0 - pointx% = pointx% + INT(RND * 3) - 1 - IF pointx% > 15 THEN pointx% = 14: size% = size% + 1 - IF pointx% < 0 THEN pointx% = 1: size% = size% + 1 - pointy% = pointy% + INT(RND * 3) - 1 - IF pointy% > 15 THEN pointy% = 14: size% = size% + 1 - IF pointy% < 0 THEN pointy% = 1: size% = size% + 1 - topo%(pointx%, pointy%) = 1 - size% = size% - 1 -LOOP -'pointx% = INT(RND * 16) -'pointy% = INT(RND * 16) -'topo%(pointx%, pointy%) = 2 -'dir% = INT(RND * 8) -'DO UNTIL pointx% <= 0 OR pointx% >= 15 OR pointy% <= 0 OR pointy% >= 15 -' IF pointx% >= 0 AND pointx% <= 15 AND pointy% >= 0 AND pointy% <= 15 THEN -' IF COS(pi / 4 * dir%) > -.1 THEN pointx% = pointx% + INT(1.5 * COS(pi / 4 * dir%)) -' IF SIN(pi / 4 * dir%) > -.1 THEN pointy% = pointy% + INT(1.5 * SIN(pi / 4 * dir%)) -' IF COS(pi / 4 * dir%) < -.1 THEN pointx% = pointx% + INT(.5 * COS(pi / 4 * dir%)) -' IF SIN(pi / 4 * dir%) < -.1 THEN pointy% = pointy% + INT(.5 * SIN(pi / 4 * dir%)) -' dir% = dir% + INT(RND * 3) - 1 -' IF dir% < 0 THEN dir% = 7 -' IF dir% > 7 THEN dir% = 0 -' topo%(pointx%, pointy%) = 2 -' END IF -'LOOP -genground topo%() -allground& = _NEWIMAGE(4096 + swidth, 4096 + sheight, 32) -_DEST allground&: CLS: _DEST 0 -FOR y = 0 TO 15 - FOR x = 0 TO 15 - _PUTIMAGE (x * 256 + (swidth / 2 - 100), y * 256 + sheight / 2), ground&(topo%(x, y)), allground& - NEXT -NEXT -_FREEIMAGE ground&(0) -_FREEIMAGE ground&(1) -FOR freeground% = 3 TO 43 - IF ground&(freeground%) THEN _FREEIMAGE ground&(freeground%) -NEXT -player& = _LOADIMAGE("player.png") -plane& = _LOADIMAGE("plane.png") -missileimage& = _LOADIMAGE("missile.png") -weapon& = _LOADIMAGE("electricweapons.png") -aug& = _LOADIMAGE("electricmods.png") -stat& = _LOADIMAGE("electricstats.png") -premetal& = _LOADIMAGE("brushedmetal.png") -brushedmetal& = _NEWIMAGE(swidth, sheight, 32) -explosioneffect& = _COPYIMAGE(blob(128, 128, _RGB(255, 0, 0), _RGB(255, 255, 0))) -contraileffect& = _COPYIMAGE(blob(16, 16, _RGB(127, 127, 127), _RGB(127, 127, 127))) -plasshot& = _COPYIMAGE(blob(8, 8, _RGB(0, 255, 0), _RGB(127, 255, 0))) -spreadshot& = _COPYIMAGE(blob(8, 8, _RGB(0, 0, 255), _RGB(0, 127, 255))) -pulseshot& = _COPYIMAGE(blob(8, 8, _RGB(127, 0, 255), _RGB(255, 0, 255))) -flareimage& = _COPYIMAGE(blob(8, 8, _RGB(255, 0, 0), _RGB(255, 255, 255))) -_DEST 0 -_PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& -_FREEIMAGE premetal& -_CLEARCOLOR _RGB(0, 0, 0), player& -_CLEARCOLOR _RGB(0, 0, 0), plane& -_CLEARCOLOR _RGB(0, 0, 0), missileimage& -_CLEARCOLOR _RGB(0, 0, 0), weapon& -_CLEARCOLOR _RGB(0, 0, 0), aug& -_CLEARCOLOR _RGB(0, 0, 0), stat& -DIM wepimage&(11) -DIM modimage&(4) -DIM statimage&(4) -DIM tooltips&(4) -_SOURCE weapon& -FOR wep% = 1 TO 8 - wepimage&(wep%) = _NEWIMAGE(32, 32, 32) - _DEST wepimage&(wep%) - FOR y% = 0 TO 31 - FOR x% = 0 TO 31 - PSET (x%, y%), POINT(x% + (wep% - 1) * 32, y%) - NEXT - NEXT -NEXT -blankmissile& = _NEWIMAGE(32, 32, 32) -_DEST blankmissile& -FOR y% = 0 TO 31 - FOR x% = 0 TO 31 - PSET (x%, y%), POINT(x%, y% + 32) - NEXT -NEXT -FOR wep% = 1 TO 4 - modimage&(wep%) = _NEWIMAGE(32, 32, 32) - statimage&(wep%) = _NEWIMAGE(32, 32, 32) - _SOURCE aug& - _DEST modimage&(wep%) - FOR y% = 0 TO 31 - FOR x% = 0 TO 31 - PSET (x%, y%), POINT(x% + (wep% - 1) * 32, y%) - NEXT - NEXT - _SOURCE stat& - _DEST statimage&(wep%) - FOR y% = 0 TO 31 - FOR x% = 0 TO 31 - PSET (x%, y%), POINT(x% + (wep% - 1) * 32, y%) - NEXT - NEXT -NEXT -_SOURCE 0 -_DEST 0 -wepimage&(9) = recolor&(blankmissile&, _RGB(255, 255, 255), _RGB(0, 0, 255)) -wepimage&(10) = recolor&(blankmissile&, _RGB(255, 255, 255), _RGB(0, 127, 0)) -wepimage&(11) = _NEWIMAGE(32, 32, 32) -_PUTIMAGE (0, 0), weapon&, wepimage&(11), (32, 32)-(63, 63) -_FREEIMAGE blankmissile& -_FREEIMAGE weapon& -_FREEIMAGE aug& -_FREEIMAGE stat& -wepimage&(0) = _NEWIMAGE(32, 32, 32) -modimage&(0) = _NEWIMAGE(32, 32, 32) -_CLEARCOLOR _RGB(0, 0, 0), wepimage&(0) -_CLEARCOLOR _RGB(0, 0, 0), modimage&(0) -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) -GET #1, 5, red -GET #1, 6, green -GET #1, 7, blue -GET #1, 8, difficulty -IF gamepad <> 0 THEN - DIM steering AS control, throttle AS control, primary AS control, secondary AS control, scrdown AS control, scrup AS control, pick AS control - GET #1, 10, steering.number - GET #1, 11, throttle.number - GET #1, 12, primary.number - GET #1, 13, secondary.number - GET #1, 16, scrdown.number - GET #1, 17, scrup.number - GET #1, 18, pick.number - GET #1, 20, steering.axis - GET #1, 21, throttle.axis - GET #1, 22, primary.axis - GET #1, 23, secondary.axis - GET #1, 24, scrdown.axis - GET #1, 25, scrup.axis - GET #1, 26, pick.axis - picked% = 1 - numdevice% = _DEVICES - buttons% = _LASTBUTTON(gamepad) - DO WHILE _DEVICEINPUT(gamepad) - LOOP -END IF -GET #1, 14, livery -GET #1, 15, team -GET #1, 19, vol -CLOSE #1 -_DEST allground& 'we need the player's color to do this -LINE (0, sheight / 2)-(swidth / 2 - 100, 4095 + sheight / 2), _RGB(red, green, blue), BF -LINE (4096 + swidth / 2 - 100, sheight / 2)-(4096 + swidth - 200, 4095 + sheight / 2), _RGB(255, 0, 0), BF -LINE (swidth / 2 - 100, 0)-(4095 + swidth / 2 - 100, sheight / 2), _RGB(0, 255, 0), BF -LINE (swidth / 2 - 100, 4096 + sheight / 2)-(4095 + swidth / 2 - 100, 4096 + sheight), _RGB(255, 255, 0), BF -_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, "") -numplanes% = team * 4 - 1 -DIM points(3) AS score -DIM planes(15) AS airplane -DIM mods(15, 4) AS aug -DIM weapons(15, 5) AS weapon -DIM lazers(5000) AS shot -DIM missiles(50) AS missile -DIM contrails%(5000, 2) -DIM explosions%(200, 4) -DIM trails%(1000, 3) -DIM flares(130, 4) -DIM wepstorage(15, 15) AS weapon -DIM modstorage(15, 15) AS aug -DIM controller(30) -DIM debriss(260) AS debris -FOR teammates = 0 TO team - 1 - planes(0 + 4 * teammates).blip = recolor&(player&, _RGB(255, 255, 255), _RGB(red, green, blue)) - planes(1 + 4 * teammates).blip = recolor&(player&, _RGB(255, 255, 255), _RGB(255, 0, 0)) - planes(2 + 4 * teammates).blip = recolor&(player&, _RGB(255, 255, 255), _RGB(0, 255, 0)) - planes(3 + 4 * teammates).blip = recolor&(player&, _RGB(255, 255, 255), _RGB(255, 255, 0)) - IF livery = 0 THEN - planes(0 + 4 * teammates).image = recolor&(plane&, _RGB(255, 255, 255), _RGB(red, green, blue)) - planes(1 + 4 * teammates).image = recolor&(plane&, _RGB(255, 255, 255), _RGB(255, 0, 0)) - planes(2 + 4 * teammates).image = recolor&(plane&, _RGB(255, 255, 255), _RGB(0, 255, 0)) - planes(3 + 4 * teammates).image = recolor&(plane&, _RGB(255, 255, 255), _RGB(255, 255, 0)) - ELSE - planes(0 + 4 * teammates).image = colorgreyspectrum&(plane&, _RGB(red, green, blue)) - planes(1 + 4 * teammates).image = colorgreyspectrum&(plane&, _RGB(255, 0, 0)) - planes(2 + 4 * teammates).image = colorgreyspectrum&(plane&, _RGB(0, 255, 0)) - planes(3 + 4 * teammates).image = colorgreyspectrum&(plane&, _RGB(255, 255, 0)) - END IF - planes(0 + 4 * teammates).team = 0 - planes(0 + 4 * teammates).x = 300 - planes(0 + 4 * teammates).y = 300 - planes(0 + 4 * teammates).lasthit = 2 - planes(0 + 4 * teammates).ai = 1 - planes(1 + 4 * teammates).team = 1 - planes(1 + 4 * teammates).x = 3796 - planes(1 + 4 * teammates).y = 3796 - planes(1 + 4 * teammates).dir = pi - planes(1 + 4 * teammates).lasthit = 3 - planes(1 + 4 * teammates).ai = 1 - planes(2 + 4 * teammates).team = 2 - planes(2 + 4 * teammates).x = 3796 - planes(2 + 4 * teammates).y = 300 - planes(2 + 4 * teammates).dir = pi / 2 - planes(2 + 4 * teammates).lasthit = 1 - planes(2 + 4 * teammates).ai = 1 - planes(3 + 4 * teammates).team = 3 - planes(3 + 4 * teammates).x = 300 - planes(3 + 4 * teammates).y = 3796 - planes(3 + 4 * teammates).dir = 3 / 2 * pi - planes(3 + 4 * teammates).lasthit = 0 - planes(3 + 4 * teammates).ai = 1 -NEXT -planes(0).ai = 0 -'un-comment the next line for practically unlimited credits -'planes(0).credits = 9999 -'uncomment the next four lines for practically unlimited radar-guided missiles -'weapons(0, 5).wep = 10 -'weapons(0, 5).ifon = -1 -'weapons(0, 5).total = 60 -'weapons(0, 5).ammo = 9999 -fcont% = 1 -numlazer% = 0 -DIM wepmouse AS weapon -DIM modmouse AS aug -DIM blankspace AS weapon -FOR k% = 0 TO numplanes% - planes(k%).force = 3 - planes(k%).speed = 3 - planes(k%).battery = 100 - planes(k%).generator = 1 - planes(k%).armor = 10 - planes(k%).ammo = 1000 - planes(k%).maxbatt = 100 - planes(k%).maxarm = 10 - weapons(k%, 2).wep = 1 - weapons(k%, 2).ifon = -1 - weapons(k%, 2).total = 12 - weapons(k%, 2).energy = .25 -NEXT -music& = _SNDOPEN("electric_game.ogg", "sync,vol") -IF music& <> 0 THEN - _SNDVOL music&, vol * .8 - _SNDLOOP music& -END IF -DO - _LIMIT 61 - DO - lclick% = _MOUSEBUTTON(1) - LOOP WHILE _MOUSEINPUT - 'CLS - IF planes(0).market = 0 THEN scrollground allground& - IF xoffset% > 0 THEN - LINE (0, yoffset%)-(xoffset% - 1, 4095 + yoffset%), _RGB(red, green, blue), BF - COLOR _RGB(255 - red, 255 - green, 255 - blue) - _PRINTSTRING (-152 + xoffset%, sheight / 2 - 16), "Market" - IF planes(0).waittime > 0 THEN _PRINTSTRING (-152 + xoffset%, sheight / 2), "Closed" ELSE _PRINTSTRING (-148 + xoffset%, sheight / 2), "Open!" - COLOR _RGB(255, 255, 255) - END IF - IF gamepad <> 0 THEN - IF gamepad <= numdevice% THEN - DO WHILE _DEVICEINPUT(gamepad) - FOR a% = 1 TO buttons% - controller(a%) = _BUTTON(a%) - NEXT - FOR b% = 1 TO _LASTAXIS - controller(b% + buttons%) = _AXIS(b%) - NEXT - LOOP - IF controller(buttons% * scrdown.axis + scrdown.number) AND ignoretog% = 0 THEN picked% = picked% - 1: ignoretog% = -1 - IF controller(buttons% * scrup.axis + scrup.number) AND ignoretog% = 0 THEN picked% = picked% + 1: ignoretog% = -1 - IF picked% <= 0 THEN picked% = 9 - IF picked% >= 10 THEN picked% = 1 - END IF - END IF - IF planes(0).armor > 0 THEN - IF gamepad = 0 THEN - playercontrol planes(0).dir, planes(0).force, planes(0).yaw, 0, 0 - IF planes(0).market = 0 THEN playerfire planes(), 0, weapons(), 0, 0 - ELSE - playercontrol planes(0).dir, planes(0).force, planes(0).yaw, controller(buttons% * steering.axis + steering.number), controller(buttons% * throttle.axis + throttle.number) - IF planes(0).market = 0 THEN playerfire planes(), 0, weapons(), ABS(controller(buttons% * primary.axis + primary.number)) + .5, ABS(controller(buttons% * secondary.axis + secondary.number)) + .5 - END IF - END IF - IF planes(0).x <= 0 AND planes(0).waittime <= 0 THEN planes(0).x = -128: planes(0).force = 0: planes(0).speed = 0: planes(0).market = 1 - IF planes(0).speed < 2.5 AND planes(0).force < 2 AND planes(0).armor > 0 THEN COLOR _RGB(255, 0, 0): _PRINTSTRING ((swidth - _PRINTWIDTH("STALL WARNING!")) / 2, sheight / 2 + 32), "STALL WARNING!": COLOR _RGB(255, 255, 255) - screenanchorx% = INT(planes(0).x) - screenanchory% = INT(planes(0).y) - xoffset% = -screenanchorx% + swidth / 2 - 100 - yoffset% = -screenanchory% + sheight / 2 - FOR k% = 0 TO numplanes% - FOR wepn% = 1 TO 3 - IF weapons(k%, wepn%).kind = 0 THEN - IF weapons(k%, wepn%).remaining < weapons(k%, wepn%).total THEN weapons(k%, wepn%).remaining = weapons(k%, wepn%).remaining + 1 - IF weapons(k%, wepn%).firing = 1 THEN - weapons(k%, wepn%).firing = 0 - makeshot lazers(), numlazer%, planes(k%), k%, weapons(k%, wepn%).wep, wepn%, planes(0).market - planes(k%).battery = planes(k%).battery - weapons(k%, wepn%).energy - planes(k%).ammo = planes(k%).ammo - weapons(k%, wepn%).ammo - IF wepn% = 2 OR wepn% = 3 THEN - planes(k%).battery = planes(k%).battery - weapons(k%, wepn%).energy - planes(k%).ammo = planes(k%).ammo - weapons(k%, wepn%).ammo - END IF - END IF - END IF - IF weapons(k%, wepn%).kind = 1 THEN - IF weapons(k%, wepn%).firing >= 1 AND NOT _KEYDOWN(32) AND NOT lclick AND NOT controller(1) THEN - makecharge lazers(), numlazer%, k%, planes(), weapons(k%, wepn%).wep, weapons(k%, wepn%).firing, wepn%, numplanes% - planes(k%).battery = planes(k%).battery - weapons(k%, wepn%).firing / 6 - IF wepn% = 2 OR wepn% = 3 THEN planes(k%).battery = planes(k%).battery - weapons(k%, wepn%).firing / 6 - weapons(k%, wepn%).firing = 0 - END IF - END IF - NEXT - FOR wepn% = 4 TO 5 - IF weapons(k%, wepn%).remaining < weapons(k%, wepn%).total THEN weapons(k%, wepn%).remaining = weapons(k%, wepn%).remaining + 1 - IF weapons(k%, wepn%).firing = 1 THEN - weapons(k%, wepn%).firing = 0 - makemissile missiles(), nummissile%, k%, planes(), weapons(k%, wepn%).wep, numplanes% - weapons(k%, wepn%).ammo = weapons(k%, wepn%).ammo - 1 - END IF - IF weapons(k%, wepn%).ammo <= 0 THEN weapons(k%, wepn%) = blankspace - NEXT - IF planes(k%).battery >= 1 THEN - FOR augm% = 1 TO 4 - IF mods(k%, augm%).ifon = -1 THEN - IF mods(k%, augm%).kind = 1 THEN aimer planes(), k%, numplanes% - IF mods(k%, augm%).kind = 2 THEN converter planes(k%), mods(k%, augm%).ifon - IF mods(k%, augm%).kind = 3 THEN srb planes(k%), contrails%(), numcontrail%, mods(k%, augm%) - IF mods(k%, augm%).kind = 4 THEN flare k%, planes(k%), missiles(), nummissile%, mods(k%, augm%), flares(), numflare% - planes(k%).battery = planes(k%).battery - mods(k%, augm%).energy / 60 - END IF - NEXT - END IF - IF planes(k%).armor <= 0 THEN respawn planes(k%) - IF planes(k%).ai = 1 AND planes(k%).armor > 0 THEN - aiplane k%, planes(), weapons(), difficulty - SELECT CASE planes(k%).team - CASE 0: IF planes(k%).x <= 0 THEN aimarket planes(k%), k%, weapons(), wepstorage() - CASE 1: IF planes(k%).x >= 4095 THEN aimarket planes(k%), k%, weapons(), wepstorage() - CASE 2: IF planes(k%).y <= 0 THEN aimarket planes(k%), k%, weapons(), wepstorage() - CASE 3: IF planes(k%).y >= 4095 THEN aimarket planes(k%), k%, weapons(), wepstorage() - END SELECT - END IF - planes(k%).dir = planes(k%).dir + rad(1.5 * planes(k%).yaw) - togglecontrol k%, weapons(), mods(), ignoretog%, picked%, controller(pick.number) - IF planes(k%).speed < 2 AND planes(k%).market = 0 THEN - planes(k%).armor = 0 - crash planes(), explosions%(), points(), numexplosion%, numplanes%, difficulty, mods(), debriss(), numdebris% - END IF - planes(k%).x = planes(k%).x + COS(planes(k%).dir) * planes(k%).speed - planes(k%).y = planes(k%).y + SIN(planes(k%).dir) * planes(k%).speed - IF planes(k%).market = 0 AND planes(k%).x < 0 THEN planes(k%).x = 0 - IF planes(k%).x > 4095 THEN planes(k%).x = 4095 - IF planes(k%).y < 0 THEN planes(k%).y = 0 - IF planes(k%).y > 4095 THEN planes(k%).y = 4095 - planes(k%).battery = planes(k%).battery + planes(k%).generator / 30 - planes(k%).force * 1 / 150 - IF planes(k%).battery < 0 THEN planes(k%).battery = 0: IF planes(k%).force > planes(k%).generator * 5 THEN planes(k%).force = planes(k%).generator * 5 - fakephysics planes(k%).force, planes(k%).speed - IF planes(k%).battery > planes(k%).maxbatt THEN planes(k%).battery = planes(k%).maxbatt - IF planes(0).market = 0 THEN - IF planes(k%).x + xoffset% > 0 AND planes(k%).x + xoffset% < swidth - 200 AND planes(k%).y + yoffset% > 0 AND planes(k%).y + yoffset% < sheight AND planes(k%).armor > 0 THEN - IF planes(k%).yaw <= -.7 THEN - IF graphsetting = 1 THEN - rotator planes(k%).x + 16 + xoffset%, planes(k%).y + 16 + yoffset%, planes(k%).dir, planeshadow&, 0, 0, 31, 31, 32 - maketrail planes(k%).x + COS(planes(k%).dir - pi / 2) * 8, planes(k%).y + SIN(planes(k%).dir - pi / 2) * 8, trails%(), numtrail%, k% - maketrail planes(k%).x + COS(planes(k%).dir + pi / 2) * 8, planes(k%).y + SIN(planes(k%).dir + pi / 2) * 8, trails%(), numtrail%, k% + numplanes% + 1 - END IF - rotator planes(k%).x + xoffset%, planes(k%).y + yoffset%, planes(k%).dir, planes(k%).image, 0, 0, 31, 31, 32 - END IF - IF planes(k%).yaw > -.7 AND planes(k%).yaw < -.3 THEN - IF graphsetting = 1 THEN rotator planes(k%).x + 16 + xoffset%, planes(k%).y + 16 + yoffset%, planes(k%).dir, planeshadow&, 32, 0, 63, 31, 32 - rotator planes(k%).x + xoffset%, planes(k%).y + yoffset%, planes(k%).dir, planes(k%).image, 32, 0, 63, 31, 32 - END IF - IF planes(k%).yaw >= -.3 AND planes(k%).yaw <= .3 THEN - IF graphsetting = 1 THEN rotator planes(k%).x + 16 + xoffset%, planes(k%).y + 16 + yoffset%, planes(k%).dir, planeshadow&, 64, 0, 95, 31, 32 - rotator planes(k%).x + xoffset%, planes(k%).y + yoffset%, planes(k%).dir, planes(k%).image, 64, 0, 95, 31, 32 - END IF - IF planes(k%).yaw > .3 AND planes(k%).yaw < .7 THEN - IF graphsetting = 1 THEN rotator planes(k%).x + 16 + xoffset%, planes(k%).y + 16 + yoffset%, planes(k%).dir, planeshadow&, 96, 0, 127, 31, 32 - rotator planes(k%).x + xoffset%, planes(k%).y + yoffset%, planes(k%).dir, planes(k%).image, 96, 0, 127, 31, 32 - END IF - IF planes(k%).yaw >= .7 THEN - IF graphsetting = 1 THEN - rotator planes(k%).x + 16 + xoffset%, planes(k%).y + 16 + yoffset%, planes(k%).dir, planeshadow&, 128, 0, 159, 31, 32 - maketrail planes(k%).x + COS(planes(k%).dir - pi / 2) * 8, planes(k%).y + SIN(planes(k%).dir - pi / 2) * 8, trails%(), numtrail%, k% - maketrail planes(k%).x + COS(planes(k%).dir + pi / 2) * 8, planes(k%).y + SIN(planes(k%).dir + pi / 2) * 8, trails%(), numtrail%, k% + numplanes% + 1 - END IF - rotator planes(k%).x + xoffset%, planes(k%).y + yoffset%, planes(k%).dir, planes(k%).image, 128, 0, 159, 31, 32 - END IF - '_PRINTSTRING (planes(k%).x + xoffset%, planes(k%).y + yoffset%), whatever you need - END IF - IF planes(k%).waittime > 0 THEN planes(k%).waittime = planes(k%).waittime - 1 - END IF - NEXT - debriseffect debriss(), numdebris%, explosions%(), numexplosion% - lazer lazers(), planes(), points(), numlazer%, explosions%(), numexplosion%, numplanes%, difficulty, plasshot&, spreadshot&, pulseshot&, mods(), debriss(), numdebris% - charge lazers(), planes(), numlazer% - missile missiles(), planes(), points(), nummissile%, contrails%(), numcontrail%, missileimage&, explosions%(), numexplosion%, numplanes%, difficulty, mods(), debriss(), numdebris% - contrail contrails%(), numcontrail%, contraileffect& - flareeffect flares(), numflare%, contrails%(), numcontrail%, flareimage& - explosion explosions%(), numexplosion%, explosioneffect& - IF graphsetting = 1 THEN trail trails%(), numtrail%, numplanes% - IF planes(0).market = 0 THEN - _PUTIMAGE (swidth - 200, 0)-(swidth - 1, sheight - 1), brushedmetal&, 0, (swidth - 200, 0)-(swidth - 1, sheight - 1) - hudbar 0, "PWR", planes(0).force / 10 * 100, 100, _RGB(127, 0, 0), "%", quartz& - hudbar 1, "GEN", planes(0).generator / 2 * 100, 100, _RGB(0, 127, 0), "%", quartz& - hudbar 2, "BAT", planes(0).battery / planes(0).maxbatt * 100, 100, _RGB(127, 127, 0), "%", quartz& - hudbar 3, "SPD", planes(0).speed / 10 * 645.6, 645.6, _RGB(0, 127, 127), "mph", quartz& - hudbar 4, "ARM", planes(0).armor / planes(0).maxarm * 100, 100, _RGB(0, 0, 127), "%", quartz& - hudbar 5, "AMO", planes(0).ammo / 100, 100, _RGB(31, 31, 31), "%", quartz& - _FONT quartz& - _PRINTSTRING (swidth - 200, 208), "PTS " + LTRIM$(STR$(points(0).points)) - _PRINTSTRING (swidth - 200, 240), "CR. " + LTRIM$(STR$(planes(0).credits)) - _FONT 16 - weaponhud swidth - 180, sheight / 2, weapons(), 0, wepimage&(), picked% - modhud swidth - 164, sheight / 2 + 80, mods(), 0, modimage&(), picked% - LINE (swidth - 180, sheight - 180)-(swidth - 21, sheight - 21), _RGB(0, 63, 0), BF - FOR blip% = 0 TO numplanes% - rotator swidth - 180 + planes(blip%).x \ 25.6, sheight - 180 + planes(blip%).y \ 25.6, planes(blip%).dir, planes(blip%).blip, 0, 0, 16, 16, 8 - NEXT - LINE (swidth - 180 - ((swidth - 200) \ 51.2) + planes(0).x \ 25.6, sheight - 180 - (sheight \ 51.2) + planes(0).y \ 25.6)-(swidth - 180 + ((swidth - 200) \ 51.2) + planes(0).x \ 25.6, sheight - 180 + (sheight \ 51.2) + planes(0).y \ 25.6), _RGB(255, 255, 255), B - END IF - IF planes(0).market = 1 THEN market planes(0), 0, weapons(), mods(), wepimage&(), modimage&(), statimage&(), wepstorage(), modstorage(), wepmouse, modmouse, whichstore%, bigquartz&, quartz&, cyberbit&, brushedmetal&, tooltips&(), difficulty - IF _KEYDOWN(112) THEN - leaderboard planes(), points(), numplanes% - _DISPLAY - SLEEP - END IF - IF _KEYDOWN(9) THEN leaderboard planes(), points(), numplanes% - _DISPLAY - IF ignoretog% <> 0 AND _KEYDOWN(49) = 0 AND _KEYDOWN(50) = 0 AND _KEYDOWN(51) = 0 AND _KEYDOWN(52) = 0 AND _KEYDOWN(53) = 0 AND _KEYDOWN(54) = 0 AND _KEYDOWN(55) = 0 AND _KEYDOWN(56) = 0 AND _KEYDOWN(57) = 0 THEN - IF gamepad = 0 THEN - ignoretog% = 0 - ELSE - IF controller(scrdown.number) = 0 AND controller(scrup.number) = 0 AND controller(pick.number) = 0 THEN ignoretog% = 0 - END IF - END IF - IF _KEYDOWN(27) AND ignore` = 0 THEN EXIT DO - clickonce -LOOP -_FONT cyberbit& -CLS -_PUTIMAGE , brushedmetal& -leaderboard planes(), points(), numplanes% -_PRINTSTRING (swidth / 2 - 256, 320), "Press any key to go back to the Main Menu." -_DISPLAY -IF music& THEN - DO UNTIL vol = 0 - _LIMIT 30 - vol = vol - .02 - IF vol < 0 THEN vol = 0 - _SNDVOL music&, vol - LOOP - _SNDSTOP music& - _SNDCLOSE music& -END IF -SLEEP -_FREEIMAGE player& -_FREEIMAGE plane& -_FREEIMAGE planeshadow& -_FREEIMAGE missileimage& -_FREEIMAGE brushedmetal& -_FREEIMAGE explosioneffect& -_FREEIMAGE contraileffect& -_FREEIMAGE allground& -_FREEIMAGE plasshot& -_FREEIMAGE spreadshot& -_FREEIMAGE pulseshot& -FOR freee% = 0 TO 3 - FOR teammates% = 0 TO team - 1 - _FREEIMAGE planes(freee% + 4 * teammates%).image - _FREEIMAGE planes(freee% + 4 * teammates%).blip - NEXT -NEXT -FOR free8% = 0 TO 11 - _FREEIMAGE wepimage&(free8%) -NEXT -FOR free4% = 1 TO 4 - _FREEIMAGE modimage&(free4%) - _FREEIMAGE statimage&(free4%) -NEXT -_FONT 16 -IF quartz& <> 0 THEN _FREEFONT (quartz&) -IF bigquartz& <> 0 THEN _FREEFONT (bigquartz&) -IF cyberbit& <> 0 THEN _FREEFONT (cyberbit&) -END SUB - -SUB crash (planes() AS airplane, explosions%(), points() AS score, numexplosions%, numplanes%, difficulty, mods() AS aug, debriss() AS debris, numdebris%) 'Resets planes after they crash, and makes the crash sound -boom& = _SNDOPEN("factory_destroyed.wav", "sync") -FOR a% = 0 TO numplanes% - IF planes(a%).armor <= 0 AND planes(a%).respawntime <= 0 THEN - IF boom& THEN _SNDPLAY boom& - makeexplosion planes(a%).x, planes(a%).y, explosions%(), numexplosion%, 60, 0 - makedebris planes(a%), debriss(), numdebris% - planes(a%).respawntime = 60 - planes(a%).force = 0 - planes(a%).speed = 0 - FOR m = 1 TO 4 - mods(a%, m).ifon = 0 - NEXT - team% = planes(planes(a%).lasthit).team - points(team%).points = points(team%).points + 1 - points(team%).total = points(team%).points - points(team%).losses - points(planes(a%).team).losses = points(planes(a%).team).losses + 1 - points(planes(a%).team).total = points(planes(a%).team).points - points(planes(a%).team).losses - planes(planes(a%).lasthit).credits = planes(planes(a%).lasthit).credits + 1 - IF planes(planes(a%).lasthit).ai = 1 AND difficulty = 1 THEN - marketchance% = INT(RND * 12) 'originally, 12 was (13 - planes(planes(a%).lasthit).credits) - IF marketchance% = 0 THEN planes(planes(a%).lasthit).market = 1 - END IF - END IF -NEXT -_SNDCLOSE boom& -END SUB - -SUB respawn (plane AS airplane) -IF plane.respawntime > 0 THEN plane.respawntime = plane.respawntime - 1 -IF plane.respawntime <= 0 THEN - plane.x = INT(RND * 4090) + 3 - plane.y = INT(RND * 4090) + 3 - plane.dir = RND * 2 * pi - plane.force = 3 - plane.speed = 3 - plane.battery = plane.maxbatt - plane.armor = plane.maxarm -END IF -END SUB - -SUB leaderboard (planes() AS airplane, points() AS score, numplanes%) -DIM order(3) AS INTEGER -FOR find = 0 TO 3 - IF points% > points(find).total THEN points% = points(find).total -NEXT -DO - FOR rank% = 0 TO 3 - IF points(rank%).total = points% THEN order(3 - checked%) = rank%: checked% = checked% + 1 - NEXT - points% = points% + 1 -LOOP UNTIL checked% = 4 -FOR thelasttime% = 0 TO 3 - _PUTIMAGE (swidth / 2 - 224, 64 + 64 * thelasttime%), planes(order(thelasttime%)).image, , (64, 0)-(95, 31) - _PRINTSTRING (swidth / 2 - 256, 64 + 64 * thelasttime%), LTRIM$(STR$(thelasttime% + 1)) + "." - _PRINTSTRING (swidth / 2 - 176, 64 + 64 * thelasttime%), LTRIM$(STR$(points(planes(order(thelasttime%)).team).points)) + " Points | " + LTRIM$(STR$(points(planes(order(thelasttime%)).team).losses)) + " Losses | " + LTRIM$(STR$(points(planes(order(thelasttime%)).team).total)) + " Total" - IF order(thelasttime%) = 0 THEN _PRINTSTRING (swidth / 2 - 328, 64 + 64 * thelasttime%), "Player" -NEXT -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) -GET #1, 1, swidth -GET #1, 2, sheight -GET #1, 3, fs -GET #1, 4, graphsetting -GET #1, 5, red -GET #1, 6, green -GET #1, 7, blue -GET #1, 8, difficulty -GET #1, 9, gamepad -GET #1, 10, steering.number -GET #1, 11, throttle.number -GET #1, 12, primary.number -GET #1, 13, secondary.number -GET #1, 14, livery -GET #1, 15, team -GET #1, 16, scrdown.number -GET #1, 17, scrup.number -GET #1, 18, pick.number -GET #1, 19, vol -GET #1, 20, steering.axis -GET #1, 21, throttle.axis -GET #1, 22, primary.axis -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, "") -premetal& = _LOADIMAGE("electricplane2.png") -brushedmetal& = _NEWIMAGE(swidth, sheight, 32) -_PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& -_FREEIMAGE premetal& -numcontroller% = _DEVICES -DO - _LIMIT 60 - CLS - _PUTIMAGE (0, 0), brushedmetal& - _FONT quartz& - COLOR _RGB(255, 200, 0) - center "OPTIONS", 1 - _FONT cyberbit& - COLOR _RGB(255, 255, 255) - center "Set Screen Resolution (" + LTRIM$(STR$(swidth)) + " x " + LTRIM$(STR$(sheight)) + ")", 4 - IF fs = 0 THEN center "Toggle Fullscreen (off)", 5 ELSE center "Toggle Fulscreen (on)", 5 - IF graphsetting = 0 THEN center "Fancyness (Low)", 6 ELSE center "Fancyness (High)", 6 - center "Plane color (" + LTRIM$(STR$(red)) + ", " + LTRIM$(STR$(green)) + ", " + LTRIM$(STR$(blue)) + ") -- " + colorhint$(red, green, blue), 7 - IF difficulty = 0 THEN center "Enemy AI (good)", 8 ELSE center "Enemy AI (really good)", 8 - IF gamepad = 0 THEN center "Input Device: Mouse & Keyboard Only", 9 ELSE center "Input Device: " + controllerparse$(4, gamepad), 9 - center "Controls (If you're using a controller)", 10 - center "Planes per team: (" + LTRIM$(STR$(team)) + ")", 11 - center "Music volume: (" + LTRIM$(STR$(INT(vol * 100))) + "%)", 12 - center "Restore Defaults", 13 - center "Back", 14 - IF menu(4) THEN - pickres - premetal& = _LOADIMAGE("electricplane2.png") - brushedmetal& = _NEWIMAGE(swidth, sheight, 32) - _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& - _FREEIMAGE premetal& - PUT #1, 1, swidth - PUT #1, 2, sheight - _PRINTMODE _KEEPBACKGROUND - _FONT 16 - quartz& = _LOADFONT("segment14.otf", sheight / 24, "") - cyberbit& = _LOADFONT("cyberbit.ttf", sheight / 32, "") - END IF - IF menu(5) THEN - IF fs = 0 THEN fs = 1 ELSE fs = 0 - IF fs = 0 THEN _FULLSCREEN _OFF ELSE _FULLSCREEN - PUT #1, 3, fs - END IF - IF menu(6) THEN - IF graphsetting = 0 THEN graphsetting = 1 ELSE graphsetting = 0 - PUT #1, 4, graphsetting - END IF - IF menu(7) THEN - colorslider red, green, blue, livery - PUT #1, 5, red - PUT #1, 6, green - PUT #1, 7, blue - PUT #1, 14, livery - END IF - IF menu(8) THEN - IF difficulty = 0 THEN difficulty = 1 ELSE difficulty = 0 - PUT #1, 8, difficulty - END IF - IF menu(9) THEN - DO - gamepad = gamepad + 1 - IF gamepad > numcontroller% THEN gamepad = 0 - LOOP UNTIL controllerparse$(1, gamepad) = "CONTROLLER" OR gamepad = 0 - PUT #1, 9, gamepad - END IF - IF menu(10) THEN - keybind gamepad, steering, throttle, primary, secondary, scrdown, scrup, pick - PUT #1, 10, steering.number - PUT #1, 11, throttle.number - PUT #1, 12, primary.number - PUT #1, 13, secondary.number - PUT #1, 16, scrdown.number - PUT #1, 17, scrup.number - PUT #1, 18, pick.number - PUT #1, 20, steering.axis - PUT #1, 21, throttle.axis - PUT #1, 22, primary.axis - PUT #1, 23, secondary.axis - PUT #1, 24, scrdown.axis - PUT #1, 25, scrup.axis - PUT #1, 26, pick.axis - END IF - IF menu(11) THEN - team = team + 1 - IF team > 4 THEN team = 1 - PUT #1, 15, team - END IF - IF menu(12) THEN volumeslider vol - PUT #1, 19, vol - IF menu(13) THEN - fs = 1 - graphsetting = 0 - red = 0 - green = 0 - blue = 255 - difficulty = 0 - gamepad = 0 - steering.number = 1 - throttle.number = 3 - primary.number = 1 - secondary.number = 2 - livery = 0 - team = 1 - scrdown.number = 4 - scrup.number = 5 - pick.number = 3 - vol = 0.8 - steering.axis = 1 - throttle.axis = 1 - primary.axis = 0 - secondary.axis = 0 - scrdown.axis = 0 - scrup.axis = 0 - pick.axis = 0 - PUT #1, 3, fs - PUT #1, 4, graphsetting - PUT #1, 5, red - PUT #1, 6, green - PUT #1, 7, blue - PUT #1, 8, difficulty - PUT #1, 9, gamepad - PUT #1, 10, steering.number - PUT #1, 11, throttle.number - PUT #1, 12, primary.number - PUT #1, 13, secondary.number - PUT #1, 14, livery - PUT #1, 15, team - PUT #1, 16, scrdown.number - PUT #1, 17, scrup.number - PUT #1, 18, pick.number - PUT #1, 19, vol - PUT #1, 20, steering.axis - PUT #1, 21, throttle.axis - PUT #1, 22, primary.axis - PUT #1, 23, secondary.axis - PUT #1, 24, scrdown.axis - PUT #1, 25, scrup.axis - PUT #1, 26, pick.axis - END IF - IF menu(14) THEN - EXIT DO - END IF - clickonce - cursor - _DISPLAY -LOOP -CLOSE #1 -_FONT 16 -IF quartz& <> 0 AND quartz& <> -1 THEN _FREEFONT (quartz&) -IF cyberbit& <> 0 AND cyberbit& <> -1 THEN _FREEFONT (cyberbit&) -_FREEIMAGE brushedmetal& -END SUB - -SUB pickres 'screen resolution picking dialogue -quartz& = _LOADFONT("segment14.otf", sheight / 16, "") -cyberbit& = _LOADFONT("cyberbit.ttf", sheight / 32, "") -premetal& = _LOADIMAGE("brushedmetal.png") -brushedmetal& = _NEWIMAGE(swidth, sheight, 32) -_PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& -_FREEIMAGE premetal& -DIM resarray(16) AS res -RESTORE resolutions -FOR a% = 1 TO 16 - READ resarray(a%).x, resarray(a%).y, resarray(a%).caption -NEXT -DO - _LIMIT 60 - CLS - _PUTIMAGE (0, 0), brushedmetal& - _FONT quartz& - COLOR _RGB(255, 200, 0) - center "SCREEN RESOLUTION", 1 - _FONT cyberbit& - COLOR _RGB(255, 255, 255) - FOR a% = 1 TO 16 - center LTRIM$(STR$(resarray(a%).x)) + " x " + LTRIM$(STR$(resarray(a%).y)) + " " + RTRIM$(resarray(a%).caption), a% + 3 - NEXT - center "Back", 21 - FOR a% = 1 TO 16 - IF menu(3 + a%) THEN - swidth = resarray(a%).x - sheight = resarray(a%).y - SCREEN _NEWIMAGE(swidth, sheight, 32) - _PRINTMODE _KEEPBACKGROUND - premetal& = _LOADIMAGE("brushedmetal.png") - brushedmetal& = _NEWIMAGE(swidth, sheight, 32) - _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, "") - END IF - NEXT - IF menu(21) THEN - _FONT 16 - EXIT DO - END IF - cursor - clickonce - _DISPLAY -LOOP -IF quartz& <> 0 THEN _FREEFONT (quartz&) -'IF cyberbit& <> 0 THEN _FREEFONT (cyberbit&) -_FREEIMAGE brushedmetal& - -resolutions: -DATA 800,600,"(Smallest supported resolution, SVGA)" -DATA 1024,600,"(Most netbooks)" -DATA 1024,768,"(XGA, Many older 4:3 LCD monitors)" -DATA 1280,720,"(720p)" -DATA 1280,768,"(Wide XGA 5:3)" -DATA 1280,800,"(Wide XGA 16:10)" -DATA 1280,960,"(SXGA-)" -DATA 1280,1024,"(SXGA)" -DATA 1366,768,"(Many consumer laptops)" -DATA 1440,900,"(Wide SXGA)" -DATA 1600,900,"(900p, many modern 16:9 monitors)" -DATA 1600,1200,"(UXGA)" -DATA 1680,1050,"(Common widescreen 16:10 monitors)" -DATA 1920,1080,"(Full HD)" -DATA 1920,1200,"(Common 23''-25'' monitor resolution)" -DATA 2560,1600,"(High-end gaming monitors)" - -END SUB - -FUNCTION colorhint$ (red, green, blue) 'The 64 color names -colorint% = red \ 64 + 4 * (green \ 64) + 16 * (blue \ 64) -SELECT CASE colorint% - CASE 0: colorhint$ = "Black" - CASE 1: colorhint$ = "Dark Red" - CASE 2: colorhint$ = "Crimson" - CASE 3: colorhint$ = "Red" - CASE 4: colorhint$ = "Forest Green" - CASE 5: colorhint$ = "Dark yellow" - CASE 6: colorhint$ = "Brown" - CASE 7: colorhint$ = "Orange" - CASE 8: colorhint$ = "Green" - CASE 9: colorhint$ = "Dark Olive" - CASE 10: colorhint$ = "Deep Yellow" - CASE 11: colorhint$ = "Yellow Orange" - CASE 12: colorhint$ = "Bright Green" - CASE 13: colorhint$ = "Grass Green" - CASE 14: colorhint$ = "Yellow Green" - CASE 15: colorhint$ = "Yellow" - CASE 16: colorhint$ = "Dark Blue" - CASE 17: colorhint$ = "Dark Purple" - CASE 18: colorhint$ = "Maroon" - CASE 19: colorhint$ = "Hot Pink" - CASE 20: colorhint$ = "Dark Teal" - CASE 21: colorhint$ = "Dark Grey" - CASE 22: colorhint$ = "Rose" - CASE 23: colorhint$ = "Light Red" - CASE 24: colorhint$ = "Dark Blue Green" - CASE 25: colorhint$ = "Drab Green" - CASE 26: colorhint$ = "Drab Yellow" - CASE 27: colorhint$ = "Salmon" - CASE 28: colorhint$ = "Mint" - CASE 29: colorhint$ = "Sage" - CASE 30: colorhint$ = "Lime" - CASE 31: colorhint$ = "Dusty Yellow" - CASE 32: colorhint$ = "Indigo" - CASE 33: colorhint$ = "Purple" - CASE 34: colorhint$ = "Violet" - CASE 35: colorhint$ = "Bright Purple" - CASE 36: colorhint$ = "8 Blue" - CASE 37: colorhint$ = "Navy" - CASE 38: colorhint$ = "Lavender" - CASE 39: colorhint$ = "Pink" - CASE 40: colorhint$ = "That color that looks bad on cars" - CASE 41: colorhint$ = "Seafoam Blue" - CASE 42: colorhint$ = "Light Grey" - CASE 43: colorhint$ = "Light Pink" - CASE 44: colorhint$ = "Light Teal" - CASE 45: colorhint$ = "Seafoam Green" - CASE 46: colorhint$ = "Light Green" - CASE 47: colorhint$ = "Pale Yellow" - CASE 48: colorhint$ = "Electric Blue" - CASE 49: colorhint$ = "Light Indigo" - CASE 50: colorhint$ = "Light Purple" - CASE 51: colorhint$ = "Magenta" - CASE 52: colorhint$ = "Blue" - CASE 53: colorhint$ = "Light Blue" - CASE 54: colorhint$ = "Light Lavender" - CASE 55: colorhint$ = "Light Magenta" - CASE 56: colorhint$ = "Sky Blue" - CASE 57: colorhint$ = "Cornfield" - CASE 58: colorhint$ = "Pale Blue" - CASE 59: colorhint$ = "Pale Magenta" - CASE 60: colorhint$ = "Cyan" - CASE 61: colorhint$ = "Light Cyan" - CASE 62: colorhint$ = "Pale Cyan" - CASE 63: colorhint$ = "White" -END SELECT -END FUNCTION - -SUB buttonbind (gamepad, button AS control) -numdevice% = _DEVICES -done% = 0 -center "?", 9 -_DISPLAY -DO WHILE _DEVICEINPUT(gamepad) -LOOP -DO - IF _DEVICEINPUT(gamepad) THEN - FOR a% = 1 TO _LASTBUTTON(gamepad) - IF _BUTTONCHANGE(a%) THEN - button.number = a% - button.axis = 0 - done% = 1 - END IF - NEXT - FOR a% = 1 TO _LASTAXIS(gamepad) - IF ABS(_AXIS(a%)) >= .5 THEN - button.number = a% - button.axis = 1 - done% = 1 - END IF - NEXT - END IF -LOOP UNTIL done% = 1 -END SUB - -SUB keybind (gamepad, steering AS control, throttle AS control, primary AS control, secondary AS control, scrdown AS control, scrup AS control, pick AS control) -premetal& = _LOADIMAGE("brushedmetal.png") -brushedmetal& = _NEWIMAGE(swidth, sheight, 32) -_PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& -_FREEIMAGE premetal& -numdevice% = _DEVICES -IF gamepad <= numdevice% AND gamepad <> 0 THEN - DO - _LIMIT 60 - CLS - _PUTIMAGE (0, 0), brushedmetal& - IF steering.axis THEN steerstring$ = "Steering: Axis " + LTRIM$(STR$(steering.number)) ELSE steerstring$ = "Steering: Button " + LTRIM$(STR$(steering.number)) - center steerstring$, 1 - IF throttle.axis THEN throtstring$ = "Throttle: Axis " + LTRIM$(STR$(throttle.number)) ELSE throtstring$ = "Throttle: Button " + LTRIM$(STR$(throttle.number)) - center throtstring$, 2 - IF primary.axis THEN primstring$ = "Fire Primary: Axis " + LTRIM$(STR$(primary.number)) ELSE primstring$ = "Fire Primary: Button " + LTRIM$(STR$(primary.number)) - center primstring$, 3 - IF secondary.axis THEN secondstring$ = "Fire Secondary: Axis " + LTRIM$(STR$(secondary.number)) ELSE secondstring$ = "Fire Secondary: Button " + LTRIM$(STR$(secondary.number)) - center secondstring$, 4 - IF scrup.axis THEN upstring$ = "Next Weapon/Mod: Axis " + LTRIM$(STR$(scrup.number)) ELSE upstring$ = "Next Weapon/Mod: Button " + LTRIM$(STR$(scrup.number)) - center upstring$, 5 - IF scrdown.axis THEN downstring$ = "Last Weapon/Mod: Axis " + LTRIM$(STR$(scrdown.number)) ELSE downstring$ = "Last Weapon/Mod: Button " + LTRIM$(STR$(scrdown.number)) - center downstring$, 6 - IF pick.axis THEN pickstring$ = "Toggle Weapon/Mod: Axis " + LTRIM$(STR$(pick.number)) ELSE pickstring$ = "Toggle Weapon/Mod: Button " + LTRIM$(STR$(pick.number)) - center pickstring$, 7 - center "Back", 8 - IF menu(1) THEN buttonbind gamepad, steering - IF menu(2) THEN buttonbind gamepad, throttle - IF menu(3) THEN buttonbind gamepad, primary - IF menu(4) THEN buttonbind gamepad, secondary - IF menu(5) THEN buttonbind gamepad, scrup - IF menu(6) THEN buttonbind gamepad, scrdown - IF menu(7) THEN buttonbind gamepad, pick - testaxis = 0 - IF menu(8) THEN EXIT DO - cursor - clickonce - _DISPLAY - LOOP -END IF -_FREEIMAGE brushedmetal& -CLOSE #2 -END SUB - -SUB colorslider (red, green, blue, livery) 'The RGB color sliders to choose plane colors -DIM colory(2) -plane& = _LOADIMAGE("plane.png") -_CLEARCOLOR _RGB(0, 0, 0), plane& -premetal& = _LOADIMAGE("brushedmetal.png") -brushedmetal& = _NEWIMAGE(swidth, sheight, 32) -_PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& -_FREEIMAGE premetal& -liv1& = recolor&(plane&, _RGB(255, 255, 255), _RGB(red, green, blue)) -liv2& = colorgreyspectrum(plane&, _RGB(red, green, blue)) -DO - DO - mousex% = _MOUSEX - mousey% = _MOUSEY - lclick% = _MOUSEBUTTON(1) - LOOP WHILE _MOUSEINPUT - _LIMIT 60 - CLS - _PUTIMAGE (0, 0), brushedmetal& - PRINT "Press 'Esc' to go back." - colory(0) = 279 - red - colory(1) = 279 - green - colory(2) = 279 - blue - LINE (swidth / 2 - 33, 24)-(swidth / 2 - 32, 279), _RGB(127, 0, 0), B - LINE (swidth / 2 - 1, 24)-(swidth / 2, 279), _RGB(0, 127, 0), B - LINE (swidth / 2 + 31, 24)-(swidth / 2 + 32, 279), _RGB(0, 0, 127), B - IF trigger(swidth / 2 - 40, 16, swidth / 2 - 25, 287, mousex%, mousey%) AND lclick% THEN colory(0) = mousey%: liv1& = recolor&(plane&, _RGB(255, 255, 255), _RGB(red, green, blue)): liv2& = colorgreyspectrum(plane&, _RGB(red, green, blue)) - IF trigger(swidth / 2 - 8, 16, swidth / 2 + 7, 287, mousex%, mousey%) AND lclick% THEN colory(1) = mousey%: liv1& = recolor&(plane&, _RGB(255, 255, 255), _RGB(red, green, blue)): liv2& = colorgreyspectrum(plane&, _RGB(red, green, blue)) - IF trigger(swidth / 2 + 24, 16, swidth / 2 + 39, 287, mousex%, mousey%) AND lclick% THEN colory(2) = mousey%: liv1& = recolor&(plane&, _RGB(255, 255, 255), _RGB(red, green, blue)): liv2& = colorgreyspectrum(plane&, _RGB(red, green, blue)) - FOR a% = 0 TO 2 - IF colory(a%) < 24 THEN colory(a%) = 24 - IF colory(a%) > 279 THEN colory(a%) = 279 - NEXT - LINE (swidth / 2 - 40, colory(0) - 8)-(swidth / 2 - 25, colory(0) + 7), _RGB(255, 0, 0), BF - LINE (swidth / 2 - 8, colory(1) - 8)-(swidth / 2 + 7, colory(1) + 7), _RGB(0, 255, 0), BF - LINE (swidth / 2 + 24, colory(2) - 8)-(swidth / 2 + 39, colory(2) + 7), _RGB(0, 0, 255), BF - red = 279 - colory(0) - green = 279 - colory(1) - blue = 279 - colory(2) - center LTRIM$(STR$(red)) + ", " + LTRIM$(STR$(green)) + ", " + LTRIM$(STR$(blue)), 16 - _PUTIMAGE (swidth / 2 - 32, 310), liv1&, , (64, 0)-(95, 31) - _PUTIMAGE (swidth / 2, 310), liv2&, , (64, 0)-(95, 31) - IF trigger(swidth / 2 - 32, 310, swidth / 2 - 1, 341, mousex%, mousey%) AND lclick% THEN livery = 0 - IF trigger(swidth / 2, 310, swidth / 2 + 31, 341, mousex%, mousey%) AND lclick% THEN livery = 1 - IF livery = 0 THEN LINE (swidth / 2 - 32, 310)-(swidth / 2 - 1, 341), _RGB(255, 255, 255), B - IF livery = 1 THEN LINE (swidth / 2, 310)-(swidth / 2 + 31, 341), _RGB(255, 255, 255), B - cursor - _DISPLAY -LOOP UNTIL _KEYDOWN(27) -_FREEIMAGE plane& -_FREEIMAGE brushedmetal& -END SUB - -SUB volumeslider (vol) -premetal& = _LOADIMAGE("brushedmetal.png") -brushedmetal& = _NEWIMAGE(swidth, sheight, 32) -_PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& -_FREEIMAGE premetal& -DO - DO - mousex% = _MOUSEX - mousey% = _MOUSEY - lclick% = _MOUSEBUTTON(1) - LOOP WHILE _MOUSEINPUT - _LIMIT 60 - CLS - _PUTIMAGE (0, 0), brushedmetal& - PRINT "Press 'Esc' to go back." - LINE (swidth / 2 - 1, 24)-(swidth / 2, 279), _RGB(255, 255, 255), B - IF trigger(swidth / 2 - 8, 16, swidth / 2 + 7, 287, mousex%, mousey%) AND lclick% THEN vol = INT((279 - mousey%) / 2.55) / 100 - IF vol > 1 THEN vol = 1 - IF vol < 0 THEN vol = 0 - LINE (swidth / 2 - 8, 279 - vol * 255 - 8)-(swidth / 2 + 7, 279 - vol * 255 + 7), _RGB(255, 255, 255), BF - center LTRIM$(STR$(INT(vol * 100))) + "%", 16 - cursor - _DISPLAY -LOOP UNTIL _KEYDOWN(27) -_FREEIMAGE brushedmetal& -END SUB - -SUB genground (topo%()) -FOR y% = 0 TO 15 - FOR x% = 0 TO 15 - IF topo%(x%, y%) = 0 THEN - IF x% - 1 >= 0 AND y% - 1 >= 0 THEN IF topo%(x% - 1, y% - 1) = 1 THEN topo%(x%, y%) = 3 - IF x% + 1 <= 15 AND y% - 1 >= 0 THEN IF topo%(x% + 1, y% - 1) = 1 THEN topo%(x%, y%) = 4 - IF x% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 THEN topo%(x%, y%) = 5 - IF x% + 1 <= 15 AND y% + 1 <= 15 THEN IF topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 6 - IF x% - 1 >= 0 AND y% - 1 >= 0 AND x% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% + 1, y% - 1) = 1 THEN topo%(x%, y%) = 19 - IF x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% + 1, y% - 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 20 - IF x% - 1 >= 0 AND y% + 1 <= 15 AND x% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 21 - IF x% - 1 >= 0 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% - 1, y% + 1) = 1 THEN topo%(x%, y%) = 22 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 AND topo%(x% + 1, y% - 1) = 1 THEN topo%(x%, y%) = 42 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 43 - IF y% - 1 >= 0 THEN IF topo%(x%, y% - 1) = 1 THEN topo%(x%, y%) = 7 - IF x% + 1 <= 15 THEN IF topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 8 - IF y% + 1 <= 15 THEN IF topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 9 - IF x% - 1 >= 0 THEN IF topo%(x% - 1, y%) = 1 THEN topo%(x%, y%) = 10 - IF x% - 1 >= 0 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 24 - IF x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% + 1, y% - 1) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 25 - IF x% - 1 >= 0 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x% - 1, y% + 1) = 1 THEN topo%(x%, y%) = 26 - IF x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 27 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x% + 1, y% - 1) = 1 THEN topo%(x%, y%) = 28 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 29 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 30 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 31 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% + 1, y% - 1) = 1 AND topo%(x, y% + 1) = 1 THEN topo%(x%, y%) = 34 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x% + 1, y% - 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 35 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 AND topo%(x% + 1, y% + 1) = 1 AND topo%(x%, y% - 1) = 1 THEN topo%(x%, y%) = 36 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% - 1, y% + 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 37 - IF x% + 1 <= 15 AND y% - 1 >= 0 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 11 - IF x% + 1 <= 15 AND y% + 1 <= 15 THEN IF topo%(x% + 1, y%) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 12 - IF x% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 13 - IF x% - 1 >= 0 AND y% - 1 >= 0 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x% - 1, y%) = 1 THEN topo%(x%, y%) = 14 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 AND topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 38 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x%, y% + 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 39 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% + 1) = 1 AND topo%(x% + 1, y% - 1) = 1 THEN topo%(x%, y%) = 40 - IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 41 - IF y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 32 - IF x% - 1 >= 0 AND x% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 33 - IF x% - 1 >= 0 AND y% + 1 <= 15 AND x% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% + 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 15 - IF x% - 1 >= 0 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% - 1) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 16 - IF x% - 1 >= 0 AND y% - 1 >= 0 AND x% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 17 - IF x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 18 - IF x% - 1 >= 0 AND y% - 1 >= 0 AND x% + 1 <= 15 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 23 - END IF - NEXT -NEXT -END SUB - -SUB scrollground (allground&) 'Makes the scrolling background with all the grass -- rivers are planned for the future. Demensions are 4096 + screen width - 200 x 4096 + screen height. -IF allground& THEN - _PUTIMAGE (0, 0)-(swidth - 200, sheight), allground&, 0, (screenanchorx%, screenanchory%)-(screenanchorx% + swidth - 200, screenanchory% + sheight) -END IF -END SUB - -SUB aimarket (player AS airplane, plane%, weapons() AS weapon, wepstorage() AS weapon) -DIM switchvar AS weapon -FOR k% = 0 TO 15 - FOR l% = 1 TO 5 - IF wepstorage(plane%, k%).wep = 0 AND weapons(plane%, l%).wep <> 0 THEN - switchvar = weapons(plane%, l%) - weapons(plane%, l%) = wepstorage(plane%, k%) - wepstorage(plane%, k%) = switchvar - IF l% = 2 OR l% = 3 THEN - FOR look% = 0 TO 15 - IF wepstorage(plane%, look%).wep = 0 THEN wepstorage(plane%, look%) = switchvar: EXIT FOR - NEXT - END IF - EXIT FOR - END IF - NEXT -NEXT -choice% = INT(RND * 14) + 1 -SELECT CASE choice% - CASE 1: IF player.credits >= 3 THEN selectweapon 1, plane%, wepstorage(): player.credits = player.credits - 3 - CASE 2: IF player.credits >= 3 THEN selectweapon 2, plane%, wepstorage(): player.credits = player.credits - 3 - CASE 3: IF player.credits >= 3 THEN selectweapon 3, plane%, wepstorage(): player.credits = player.credits - 3 - CASE 4: IF player.credits >= 3 THEN selectweapon 4, plane%, wepstorage(): player.credits = player.credits - 3 - CASE 5: IF player.credits >= 3 THEN selectweapon 5, plane%, wepstorage(): player.credits = player.credits - 3 - CASE 6: IF player.credits >= 5 THEN selectweapon 6, plane%, wepstorage(): player.credits = player.credits - 5 - CASE 9: IF player.credits >= 4 THEN selectmissile 1, plane%, wepstorage(): player.credits = player.credits - 4 - CASE 10: IF player.credits >= 5 THEN selectmissile 2, plane%, wepstorage(): player.credits = player.credits - 5 - CASE 11: IF player.credits >= 6 THEN selectmissile 3, plane%, wepstorage(): player.credits = player.credits - 6 - CASE 12: IF player.credits >= 5 AND player.generator < 1 THEN player.generator = player.generator + .1: player.credits = player.credits - 5 - CASE 13: IF player.credits >= 5 AND player.maxbatt < 200 THEN player.maxbatt = player.maxbatt + 10: player.credits = player.credits - 5 - CASE 14: IF player.credits >= 5 AND player.maxarm < 20 THEN player.maxarm = player.maxarm + 1: player.credits = player.credits - 5 - CASE 15: IF player.credits >= 1 AND player.ammo < 10000 THEN player.ammo = player.ammo + 1000: player.credits = player.credits - 1 -END SELECT -FOR a% = 2 TO 3 - FOR k% = 0 TO 15 - IF wepstorage(plane%, k%).wep <> 0 AND wepstorage(plane%, k%).wep <= 8 THEN - FOR look% = 0 TO 15 - IF wepstorage(plane%, look%).wep = wepstorage(plane%, k%).wep AND look% <> k% THEN - switchvar = weapons(plane%, a%) - weapons(plane%, a%) = wepstorage(plane%, k%) - wepstorage(plane%, k%) = switchvar - wepstorage(plane%, look%) = switchvar - EXIT FOR: EXIT FOR - END IF - NEXT - END IF - NEXT -NEXT -FOR k% = 0 TO 15 - IF wepstorage(plane%, k%).wep <> 0 AND wepstorage(plane%, k%).wep <= 8 THEN - switchvar = weapons(plane%, 1) - weapons(plane%, 1) = wepstorage(plane%, k%) - wepstorage(plane%, k%) = switchvar - EXIT FOR - END IF -NEXT -FOR a% = 4 TO 5 - FOR k% = 0 TO 15 - IF wepstorage(plane%, k%).wep >= 9 THEN - switchvar = weapons(plane%, a%) - weapons(plane%, a%) = wepstorage(plane%, k%) - wepstorage(plane%, k%) = switchvar - EXIT FOR - END IF - NEXT -NEXT -player.market = 0 -player.force = 3 -player.speed = 3 -player.battery = player.maxbatt -SELECT CASE player.team - CASE 0 - player.x = 32 - player.dir = 0 - CASE 1 - player.x = 4063 - player.dir = pi - CASE 2 - player.y = 32 - player.dir = pi / 2 - CASE 3 - player.y = 4063 - player.dir = 3 * pi / 2 -END SELECT -END SUB - -SUB market (player AS airplane, plane%, weapons() AS weapon, mods() AS aug, wepimage&(), modimage&(), statimage&(), wepstorage() AS weapon, modstorage() AS aug, wepmouse AS weapon, modmouse AS aug, whichstore%, quartz&, quartz2&, cyberbit&, brushedmetal&, tooltips&(), difficulty) -'Handles the markets -_FONT cyberbit& -DO - mousex% = _MOUSEX - mousey% = _MOUSEY - lclick% = _MOUSEBUTTON(1) -LOOP WHILE _MOUSEINPUT -CLS -_PUTIMAGE (0, 0), brushedmetal& -IF trigger(0, 0, 191, 31, mousex%, mousey%) AND lclick% THEN whichstore% = 0 -IF trigger(192, 0, 383, 31, mousex%, mousey%) AND lclick% THEN whichstore% = 1 -IF trigger(384, 0, 575, 31, mousex%, mousey%) AND lclick% THEN whichstore% = 2 -SELECT CASE whichstore% - CASE 0: wepmarket player.credits, plane%, weapons(), wepimage&(), wepstorage(), wepmouse, quartz2& - CASE 1: modmarket player.credits, plane%, mods(), modimage&(), modstorage(), modmouse, tooltips&() - CASE 2: statmarket player, statimage&(), quartz2& -END SELECT -_FONT quartz& -PRINT " WEAPONS | MODS | STATS |" -_FONT cyberbit& -IF difficulty <> 0 THEN _PRINTSTRING (swidth - _PRINTWIDTH("Time: " + LTRIM$(STR$(60 - player.markettime \ 60))), sheight - 72), "Time: " + LTRIM$(STR$(60 - player.markettime \ 60)) -_PRINTSTRING (swidth - _PRINTWIDTH("Cr. " + LTRIM$(STR$(player.credits))), sheight - 48), "Cr. " + LTRIM$(STR$(player.credits)) -_PRINTSTRING (swidth - _PRINTWIDTH("EXIT"), sheight - 24), "EXIT" -IF trigger(swidth - _PRINTWIDTH("EXIT"), sheight - 24, swidth - 1, sheight - 1, mousex%, mousey%) AND lclick% = -1 AND ignore` = 0 OR player.markettime >= 3600 AND difficulty <> 0 OR _KEYDOWN(27) THEN - player.market = 0 - player.x = 32 - player.dir = 0 - player.force = 3 - player.speed = 3 - player.battery = player.maxbatt - player.waittime = player.waittime + player.markettime * 2 - player.markettime = 0 - _FONT 16 - ignore` = -1 -END IF -player.markettime = player.markettime + 1 -cursor -clickonce -END SUB - -SUB wepmarket (credits%, plane%, weapons() AS weapon, wepimage&(), storage() AS weapon, inmouse AS weapon, quartz&) 'The market with the weapons in it -DIM switchvar AS weapon -DIM blankspace AS weapon -DO - mousex% = _MOUSEX - mousey% = _MOUSEY - lclick% = _MOUSEBUTTON(1) - rclick% = _MOUSEBUTTON(2) -LOOP WHILE _MOUSEINPUT -LINE (0, 0)-(191, 31), _RGB(127, 0, 0), BF -FOR wep% = 1 TO 11 - _PUTIMAGE (0, wep% * 32), wepimage&(wep%) -NEXT -_PRINTSTRING (32, 32), "Laser - Cr.3" -_PRINTSTRING (32, 64), "Vulcan - Cr.3" -_PRINTSTRING (32, 96), "Spread - Cr.3" -_PRINTSTRING (32, 128), "Plasma - Cr.3" -_PRINTSTRING (32, 160), "Gauss - Cr.3" -_PRINTSTRING (32, 192), "Avenger - Cr.5" -_PRINTSTRING (32, 224), "Homing Plasma - Cr.5" -_PRINTSTRING (32, 256), "Pulse - Cr.5" -_PRINTSTRING (32, 288), "10 Heat-Seeker Missiles - Cr.4" -_PRINTSTRING (32, 320), "10 Radar-Guided Missiles - Cr.5" -_PRINTSTRING (32, 352), "4 Cruise Missiles - Cr.6" -weaponhud swidth - 180, 20, weapons(), plane%, wepimage&(), 0 -_PRINTSTRING (swidth - 180, 104), "STORAGE" -grid swidth - 164, 128 -FOR y% = 0 TO 3 - FOR x% = 0 TO 3 - _PUTIMAGE (swidth - 164 + x% * 32, 128 + y% * 32), wepimage&(storage(0, x% + 4 * y%).wep) - IF storage(0, x% + 4 * y%).wep >= 9 THEN _PRINTSTRING (swidth - 133 - _PRINTWIDTH(LTRIM$(STR$(storage(0, x% + 4 * y%).ammo))) + x% * 32, 159 - _FONTHEIGHT + y% * 32), LTRIM$(STR$(storage(0, x% + 4 * y%).ammo)) - IF trigger(swidth - 164 + x% * 32, 128 + y% * 32, swidth - 133 + x% * 32, 159 + y% * 32, mousex%, mousey%) AND lclick% AND ignore` = 0 THEN - IF storage(0, x% + 4 * y%).wep >= 9 THEN - IF storage(0, x% + 4 * y%).wep = inmouse.wep THEN - storage(0, x% + 4 * y%).ammo = storage(0, x% + 4 * y%).ammo + inmouse.ammo - inmouse = blankspace - END IF - END IF - switchvar = inmouse - inmouse = storage(0, x% + 4 * y%) - storage(0, x% + 4 * y%) = switchvar - ignore` = -1 - END IF - IF trigger(swidth - 164 + x% * 32, 128 + y% * 32, swidth - 133 + x% * 32, 159 + y% * 32, mousex%, mousey%) AND rclick% AND ignore` = 0 THEN - storage(0, x% + 4 * y%) = blankspace - ignore` = -1 - END IF - NEXT -NEXT -changeweapons swidth - 180, 20, mousex%, mousey%, lclick%, plane%, inmouse, weapons(), storage() -_PUTIMAGE (mousex% - 16, mousey% - 16), wepimage&(inmouse.wep) -IF trigger(0, 32, swidth - 200, 63, mousex%, mousey%) THEN - nrg = 1.25: dam = 25: rpm = 300: spd = 16: amo = 0 - specattr1$ = "None" - 'wot "A standard laser cannon, with medium rate of fire, medium power, and medium energy consumption.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectweapon 1, 0, storage(): credits% = credits% - 3: ignore` = -1 -END IF -IF trigger(0, 64, swidth - 200, 95, mousex%, mousey%) THEN - nrg = 0: dam = 30: rpm = 3600: spd = 20: amo = 60 - specattr1$ = "Spread angle = 3" + CHR$(248) - 'wot "A heavy machine gun with a high fire rate. Since it's a balistic weapon, it uses bullets rather than energy.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectweapon 2, 0, storage(): credits% = credits% - 3: ignore` = -1 -END IF -IF trigger(0, 96, swidth - 200, 127, mousex%, mousey%) THEN - nrg = 2.25: dam = 56.25: rpm = 450: spd = 16: amo = 0 - specattr1$ = "Bullets/shot = 3" - specattr2$ = "Spread angle = 60" + CHR$(248) - 'wot "A unique energy weapon that fires three shots at even angles -- one strait forward, and one on each side.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectweapon 3, 0, storage(): credits% = credits% - 3: ignore` = -1 -END IF -IF trigger(0, 128, swidth - 200, 159, mousex%, mousey%) THEN - nrg = 5: dam = 100: rpm = 600: spd = 18: amo = 0 - specattr1$ = "None" - 'wot "A high-power blaster. It has a high firing rate and energy consumption, so watch your battery.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectweapon 4, 0, storage(): credits% = credits% - 3: ignore` = -1 -END IF -IF trigger(0, 160, swidth - 200, 191, mousex%, mousey%) THEN - nrg = 0: dam = 30: rpm = 450: spd = 20: amo = 60 - specattr1$ = "Bullets/shot = 8" - specattr2$ = "Spread angle = 3" + CHR$(248) - 'wot "A machine gun that, instead of firing individual bullets consecutively, loads all barrels and fires them all at once.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectweapon 5, 0, storage(): credits% = credits% - 3: ignore` = -1 -END IF -IF trigger(0, 192, swidth - 200, 223, mousex%, mousey%) THEN - nrg = 0: dam = 60: rpm = 3600: spd = 20: amo = 60 - specattr1$ = "Recoil effect" - specattr2$ = "Spread angle = 3" + CHR$(248) - 'wot "This powerful machine gun's recoil is more powerful than your engine, so throttle up.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 5 AND ignore` = 0 THEN selectweapon 6, 0, storage(): credits% = credits% - 5: ignore` = -1 -END IF -IF trigger(0, 224, swidth - 200, 255, mousex%, mousey%) THEN - nrg = 10: dam = 60: rpm = 3600: spd = 12: amo = 0 - specattr1$ = "Charged" - specattr2$ = "Homing" - 'wot "A charging weapon that fires a slow homing shot. Good to have when you run out of missiles.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 5 AND ignore` = 0 THEN selectweapon 7, 0, storage(): credits% = credits% - 5: ignore` = -1 -END IF -IF trigger(0, 256, swidth - 200, 287, mousex%, mousey%) THEN - nrg = 10: dam = 60: rpm = 3600: spd = 16: amo = 0 - specattr1$ = "Charged" - specattr2$ = "Ghost" - 'wot "A charging weapon who'se shots continue after hitting something.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 5 AND ignore` = 0 THEN selectweapon 8, 0, storage(): credits% = credits% - 5: ignore` = -1 -END IF -IF trigger(0, 288, swidth - 200, 319, mousex%, mousey%) THEN - nrg = 0: dam = 50: rpm = 60: spd = 16: amo = 1 - specattr1$ = "Homing" - 'wot "Missiles that home in on whatever they see first.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 4 AND ignore` = 0 THEN selectmissile 1, 0, storage(): credits% = credits% - 4: ignore` = -1 -END IF -IF trigger(0, 320, swidth - 200, 351, mousex%, mousey%) THEN - nrg = 0: dam = 50: rpm = 60: spd = 16: amo = 1 - specattr1$ = "Homing (Leads)" - 'wot "Homes more accurately than a heat-seeker, and has longer range as well.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 5 AND ignore` = 0 THEN selectmissile 2, 0, storage(): credits% = credits% - 5: ignore` = -1 -END IF -IF trigger(0, 352, swidth - 200, 383, mousex%, mousey%) THEN - nrg = 0: dam = 300: rpm = 60: spd = 16: amo = 1 - specattr1$ = "Splash range = 300" - specattr2$ = "Homing (weak)" - 'wot "It doesn't home very tightly, but it flies for a long time and has a very, very big explosion. It also doesn't require a direct hit.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 6 AND ignore` = 0 THEN selectmissile 3, 0, storage(): credits% = credits% - 6: ignore` = -1 -END IF -hudbar 8, "NRG", nrg, 10, _RGB(127, 127, 0), "/sec", quartz& -hudbar 9, "DAM", dam, 100, _RGB(0, 0, 127), "/sec", quartz& -hudbar 10, "RPM", rpm, 3600, _RGB(0, 127, 0), "", quartz& -hudbar 11, "SPD", spd, 20, _RGB(0, 127, 127), "", quartz& -hudbar 12, "AMO", amo, 60, _RGB(31, 31, 31), "/sec", quartz& -_PRINTSTRING (swidth - 200, 416), specattr1$ -_PRINTSTRING (swidth - 200, 448), specattr2$ -END SUB - -SUB modmarket (credits%, plane%, mods() AS aug, modimage&(), storage() AS aug, inmouse AS aug, tooltips&()) 'The market with the mods in it -DIM switchvar AS aug -DIM blankspace AS aug -DO - mousex% = _MOUSEX - mousey% = _MOUSEY - lclick% = _MOUSEBUTTON(1) - rclick% = _MOUSEBUTTON(2) -LOOP WHILE _MOUSEINPUT -LINE (192, 0)-(383, 31), _RGB(0, 127, 0), BF -FOR wep% = 1 TO 4 - _PUTIMAGE (0, wep% * 32), modimage&(wep%) -NEXT -_PRINTSTRING (32, 32), "Aimer - Cr.3" -_PRINTSTRING (32, 64), "Energy ==> Armor - Cr.3" -_PRINTSTRING (32, 96), "Solid Rocket Booster - Cr.3" -_PRINTSTRING (32, 128), "Flare Pack - Cr.3" -modhud swidth - 180, 20, mods(), plane%, modimage&(), 0 -_PRINTSTRING (swidth - 180, 104), "STORAGE" -grid swidth - 164, 128 -FOR y% = 0 TO 3 - FOR x% = 0 TO 3 - _PUTIMAGE (swidth - 164 + x% * 32, 128 + y% * 32), modimage&(storage(0, x% + 4 * y%).kind) - IF storage(0, x% + 4 * y%).ammo > 0 THEN _PRINTSTRING (swidth - 133 - _PRINTWIDTH(LTRIM$(STR$(storage(0, x% + 4 * y%).ammo))) + x% * 32, 159 - _FONTHEIGHT + y% * 32), LTRIM$(STR$(storage(0, x% + 4 * y%).ammo)) - IF trigger(swidth - 164 + x% * 32, 128 + y% * 32, swidth - 133 + x% * 32, 159 + y% * 32, mousex%, mousey%) AND lclick% AND ignore` = 0 THEN - IF storage(0, x% + 4 * y%).ammo > 0 THEN - IF storage(0, x% + 4 * y%).kind = inmouse.kind THEN - storage(0, x% + 4 * y%).ammo = storage(0, x% + 4 * y%).ammo + inmouse.ammo - inmouse = blankspace - END IF - END IF - switchvar = inmouse - inmouse = storage(0, x% + 4 * y%) - storage(0, x% + 4 * y%) = switchvar - ignore` = -1 - END IF - IF trigger(swidth - 164 + x% * 32, 128 + y% * 32, swidth - 133 + x% * 32, 159 + y% * 32, mousex%, mousey%) AND rclick% AND ignore` = 0 THEN - storage(0, x% + 4 * y%) = blankspace - ignore` = -1 - END IF - NEXT -NEXT -changemods swidth - 180, 20, mousex%, mousey%, lclick%, plane%, inmouse, mods() -_PUTIMAGE (mousex% - 16, mousey% - 16), modimage&(inmouse.kind) -IF trigger(0, 32, swidth - 200, 63, mousex%, mousey%) THEN - _PUTIMAGE (mousex%, mousey%), tooltips&(1) - 'wot "This device displays an estimate of where enemy planes will be when your shots get there, as well as a line to help you aim. Fire when the line crosses a circle. Calibrated for lasers.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectmod 1, 0, storage(): credits% = credits% - 3: ignore` = -1 -END IF -IF trigger(0, 64, swidth - 200, 95, mousex%, mousey%) THEN - _PUTIMAGE (mousex%, mousey%), tooltips&(2) - 'wot "This device slowly regenerates armor at the cost of electricity. Watch your battery.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectmod 2, 0, storage(): credits% = credits% - 3: ignore` = -1 -END IF -IF trigger(0, 96, swidth - 200, 127, mousex%, mousey%) THEN - _PUTIMAGE (mousex%, mousey%), tooltips&(3) - 'wot "Simple, but effective, SRBs are used to provide a short boost of speed in case the need for a quick escape arises. It takes no energy, but runs out of fuel after only one use.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectmod 3, 0, storage(): credits% = credits% - 3: ignore` = -1 -END IF -IF trigger(0, 128, swidth - 200, 159, mousex%, mousey%) THEN - _PUTIMAGE (mousex%, mousey%), tooltips&(4) - 'wot "Using one of these fires four flares that can trick all kinds of missiles. It works 4 out of 5 times.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectmod 4, 0, storage(): credits% = credits% - 3: ignore` = -1 -END IF -END SUB - -SUB statmarket (player AS airplane, statimage&(), quartz&) 'The market with the stats in it -DO - mousex% = _MOUSEX - mousey% = _MOUSEY - lclick% = _MOUSEBUTTON(1) - rclick% = _MOUSEBUTTON(2) -LOOP WHILE _MOUSEINPUT -LINE (384, 0)-(575, 31), _RGB(0, 0, 127), BF -FOR wep% = 1 TO 4 - _PUTIMAGE (0, wep% * 32), statimage&(wep%) -NEXT -_PRINTSTRING (32, 32), "+ 5% Generator - Cr. 5 (Currently " + LTRIM$(STR$(INT(player.generator * 50))) + ")" -_PRINTSTRING (32, 64), "+ 10% Battery life - Cr.5 (Currently " + LTRIM$(STR$(player.maxbatt)) + ")" -_PRINTSTRING (32, 96), "+ 10% Armor - Cr.5 (Currently " + LTRIM$(STR$(player.maxarm * 10)) + ")" -_PRINTSTRING (32, 128), "1000 Bullets - Cr.1 (currently " + LTRIM$(STR$(player.ammo)) + ")" -IF trigger(0, 32, swidth - 200, 63, mousex%, mousey%) THEN - 'wot "A generator upgrade that increases its effectiveness.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND player.credits >= 5 AND ignore` = 0 AND player.generator < 2 THEN player.generator = player.generator + .1: player.credits = player.credits - 5: ignore` = -1 -END IF -IF trigger(0, 64, swidth - 200, 95, mousex%, mousey%) THEN - 'wot "Increases battery storage capacity. Note that the meter on your dashboard displays % of total battery charge.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND player.credits >= 5 AND ignore` = 0 AND player.maxbatt < 200 THEN player.maxbatt = player.maxbatt + 10: player.credits = player.credits - 5: ignore` = -1 -END IF -IF trigger(0, 96, swidth - 200, 127, mousex%, mousey%) THEN - 'wot "Increases the strength of your armor. Note that the meter on your dashboard displays % of total armor.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND player.credits >= 5 AND ignore` = 0 AND player.maxarm < 20 THEN player.maxarm = player.maxarm + 1: player.credits = player.credits - 5: ignore` = -1 -END IF -IF trigger(0, 128, swidth - 200, 159, mousex%, mousey%) THEN - 'wot "Machine gun ammunition.", mousex%, mousey%, mousex% + 256 - IF lclick% = -1 AND player.credits >= 1 AND ignore` = 0 AND player.ammo < 10000 THEN player.ammo = player.ammo + 1000: player.credits = player.credits - 1: ignore` = -1 -END IF -hudbar 8, "GEN", player.generator / 2 * 100, 100, _RGB(0, 127, 0), "/100", quartz& -hudbar 9, "BAT", player.maxbatt, 200, _RGB(127, 127, 0), "/200", quartz& -hudbar 10, "ARM", player.maxarm * 10, 200, _RGB(0, 0, 127), "/200", quartz& -hudbar 11, "AMO", player.ammo, 10000, _RGB(31, 31, 31), "/10000", quartz& -END SUB - -SUB grid (x AS INTEGER, y AS INTEGER) 'Makes the storage grid at coordinates ("x", "y") -FOR y2% = 0 TO 4 - LINE (x, y + y2% * 32)-(x + 128, y + y2% * 32), _RGB(255, 255, 255) -NEXT -FOR x2% = 0 TO 4 - LINE (x + x2% * 32, y)-(x + x2% * 32, y + 128), _RGB(255, 255, 255) -NEXT -END SUB - -SUB selectweapon (num AS INTEGER, plane AS INTEGER, storage() AS weapon) 'Gives the player weapons that pchk buys, and puts them in storage. -DIM selection(8) AS weapon -selection(1).wep = 1 -selection(1).ifon = -1 -selection(1).total = 12 -selection(1).energy = .25 -selection(2).wep = 2 -selection(2).ifon = -1 -selection(2).total = 1 -selection(2).ammo = 1 -selection(3).wep = 3 -selection(3).ifon = -1 -selection(3).total = 8 -selection(3).energy = .3 -selection(4).wep = 4 -selection(4).ifon = -1 -selection(4).total = 6 -selection(4).energy = .5 -selection(5).wep = 5 -selection(5).ifon = -1 -selection(5).total = 8 -selection(5).ammo = 8 -selection(6).wep = 6 -selection(6).ifon = -1 -selection(6).total = 1 -selection(6).ammo = 1 -selection(7).wep = 7 -selection(7).ifon = -1 -selection(7).kind = 1 -selection(8).wep = 8 -selection(8).ifon = -1 -selection(8).kind = 1 -FOR stor% = 0 TO 15 - IF storage(plane, stor%).wep = 0 THEN storage(plane, stor%) = selection(num): EXIT FOR -NEXT -END SUB - -SUB selectmissile (num AS INTEGER, plane AS INTEGER, storage() AS weapon) 'Gives the player missiles that pchk buys, and puts them in storage. -DIM selection(3) AS weapon -selection(1).wep = 9 -selection(1).ifon = -1 -selection(1).total = 60 -selection(1).ammo = 10 -selection(2).wep = 10 -selection(2).ifon = -1 -selection(2).total = 60 -selection(2).ammo = 10 -selection(3).wep = 11 -selection(3).ammo = 4 -selection(3).ifon = -1 -selection(3).total = 60 -FOR stor% = 0 TO 15 - IF storage(plane, stor%).wep = selection(num).wep THEN storage(plane, stor%).ammo = storage(plane, stor%).ammo + selection(num).ammo: skip` = -1: EXIT FOR -NEXT -IF skip` = 0 THEN - FOR stor% = 0 TO 15 - IF storage(plane, stor%).wep = 0 THEN storage(plane, stor%) = selection(num): EXIT FOR - NEXT -END IF -END SUB - -SUB selectmod (num AS INTEGER, plane AS INTEGER, storage() AS aug) 'Gives the player mods that pchk buys, and puts them in storage. -DIM selection(4) AS aug -selection(1).kind = 1 -selection(1).energy = .5 -selection(2).kind = 2 -selection(2).energy = 9 -selection(3).kind = 3 -selection(3).fuel = 180 -selection(3).ammo = 1 -selection(4).kind = 4 -selection(4).ammo = 3 -FOR stor% = 0 TO 15 - IF storage(plane, stor%).kind = selection(num).kind AND selection(num).ammo > 0 THEN storage(plane, stor%).ammo = storage(plane, stor%).ammo + selection(num).ammo: skip% = -1: EXIT FOR -NEXT -IF skip% = 0 THEN - FOR stor% = 0 TO 15 - IF storage(plane, stor%).kind = 0 THEN storage(plane, stor%) = selection(num): EXIT FOR - NEXT -END IF -END SUB - -SUB weaponhud (x AS INTEGER, y AS INTEGER, weapons() AS weapon, plane AS INTEGER, wepimage&(), picked%) 'The HUD for the weapons. -LINE (x + 64, y)-(x + 95, y + 31), _RGB(255, 0, 0), B -IF picked% = 1 THEN LINE (x + 65, y + 1)-(x + 94, y + 30), _RGB(255, 255, 255), B -IF weapons(plane, 1).ifon = -1 THEN LINE (x + 66, y + 2)-(x + 93, y + 29), _RGB(127, 0, 0), BF -_PUTIMAGE (x + 64, y), wepimage&(weapons(plane, 1).wep) -_PRINTSTRING (x + 64, y), "1" -LINE (x + 32, y + 16)-(x + 63, y + 47), _RGB(255, 0, 0), B: LINE (x + 96, y + 16)-(x + 127, y + 47), _RGB(255, 0, 0), B -IF picked% = 2 THEN LINE (x + 33, y + 17)-(x + 62, y + 46), _RGB(255, 255, 255), B: LINE (x + 97, y + 17)-(x + 126, y + 46), _RGB(255, 255, 255), B -IF weapons(plane, 2).ifon = -1 THEN LINE (x + 34, y + 18)-(x + 61, y + 45), _RGB(127, 0, 0), BF: LINE (x + 98, y + 18)-(x + 125, y + 45), _RGB(127, 0, 0), BF -_PUTIMAGE (x + 32, y + 16), wepimage&(weapons(plane, 2).wep): _PUTIMAGE (x + 96, y + 16), wepimage&(weapons(plane, 2).wep) -_PRINTSTRING (x + 32, y + 16), "2": _PRINTSTRING (x + 96, y + 16), "2" -LINE (x, y + 32)-(x + 31, y + 63), _RGB(255, 0, 0), B: LINE (x + 128, y + 32)-(x + 159, y + 63), _RGB(255, 0, 0), B -IF picked% = 3 THEN LINE (x + 1, y + 33)-(x + 30, y + 62), _RGB(255, 255, 255), B: LINE (x + 129, y + 33)-(x + 158, y + 62), _RGB(255, 255, 255), B -IF weapons(plane, 3).ifon = -1 THEN LINE (x + 2, y + 34)-(x + 29, y + 61), _RGB(127, 0, 0), BF: LINE (x + 130, y + 34)-(x + 157, y + 61), _RGB(127, 0, 0), BF -_PUTIMAGE (x, y + 32), wepimage&(weapons(plane, 3).wep): _PUTIMAGE (x + 128, y + 32), wepimage&(weapons(plane, 3).wep) -_PRINTSTRING (x, y + 32), "3": _PRINTSTRING (x + 128, y + 32), "3" -LINE (x + 64, y + 32)-(x + 95, y + 63), _RGB(0, 0, 255), B -IF picked% = 4 THEN LINE (x + 65, y + 33)-(x + 94, y + 62), _RGB(255, 255, 255), B -IF weapons(plane, 4).ifon = -1 THEN LINE (x + 66, y + 34)-(x + 93, y + 61), _RGB(0, 0, 127), BF -_PUTIMAGE (x + 64, y + 32), wepimage&(weapons(plane, 4).wep) -_PRINTSTRING (x + 64, y + 32), "4" -_PRINTSTRING (x + 95 - _PRINTWIDTH(LTRIM$(STR$(weapons(plane, 4).ammo))), y + 63 - _FONTHEIGHT), LTRIM$(STR$(weapons(plane, 4).ammo)) -LINE (x + 32, y + 48)-(x + 63, y + 79), _RGB(0, 0, 255), B: LINE (x + 96, y + 48)-(x + 127, y + 79), _RGB(0, 0, 255), B -IF picked% = 5 THEN LINE (x + 33, y + 49)-(x + 62, y + 78), _RGB(255, 255, 255), B: LINE (x + 97, y + 49)-(x + 126, y + 78), _RGB(255, 255, 255), B -IF weapons(plane, 5).ifon = -1 THEN LINE (x + 34, y + 50)-(x + 61, y + 77), _RGB(0, 0, 127), BF: LINE (x + 98, y + 50)-(x + 125, y + 77), _RGB(0, 0, 127), BF -_PUTIMAGE (x + 32, y + 48), wepimage&(weapons(plane, 5).wep): _PUTIMAGE (x + 96, y + 48), wepimage&(weapons(plane, 5).wep) -_PRINTSTRING (x + 32, y + 48), "5": _PRINTSTRING (x + 96, y + 48), "5" -_PRINTSTRING (x + 63 - _PRINTWIDTH(LTRIM$(STR$(weapons(plane, 5).ammo))), y + 79 - _FONTHEIGHT), LTRIM$(STR$(weapons(plane, 5).ammo)): _PRINTSTRING (x + 127 - _PRINTWIDTH(LTRIM$(STR$(weapons(plane, 5).ammo))), y + 79 - _FONTHEIGHT), LTRIM$(STR$(weapons(plane, 5).ammo)) -END SUB - -SUB modhud (x AS INTEGER, y AS INTEGER, mods() AS aug, plane AS INTEGER, modimage&(), picked%) 'The HUD for the mods. -LINE (x, y)-(x + 31, y + 31), _RGB(0, 255, 0), B -IF picked% = 6 THEN LINE (x + 1, y + 1)-(x + 30, y + 30), _RGB(255, 255, 255), B -IF mods(plane, 1).ifon = -1 THEN LINE (x + 2, y + 2)-(x + 29, y + 29), _RGB(0, 127, 0), BF -_PUTIMAGE (x, y), modimage&(mods(plane, 1).kind) -_PRINTSTRING (x, y), "6" -IF mods(plane, 1).ammo > 0 THEN _PRINTSTRING (x + 31 - _PRINTWIDTH(LTRIM$(STR$(mods(plane, 1).ammo))), y + 31 - _FONTHEIGHT), LTRIM$(STR$(mods(plane, 1).ammo)) -LINE (x + 32, y)-(x + 63, y + 31), _RGB(0, 255, 0), B -IF picked% = 7 THEN LINE (x + 33, y + 1)-(x + 62, y + 30), _RGB(255, 255, 255), B -IF mods(plane, 2).ifon = -1 THEN LINE (x + 34, y + 2)-(x + 61, y + 29), _RGB(0, 127, 0), BF -_PUTIMAGE (x + 32, y), modimage&(mods(plane, 2).kind) -_PRINTSTRING (x + 32, y), "7" -IF mods(plane, 2).ammo > 0 THEN _PRINTSTRING (x + 63 - _PRINTWIDTH(LTRIM$(STR$(mods(plane, 1).ammo))), y + 31 - _FONTHEIGHT), LTRIM$(STR$(mods(plane, 2).ammo)) -LINE (x + 64, y)-(x + 95, y + 31), _RGB(0, 255, 0), B -IF picked% = 8 THEN LINE (x + 65, y + 1)-(x + 94, y + 30), _RGB(255, 255, 255), B -IF mods(plane, 3).ifon = -1 THEN LINE (x + 66, y + 2)-(x + 93, y + 29), _RGB(0, 127, 0), BF -_PUTIMAGE (x + 64, y), modimage&(mods(plane, 3).kind) -_PRINTSTRING (x + 64, y), "8" -IF mods(plane, 3).ammo > 0 THEN _PRINTSTRING (x + 95 - _PRINTWIDTH(LTRIM$(STR$(mods(plane, 1).ammo))), y + 31 - _FONTHEIGHT), LTRIM$(STR$(mods(plane, 3).ammo)) -LINE (x + 96, y)-(x + 127, y + 31), _RGB(0, 255, 0), B -IF picked% = 9 THEN LINE (x + 97, y + 1)-(x + 126, y + 30), _RGB(255, 255, 255), B -IF mods(plane, 4).ifon = -1 THEN LINE (x + 98, y + 2)-(x + 125, y + 29), _RGB(0, 127, 0), BF -_PUTIMAGE (x + 96, y), modimage&(mods(plane, 4).kind) -_PRINTSTRING (x + 96, y), "9" -IF mods(plane, 4).ammo > 0 THEN _PRINTSTRING (x + 127 - _PRINTWIDTH(LTRIM$(STR$(mods(plane, 1).ammo))), y + 31 - _FONTHEIGHT), LTRIM$(STR$(mods(plane, 4).ammo)) -END SUB - -SUB changeweapons (x AS INTEGER, y AS INTEGER, mousex AS INTEGER, mousey AS INTEGER, lclick AS INTEGER, plane AS INTEGER, inmouse AS weapon, weapons() AS weapon, storage() AS weapon) 'Allows the player to change the weapons on board -DIM switchvar AS weapon -DIM blankspace AS weapon -SELECT CASE inmouse.wep - CASE 0 - IF trigger(x + 64, y, x + 95, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN - switchvar = inmouse - inmouse = weapons(plane, 1) - weapons(plane, 1) = switchvar - ignore` = -1 - END IF - IF trigger(x + 32, y + 16, x + 63, y + 47, mousex, mousey) OR trigger(x + 96, y + 16, x + 127, y + 47, mousex, mousey) THEN - IF lclick = -1 AND ignore` = 0 THEN - FOR look = 0 TO 15 - IF storage(0, look).wep = inmouse.wep THEN - switchvar = inmouse - inmouse = weapons(plane, 2) - storage(0, look) = weapons(plane, 2) - weapons(plane, 2) = switchvar - ignore` = -1 - EXIT FOR - END IF - NEXT - END IF - END IF - IF trigger(x, y + 32, x + 31, y + 63, mousex, mousey) OR trigger(x + 128, y + 32, x + 159, y + 63, mousex, mousey) THEN - IF lclick = -1 AND ignore` = 0 THEN - FOR look = 0 TO 15 - IF storage(0, look).wep = inmouse.wep THEN - switchvar = inmouse - inmouse = weapons(plane, 3) - storage(0, look) = weapons(plane, 3) - weapons(plane, 3) = switchvar - ignore` = -1 - EXIT FOR - END IF - NEXT - END IF - END IF - IF trigger(x + 64, y + 32, x + 95, y + 63, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN - switchvar = inmouse - inmouse = weapons(plane, 4) - weapons(plane, 4) = switchvar - ignore` = -1 - END IF - IF trigger(x + 32, y + 48, x + 63, y + 79, mousex, mousey) OR trigger(x + 96, y + 48, x + 127, y + 79, mousex, mousey) THEN - IF lclick = -1 AND ignore` = 0 THEN - switchvar = inmouse - inmouse = weapons(plane, 5) - weapons(plane, 5) = switchvar - ignore` = -1 - END IF - END IF - CASE 1, 2, 3, 4, 5, 6, 7, 8 - IF trigger(x + 64, y, x + 95, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN - switchvar = inmouse - inmouse = weapons(plane, 1) - weapons(plane, 1) = switchvar - ignore` = -1 - END IF - IF trigger(x + 32, y + 16, x + 63, y + 47, mousex, mousey) OR trigger(x + 96, y + 16, x + 127, y + 47, mousex, mousey) THEN - IF lclick = -1 AND ignore` = 0 THEN - FOR look% = 0 TO 15 - IF storage(0, look%).wep = inmouse.wep THEN - switchvar = inmouse - inmouse = weapons(plane, 2) - storage(0, look%) = weapons(plane, 2) - weapons(plane, 2) = switchvar - ignore` = -1 - EXIT FOR - END IF - NEXT - END IF - END IF - IF trigger(x, y + 32, x + 31, y + 63, mousex, mousey) OR trigger(x + 128, y + 32, x + 159, y + 63, mousex, mousey) THEN - IF lclick = -1 AND ignore` = 0 THEN - FOR look% = 0 TO 15 - IF storage(0, look%).wep = inmouse.wep THEN - switchvar = inmouse - inmouse = weapons(plane, 3) - storage(0, look%) = weapons(plane, 3) - weapons(plane, 3) = switchvar - ignore` = -1 - EXIT FOR - END IF - NEXT - END IF - END IF - CASE 9, 10, 11 - IF trigger(x + 64, y + 32, x + 95, y + 63, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN - IF weapons(plane, 4).wep = inmouse.wep THEN - weapons(plane, 4).ammo = weapons(plane, 4).ammo + inmouse.ammo - inmouse = blankspace - ELSE - switchvar = inmouse - inmouse = weapons(plane, 4) - weapons(plane, 4) = switchvar - END IF - ignore` = -1 - END IF - IF trigger(x + 32, y + 48, x + 63, y + 79, mousex, mousey) OR trigger(x + 96, y + 48, x + 127, y + 79, mousex, mousey) THEN - IF lclick = -1 AND ignore` = 0 THEN - IF weapons(plane, 5).wep = inmouse.wep THEN - weapons(plane, 5).ammo = weapons(plane, 5).ammo + inmouse.ammo - inmouse = blankspace - ELSE - switchvar = inmouse - inmouse = weapons(plane, 5) - weapons(plane, 5) = switchvar - END IF - ignore` = -1 - END IF - END IF -END SELECT -END SUB - -SUB changemods (x AS INTEGER, y AS INTEGER, mousex AS INTEGER, mousey AS INTEGER, lclick AS INTEGER, plane AS INTEGER, inmouse AS aug, mods() AS aug) 'Allows the player to change mods on board. -DIM switchvar AS aug -DIM blankspace AS aug -IF trigger(x, y, x + 31, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN - IF mods(plane, 1).kind = inmouse.kind AND mods(plane, 1).ammo > 0 THEN - mods(plane, 1).ammo = mods(plane, 1).ammo + inmouse.ammo - inmouse = blankspace - ELSE - switchvar = inmouse - inmouse = mods(plane, 1) - mods(plane, 1) = switchvar - END IF - ignore` = -1 -END IF -IF trigger(x + 32, y, x + 63, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN - IF mods(plane, 2).kind = inmouse.kind AND mods(plane, 2).ammo > 0 THEN - mods(plane, 2).ammo = mods(plane, 2).ammo + inmouse.ammo - inmouse = blankspace - ELSE - switchvar = inmouse - inmouse = mods(plane, 2) - mods(plane, 2) = switchvar - END IF - ignore` = -1 -END IF -IF trigger(x + 64, y, x + 95, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN - IF mods(plane, 3).kind = inmouse.kind AND mods(plane, 3).ammo > 0 THEN - mods(plane, 3).ammo = mods(plane, 3).ammo + inmouse.ammo - inmouse = blankspace - ELSE - switchvar = inmouse - inmouse = mods(plane, 3) - mods(plane, 3) = switchvar - END IF - ignore` = -1 -END IF -IF trigger(x + 96, y, x + 127, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN - IF mods(plane, 4).kind = inmouse.kind AND mods(plane, 4).ammo > 0 THEN - mods(plane, 4).ammo = mods(plane, 4).ammo + inmouse.ammo - inmouse = blankspace - ELSE - switchvar = inmouse - inmouse = mods(plane, 4) - mods(plane, 4) = switchvar - END IF - ignore` = -1 -END IF -END SUB - -SUB aiplane (plane AS INTEGER, planes() AS airplane, weapons() AS weapon, difficulty) 'The other planes' AI -angle = planes(plane).dir -IF planes(plane).market = 0 THEN - distx% = planes(planes(plane).lasthit).x - planes(plane).x - disty% = planes(planes(plane).lasthit).y - planes(plane).y - totaldist = SQR(distx% ^ 2 + disty% ^ 2) - IF difficulty = 1 THEN - newposx% = totaldist / 16 * planes(planes(plane).lasthit).speed * COS(planes(planes(plane).lasthit).dir) - newposy% = totaldist / 16 * planes(planes(plane).lasthit).speed * SIN(planes(planes(plane).lasthit).dir) - distx% = distx% + newposx% - disty% = disty% + newposy% - planes(plane).force = planes(planes(plane).lasthit).speed + 1 / 256 * (totaldist - 256) - IF planes(plane).force > 10 THEN planes(plane).force = 10 - IF planes(plane).force < 2 THEN planes(plane).force = 2 - END IF - IF distx% <> 0 THEN angle2 = ATN(disty% / distx%) ELSE angle2 = 0 - IF distx% < 0 THEN angle2 = angle2 + pi - IF angle2 < 0 THEN angle2 = angle2 + 2 * pi -ELSE - SELECT CASE planes(plane).team - CASE 0: angle2 = pi - CASE 1: angle2 = 0 - CASE 2: angle2 = 3 * pi / 2 - CASE 3: angle2 = pi / 2 - END SELECT -END IF -IF ABS(angle - angle2) > rad(2) THEN - IF angle >= pi THEN - IF angle - angle2 < pi AND angle - angle2 > 0 THEN planes(plane).yaw = planes(plane).yaw - .1 ELSE planes(plane).yaw = planes(plane).yaw + .1 - END IF - IF angle < pi THEN - IF angle2 - angle < pi AND angle2 - angle > 0 THEN planes(plane).yaw = planes(plane).yaw + .1 ELSE planes(plane).yaw = planes(plane).yaw - .1 - END IF -ELSE - IF planes(plane).market = 0 THEN - IF totaldist <= swidth / 2 - 100 THEN - FOR fire% = 1 TO 3 - IF weapons(plane, fire%).ifon = -1 THEN - IF weapons(plane, fire%).kind = 0 AND weapons(plane, fire%).remaining >= weapons(plane, fire%).total THEN - IF weapons(plane, fire%).energy > 0 THEN IF planes(plane).battery > weapons(plane, fire%).energy THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 - IF weapons(plane, fire%).ammo > 0 THEN IF planes(plane).ammo > 0 THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 - END IF - IF weapons(plane, fire%).kind = 1 AND planes(plane).battery > 1 THEN weapons(plane, fire%).firing = weapons(plane, fire%).firing + 1 - END IF - NEXT - END IF - IF INT(RND * 180) = 0 THEN - FOR fire% = 4 TO 5 - IF weapons(plane, fire%).ifon = -1 THEN - IF weapons(plane, fire%).remaining >= weapons(plane, fire%).total THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 - IF fire% = 5 THEN IF weapons(plane, fire%).remaining = weapons(plane, fire%).total / 2 THEN weapons(plane, fire%).firing = 1 - END IF - NEXT - END IF - END IF -END IF -IF planes(plane).yaw > ABS(deg(angle - angle2)) / 3 THEN planes(plane).yaw = ABS(deg(angle - angle2)) / 3 -IF planes(plane).yaw < -(ABS(deg(angle - angle2)) / 3) THEN planes(plane).yaw = -(ABS(deg(angle - angle2)) / 3) -IF planes(plane).yaw > 1 THEN planes(plane).yaw = 1 -IF planes(plane).yaw < -1 THEN planes(plane).yaw = -1 -IF deg(planes(plane).dir) > 359 THEN planes(plane).dir = planes(plane).dir - 2 * pi -IF deg(planes(plane).dir) < 0 THEN planes(plane).dir = planes(plane).dir + 2 * pi -END SUB - -SUB fakephysics (force, speed) '"speed"'s relationship to "force" -net = force - speed -speed = speed + net / 500 -END SUB - -SUB playercontrol (angle, force, yaw, yawcontrol, forcecontrol) 'Allows the player to control pchk's own plane. -IF gamepad = 0 THEN - IF ignorethrot` = 0 THEN - IF _KEYDOWN(119) THEN force = INT(force) + 1: ignorethrot` = -1 - IF _KEYDOWN(115) THEN force = INT(force + .9) - 1: ignorethrot` = -1 - END IF - IF ignorethrot` = -1 AND NOT _KEYDOWN(119) AND NOT _KEYDOWN(115) THEN ignorethrot` = 0 - IF _KEYDOWN(97) THEN - yaw = -1 - ELSEIF _KEYDOWN(100) THEN - yaw = 1 - ELSE - yaw = 0 - END IF -ELSE - force = (-forcecontrol + 1) * 5 - IF force < .5 THEN force = 0 - IF force > 9.5 THEN force = 10 - IF force > 4.5 AND force < 5.5 THEN force = 5 - yaw = yawcontrol - IF yaw < -.95 THEN yaw = -1 - IF yaw > .95 THEN yaw = 1 - IF yaw > -.05 AND yaw < .05 THEN yaw = 0 -END IF -IF force < 0 THEN force = 0 -IF force > 10 THEN force = 10 -IF deg(angle) > 359 THEN angle = angle - rad(360) -IF deg(angle) < 0 THEN angle = angle + rad(360) -END SUB - -SUB playerfire (planes() AS airplane, plane AS INTEGER, weapons() AS weapon, primary AS INTEGER, secondary AS INTEGER) 'Allows the player to fire pchk's own weapons. -IF gamepad = 0 THEN - DO - fire1% = _MOUSEBUTTON(1) - fire2% = _MOUSEBUTTON(2) - LOOP WHILE _MOUSEINPUT -ELSE - fire1% = primary - fire2% = secondary -END IF -IF _KEYDOWN(32) OR fire1% AND ignore` = 0 THEN - FOR fire% = 1 TO 3 - IF weapons(plane, fire%).ifon = -1 THEN - IF weapons(plane, fire%).kind = 0 AND weapons(plane, fire%).remaining >= weapons(plane, fire%).total THEN - IF weapons(plane, fire%).energy > 0 THEN IF planes(plane).battery > 1 THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 - IF weapons(plane, fire%).ammo > 0 THEN IF planes(plane).ammo > 0 THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 - END IF - IF weapons(plane, fire%).kind = 1 AND planes(plane).battery > 1 THEN weapons(plane, fire%).firing = weapons(plane, fire%).firing + 1 - END IF - NEXT -END IF -IF _KEYDOWN(102) OR fire2% THEN - FOR fire% = 4 TO 5 - IF weapons(plane, fire%).ifon = -1 THEN - IF weapons(plane, fire%).remaining >= weapons(plane, fire%).total THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 - IF fire% = 5 THEN IF weapons(plane, fire%).remaining = weapons(plane, fire%).total / 2 THEN weapons(plane, fire%).firing = 1 - END IF - NEXT -END IF -END SUB - -SUB toggle (num%, change%, ignoretog%) 'Toggles weapons and mods. "num" is the weapon/mod's place (1-3 for primary weapons, 4-5 for missiles, 6-9 for mods). "change" is "*.ifon". "ignoretog" is like clickonce for toggling. -IF _KEYDOWN(num% + 48) AND ignoretog% = 0 THEN - IF change% = 0 THEN change% = -1 ELSE change% = 0 - ignoretog% = -1 -END IF -END SUB - -SUB togglecontrol (plane AS INTEGER, weapons() AS weapon, mods() AS aug, ignoretog%, picked%, pick) 'Allows the player to toggle things. -FOR k% = 1 TO 5 - toggle k%, weapons(plane, k%).ifon, ignoretog% -NEXT -FOR l% = 6 TO 9 - toggle l%, mods(plane, l% - 5).ifon, ignoretog% -NEXT -IF gamepad <> 0 THEN - IF picked% >= 1 AND picked% <= 5 AND ABS(pick) >= .5 AND ignoretog% = 0 THEN - IF weapons(plane, picked%).ifon = 0 THEN weapons(plane, picked%).ifon = -1 ELSE weapons(plane, picked%).ifon = 0 - ignoretog% = -1 - END IF - IF picked% >= 6 AND picked% <= 9 AND ABS(pick) >= .5 AND ignoretog% = 0 THEN - IF mods(plane, picked% - 5).ifon = 0 THEN mods(plane, picked% - 5).ifon = -1 ELSE mods(plane, picked% - 5).ifon = 0 - ignoretog% = -1 - END IF -END IF -END SUB - -SUB hudbar (slot AS INTEGER, title$, display, limit, barcolor~&, suffix$, quartz&) 'The simple meter, used for PWR, GEN, etc. -'slot: distance from the top (16 + 32 * slot) -'title: three char title -'display: amount of whatever you are measuring -'limit: the upper limit of whatever you are measuring should be -'barcolor: the color of the meter (dark color recomended) -'suffix: the unit you are using (usually "%") -'quartz: the font -IF display < limit THEN LINE (swidth - 167, 16 + 32 * slot + 1)-(swidth - 167 + display / limit * 100, 16 + 32 * slot + 14), barcolor~&, BF ELSE LINE (swidth - 167, 16 + 32 * slot + 1)-(swidth - 67, 16 + 32 * slot + 14), barcolor~&, BF -LINE (swidth - 168, 16 + 32 * slot)-(swidth - 66, 16 + 32 * slot + 15), _RGB(255, 255, 255), B -IF LEN(title$) > 3 THEN title$ = LEFT$(title$, 3) -_FONT quartz& -IF display >= limit + 1 THEN COLOR _RGB(255, 127, 0) -_PRINTSTRING (swidth - 200, 16 + 32 * slot), title$ + " " + LTRIM$(STR$(INT(display + .5))) + suffix$ -COLOR _RGB(255, 255, 255) -_FONT 16 -END SUB - -SUB rotator (originx AS INTEGER, originy AS INTEGER, angle, image&, minx%, miny%, maxx%, maxy%, size) 'Makes images that can rotate. -DIM rotx(3), roty(3) -dist = SQR(((size / 2) ^ 2) + ((size / 2) ^ 2)) -rotx(0) = originx + COS(angle + rad(45)) * dist - 1: rotx(1) = originx + COS(angle + rad(135)) * dist - 1: rotx(2) = originx + COS(angle + rad(225)) * dist: rotx(3) = originx + COS(angle + rad(315)) * dist -roty(0) = originy + SIN(angle + rad(45)) * dist: roty(1) = originy + SIN(angle + rad(135)) * dist - 1: roty(2) = originy + SIN(angle + rad(225)) * dist - 1: roty(3) = originy + SIN(angle + rad(315)) * dist -_MAPTRIANGLE (minx%, miny%)-(minx%, maxy%)-(maxx%, maxy%), image& TO(rotx(3), roty(3))-(rotx(2), roty(2))-(rotx(1), roty(1)) -_MAPTRIANGLE _SEAMLESS(minx%, miny%)-(maxx%, miny%)-(maxx%, maxy%), image& TO(rotx(3), roty(3))-(rotx(0), roty(0))-(rotx(1), roty(1)) -END SUB - -FUNCTION getfact$ -DIM facts$(7) -'facts$(0) = "The airplane in this game is losely based on the Lockheed-Martin F-35 Lightning II and the General Dynamics F-16 Fighting Falcon, the major difference being the means of propultion." -'facts$(1) = "The premise for 'Electric' was conceived when I discovered this tidbit of information about Lt. Surge from 'Pokemon: Fire Red': 'Lt. Surge is rumored to have been a pilot while home in America. He used the electricity generated by Pokmon to power his plane.' Having said that, the generators in 'Electric' are just normal generators." -'facts$(2) = "'Descent II' by Parallax had a significant influence on 'Electric', which is ironic because 'Electric' has nothing to do with space." -facts$(0) = "In most of the code, " + CHR$(34) + "laser" + CHR$(34) + " is misspelled " + CHR$(34) + "lazer." + CHR$(34) -facts$(1) = "Change 'Planes per Team' to 2 or more. Shoot your AI helper. Look in the top left corner of the screen. It only appears for 1/60 of a second." -facts$(2) = "'Electric v0.1:0001' was just a white triangle that pointed toward the mouse in the center of an 800x600 window." -facts$(3) = "There are only 4 fun facts, including this one." -'facts$(6) = "Some of these facts won't make it into the final product due to issues with using the words 'pokemon' and 'Descent II'." -getfact$ = facts$(INT(RND * 4)) -END FUNCTION +CONST versionvrsn = "v1.1:0007-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) +GET #1, 1, swidth +GET #1, 2, sheight +GET #1, 3, fs +GET #1, 4, graphsetting +GET #1, 9, gamepad +GET #1, 19, vol +IF swidth > 0 AND sheight > 0 THEN + SCREEN _NEWIMAGE(swidth, sheight, 32) +ELSE + dw = _DESKTOPWIDTH + dh = _DESKTOPHEIGHT + IF dw AND dh THEN + swidth = dw + sheight = dh + ELSE + swidth = 800 + sheight = 600 + END IF + SCREEN _NEWIMAGE(swidth, sheight, 32) + fs = 1 + blue = 255 + steering = 1 + throttle = 3 + primary = 1 + secondary = 2 + team = 1 + scrdown = 5 + scrup = 4 + pick = 3 + vol = 0.8 + PUT #1, 1, swidth + PUT #1, 2, sheight + PUT #1, 3, fs + PUT #1, 7, blue + PUT #1, 10, steering + PUT #1, 11, throttle + PUT #1, 12, primary + PUT #1, 13, secondary + PUT #1, 15, team + PUT #1, 16, scrdown + PUT #1, 17, scrup + PUT #1, 18, pick + PUT #1, 19, vol +END IF +CLOSE #1 +electricicon& = _LOADIMAGE("ui\electricicon.png") +premetal& = _LOADIMAGE("bg\electricplane2.png") +brushedmetal& = _NEWIMAGE(swidth, sheight, 32) +_PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& +_FREEIMAGE premetal& +IF electricicon& THEN + _CLEARCOLOR _RGB(0, 0, 0), electricicon& + _ICON electricicon& + _FREEIMAGE electricicon& +END IF +IF fs = 1 THEN _FULLSCREEN +quartz& = _LOADFONT("fonts\Segment14.otf", sheight / 24, "") +cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") +_PRINTMODE _KEEPBACKGROUND +RANDOMIZE TIMER +TYPE control + number AS SINGLE + axis AS SINGLE '1 if axis, 0 if button +END TYPE +TYPE score + points AS INTEGER + losses AS INTEGER + total AS INTEGER +END TYPE +TYPE res + x AS INTEGER + y AS INTEGER + caption AS STRING * 64 +END TYPE +TYPE airplane + team AS INTEGER + x AS SINGLE + y AS SINGLE + dir AS SINGLE 'in degrees + force AS SINGLE + speed AS SINGLE + battery AS SINGLE + generator AS SINGLE + armor AS SINGLE + lasthit AS INTEGER + credits AS INTEGER + yaw AS SINGLE + market AS INTEGER + markettime AS INTEGER + waittime AS INTEGER + ammo AS INTEGER + ai AS INTEGER + maxbatt AS SINGLE + maxarm AS SINGLE + respawntime AS INTEGER + image AS LONG + blip AS LONG +END TYPE +TYPE aug + kind AS INTEGER + ifon AS INTEGER + energy AS SINGLE + fuel AS INTEGER 'only used for SRBs + ammo AS INTEGER 'only used for stackable mods +END TYPE +TYPE weapon + wep AS INTEGER + ifon AS INTEGER + firing AS INTEGER + remaining AS INTEGER + total AS INTEGER + ammo AS INTEGER + energy AS SINGLE + kind AS INTEGER +END TYPE +TYPE shot + x AS SINGLE + y AS SINGLE + dir AS SINGLE + fired AS INTEGER + kind AS INTEGER + speed AS INTEGER + damage AS SINGLE + shape AS INTEGER + color AS LONG + target AS INTEGER 'only used in Homing Plasma + charge AS INTEGER 'only used in charging weapons +END TYPE +TYPE missile + x AS SINGLE + y AS SINGLE + dir AS SINGLE + fired AS INTEGER + duration AS INTEGER + target AS INTEGER + kind AS INTEGER +END TYPE +TYPE debris + x AS SINGLE + y AS SINGLE + life AS INTEGER + dir AS SINGLE + speed AS SINGLE + image AS LONG + angle AS SINGLE + rotation AS SINGLE +END TYPE + +menumusic& = _SNDOPEN("menu_music.ogg", "sync,vol") +_SNDVOL menumusic&, vol +IF menumusic& THEN _SNDPLAY menumusic& +DO + _LIMIT 60 + CLS + _PUTIMAGE (0, 0), brushedmetal& + _FONT quartz& + COLOR _RGB(255, 200, 0) + center "ELECTRIC", 1 + _FONT cyberbit& + COLOR _RGB(255, 255, 255) + center "Play", 4 + center "Options", 5 + center "Credits", 6 + center "Exit", 7 + IF specialstring$ = "funfact" THEN + center "Tell me a fun fact!", 8 + wot funfact$, 0, 9 * _FONTHEIGHT, swidth + END IF + _PRINTSTRING (0, sheight - _FONTHEIGHT), versionvrsn + IF menu(4) THEN + IF _SNDPLAYING(menumusic&) THEN _SNDSTOP menumusic& + env + IF menumusic& THEN _SNDPLAY menumusic& + END IF + IF menu(5) THEN + options + OPEN "electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) + GET #1, 19, vol + CLOSE #1 + IF menumusic& THEN _SNDVOL menumusic&, vol + premetal& = _LOADIMAGE("bg\electricplane2.png") + brushedmetal& = _NEWIMAGE(swidth, sheight, 32) + _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& + _FREEIMAGE premetal& + _FONT 16 + 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 + CLS + _FONT 16 + IF quartz& > 0 THEN _FREEFONT (quartz&) + IF cyberbit& > 0 THEN _FREEFONT (cyberbit&) + IF brushedmetal& < -1 THEN _FREEIMAGE brushedmetal& + IF _SNDPLAYING(menumusic&) THEN _SNDSTOP menumusic& + _SNDCLOSE menumusic& + SYSTEM + END IF + IF specialstring$ = "funfact" THEN + IF menu(8) THEN funfact$ = getfact$ + ELSE + special$ = INKEY$ + IF special$ <> "" THEN specialstring$ = specialstring$ + special$ + IF LEN(specialstring$) >= 8 THEN specialstring$ = "" + END IF + clickonce + cursor + _DISPLAY +LOOP +_FREEFONT quartz& + +SUB credit + premetal& = _LOADIMAGE("bg\electricplane2.png") + brushedmetal& = _NEWIMAGE(swidth, sheight, 32) + _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& + _FREEIMAGE premetal& + _PUTIMAGE (0, 0), brushedmetal& + _FONT 16 + quartz& = _LOADFONT("fonts\Segment14.otf", sheight / 24, "") + cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") + _FONT quartz& + center "CREDITS", 1 + _FONT cyberbit& + center "Programmer:", 4 + center "Patrick 'Cheese-Water' Marsee", 5 + center "In-Game Music:", 7 + center "N/A", 8 + center "Title Music:", 10 + center "N/A", 11 + center "Other Stuff:", 13 + center "QB64 - IDE", 14 + center "GIMP - Graphics", 15 + center "sfxr - Sound Effects", 16 + center "Press any key to return.", 18 + _FONT 16 + _FREEFONT quartz& + _FREEFONT cyberbit& + _FREEIMAGE brushedmetal& + _DISPLAY + SLEEP +END SUB + +SUB center (text$, row%) 'centers text "text$" on row "row" + lentext% = _PRINTWIDTH(text$) + textheight% = _FONTHEIGHT + _PRINTSTRING ((swidth - lentext%) / 2, row% * textheight%), text$ +END SUB + +FUNCTION menu (choice%) 'draws the box around menu item if the mouse is over it, returns -1 if clicked. "choice" is the 16-pixel tall row, starting with 0. + DO + mousey% = _MOUSEY + click% = _MOUSEBUTTON(1) + LOOP WHILE _MOUSEINPUT + textheight% = _FONTHEIGHT + IF textheight% * choice% <= mousey% AND mousey% <= textheight% * choice% + textheight% - 1 THEN + LINE (0, textheight% * choice%)-(swidth - 1, textheight% * choice% + textheight% - 1), _RGB(255, 255, 255), B + IF ignore` = 0 AND click% THEN menu = -1: ignore` = -1 + END IF +END FUNCTION + +SUB wot (text$, startx%, starty%, endx%) 'Makes a small text box between "startx%" and "endx%" (pixels), and starting on "starty%" (pixels) that prints "text$". + changetext$ = text$ + textlen% = LEN(text$) + textwidth% = _PRINTWIDTH(text$) + textheight% = _FONTHEIGHT + linewidth% = endx% - startx% + numline% = 0 + DO WHILE textwidth% > linewidth% + a% = a% + 1 + IF _PRINTWIDTH(LEFT$(changetext$, a%)) > linewidth% THEN + FOR k% = a% TO 1 STEP -1 + IF MID$(changetext$, k%, 1) = " " THEN + textlen% = textlen% - k% + _PRINTSTRING (startx%, starty% + textheight% * numline%), LEFT$(changetext$, k%) + changetext$ = RIGHT$(changetext$, textlen%) + textwidth% = _PRINTWIDTH(changetext$) + numline% = numline% + 1 + a% = 0 + EXIT FOR + END IF + NEXT + END IF + LOOP + _PRINTSTRING (startx%, starty% + textheight% * numline%), changetext$ +END SUB + +FUNCTION controllerparse$ (part%, num%) + numdevice% = _DEVICES + IF num% <= numdevice% AND num% >= 1 THEN + DIM stringparts$(8) + numpart% = 0 + devicestring$ = _DEVICE$(num%) + FOR a% = 1 TO LEN(devicestring$) + b$ = MID$(devicestring$, a%, 1) + IF b$ = "[" THEN numpart% = numpart% + 1 + IF b$ <> "[" AND b$ <> "]" THEN stringparts$(numpart%) = stringparts$(numpart%) + b$ + NEXT + controllerparse$ = stringparts$(part%) + ELSE + controllerparse$ = "ERROR: No such controller!" + END IF +END FUNCTION + +SUB clickonce 'Placed at the end of a loop that uses mouse inputs to make sure it doesn't click multiple times while the mousebutton is held. + DO + click% = _MOUSEBUTTON(1) + LOOP WHILE _MOUSEINPUT + IF ignore` = -1 AND click% = 0 AND _KEYDOWN(27) = 0 THEN ignore` = 0 +END SUB + +FUNCTION trigger (x1%, y1%, x2%, y2%, x3%, y3%) 'Generates output if coordinates("x3", "y3") fall within ("x1", "y1")-("x2", "y2"). + IF x1% <= x3% AND x3% <= x2% AND y1% <= y3% AND y3% <= y2% THEN trigger = -1 +END FUNCTION + +FUNCTION pi 'It's pi. + pi = 4 * ATN(1) +END FUNCTION + +FUNCTION rad (degrees) 'Converts degrees to radians. + rad = degrees * pi / 180 +END FUNCTION + +FUNCTION deg (radians) 'Converts radians to degrees. + deg = radians / pi * 180 +END FUNCTION + +'FUNCTION mousedir (x, y) 'returns the angle of the mouse relative to coordinates("x", "y"). Not used in this program, but I keep it around in case that changes. +'DO +' mousex = _MOUSEX +' mousey = _MOUSEY +'LOOP WHILE _MOUSEINPUT +'distx = mousex - x +'disty = mousey - y +'angle = ATN(disty / distx) +'IF distx < 0 THEN angle = angle + rad(180) +'mousedir = angle +'END FUNCTION + +FUNCTION recolor& (image&, old~&, new~&) 'requires an image, the color to change, and the new color. + redo& = _COPYIMAGE(image&) 'makes a copy of the image so that it doesn't mess up the original one + _SOURCE image& 'set the source as the original image + _DEST redo& 'set the destination as the new image + FOR x% = 0 TO _WIDTH(image&) - 1 'loop all x values + FOR y% = 0 TO _HEIGHT(image&) - 1 'loop all y values + IF POINT(x%, y%) = old~& THEN PSET (x%, y%), new~& 'if the color at coordinates ("x", "y") = the old color, then make it the new color on the new image + NEXT 'close the y loop + NEXT 'close the x loop + recolor& = _COPYIMAGE(redo&) 'return the new image + _SOURCE 0 'set the source back to the main window + _DEST 0 'set the destination back to the main window + _FREEIMAGE redo& 'free the new image because we already returned it and this saves memory +END FUNCTION + +FUNCTION colorgreyspectrum& (image&, new~&) 'the secondary livery + change& = _COPYIMAGE(image&) + _SOURCE image& + _DEST change& + FOR x% = 0 TO _WIDTH(image&) - 1 + FOR y% = 0 TO _HEIGHT(image&) - 1 + FOR grey% = 0 TO 127 + IF POINT(x%, y%) = _RGB(grey%, grey%, grey%) THEN + red% = _RED32(new~&) * (grey% / 127) + green% = _GREEN32(new~&) * (grey% / 127) + blue% = _BLUE32(new~&) * (grey% / 127) + PSET (x%, y%), _RGB(red%, green%, blue%) + EXIT FOR + END IF + NEXT + FOR grey% = 128 TO 255 + IF POINT(x%, y%) = _RGB(grey%, grey%, grey%) THEN + red% = _RED32(new~&) + (255 - _RED32(new~&)) / 128 * (grey% - 127) + green% = _GREEN32(new~&) + (255 - _GREEN32(new~&)) / 128 * (grey% - 127) + blue% = _BLUE32(new~&) + (255 - _BLUE32(new~&)) / 128 * (grey% - 127) + PSET (x%, y%), _RGB(red%, green%, blue%) + EXIT FOR + END IF + NEXT + NEXT + NEXT + _DEST 0 + _SOURCE 0 + colorgreyspectrum& = _COPYIMAGE(change&) + _FREEIMAGE change& +END FUNCTION + +'FUNCTION darken& (image&, amount) 'Darkens image "image&" by "amount" amount +'redo& = _COPYIMAGE(image&) +'_SOURCE image& +'_DEST redo& +'FOR x% = 0 TO _WIDTH(image&) - 1 +' FOR y% = 0 TO _HEIGHT(image&) - 1 +' PSET (x%, y%), _RGB(_RED32(POINT(x, y)) / amount, _GREEN32(POINT(x, y)) / amount, _BLUE32(POINT(x, y)) \ amount) +' NEXT +'NEXT +'darken& = _COPYIMAGE(redo&) +'_SOURCE 0 +'_DEST 0 +'_FREEIMAGE redo& +'END FUNCTION + +FUNCTION shadow& (image&) 'Creates a shadow that looks like "image&", excluding black. + redo& = _NEWIMAGE(_WIDTH(image), _HEIGHT(image), 32) + _SOURCE image& + _DEST redo& + FOR x% = 0 TO _WIDTH(image&) - 1 + FOR y% = 0 TO _HEIGHT(image&) - 1 + oldcolor& = _RGB(_RED32(POINT(x%, y%)), _GREEN32(POINT(x%, y%)), _BLUE32(POINT(x%, y%))) + IF oldcolor& = _RGB(0, 0, 0) THEN PSET (x%, y%), _RGB(255, 255, 255) + IF oldcolor& <> _RGB(0, 0, 0) THEN PSET (x%, y%), _RGBA(0, 0, 0, 127) + NEXT + NEXT + _CLEARCOLOR _RGB(255, 255, 255), redo& + shadow& = _COPYIMAGE(redo&) + _SOURCE 0 + _DEST 0 + _FREEIMAGE redo& +END FUNCTION + +FUNCTION sinecolor% (outer AS INTEGER, inner AS INTEGER, x AS INTEGER, y AS INTEGER, sinx AS INTEGER, siny AS INTEGER) + IF outer = inner THEN + sinecolor% = outer + ELSE + IF inner > outer THEN + sinecolor% = (SIN(pi / x * sinx) + (SIN(pi / y * siny) - 1)) * (inner - outer) + outer + ELSE sinecolor% = (1 - (SIN(pi / x * sinx) + (SIN(pi / y * siny) - 1))) * (outer - inner) + inner + END IF + END IF +END FUNCTION + +FUNCTION blob& (x%, y%, outer~&, inner~&) 'generates the round sprites for explosions and the like + effect& = _NEWIMAGE(x%, y%, 32) + _DEST effect& + FOR sinx% = 0 TO x% - 1 + FOR siny% = 0 TO y% - 1 + PSET (sinx%, siny%), _RGBA(sinecolor%(_RED32(outer~&), _RED32(inner~&), x%, y%, sinx%, siny%), sinecolor%(_GREEN32(outer~&), _GREEN32(inner~&), x%, y%, sinx%, siny%), sinecolor%(_BLUE32(outer~&), _BLUE32(inner~&), x%, y%, sinx%, siny%), (SIN(pi / x% * sinx%) + (SIN(pi / y% * siny%) - 1)) * 255) + NEXT + NEXT + blob& = _COPYIMAGE(effect&) + _FREEIMAGE effect& +END FUNCTION + +SUB aimer (planes() AS airplane, plane%, numplanes%) 'The aimer mod. + angle = planes(plane%).dir + FOR a% = 1 TO numplanes% + IF planes(a%).team <> planes(plane%).team THEN + distx% = planes(a%).x - planes(plane%).x + disty% = planes(a%).y - planes(plane%).y + totaldist = SQR(distx% ^ 2 + disty% ^ 2) + newposx% = totaldist / 16 * planes(a%).speed * COS(planes(a%).dir) + newposy% = totaldist / 16 * planes(a%).speed * SIN(planes(a%).dir) + distx% = distx% + newposx% + disty% = disty% + newposy% + CIRCLE (distx% + planes(plane%).x + xoffset%, disty% + planes(plane%).y + yoffset%), 16, _RGB(255, 0, 0) + END IF + NEXT + LINE (planes(plane%).x + xoffset%, planes(plane%).y + yoffset%)-(planes(plane%).x + COS(planes(plane%).dir) * (swidth / 2 - 100) + xoffset%, planes(plane%).y + SIN(planes(plane%).dir) * (swidth / 2 - 100) + yoffset%), _RGB(255, 0, 0) + LINE (planes(plane%).x + xoffset%, planes(plane%).y + yoffset%)-(planes(plane%).x + COS(planes(plane%).dir - pi / 6) * (swidth / 2 - 100) + xoffset%, planes(plane%).y + SIN(planes(plane%).dir - pi / 6) * (swidth / 2 - 100) + yoffset%), _RGB(255, 0, 0) + LINE (planes(plane%).x + xoffset%, planes(plane%).y + yoffset%)-(planes(plane%).x + COS(planes(plane%).dir + pi / 6) * (swidth / 2 - 100) + xoffset%, planes(plane%).y + SIN(planes(plane%).dir + pi / 6) * (swidth / 2 - 100) + yoffset%), _RGB(255, 0, 0) +END SUB + +SUB converter (plane AS airplane, ifon%) 'The energy ==> armor mod. + IF plane.armor < plane.maxarm THEN + plane.armor = plane.armor + .01 * plane.maxarm / 10 + ELSE + ifon% = 0 + END IF +END SUB + +SUB srb (plane AS airplane, contrails%(), numcontrail%, booster AS aug) 'The solid rocket booster mod. + makecontrail plane.x, plane.y, contrails%(), numcontrail% + IF booster.fuel > 0 THEN + plane.speed = plane.speed + 0.05 + booster.fuel = booster.fuel - 1 + ELSE + booster.ammo = booster.ammo - 1 + IF booster.ammo > 0 THEN + booster.fuel = 180 + booster.ifon = 0 + ELSE + DIM blankspace AS aug + booster = blankspace + END IF + END IF +END SUB + +'SUB scope (plane AS airplane) The defunct scope mod, preserved for old times sake. +'screenanchorx% = plane.x + COS(plane.dir) * (sheight / 2 - 16) +'screenanchory% = plane.y + SIN(plane.dir) * (sheight / 2 - 16) +'xoffset% = -screenanchorx% + swidth / 2 - 100 +'yoffset% = -screenanchory% + sheight / 2 +'END SUB + +SUB flare (plane%, planes AS airplane, missiles() AS missile, nummissile%, flr AS aug, flares(), numflare%) 'The flare mod. + IF flr.ammo > 0 THEN + flr.ammo = flr.ammo - 1 + IF numflare% < 125 THEN + FOR j = 0 TO 3 + numflare% = numflare% + 1 + flares(numflare%, 0) = planes.x 'x position + flares(numflare%, 1) = planes.y 'y position + flares(numflare%, 2) = 0 'time + flaredirx = RND * 4 - 2 + flarediry = RND * 4 - 2 + flares(numflare%, 3) = ATN((SIN(planes.dir) * planes.speed + flarediry) / (COS(planes.dir) * planes.speed + flaredirx)) 'direction + IF COS(planes.dir) * planes.speed + flaredirx < 0 THEN flares(numflare%, 3) = flares(numflare%, 3) + pi + flares(numflare%, 4) = SQR((SIN(planes.dir) * planes.speed + flarediry) ^ 2 + (COS(planes.dir) * planes.speed + flaredirx) ^ 2) 'speed + NEXT + END IF + IF nummissile% > 0 THEN + FOR i = 1 TO nummissile% + IF missiles(i).target = plane% THEN + chance% = INT(RND * 5) + IF chance% <> 0 THEN missiles(i).target = -1 + END IF + NEXT + END IF + flr.ifon = 0 + IF flr.ammo <= 0 THEN + DIM blankspace AS aug + flr = blankspace + END IF + END IF +END SUB + +SUB makeshot (lazers() AS shot, numlazer%, plane AS airplane, fired%, shot%, position%, inmarket AS INTEGER) 'makes the specified "shot" in front of plane "plane", and makes the firing sound. + STATIC vulcansound% + IF numlazer% < 4999 THEN + SELECT CASE position% + CASE 1 + x = plane.x + COS(plane.dir) * 32 + y = plane.y + SIN(plane.dir) * 32 + CASE 2 + x = plane.x + COS(plane.dir) * 28 + COS(plane.dir + pi / 2) * 4 + y = plane.y + SIN(plane.dir) * 28 + SIN(plane.dir + pi / 2) * 4 + makeshot lazers(), numlazer%, plane, fired%, shot%, 6, inmarket + CASE 3 + x = plane.x + COS(plane.dir) * 24 + COS(plane.dir + pi / 2) * 8 + y = plane.y + SIN(plane.dir) * 24 + SIN(plane.dir + pi / 2) * 8 + makeshot lazers(), numlazer%, plane, fired%, shot%, 7, inmarket + CASE 6 + x = plane.x + COS(plane.dir) * 28 + COS(plane.dir - pi / 2) * 4 + y = plane.y + SIN(plane.dir) * 28 + SIN(plane.dir - pi / 2) * 4 + CASE 7 + x = plane.x + COS(plane.dir) * 24 + COS(plane.dir - pi / 2) * 8 + y = plane.y + SIN(plane.dir) * 24 + SIN(plane.dir - pi / 2) * 8 + END SELECT + numlazer% = numlazer% + 1 + lazers(numlazer%).x = x + lazers(numlazer%).y = y + lazers(numlazer%).dir = plane.dir + lazers(numlazer%).fired = fired% + lazers(numlazer%).kind = shot% + SELECT CASE shot% + CASE 1 + IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 THEN + zap& = _SNDOPEN("sfx\laser.wav", "sync") + IF zap& THEN _SNDPLAY zap& + _SNDCLOSE zap& + END IF + lazers(numlazer%).speed = 16 + lazers(numlazer%).damage = .5 + lazers(numlazer%).shape = 0 + lazers(numlazer%).color = _RGB(255, 0, 0) + CASE 2 + lazers(numlazer%).dir = lazers(numlazer%).dir + rad(RND * 4 - 2) + vulcansound% = vulcansound% + 1 + IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 AND vulcansound% >= 5 THEN + zap& = _SNDOPEN("sfx\shoot.wav", "sync") + IF zap& THEN _SNDPLAY zap& + _SNDCLOSE zap& + vulcansound% = vulcansound% - 5 + END IF + lazers(numlazer%).speed = 20 + lazers(numlazer%).damage = .05 + lazers(numlazer%).shape = 1 + lazers(numlazer%).color = _RGB(0, 0, 0) + CASE 3 + lazers(numlazer%).speed = 16 + lazers(numlazer%).damage = .25 + lazers(numlazer%).shape = 2 + lazers(numlazer%).color = _RGB(0, 100, 200) + FOR spread% = 0 TO 1 + numlazer% = numlazer% + 1 + lazers(numlazer%).x = x + lazers(numlazer%).y = y + lazers(numlazer%).dir = plane.dir - pi / 6 + spread% * pi / 3 + lazers(numlazer%).fired = fired% + lazers(numlazer%).kind = 3 + lazers(numlazer%).speed = 16 + lazers(numlazer%).damage = .25 + lazers(numlazer%).shape = 2 + lazers(numlazer%).color = _RGB(0, 100, 200) + NEXT + IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 THEN + zap& = _SNDOPEN("sfx\laser.wav", "sync") + IF zap& THEN _SNDPLAY zap& + _SNDCLOSE zap& + END IF + CASE 4 + lazers(numlazer%).speed = 18 + lazers(numlazer%).damage = 1 + lazers(numlazer%).shape = 3 + lazers(numlazer%).color = _RGB(0, 255, 0) + IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 THEN + zap& = _SNDOPEN("sfx\plasma.wav", "sync") + IF zap& THEN _SNDPLAY zap& + _SNDCLOSE zap& + END IF + CASE 5 + lazers(numlazer%).dir = lazers(numlazer%).dir + rad(RND * 4 - 2) + IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 THEN + zap& = _SNDOPEN("sfx\gauss.wav", "sync") + IF zap& THEN _SNDPLAY zap& + _SNDCLOSE zap& + END IF + lazers(numlazer%).speed = 20 + lazers(numlazer%).damage = .05 + lazers(numlazer%).shape = 1 + lazers(numlazer5).color = _RGB(0, 0, 0) + FOR spread% = 0 TO 6 + numlazer% = numlazer% + 1 + lazers(numlazer%).x = x + lazers(numlazer%).y = y + lazers(numlazer%).dir = plane.dir + rad(RND * 4 - 2) + lazers(numlazer%).fired = fired% + lazers(numlazer%).kind = 5 + lazers(numlazer%).speed = 20 + lazers(numlazer%).damage = .05 + lazers(numlazer%).shape = 1 + lazers(numlazer%).color = _RGB(0, 0, 0) + NEXT + CASE 6 + lazers(numlazer%).dir = lazers(numlazer%).dir + rad(RND * 4 - 2) + vulcansound% = vulcansound% + 1 + IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight AND inmarket = 0 AND vulcansound% >= 5 THEN + zap& = _SNDOPEN("sfx\shoot.wav", "sync") + IF zap& THEN _SNDPLAY zap& + _SNDCLOSE zap& + vulcansound% = vulcansound% - 5 + END IF + lazers(numlazer%).speed = 20 + lazers(numlazer%).damage = .1 + lazers(numlazer%).shape = 1 + lazers(numlazer%).color = _RGB(0, 0, 0) + plane.speed = plane.speed - .01 + END SELECT + END IF +END SUB + +SUB makecharge (lazers() AS shot, numlazer%, plane%, planes() AS airplane, shot%, power, position%, numplanes%) 'basically makeshot for charging weapons + IF numlazer% < 4999 THEN + SELECT CASE position% + CASE 1 + x = planes(plane%).x + COS(planes(plane%).dir) * 16 + y = planes(plane%).y + SIN(planes(plane%).dir) * 16 + CASE 2 + x = planes(plane%).x + COS(planes(plane%).dir) * 12 + COS(planes(plane%).dir + pi / 2) * 4 + y = planes(plane%).y + SIN(planes(plane%).dir) * 12 + SIN(planes(plane%).dir + pi / 2) * 4 + makecharge lazers(), numlazer%, plane%, planes(), shot%, power, 6, numplanes% + CASE 3 + x = planes(plane%).x + COS(planes(plane%).dir) * 8 + COS(planes(plane%).dir + pi / 2) * 8 + y = planes(plane%).y + SIN(planes(plane%).dir) * 8 + SIN(planes(plane%).dir + pi / 2) * 8 + makecharge lazers(), numlazer%, plane%, planes(), shot%, power, 7, numplanes% + CASE 6 + x = planes(plane%).x + COS(planes(plane%).dir) * 12 + COS(planes(plane%).dir - pi / 2) * 4 + y = planes(plane%).y + SIN(planes(plane%).dir) * 12 + SIN(planes(plane%).dir - pi / 2) * 4 + CASE 7 + x = planes(plane%).x + COS(planes(plane%).dir) * 8 + COS(planes(plane%).dir - pi / 2) * 8 + y = planes(plane%).y + SIN(planes(plane%).dir) * 8 + SIN(planes(plane%).dir - pi / 2) * 8 + END SELECT + numlazer% = numlazer% + 1 + lazers(numlazer%).x = x + lazers(numlazer%).y = y + lazers(numlazer%).dir = planes(plane%).dir + lazers(numlazer%).fired = plane% + lazers(numlazer%).kind = shot% + lazers(numlazer%).charge = power * 5 + SELECT CASE shot% + CASE 7 + lazers(numlazer%).speed = 12 + lazers(numlazer%).shape = 3 + lazers(numlazer%).color = _RGB(0, 255, 0) + lazers(numlazer%).target = -1 + IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight THEN + zap& = _SNDOPEN("sfx\bolt.wav", "sync") + IF zap& THEN _SNDPLAY zap& + _SNDCLOSE zap& + END IF + smallangle = pi / 4 + FOR k% = 0 TO numplanes% + IF planes(k%).team <> planes(plane%).team OR planes(k%).armor <> 0 THEN + distx% = planes(k%).x - lazers(numlazer%).x + disty% = planes(k%).y - lazers(numlazer%).y + dist = SQR(distx% ^ 2 + disty% ^ 2) + angle2 = ATN(disty% / distx%) + IF distx% < 0 THEN angle2 = angle2 + pi + IF angle2 < 0 THEN angle2 = angle2 + 2 * pi + angledist = ABS(lazers(numlazer%).dir - angle2) + IF angledist <= pi / 6 AND dist > 48 AND angledist < smallangle THEN + smallangle = angledist + lazers(numlazer%).target = k% + END IF + END IF + NEXT + CASE 8 + lazers(numlazer%).speed = 16 + lazers(numlazer%).shape = 4 + lazers(numlazer%).color = _RGB(127, 0, 255) + IF x + xoffset% > 0 AND x + xoffset% < swidth - 200 AND y + yoffset% > 0 AND y + yoffset% < sheight THEN + zap& = _SNDOPEN("sfx\bolt.wav", "sync") + IF zap& THEN _SNDPLAY zap& + _SNDCLOSE zap& + END IF + END SELECT + END IF +END SUB + +SUB makemissile (missiles() AS missile, nummissile%, plane%, planes() AS airplane, shot%, numplanes%) 'makes the specified missile "shot" in front of plane "plane", makes the firing sound, and chooses its target. + IF nummissile% < 49 THEN + nummissile% = nummissile% + 1 + missiles(nummissile%).x = planes(plane%).x + missiles(nummissile%).y = planes(plane%).y + IF missiles(nummissile%).x + xoffset% > 0 AND missiles(nummissile%).x + xoffset% < swidth - 200 AND missiles(nummissile%).y + yoffset% > 0 AND missiles(nummissile%).y + yoffset% < sheight THEN + whoosh& = _SNDOPEN("sfx\missile.wav", "sync") + IF whoosh& THEN _SNDPLAY whoosh& + _SNDCLOSE whoosh& + END IF + missiles(nummissile%).dir = planes(plane%).dir + missiles(nummissile%).fired = plane% + missiles(nummissile%).duration = 0 + missiles(nummissile%).target = -1 + missiles(nummissile%).kind = shot% + smallangle = pi / 4 + FOR k% = 0 TO numplanes% + IF planes(k%).team <> planes(plane%).team OR planes(k%).armor > 0 THEN + distx% = planes(k%).x - missiles(nummissile%).x + disty% = planes(k%).y - missiles(nummissile%).y + dist = SQR(distx% ^ 2 + disty% ^ 2) + angle2 = ATN(disty% / distx%) ' In this case, there is no angle1. angle2 is the angle between the missile and its target. + IF distx% < 0 THEN angle2 = angle2 + pi + IF angle2 < 0 AND missiles(nummissile%).dir >= pi / 6 AND missiles(nummissile%).dir <= 11 * pi / 6 THEN 'When I refer to "fixing" an angle, I mean to add 2 * pi if it's negative. + angle2 = angle2 + 2 * pi ' only fix angle2 if the missile isn't pinting east. + ELSE IF missiles(nummissile%).dir > 11 * pi / 6 THEN missiles(nummissile%).dir = missiles(nummissile%).dir - 2 * pi 'if it is pointing east, un-fix the missile's angle instead. + END IF + angledist = ABS(missiles(nummissile%).dir - angle2) + IF angledist <= pi / 6 AND dist > 48 AND angledist < smallangle THEN + smallangle = angledist + missiles(nummissile%).target = k% + END IF + END IF + NEXT + END IF +END SUB + +SUB lazer (lazers() AS shot, planes() AS airplane, points() AS score, numlazer%, explosions%(), numexplosion%, numplanes%, difficulty, plas&, spread&, pulse&, mods() AS aug, debriss() AS debris, numdebris%) 'Handles all of the bullets and their collisions. Note: When I discovered that it should be spelled "laser," it was already too late. It would have taken hours to change all the references to "lazer," "makelazer," "numlazer," and "lazers()." + IF numlazer% > 0 THEN + FOR k% = 1 TO numlazer% + lazers(k%).x = lazers(k%).x + COS(lazers(k%).dir) * lazers(k%).speed + lazers(k%).y = lazers(k%).y + SIN(lazers(k%).dir) * lazers(k%).speed + SELECT CASE lazers(k%).shape + CASE 0: LINE (lazers(k%).x + xoffset%, lazers(k%).y + yoffset%)-(lazers(k%).x - COS(lazers(k%).dir) * 16 + xoffset%, lazers(k%).y - SIN(lazers(k%).dir) * 16 + yoffset%), lazers(k%).color + CASE 1: LINE (lazers(k%).x + xoffset%, lazers(k%).y + yoffset%)-(lazers(k%).x + xoffset% + 1, lazers(k%).y + yoffset% + 1), lazers(k%).color, BF + CASE 2: _PUTIMAGE (lazers(k%).x - 4 + xoffset%, lazers(k%).y - 4 + yoffset%), spread& + CASE 3: _PUTIMAGE (lazers(k%).x - 4 + xoffset%, lazers(k%).y - 4 + yoffset%), plas& + CASE 4: _PUTIMAGE (lazers(k%).x - 4 + xoffset%, lazers(k%).y - 4 + yoffset%), pulse& + END SELECT + FOR p% = 0 TO numplanes% + IF trigger(planes(p%).x - 16, planes(p%).y - 16, planes(p%).x + 15, planes(p%).y + 15, lazers(k%).x, lazers(k%).y) AND planes(p%).armor > 0 AND p% <> lazers(k%).fired THEN + IF lazers(k%).x + xoffset% > 0 AND lazers(k%).x + xoffset% < swidth - 200 AND lazers(k%).y + yoffset% > 0 AND lazers(k%).y + yoffset% < sheight THEN + hit& = _SNDOPEN("sfx\hit.wav", "sync") + IF hit& <> 0 THEN _SNDPLAY hit& + _SNDCLOSE hit& + END IF + IF planes(p%).team <> planes(lazers(k%).fired).team THEN + planes(p%).lasthit = lazers(k%).fired + ELSE + IF planes(p%).team = 0 AND lazers(k%).fired = 0 THEN PRINT "Hey, Einstein! I'm on your side!" + END IF + planes(p%).armor = planes(p%).armor - lazers(k%).damage + makeexplosion lazers(k%).x, lazers(k%).y, explosions%(), numexplosion%, 15, 0 + IF lazers(k%).kind <> 8 THEN removeshot lazers(), k%, numlazer% + IF lazers(k%).kind = 8 THEN lazers(k%).charge = lazers(k%).charge * 2 + crash planes(), explosions%(), points(), numexplosion%, numplanes%, difficulty, mods(), debriss(), numdebris% + END IF + NEXT + IF lazers(k%).x < 0 OR lazers(k%).x > 4095 OR lazers(k%).y < 0 OR lazers(k%).y > 4095 THEN removeshot lazers(), k%, numlazer% + NEXT + END IF +END SUB + +SUB charge (lazers() AS shot, planes() AS airplane, numlazer%) 'Like lazer, but for charged shots + IF numlazer% > 0 THEN + FOR k% = 1 TO numlazer% + IF lazers(k%).kind = 7 OR lazers(k%).kind = 8 THEN + lazers(k%).damage = lazers(k%).charge / 100 + IF lazers(k%).kind = 7 THEN + IF lazers(k%).target <> -1 THEN + angle = lazers(k%).dir + distx% = planes(lazers(k%).target).x - lazers(k%).x + disty% = planes(lazers(k%).target).y - lazers(k%).y + angle2 = ATN(disty% / distx%) + IF distx% < 0 THEN angle2 = angle2 + pi + IF angle2 < 0 THEN angle2 = angle2 + 2 * pi + IF ABS(angle - angle2) > rad(3) THEN + IF angle >= pi THEN + IF angle - angle2 < pi AND angle - angle2 > 0 THEN lazers(k%).dir = lazers(k%).dir - rad(1.5) ELSE lazers(k%).dir = lazers(k%).dir + rad(1.5) + END IF + IF angle < pi THEN + IF angle2 - angle < pi AND angle2 - angle > 0 THEN lazers(k%).dir = lazers(k%).dir + rad(1.5) ELSE lazers(k%).dir = lazers(k%).dir - rad(1.5) + END IF + END IF + IF lazers(k%).dir >= 2 * pi THEN lazers(k%).dir = 0 + IF lazers(k%).dir < 0 THEN lazers(k%).dir = lazers(k%).dir + 2 * pi + END IF + END IF + IF lazers(k%).charge <= 0 THEN removeshot lazers(), k%, numlazer% + lazers(k%).charge = lazers(k%).charge - 1 + END IF + NEXT + END IF +END SUB + +SUB removeshot (lazers() AS shot, k%, numlazer%) 'removes bullets after they hit stuff + FOR a% = k% TO numlazer% + lazers(a%) = lazers(a% + 1) + NEXT + numlazer% = numlazer% - 1 +END SUB + +SUB missile (missiles() AS missile, planes() AS airplane, points() AS score, nummissile%, contrails%(), numcontrail%, image&, explosions%(), numexplosion%, numplanes%, difficulty, mods() AS aug, debriss() AS debris, numdebris%) 'Handles missiles and their collisions. + IF nummissile% > 0 THEN + FOR k% = 1 TO nummissile% + IF graphsetting = 1 THEN makecontrail missiles(k%).x, missiles(k%).y, contrails%(), numcontrail% + missiles(k%).x = missiles(k%).x + COS(missiles(k%).dir) * 16 + missiles(k%).y = missiles(k%).y + SIN(missiles(k%).dir) * 16 + makecontrail missiles(k%).x, missiles(k%).y, contrails%(), numcontrail% + IF missiles(k%).target <> -1 THEN + angle = missiles(k%).dir + distx% = planes(missiles(k%).target).x - missiles(k%).x + disty% = planes(missiles(k%).target).y - missiles(k%).y + IF missiles(k%).kind = 10 THEN + totaldist = SQR(distx% ^ 2 + disty% ^ 2) + newposx% = totaldist / 16 * planes(missiles(k%).target).speed * COS(planes(missiles(k%).target).dir) + newposy% = totaldist / 16 * planes(missiles(k%).target).speed * SIN(planes(missiles(k%).target).dir) + distx% = distx% + newposx% + disty% = disty% + newposy% + END IF + CIRCLE (distx% + missiles(k%).x + xoffset%, disty% + missiles(k%).y + yoffset%), 16, _RGB(255, 0, 0) + IF missiles(k%).target = 0 THEN _PRINTSTRING (swidth / 2 - 100 - _PRINTWIDTH("MISSILE INCOMING!"), sheight / 2 - 32), "MISSILE INCOMING!" + angle2 = ATN(disty% / distx%) + IF distx% < 0 THEN angle2 = angle2 + pi + IF angle2 < 0 THEN angle2 = angle2 + 2 * pi + IF missiles(k%).kind = 11 THEN turn = .5 ELSE turn = 1.5 + IF ABS(angle - angle2) > rad(3) THEN + IF angle >= pi THEN + IF angle - angle2 < pi AND angle - angle2 > 0 THEN missiles(k%).dir = missiles(k%).dir - rad(turn) ELSE missiles(k%).dir = missiles(k%).dir + rad(turn) + END IF + IF angle < pi THEN + IF angle2 - angle < pi AND angle2 - angle > 0 THEN missiles(k%).dir = missiles(k%).dir + rad(turn) ELSE missiles(k%).dir = missiles(k%).dir - rad(turn) + END IF + END IF + IF missiles(k%).dir >= 2 * pi THEN missiles(k%).dir = 0 + IF missiles(k%).dir < 0 THEN missiles(k%).dir = missiles(k%).dir + 2 * pi + END IF + rotator missiles(k%).x + xoffset%, missiles(k%).y + yoffset%, missiles(k%).dir, image&, 0, 0, 15, 15, 16 + IF missiles(k%).kind <> 11 THEN + FOR p% = 0 TO numplanes% + IF trigger(planes(p%).x - 16, planes(p%).y - 16, planes(p%).x + 15, planes(p%).y + 15, missiles(k%).x, missiles(k%).y) AND planes(p%).armor > 0 AND p% <> missiles(k%).fired THEN + IF missiles(k%).x + xoffset% > 0 AND missiles(k%).x + xoffset% < swidth - 200 AND missiles(k%).y + yoffset% > 0 AND missiles(k%).y + yoffset% < sheight THEN + hit& = _SNDOPEN("sfx\missilehit.wav", "sync") + IF hit& <> 0 THEN _SNDPLAY hit& + _SNDCLOSE hit& + END IF + IF planes(p%).team <> planes(missiles(k%).fired).team THEN + planes(p%).lasthit = missiles(k%).fired + ELSE + IF planes(p%).team = 0 AND missiles(k%).fired = 0 THEN PRINT "Hey, Einstein! I'm on your side!" + END IF + planes(p%).armor = planes(p%).armor - 5 + makeexplosion missiles(k%).x, missiles(k%).y, explosions%(), numexplosion%, 30, 0 + removemissile missiles(), k%, nummissile% + crash planes(), explosions%(), points(), numexplosion%, numplanes%, difficulty, mods(), debriss(), numdebris% + END IF + NEXT + ELSE + IF missiles(k%).target <> -1 THEN + angle = angle + 180 + angle2 = angle2 + 180 + IF ABS(angle - angle2) >= pi / 2 THEN + FOR p% = 0 TO numplanes% + distx% = planes(p%).x - missiles(k%).x + disty% = planes(p%).y - missiles(k%).y + totaldist = SQR(distx% ^ 2 + disty% ^ 2) + IF totaldist < 300 THEN + hit& = _SNDOPEN("cruze.wav", "sync") + IF hit& <> 0 THEN _SNDPLAY hit& + _SNDCLOSE hit& + planes(p%).armor = planes(p%).armor - (30 - totaldist / 10) + IF planes(p%).team <> planes(missiles(k%).fired).team THEN + planes(p%).lasthit = missiles(k%).fired + ELSE + IF planes(p%).team = 0 AND missiles(k%).fired = 0 THEN PRINT "Hey, Einstein! I'm on your side!" + END IF + END IF + NEXT + makeexplosion missiles(k%).x, missiles(k%).y, explosions%(), numexplosion%, 120, 1 + removemissile missiles(), k%, nummissile% + crash planes(), explosions%(), points(), numexplosion%, numplanes%, difficulty, mods(), debriss(), numdebris% + END IF + END IF + END IF + missiles(k%).duration = missiles(k%).duration + 1 + IF missiles(k%).x < 0 OR missiles(k%).x > 4095 OR missiles(k%).y < 0 OR missiles(k%).y > 4095 THEN removemissile missiles(), k%, nummissile% + IF missiles(k%).kind = 9 THEN IF missiles(k%).duration >= 180 THEN removemissile missiles(), k%, nummissile% + IF missiles(k%).kind = 10 THEN IF missiles(k%).duration >= 360 THEN removemissile missiles(), k%, nummissile% + IF missiles(k%).kind = 11 THEN IF missiles(k%).duration >= 540 THEN removemissile missiles(), k%, nummissile% + NEXT + END IF +END SUB + +SUB removemissile (missiles() AS missile, k%, nummissile%) 'Removes missiles. + FOR a% = k% TO nummissile% + missiles(a%) = missiles(a% + 1) + NEXT + missiles(nummissile%).target = -1 + nummissile% = nummissile% - 1 +END SUB + +SUB makecontrail (x%, y%, contrails%(), numcontrail%) 'Makes smoke puffs. + IF numcontrail% < 4999 THEN + numcontrail% = numcontrail% + 1 + contrails%(numcontrail%, 0) = x% + contrails%(numcontrail%, 1) = y% + contrails%(numcontrail%, 2) = 0 + END IF +END SUB + +SUB makeexplosion (x%, y%, explosions%(), numexplosion%, duration%, kind%) 'Makes the explosions. + IF numexplosion% < 199 THEN + numexplosion% = numexplosion% + 1 + explosions%(numexplosion%, 0) = x% ' x position + explosions%(numexplosion%, 1) = y% ' y position + explosions%(numexplosion%, 2) = 0 ' time in existence + explosions%(numexplosion%, 3) = duration% ' end of life + explosions%(numexplosion%, 4) = kind% ' kind of explostion + END IF +END SUB + +SUB maketrail (x%, y%, trails%(), numtrail%, wing%) + IF numtrail% < 999 THEN + numtrail% = numtrail% + 1 + trails%(numtrail%, 0) = x% ' x position + trails%(numtrail%, 1) = y% ' y position + trails%(numtrail%, 2) = 0 ' time in existence + trails%(numtrail%, 3) = wing% ' wing to follow + END IF +END SUB + +SUB makedebris (plane AS airplane, debriss() AS debris, numdebris%) + IF numdebris% <= 252 THEN + FOR k = 0 TO 3 + numdebris% = numdebris% + 1 + debriss(numdebris%).x = plane.x + debriss(numdebris%).y = plane.y + debriss(numdebris%).life = 0 'time in existence + debrisdirx = RND * 4 - 2 + debrisdiry = RND * 4 - 2 + debriss(numdebris%).dir = ATN((SIN(plane.dir) * plane.speed + debrisdiry) / (COS(plane.dir) * plane.speed + debrisdirx)) 'direction + IF COS(plane.dir) * plane.speed + debrisdirx < 0 THEN debriss(numdebris%).dir = debriss(numdebris%).dir + pi + debriss(numdebris%).speed = SQR((SIN(plane.dir) * plane.speed + debrisdiry) ^ 2 + (COS(plane.dir) * plane.speed + debrisdirx) ^ 2) 'speed + debriss(numdebris%).image = _NEWIMAGE(_HEIGHT(plane.image) / 2, _HEIGHT(plane.image) / 2, 32) 'use height for both since we want a square + SELECT CASE k + 'remember that the image of the plane that we want is a square in the center of plane.image, not the whole thing + CASE 0: _PUTIMAGE , plane.image, debriss(numdebris%).image, (64, 0)-STEP(15, 15) + CASE 1: _PUTIMAGE , plane.image, debriss(numdebris%).image, (64 + _HEIGHT(plane.image) / 2, 0)-STEP(15, 15) + CASE 2: _PUTIMAGE , plane.image, debriss(numdebris%).image, (64, _HEIGHT(plane.image) / 2)-STEP(15, 15) + CASE 3: _PUTIMAGE , plane.image, debriss(numdebris%).image, (64 + _HEIGHT(plane.image) / 2, _HEIGHT(plane.image) / 2)-STEP(15, 15) + END SELECT + debriss(numdebris%).angle = debriss(numdebriss%).dir + debriss(numdebris%).rotation = RND * 4 - 2 + NEXT + END IF +END SUB + +SUB contrail (contrails%(), numcontrail%, contraileffect&) 'makes the smoke puffs wiggle, and removes them when it's time. + IF numcontrail% > 0 THEN + FOR k% = 1 TO numcontrail% + contrails%(k%, 0) = contrails%(k%, 0) + INT(RND * 3) - 1 + contrails%(k%, 1) = contrails%(k%, 1) + INT(RND * 3) - 1 + contrails%(k%, 2) = contrails%(k%, 2) + 1 + IF graphsetting = 0 AND contrails%(k%, 2) >= 60 THEN remove contrails%(), k%, numcontrail%, 2 + IF contrails%(k%, 2) >= 180 THEN remove contrails%(), k%, numcontrail%, 2 + IF contrails%(k%, 0) + xoffset% > 0 AND contrails%(k%, 0) + xoffset% < swidth - 200 AND contrails%(k%, 1) + yoffset% > 0 AND contrails%(k%, 1) + yoffset% < sheight THEN + _PUTIMAGE (contrails%(k%, 0) + xoffset% - 8, contrails%(k%, 1) + yoffset% - 8), contraileffect& + END IF + NEXT + END IF +END SUB + +SUB explosion (explosions%(), numexplosion%, explosioneffect&) 'Makes the explosions animate, and removes them when it's time. + IF numexplosion% > 0 THEN + FOR k% = 1 TO numexplosion% + IF explosions%(k%, 0) + xoffset% > 0 AND explosions%(k%, 0) + xoffset% < swidth - 200 AND explosions%(k%, 1) + yoffset% > 0 AND explosions%(k%, 1) + yoffset% < sheight THEN + IF explosions%(k%, 4) = 0 THEN + _PUTIMAGE (explosions%(k%, 0) + xoffset% - explosions%(k%, 2), explosions%(k%, 1) + yoffset% - explosions%(k%, 2))-(explosions%(k%, 0) + xoffset% + explosions%(k%, 2) - 1, explosions%(k%, 1) + yoffset% + explosions%(k%, 2) - 1), explosioneffect& + END IF + IF explosions%(k%, 4) = 1 THEN + LINE (0, 0)-(swidth - 201, sheight - 1), _RGBA(0, 0, 0, 127 - (explosions%(k%, 2) / explosions%(k%, 3) * 127)), BF + IF explosions%(k%, 2) <= 30 THEN LINE (0, 0)-(swidth - 201, sheight - 1), _RGBA(255, 255, 255, 255 - (explosions%(k%, 2) / 30 * 255)), BF + END IF + END IF + explosions%(k%, 2) = explosions%(k%, 2) + 1 + IF explosions%(k%, 2) >= explosions%(k%, 3) THEN remove explosions%(), k%, numexplosion%, 4 + NEXT + END IF +END SUB + +SUB trail (trails%(), numtrail%, numplanes%) + DIM traillinks(32, 32) AS INTEGER + IF numtrail% > 0 THEN + FOR p% = 0 TO numplanes% * 2 + 1 '# of wings + numlink% = 0 + FOR k% = 1 TO numtrail% + IF trails%(k%, 3) = p% THEN + traillinks(p%, numlink%) = k% + numlink% = numlink% + 1 + IF numlink% >= 30 THEN numlink% = 30 + END IF + NEXT + IF numlink% > 0 THEN + FOR l% = 1 TO numlink% - 1 + IF trails%(traillinks(p%, l%), 0) + xoffset% > 0 AND trails%(traillinks(p%, l%), 0) + xoffset% < swidth - 200 AND trails%(traillinks(p%, l%), 1) + yoffset% > 0 AND trails%(traillinks(p%, l%), 1) + yoffset% < sheight THEN + IF trails%(traillinks(p%, l%), 2) >= trails%(traillinks(p%, l% - 1), 2) - 2 THEN LINE (trails%(traillinks(p%, l%), 0) + xoffset%, trails%(traillinks(p%, l%), 1) + yoffset%)-(trails%(traillinks(p%, l% - 1), 0) + xoffset%, trails%(traillinks(p%, l% - 1), 1) + yoffset%), _RGB(191, 191, 191) + END IF + NEXT + END IF + NEXT + FOR a% = 1 TO numtrail% + trails%(a%, 2) = trails%(a%, 2) + 1 + IF trails%(a%, 2) >= 30 THEN remove trails%(), a%, numtrail%, 3 + NEXT + END IF +END SUB + +SUB flareeffect (flares(), numflare%, contrails%(), numcontrail%, flareimage&) + IF numflare% > 0 THEN + FOR i = 1 TO numflare% + flares(i, 0) = flares(i, 0) + COS(flares(i, 3)) * flares(i, 4) + flares(i, 1) = flares(i, 1) + SIN(flares(i, 3)) * flares(i, 4) + _PUTIMAGE (flares(i, 0) - 4 + xoffset%, flares(i, 1) - 4 + yoffset%), flareimage& + makecontrail flares(i, 0), flares(i, 1), contrails%(), numcontrail% + flares(i, 2) = flares(i, 2) + 1 + IF flares(i, 2) >= 60 THEN + FOR b = i TO numflare% + FOR a = 0 TO 4 + flares(b, a) = flares(b + 1, a) + NEXT + NEXT + numflare% = numflare% - 1 + END IF + NEXT + END IF +END SUB + +SUB debriseffect (debriss() AS debris, numdebris%, explosions%(), numexplosion%) + IF numdebris% > 0 THEN + FOR i = 1 TO numdebris% + debriss(i).x = debriss(i).x + COS(debriss(i).dir) * debriss(i).speed + debriss(i).y = debriss(i).y + SIN(debriss(i).dir) * debriss(i).speed + debriss(i).angle = debriss(i).angle + (debriss(i).rotation / 60) + rotator debriss(i).x + xoffset%, debriss(i).y + yoffset%, debriss(i).angle, debriss(i).image, 0, 0, 15, 15, 16 + IF debriss(i).life / 5 = debriss(i).life \ 5 THEN makeexplosion debriss(i).x, debriss(i).y, explosions%(), numexplosion%, 15, 0 + IF debriss(i).life >= 60 THEN + FOR a = i TO numdebris% + debriss(i) = debriss(i + 1) + NEXT + numdebris% = numdebris% - 1 + END IF + debriss(i).life = debriss(i).life + 1 + NEXT + END IF +END SUB + +SUB remove (object%(), num%, maxnum%, dims%) 'removes things + FOR b% = 0 TO dims% + FOR a% = num% TO maxnum% + object%(a%, b%) = object%(a% + 1, b%) + NEXT + NEXT + maxnum% = maxnum% - 1 +END SUB + +SUB cursor 'makes the little circle mouse pointer. + DO + mousex% = _MOUSEX + mousey% = _MOUSEY + LOOP WHILE _MOUSEINPUT + CIRCLE (mousex%, mousey%), 2, _RGB(255, 255, 255) +END SUB + +SUB env 'the main body of the game. + CLS + center "Loading...", 4 + _DISPLAY + DIM topo%(15, 15) + DIM ground&(43) + ground&(0) = _LOADIMAGE("bg\grass03.png") + ground&(1) = _LOADIMAGE("bg\woods02.png") + 'ground&(2) = _LOADIMAGE("bg\water.png") + ground&(3) = _LOADIMAGE("bg\blendgrasswoodsbottomright.png") + ground&(4) = _LOADIMAGE("bg\blendgrasswoodsbottomleft.png") + ground&(5) = _LOADIMAGE("bg\blendgrasswoodstopright.png") + ground&(6) = _LOADIMAGE("bg\blendgrasswoodstopleft.png") + ground&(7) = _LOADIMAGE("bg\blendgrasswoodsbottom.png") + ground&(8) = _LOADIMAGE("bg\blendgrasswoodsleft.png") + ground&(9) = _LOADIMAGE("bg\blendgrasswoodstop.png") + ground&(10) = _LOADIMAGE("bg\blendgrasswoodsright.png") + ground&(11) = _LOADIMAGE("bg\blendgrasswoodstopright2.png") + ground&(12) = _LOADIMAGE("bg\blendgrasswoodsbottomright2.png") + ground&(13) = _LOADIMAGE("bg\blendgrasswoodsbottomleft2.png") + ground&(14) = _LOADIMAGE("bg\blendgrasswoodstopleft2.png") + ground&(15) = _LOADIMAGE("bg\blendgrasswoodsubottom.png") + ground&(16) = _LOADIMAGE("bg\blendgrasswoodsuleft.png") + ground&(17) = _LOADIMAGE("bg\blendgrasswoodsutop.png") + ground&(18) = _LOADIMAGE("bg\blendgrasswoodsuright.png") + ground&(19) = _LOADIMAGE("bg\blendgrasswoodscornerstop.png") + ground&(20) = _LOADIMAGE("bg\blendgrasswoodscornersright.png") + ground&(21) = _LOADIMAGE("bg\blendgrasswoodscornersbottom.png") + ground&(22) = _LOADIMAGE("bg\blendgrasswoodscornersleft.png") + ground&(23) = _LOADIMAGE("bg\blendgrasswoodsclearing.png") + ground&(24) = _LOADIMAGE("bg\blendgrasswoodstopbottomright.png") + ground&(25) = _LOADIMAGE("bg\blendgrasswoodstopbottomleft.png") + ground&(26) = _LOADIMAGE("bg\blendgrasswoodsbottomtopright.png") + ground&(27) = _LOADIMAGE("bg\blendgrasswoodsbottomtopleft.png") + ground&(28) = _LOADIMAGE("bg\blendgrasswoodsrightbottomleft.png") + ground&(29) = _LOADIMAGE("bg\blendgrasswoodsrighttopleft.png") + ground&(30) = _LOADIMAGE("bg\blendgrasswoodsleftbottomright.png") + ground&(31) = _LOADIMAGE("bg\blendgrasswoodslefttopright.png") + ground&(32) = _LOADIMAGE("bg\blendgrasswoodshoriz.png") + ground&(33) = _LOADIMAGE("bg\blendgrasswoodsvert.png") + ground&(34) = _LOADIMAGE("bg\blendgrasswoodstopwithcorners.png") + ground&(35) = _LOADIMAGE("bg\blendgrasswoodsrightwithcorners.png") + ground&(36) = _LOADIMAGE("bg\blendgrasswoodsbottomwithcorners.png") + ground&(37) = _LOADIMAGE("bg\blendgrasswoodsleftwithcorners.png") + ground&(38) = _LOADIMAGE("bg\blendgrasswoodstoprightcurve.png") + ground&(39) = _LOADIMAGE("bg\blendgrasswoodsbottomrightcurve.png") + ground&(40) = _LOADIMAGE("bg\blendgrasswoodsbottomleftcurve.png") + ground&(41) = _LOADIMAGE("bg\blendgrasswoodstopleftcurve.png") + ground&(42) = _LOADIMAGE("bg\blendgrasswoodsforwardslash.png") + ground&(43) = _LOADIMAGE("bg\blendgrasswoodsbackslash.png") + pointx% = INT(RND * 16) + pointy% = INT(RND * 16) + topo%(pointx%, pointy%) = 1 + size% = 64 + DO UNTIL size% = 0 + pointx% = pointx% + INT(RND * 3) - 1 + IF pointx% > 15 THEN pointx% = 14: size% = size% + 1 + IF pointx% < 0 THEN pointx% = 1: size% = size% + 1 + pointy% = pointy% + INT(RND * 3) - 1 + IF pointy% > 15 THEN pointy% = 14: size% = size% + 1 + IF pointy% < 0 THEN pointy% = 1: size% = size% + 1 + topo%(pointx%, pointy%) = 1 + size% = size% - 1 + LOOP + 'pointx% = INT(RND * 16) + 'pointy% = INT(RND * 16) + 'topo%(pointx%, pointy%) = 2 + 'dir% = INT(RND * 8) + 'DO UNTIL pointx% <= 0 OR pointx% >= 15 OR pointy% <= 0 OR pointy% >= 15 + ' IF pointx% >= 0 AND pointx% <= 15 AND pointy% >= 0 AND pointy% <= 15 THEN + ' IF COS(pi / 4 * dir%) > -.1 THEN pointx% = pointx% + INT(1.5 * COS(pi / 4 * dir%)) + ' IF SIN(pi / 4 * dir%) > -.1 THEN pointy% = pointy% + INT(1.5 * SIN(pi / 4 * dir%)) + ' IF COS(pi / 4 * dir%) < -.1 THEN pointx% = pointx% + INT(.5 * COS(pi / 4 * dir%)) + ' IF SIN(pi / 4 * dir%) < -.1 THEN pointy% = pointy% + INT(.5 * SIN(pi / 4 * dir%)) + ' dir% = dir% + INT(RND * 3) - 1 + ' IF dir% < 0 THEN dir% = 7 + ' IF dir% > 7 THEN dir% = 0 + ' topo%(pointx%, pointy%) = 2 + ' END IF + 'LOOP + genground topo%() + allground& = _NEWIMAGE(4096 + swidth, 4096 + sheight, 32) + _DEST allground&: CLS: _DEST 0 + FOR y = 0 TO 15 + FOR x = 0 TO 15 + _PUTIMAGE (x * 256 + (swidth / 2 - 100), y * 256 + sheight / 2), ground&(topo%(x, y)), allground& + NEXT + NEXT + _FREEIMAGE ground&(0) + _FREEIMAGE ground&(1) + FOR freeground% = 3 TO 43 + IF ground&(freeground%) THEN _FREEIMAGE ground&(freeground%) + NEXT + player& = _LOADIMAGE("ui\player.png") + plane& = _LOADIMAGE("ui\plane.png") + missileimage& = _LOADIMAGE("ui\missile.png") + weapon& = _LOADIMAGE("ui\electricweapons.png") + aug& = _LOADIMAGE("ui\electricmods.png") + stat& = _LOADIMAGE("ui\electricstats.png") + premetal& = _LOADIMAGE("bg\brushedmetal.png") + brushedmetal& = _NEWIMAGE(swidth, sheight, 32) + explosioneffect& = _COPYIMAGE(blob(128, 128, _RGB(255, 0, 0), _RGB(255, 255, 0))) + contraileffect& = _COPYIMAGE(blob(16, 16, _RGB(127, 127, 127), _RGB(127, 127, 127))) + plasshot& = _COPYIMAGE(blob(8, 8, _RGB(0, 255, 0), _RGB(127, 255, 0))) + spreadshot& = _COPYIMAGE(blob(8, 8, _RGB(0, 0, 255), _RGB(0, 127, 255))) + pulseshot& = _COPYIMAGE(blob(8, 8, _RGB(127, 0, 255), _RGB(255, 0, 255))) + flareimage& = _COPYIMAGE(blob(8, 8, _RGB(255, 0, 0), _RGB(255, 255, 255))) + _DEST 0 + _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& + _FREEIMAGE premetal& + _CLEARCOLOR _RGB(0, 0, 0), player& + _CLEARCOLOR _RGB(0, 0, 0), plane& + _CLEARCOLOR _RGB(0, 0, 0), missileimage& + _CLEARCOLOR _RGB(0, 0, 0), weapon& + _CLEARCOLOR _RGB(0, 0, 0), aug& + _CLEARCOLOR _RGB(0, 0, 0), stat& + DIM wepimage&(11) + DIM modimage&(4) + DIM statimage&(4) + DIM tooltips&(4) + _SOURCE weapon& + FOR wep% = 1 TO 8 + wepimage&(wep%) = _NEWIMAGE(32, 32, 32) + _DEST wepimage&(wep%) + FOR y% = 0 TO 31 + FOR x% = 0 TO 31 + PSET (x%, y%), POINT(x% + (wep% - 1) * 32, y%) + NEXT + NEXT + NEXT + blankmissile& = _NEWIMAGE(32, 32, 32) + _DEST blankmissile& + FOR y% = 0 TO 31 + FOR x% = 0 TO 31 + PSET (x%, y%), POINT(x%, y% + 32) + NEXT + NEXT + FOR wep% = 1 TO 4 + modimage&(wep%) = _NEWIMAGE(32, 32, 32) + statimage&(wep%) = _NEWIMAGE(32, 32, 32) + _SOURCE aug& + _DEST modimage&(wep%) + FOR y% = 0 TO 31 + FOR x% = 0 TO 31 + PSET (x%, y%), POINT(x% + (wep% - 1) * 32, y%) + NEXT + NEXT + _SOURCE stat& + _DEST statimage&(wep%) + FOR y% = 0 TO 31 + FOR x% = 0 TO 31 + PSET (x%, y%), POINT(x% + (wep% - 1) * 32, y%) + NEXT + NEXT + NEXT + _SOURCE 0 + _DEST 0 + wepimage&(9) = recolor&(blankmissile&, _RGB(255, 255, 255), _RGB(0, 0, 255)) + wepimage&(10) = recolor&(blankmissile&, _RGB(255, 255, 255), _RGB(0, 127, 0)) + wepimage&(11) = _NEWIMAGE(32, 32, 32) + _PUTIMAGE (0, 0), weapon&, wepimage&(11), (32, 32)-(63, 63) + _FREEIMAGE blankmissile& + _FREEIMAGE weapon& + _FREEIMAGE aug& + _FREEIMAGE stat& + wepimage&(0) = _NEWIMAGE(32, 32, 32) + modimage&(0) = _NEWIMAGE(32, 32, 32) + _CLEARCOLOR _RGB(0, 0, 0), wepimage&(0) + _CLEARCOLOR _RGB(0, 0, 0), modimage&(0) + tooltips&(1) = _LOADIMAGE("ui\tooltips\aimer_tooltip.png") + tooltips&(2) = _LOADIMAGE("ui\tooltips\energy_armor_tooltip.png") + tooltips&(3) = _LOADIMAGE("ui\tooltips\srb_tooltip.png") + tooltips&(4) = _LOADIMAGE("ui\tooltips\flare_tooltip.png") + OPEN "electricsettings.cfg" FOR RANDOM AS #1 LEN = LEN(swidth) + GET #1, 5, red + GET #1, 6, green + GET #1, 7, blue + GET #1, 8, difficulty + IF gamepad <> 0 THEN + DIM steering AS control, throttle AS control, primary AS control, secondary AS control, scrdown AS control, scrup AS control, pick AS control + GET #1, 10, steering.number + GET #1, 11, throttle.number + GET #1, 12, primary.number + GET #1, 13, secondary.number + GET #1, 16, scrdown.number + GET #1, 17, scrup.number + GET #1, 18, pick.number + GET #1, 20, steering.axis + GET #1, 21, throttle.axis + GET #1, 22, primary.axis + GET #1, 23, secondary.axis + GET #1, 24, scrdown.axis + GET #1, 25, scrup.axis + GET #1, 26, pick.axis + picked% = 1 + numdevice% = _DEVICES + buttons% = _LASTBUTTON(gamepad) + DO WHILE _DEVICEINPUT(gamepad) + LOOP + END IF + GET #1, 14, livery + GET #1, 15, team + GET #1, 19, vol + CLOSE #1 + _DEST allground& 'we need the player's color to do this + LINE (0, sheight / 2)-(swidth / 2 - 100, 4095 + sheight / 2), _RGB(red, green, blue), BF + LINE (4096 + swidth / 2 - 100, sheight / 2)-(4096 + swidth - 200, 4095 + sheight / 2), _RGB(255, 0, 0), BF + LINE (swidth / 2 - 100, 0)-(4095 + swidth / 2 - 100, sheight / 2), _RGB(0, 255, 0), BF + LINE (swidth / 2 - 100, 4096 + sheight / 2)-(4095 + swidth / 2 - 100, 4096 + sheight), _RGB(255, 255, 0), BF + _DEST 0 + IF team < 1 THEN team = 1 + IF team > 4 THEN team = 4 + planeshadow& = shadow&(plane&) + 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 + DIM mods(15, 4) AS aug + DIM weapons(15, 5) AS weapon + DIM lazers(5000) AS shot + DIM missiles(50) AS missile + DIM contrails%(5000, 2) + DIM explosions%(200, 4) + DIM trails%(1000, 3) + DIM flares(130, 4) + DIM wepstorage(15, 15) AS weapon + DIM modstorage(15, 15) AS aug + DIM controller(30) + DIM debriss(260) AS debris + FOR teammates = 0 TO team - 1 + planes(0 + 4 * teammates).blip = recolor&(player&, _RGB(255, 255, 255), _RGB(red, green, blue)) + planes(1 + 4 * teammates).blip = recolor&(player&, _RGB(255, 255, 255), _RGB(255, 0, 0)) + planes(2 + 4 * teammates).blip = recolor&(player&, _RGB(255, 255, 255), _RGB(0, 255, 0)) + planes(3 + 4 * teammates).blip = recolor&(player&, _RGB(255, 255, 255), _RGB(255, 255, 0)) + IF livery = 0 THEN + planes(0 + 4 * teammates).image = recolor&(plane&, _RGB(255, 255, 255), _RGB(red, green, blue)) + planes(1 + 4 * teammates).image = recolor&(plane&, _RGB(255, 255, 255), _RGB(255, 0, 0)) + planes(2 + 4 * teammates).image = recolor&(plane&, _RGB(255, 255, 255), _RGB(0, 255, 0)) + planes(3 + 4 * teammates).image = recolor&(plane&, _RGB(255, 255, 255), _RGB(255, 255, 0)) + ELSE + planes(0 + 4 * teammates).image = colorgreyspectrum&(plane&, _RGB(red, green, blue)) + planes(1 + 4 * teammates).image = colorgreyspectrum&(plane&, _RGB(255, 0, 0)) + planes(2 + 4 * teammates).image = colorgreyspectrum&(plane&, _RGB(0, 255, 0)) + planes(3 + 4 * teammates).image = colorgreyspectrum&(plane&, _RGB(255, 255, 0)) + END IF + planes(0 + 4 * teammates).team = 0 + planes(0 + 4 * teammates).x = 300 + planes(0 + 4 * teammates).y = 300 + planes(0 + 4 * teammates).lasthit = 2 + planes(0 + 4 * teammates).ai = 1 + planes(1 + 4 * teammates).team = 1 + planes(1 + 4 * teammates).x = 3796 + planes(1 + 4 * teammates).y = 3796 + planes(1 + 4 * teammates).dir = pi + planes(1 + 4 * teammates).lasthit = 3 + planes(1 + 4 * teammates).ai = 1 + planes(2 + 4 * teammates).team = 2 + planes(2 + 4 * teammates).x = 3796 + planes(2 + 4 * teammates).y = 300 + planes(2 + 4 * teammates).dir = pi / 2 + planes(2 + 4 * teammates).lasthit = 1 + planes(2 + 4 * teammates).ai = 1 + planes(3 + 4 * teammates).team = 3 + planes(3 + 4 * teammates).x = 300 + planes(3 + 4 * teammates).y = 3796 + planes(3 + 4 * teammates).dir = 3 / 2 * pi + planes(3 + 4 * teammates).lasthit = 0 + planes(3 + 4 * teammates).ai = 1 + NEXT + planes(0).ai = 0 + 'un-comment the next line for practically unlimited credits + 'planes(0).credits = 9999 + 'uncomment the next four lines for practically unlimited radar-guided missiles + 'weapons(0, 5).wep = 10 + 'weapons(0, 5).ifon = -1 + 'weapons(0, 5).total = 60 + 'weapons(0, 5).ammo = 9999 + fcont% = 1 + numlazer% = 0 + DIM wepmouse AS weapon + DIM modmouse AS aug + DIM blankspace AS weapon + FOR k% = 0 TO numplanes% + planes(k%).force = 3 + planes(k%).speed = 3 + planes(k%).battery = 100 + planes(k%).generator = 1 + planes(k%).armor = 10 + planes(k%).ammo = 1000 + planes(k%).maxbatt = 100 + planes(k%).maxarm = 10 + weapons(k%, 2).wep = 1 + weapons(k%, 2).ifon = -1 + weapons(k%, 2).total = 12 + weapons(k%, 2).energy = .25 + NEXT + music& = _SNDOPEN("electric_game.ogg", "sync,vol") + IF music& <> 0 THEN + _SNDVOL music&, vol * .8 + _SNDLOOP music& + END IF + DO + _LIMIT 61 + DO + lclick% = _MOUSEBUTTON(1) + LOOP WHILE _MOUSEINPUT + 'CLS + IF planes(0).market = 0 THEN scrollground allground& + IF xoffset% > 0 THEN + LINE (0, yoffset%)-(xoffset% - 1, 4095 + yoffset%), _RGB(red, green, blue), BF + COLOR _RGB(255 - red, 255 - green, 255 - blue) + _PRINTSTRING (-152 + xoffset%, sheight / 2 - 16), "Market" + IF planes(0).waittime > 0 THEN _PRINTSTRING (-152 + xoffset%, sheight / 2), "Closed" ELSE _PRINTSTRING (-148 + xoffset%, sheight / 2), "Open!" + COLOR _RGB(255, 255, 255) + END IF + IF gamepad <> 0 THEN + IF gamepad <= numdevice% THEN + DO WHILE _DEVICEINPUT(gamepad) + FOR a% = 1 TO buttons% + controller(a%) = _BUTTON(a%) + NEXT + FOR b% = 1 TO _LASTAXIS + controller(b% + buttons%) = _AXIS(b%) + NEXT + LOOP + IF controller(buttons% * scrdown.axis + scrdown.number) AND ignoretog% = 0 THEN picked% = picked% - 1: ignoretog% = -1 + IF controller(buttons% * scrup.axis + scrup.number) AND ignoretog% = 0 THEN picked% = picked% + 1: ignoretog% = -1 + IF picked% <= 0 THEN picked% = 9 + IF picked% >= 10 THEN picked% = 1 + END IF + END IF + IF planes(0).armor > 0 THEN + IF gamepad = 0 THEN + playercontrol planes(0).dir, planes(0).force, planes(0).yaw, 0, 0 + IF planes(0).market = 0 THEN playerfire planes(), 0, weapons(), 0, 0 + ELSE + playercontrol planes(0).dir, planes(0).force, planes(0).yaw, controller(buttons% * steering.axis + steering.number), controller(buttons% * throttle.axis + throttle.number) + IF planes(0).market = 0 THEN playerfire planes(), 0, weapons(), ABS(controller(buttons% * primary.axis + primary.number)) + .5, ABS(controller(buttons% * secondary.axis + secondary.number)) + .5 + END IF + END IF + IF planes(0).x <= 0 AND planes(0).waittime <= 0 THEN planes(0).x = -128: planes(0).force = 0: planes(0).speed = 0: planes(0).market = 1 + IF planes(0).speed < 2.5 AND planes(0).force < 2 AND planes(0).armor > 0 THEN COLOR _RGB(255, 0, 0): _PRINTSTRING ((swidth - _PRINTWIDTH("STALL WARNING!")) / 2, sheight / 2 + 32), "STALL WARNING!": COLOR _RGB(255, 255, 255) + screenanchorx% = INT(planes(0).x) + screenanchory% = INT(planes(0).y) + xoffset% = -screenanchorx% + swidth / 2 - 100 + yoffset% = -screenanchory% + sheight / 2 + FOR k% = 0 TO numplanes% + FOR wepn% = 1 TO 3 + IF weapons(k%, wepn%).kind = 0 THEN + IF weapons(k%, wepn%).remaining < weapons(k%, wepn%).total THEN weapons(k%, wepn%).remaining = weapons(k%, wepn%).remaining + 1 + IF weapons(k%, wepn%).firing = 1 THEN + weapons(k%, wepn%).firing = 0 + makeshot lazers(), numlazer%, planes(k%), k%, weapons(k%, wepn%).wep, wepn%, planes(0).market + planes(k%).battery = planes(k%).battery - weapons(k%, wepn%).energy + planes(k%).ammo = planes(k%).ammo - weapons(k%, wepn%).ammo + IF wepn% = 2 OR wepn% = 3 THEN + planes(k%).battery = planes(k%).battery - weapons(k%, wepn%).energy + planes(k%).ammo = planes(k%).ammo - weapons(k%, wepn%).ammo + END IF + END IF + END IF + IF weapons(k%, wepn%).kind = 1 THEN + IF weapons(k%, wepn%).firing >= 1 AND NOT _KEYDOWN(32) AND NOT lclick AND NOT controller(1) THEN + makecharge lazers(), numlazer%, k%, planes(), weapons(k%, wepn%).wep, weapons(k%, wepn%).firing, wepn%, numplanes% + planes(k%).battery = planes(k%).battery - weapons(k%, wepn%).firing / 6 + IF wepn% = 2 OR wepn% = 3 THEN planes(k%).battery = planes(k%).battery - weapons(k%, wepn%).firing / 6 + weapons(k%, wepn%).firing = 0 + END IF + END IF + NEXT + FOR wepn% = 4 TO 5 + IF weapons(k%, wepn%).remaining < weapons(k%, wepn%).total THEN weapons(k%, wepn%).remaining = weapons(k%, wepn%).remaining + 1 + IF weapons(k%, wepn%).firing = 1 THEN + weapons(k%, wepn%).firing = 0 + makemissile missiles(), nummissile%, k%, planes(), weapons(k%, wepn%).wep, numplanes% + weapons(k%, wepn%).ammo = weapons(k%, wepn%).ammo - 1 + END IF + IF weapons(k%, wepn%).ammo <= 0 THEN weapons(k%, wepn%) = blankspace + NEXT + IF planes(k%).battery >= 1 THEN + FOR augm% = 1 TO 4 + IF mods(k%, augm%).ifon = -1 THEN + IF mods(k%, augm%).kind = 1 THEN aimer planes(), k%, numplanes% + IF mods(k%, augm%).kind = 2 THEN converter planes(k%), mods(k%, augm%).ifon + IF mods(k%, augm%).kind = 3 THEN srb planes(k%), contrails%(), numcontrail%, mods(k%, augm%) + IF mods(k%, augm%).kind = 4 THEN flare k%, planes(k%), missiles(), nummissile%, mods(k%, augm%), flares(), numflare% + planes(k%).battery = planes(k%).battery - mods(k%, augm%).energy / 60 + END IF + NEXT + END IF + IF planes(k%).armor <= 0 THEN respawn planes(k%) + IF planes(k%).ai = 1 AND planes(k%).armor > 0 THEN + aiplane k%, planes(), weapons(), difficulty + SELECT CASE planes(k%).team + CASE 0: IF planes(k%).x <= 0 THEN aimarket planes(k%), k%, weapons(), wepstorage() + CASE 1: IF planes(k%).x >= 4095 THEN aimarket planes(k%), k%, weapons(), wepstorage() + CASE 2: IF planes(k%).y <= 0 THEN aimarket planes(k%), k%, weapons(), wepstorage() + CASE 3: IF planes(k%).y >= 4095 THEN aimarket planes(k%), k%, weapons(), wepstorage() + END SELECT + END IF + planes(k%).dir = planes(k%).dir + rad(1.5 * planes(k%).yaw) + togglecontrol k%, weapons(), mods(), ignoretog%, picked%, controller(pick.number) + IF planes(k%).speed < 2 AND planes(k%).market = 0 THEN + planes(k%).armor = 0 + crash planes(), explosions%(), points(), numexplosion%, numplanes%, difficulty, mods(), debriss(), numdebris% + END IF + planes(k%).x = planes(k%).x + COS(planes(k%).dir) * planes(k%).speed + planes(k%).y = planes(k%).y + SIN(planes(k%).dir) * planes(k%).speed + IF planes(k%).market = 0 AND planes(k%).x < 0 THEN planes(k%).x = 0 + IF planes(k%).x > 4095 THEN planes(k%).x = 4095 + IF planes(k%).y < 0 THEN planes(k%).y = 0 + IF planes(k%).y > 4095 THEN planes(k%).y = 4095 + planes(k%).battery = planes(k%).battery + planes(k%).generator / 30 - planes(k%).force * 1 / 150 + IF planes(k%).battery < 0 THEN planes(k%).battery = 0: IF planes(k%).force > planes(k%).generator * 5 THEN planes(k%).force = planes(k%).generator * 5 + fakephysics planes(k%).force, planes(k%).speed + IF planes(k%).battery > planes(k%).maxbatt THEN planes(k%).battery = planes(k%).maxbatt + IF planes(0).market = 0 THEN + IF planes(k%).x + xoffset% > 0 AND planes(k%).x + xoffset% < swidth - 200 AND planes(k%).y + yoffset% > 0 AND planes(k%).y + yoffset% < sheight AND planes(k%).armor > 0 THEN + IF planes(k%).yaw <= -.7 THEN + IF graphsetting = 1 THEN + rotator planes(k%).x + 16 + xoffset%, planes(k%).y + 16 + yoffset%, planes(k%).dir, planeshadow&, 0, 0, 31, 31, 32 + maketrail planes(k%).x + COS(planes(k%).dir - pi / 2) * 8, planes(k%).y + SIN(planes(k%).dir - pi / 2) * 8, trails%(), numtrail%, k% + maketrail planes(k%).x + COS(planes(k%).dir + pi / 2) * 8, planes(k%).y + SIN(planes(k%).dir + pi / 2) * 8, trails%(), numtrail%, k% + numplanes% + 1 + END IF + rotator planes(k%).x + xoffset%, planes(k%).y + yoffset%, planes(k%).dir, planes(k%).image, 0, 0, 31, 31, 32 + END IF + IF planes(k%).yaw > -.7 AND planes(k%).yaw < -.3 THEN + IF graphsetting = 1 THEN rotator planes(k%).x + 16 + xoffset%, planes(k%).y + 16 + yoffset%, planes(k%).dir, planeshadow&, 32, 0, 63, 31, 32 + rotator planes(k%).x + xoffset%, planes(k%).y + yoffset%, planes(k%).dir, planes(k%).image, 32, 0, 63, 31, 32 + END IF + IF planes(k%).yaw >= -.3 AND planes(k%).yaw <= .3 THEN + IF graphsetting = 1 THEN rotator planes(k%).x + 16 + xoffset%, planes(k%).y + 16 + yoffset%, planes(k%).dir, planeshadow&, 64, 0, 95, 31, 32 + rotator planes(k%).x + xoffset%, planes(k%).y + yoffset%, planes(k%).dir, planes(k%).image, 64, 0, 95, 31, 32 + END IF + IF planes(k%).yaw > .3 AND planes(k%).yaw < .7 THEN + IF graphsetting = 1 THEN rotator planes(k%).x + 16 + xoffset%, planes(k%).y + 16 + yoffset%, planes(k%).dir, planeshadow&, 96, 0, 127, 31, 32 + rotator planes(k%).x + xoffset%, planes(k%).y + yoffset%, planes(k%).dir, planes(k%).image, 96, 0, 127, 31, 32 + END IF + IF planes(k%).yaw >= .7 THEN + IF graphsetting = 1 THEN + rotator planes(k%).x + 16 + xoffset%, planes(k%).y + 16 + yoffset%, planes(k%).dir, planeshadow&, 128, 0, 159, 31, 32 + maketrail planes(k%).x + COS(planes(k%).dir - pi / 2) * 8, planes(k%).y + SIN(planes(k%).dir - pi / 2) * 8, trails%(), numtrail%, k% + maketrail planes(k%).x + COS(planes(k%).dir + pi / 2) * 8, planes(k%).y + SIN(planes(k%).dir + pi / 2) * 8, trails%(), numtrail%, k% + numplanes% + 1 + END IF + rotator planes(k%).x + xoffset%, planes(k%).y + yoffset%, planes(k%).dir, planes(k%).image, 128, 0, 159, 31, 32 + END IF + '_PRINTSTRING (planes(k%).x + xoffset%, planes(k%).y + yoffset%), whatever you need + END IF + IF planes(k%).waittime > 0 THEN planes(k%).waittime = planes(k%).waittime - 1 + END IF + NEXT + debriseffect debriss(), numdebris%, explosions%(), numexplosion% + lazer lazers(), planes(), points(), numlazer%, explosions%(), numexplosion%, numplanes%, difficulty, plasshot&, spreadshot&, pulseshot&, mods(), debriss(), numdebris% + charge lazers(), planes(), numlazer% + missile missiles(), planes(), points(), nummissile%, contrails%(), numcontrail%, missileimage&, explosions%(), numexplosion%, numplanes%, difficulty, mods(), debriss(), numdebris% + contrail contrails%(), numcontrail%, contraileffect& + flareeffect flares(), numflare%, contrails%(), numcontrail%, flareimage& + explosion explosions%(), numexplosion%, explosioneffect& + IF graphsetting = 1 THEN trail trails%(), numtrail%, numplanes% + IF planes(0).market = 0 THEN + _PUTIMAGE (swidth - 200, 0)-(swidth - 1, sheight - 1), brushedmetal&, 0, (swidth - 200, 0)-(swidth - 1, sheight - 1) + hudbar 0, "PWR", planes(0).force / 10 * 100, 100, _RGB(127, 0, 0), "%", quartz& + hudbar 1, "GEN", planes(0).generator / 2 * 100, 100, _RGB(0, 127, 0), "%", quartz& + hudbar 2, "BAT", planes(0).battery / planes(0).maxbatt * 100, 100, _RGB(127, 127, 0), "%", quartz& + hudbar 3, "SPD", planes(0).speed / 10 * 645.6, 645.6, _RGB(0, 127, 127), "mph", quartz& + hudbar 4, "ARM", planes(0).armor / planes(0).maxarm * 100, 100, _RGB(0, 0, 127), "%", quartz& + hudbar 5, "AMO", planes(0).ammo / 100, 100, _RGB(31, 31, 31), "%", quartz& + _FONT quartz& + _PRINTSTRING (swidth - 200, 208), "PTS " + LTRIM$(STR$(points(0).points)) + _PRINTSTRING (swidth - 200, 240), "CR. " + LTRIM$(STR$(planes(0).credits)) + _FONT 16 + weaponhud swidth - 180, sheight / 2, weapons(), 0, wepimage&(), picked% + modhud swidth - 164, sheight / 2 + 80, mods(), 0, modimage&(), picked% + LINE (swidth - 180, sheight - 180)-(swidth - 21, sheight - 21), _RGB(0, 63, 0), BF + FOR blip% = 0 TO numplanes% + rotator swidth - 180 + planes(blip%).x \ 25.6, sheight - 180 + planes(blip%).y \ 25.6, planes(blip%).dir, planes(blip%).blip, 0, 0, 16, 16, 8 + NEXT + LINE (swidth - 180 - ((swidth - 200) \ 51.2) + planes(0).x \ 25.6, sheight - 180 - (sheight \ 51.2) + planes(0).y \ 25.6)-(swidth - 180 + ((swidth - 200) \ 51.2) + planes(0).x \ 25.6, sheight - 180 + (sheight \ 51.2) + planes(0).y \ 25.6), _RGB(255, 255, 255), B + END IF + IF planes(0).market = 1 THEN market planes(0), 0, weapons(), mods(), wepimage&(), modimage&(), statimage&(), wepstorage(), modstorage(), wepmouse, modmouse, whichstore%, bigquartz&, quartz&, cyberbit&, brushedmetal&, tooltips&(), difficulty + IF _KEYDOWN(112) THEN + leaderboard planes(), points(), numplanes% + _DISPLAY + SLEEP + END IF + IF _KEYDOWN(9) THEN leaderboard planes(), points(), numplanes% + _DISPLAY + IF ignoretog% <> 0 AND _KEYDOWN(49) = 0 AND _KEYDOWN(50) = 0 AND _KEYDOWN(51) = 0 AND _KEYDOWN(52) = 0 AND _KEYDOWN(53) = 0 AND _KEYDOWN(54) = 0 AND _KEYDOWN(55) = 0 AND _KEYDOWN(56) = 0 AND _KEYDOWN(57) = 0 THEN + IF gamepad = 0 THEN + ignoretog% = 0 + ELSE + IF controller(scrdown.number) = 0 AND controller(scrup.number) = 0 AND controller(pick.number) = 0 THEN ignoretog% = 0 + END IF + END IF + IF _KEYDOWN(27) AND ignore` = 0 THEN EXIT DO + clickonce + LOOP + _FONT cyberbit& + CLS + _PUTIMAGE , brushedmetal& + leaderboard planes(), points(), numplanes% + _PRINTSTRING (swidth / 2 - 256, 320), "Press any key to go back to the Main Menu." + _DISPLAY + IF music& THEN + DO UNTIL vol = 0 + _LIMIT 30 + vol = vol - .02 + IF vol < 0 THEN vol = 0 + _SNDVOL music&, vol + LOOP + _SNDSTOP music& + _SNDCLOSE music& + END IF + SLEEP + _FREEIMAGE player& + _FREEIMAGE plane& + _FREEIMAGE planeshadow& + _FREEIMAGE missileimage& + _FREEIMAGE brushedmetal& + _FREEIMAGE explosioneffect& + _FREEIMAGE contraileffect& + _FREEIMAGE allground& + _FREEIMAGE plasshot& + _FREEIMAGE spreadshot& + _FREEIMAGE pulseshot& + FOR freee% = 0 TO 3 + FOR teammates% = 0 TO team - 1 + _FREEIMAGE planes(freee% + 4 * teammates%).image + _FREEIMAGE planes(freee% + 4 * teammates%).blip + NEXT + NEXT + FOR free8% = 0 TO 11 + _FREEIMAGE wepimage&(free8%) + NEXT + FOR free4% = 1 TO 4 + _FREEIMAGE modimage&(free4%) + _FREEIMAGE statimage&(free4%) + NEXT + _FONT 16 + IF quartz& <> 0 THEN _FREEFONT (quartz&) + IF bigquartz& <> 0 THEN _FREEFONT (bigquartz&) + IF cyberbit& <> 0 THEN _FREEFONT (cyberbit&) +END SUB + +SUB crash (planes() AS airplane, explosions%(), points() AS score, numexplosions%, numplanes%, difficulty, mods() AS aug, debriss() AS debris, numdebris%) 'Resets planes after they crash, and makes the crash sound + boom& = _SNDOPEN("sfx\factory_destroyed.wav", "sync") + FOR a% = 0 TO numplanes% + IF planes(a%).armor <= 0 AND planes(a%).respawntime <= 0 THEN + IF boom& THEN _SNDPLAY boom& + makeexplosion planes(a%).x, planes(a%).y, explosions%(), numexplosion%, 60, 0 + makedebris planes(a%), debriss(), numdebris% + planes(a%).respawntime = 60 + planes(a%).force = 0 + planes(a%).speed = 0 + FOR m = 1 TO 4 + mods(a%, m).ifon = 0 + NEXT + team% = planes(planes(a%).lasthit).team + points(team%).points = points(team%).points + 1 + points(team%).total = points(team%).points - points(team%).losses + points(planes(a%).team).losses = points(planes(a%).team).losses + 1 + points(planes(a%).team).total = points(planes(a%).team).points - points(planes(a%).team).losses + planes(planes(a%).lasthit).credits = planes(planes(a%).lasthit).credits + 1 + IF planes(planes(a%).lasthit).ai = 1 AND difficulty = 1 THEN + marketchance% = INT(RND * 12) 'originally, 12 was (13 - planes(planes(a%).lasthit).credits) + IF marketchance% = 0 THEN planes(planes(a%).lasthit).market = 1 + END IF + END IF + NEXT + _SNDCLOSE boom& +END SUB + +SUB respawn (plane AS airplane) + IF plane.respawntime > 0 THEN plane.respawntime = plane.respawntime - 1 + IF plane.respawntime <= 0 THEN + plane.x = INT(RND * 4090) + 3 + plane.y = INT(RND * 4090) + 3 + plane.dir = RND * 2 * pi + plane.force = 3 + plane.speed = 3 + plane.battery = plane.maxbatt + plane.armor = plane.maxarm + END IF +END SUB + +SUB leaderboard (planes() AS airplane, points() AS score, numplanes%) + DIM order(3) AS INTEGER + FOR find = 0 TO 3 + IF points% > points(find).total THEN points% = points(find).total + NEXT + DO + FOR rank% = 0 TO 3 + IF points(rank%).total = points% THEN order(3 - checked%) = rank%: checked% = checked% + 1 + NEXT + points% = points% + 1 + LOOP UNTIL checked% = 4 + FOR thelasttime% = 0 TO 3 + _PUTIMAGE (swidth / 2 - 224, 64 + 64 * thelasttime%), planes(order(thelasttime%)).image, , (64, 0)-(95, 31) + _PRINTSTRING (swidth / 2 - 256, 64 + 64 * thelasttime%), LTRIM$(STR$(thelasttime% + 1)) + "." + _PRINTSTRING (swidth / 2 - 176, 64 + 64 * thelasttime%), LTRIM$(STR$(points(planes(order(thelasttime%)).team).points)) + " Points | " + LTRIM$(STR$(points(planes(order(thelasttime%)).team).losses)) + " Losses | " + LTRIM$(STR$(points(planes(order(thelasttime%)).team).total)) + " Total" + IF order(thelasttime%) = 0 THEN _PRINTSTRING (swidth / 2 - 328, 64 + 64 * thelasttime%), "Player" + NEXT +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) + GET #1, 1, swidth + GET #1, 2, sheight + GET #1, 3, fs + GET #1, 4, graphsetting + GET #1, 5, red + GET #1, 6, green + GET #1, 7, blue + GET #1, 8, difficulty + GET #1, 9, gamepad + GET #1, 10, steering.number + GET #1, 11, throttle.number + GET #1, 12, primary.number + GET #1, 13, secondary.number + GET #1, 14, livery + GET #1, 15, team + GET #1, 16, scrdown.number + GET #1, 17, scrup.number + GET #1, 18, pick.number + GET #1, 19, vol + GET #1, 20, steering.axis + GET #1, 21, throttle.axis + GET #1, 22, primary.axis + GET #1, 23, secondary.axis + GET #1, 24, scrdown.axis + GET #1, 25, scrup.axis + GET #1, 26, pick.axis + quartz& = _LOADFONT("fonts\Segment14.otf", sheight / 24, "") + cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") + premetal& = _LOADIMAGE("bg\electricplane2.png") + brushedmetal& = _NEWIMAGE(swidth, sheight, 32) + _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& + _FREEIMAGE premetal& + numcontroller% = _DEVICES + DO + _LIMIT 60 + CLS + _PUTIMAGE (0, 0), brushedmetal& + _FONT quartz& + COLOR _RGB(255, 200, 0) + center "OPTIONS", 1 + _FONT cyberbit& + COLOR _RGB(255, 255, 255) + center "Set Screen Resolution (" + LTRIM$(STR$(swidth)) + " x " + LTRIM$(STR$(sheight)) + ")", 4 + IF fs = 0 THEN center "Toggle Fullscreen (off)", 5 ELSE center "Toggle Fulscreen (on)", 5 + IF graphsetting = 0 THEN center "Fancyness (Low)", 6 ELSE center "Fancyness (High)", 6 + center "Plane color (" + LTRIM$(STR$(red)) + ", " + LTRIM$(STR$(green)) + ", " + LTRIM$(STR$(blue)) + ") -- " + colorhint$(red, green, blue), 7 + IF difficulty = 0 THEN center "Enemy AI (good)", 8 ELSE center "Enemy AI (really good)", 8 + IF gamepad = 0 THEN center "Input Device: Mouse & Keyboard Only", 9 ELSE center "Input Device: " + controllerparse$(4, gamepad), 9 + center "Controls (If you're using a controller)", 10 + center "Planes per team: (" + LTRIM$(STR$(team)) + ")", 11 + center "Music volume: (" + LTRIM$(STR$(INT(vol * 100))) + "%)", 12 + center "Restore Defaults", 13 + center "Back", 14 + IF menu(4) THEN + pickres + premetal& = _LOADIMAGE("bg\electricplane2.png") + brushedmetal& = _NEWIMAGE(swidth, sheight, 32) + _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& + _FREEIMAGE premetal& + PUT #1, 1, swidth + PUT #1, 2, sheight + _PRINTMODE _KEEPBACKGROUND + _FONT 16 + 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 + IF fs = 0 THEN _FULLSCREEN _OFF ELSE _FULLSCREEN + PUT #1, 3, fs + END IF + IF menu(6) THEN + IF graphsetting = 0 THEN graphsetting = 1 ELSE graphsetting = 0 + PUT #1, 4, graphsetting + END IF + IF menu(7) THEN + colorslider red, green, blue, livery + PUT #1, 5, red + PUT #1, 6, green + PUT #1, 7, blue + PUT #1, 14, livery + END IF + IF menu(8) THEN + IF difficulty = 0 THEN difficulty = 1 ELSE difficulty = 0 + PUT #1, 8, difficulty + END IF + IF menu(9) THEN + DO + gamepad = gamepad + 1 + IF gamepad > numcontroller% THEN gamepad = 0 + LOOP UNTIL controllerparse$(1, gamepad) = "CONTROLLER" OR gamepad = 0 + PUT #1, 9, gamepad + END IF + IF menu(10) THEN + keybind gamepad, steering, throttle, primary, secondary, scrdown, scrup, pick + PUT #1, 10, steering.number + PUT #1, 11, throttle.number + PUT #1, 12, primary.number + PUT #1, 13, secondary.number + PUT #1, 16, scrdown.number + PUT #1, 17, scrup.number + PUT #1, 18, pick.number + PUT #1, 20, steering.axis + PUT #1, 21, throttle.axis + PUT #1, 22, primary.axis + PUT #1, 23, secondary.axis + PUT #1, 24, scrdown.axis + PUT #1, 25, scrup.axis + PUT #1, 26, pick.axis + END IF + IF menu(11) THEN + team = team + 1 + IF team > 4 THEN team = 1 + PUT #1, 15, team + END IF + IF menu(12) THEN volumeslider vol + PUT #1, 19, vol + IF menu(13) THEN + fs = 1 + graphsetting = 0 + red = 0 + green = 0 + blue = 255 + difficulty = 0 + gamepad = 0 + steering.number = 1 + throttle.number = 3 + primary.number = 1 + secondary.number = 2 + livery = 0 + team = 1 + scrdown.number = 4 + scrup.number = 5 + pick.number = 3 + vol = 0.8 + steering.axis = 1 + throttle.axis = 1 + primary.axis = 0 + secondary.axis = 0 + scrdown.axis = 0 + scrup.axis = 0 + pick.axis = 0 + PUT #1, 3, fs + PUT #1, 4, graphsetting + PUT #1, 5, red + PUT #1, 6, green + PUT #1, 7, blue + PUT #1, 8, difficulty + PUT #1, 9, gamepad + PUT #1, 10, steering.number + PUT #1, 11, throttle.number + PUT #1, 12, primary.number + PUT #1, 13, secondary.number + PUT #1, 14, livery + PUT #1, 15, team + PUT #1, 16, scrdown.number + PUT #1, 17, scrup.number + PUT #1, 18, pick.number + PUT #1, 19, vol + PUT #1, 20, steering.axis + PUT #1, 21, throttle.axis + PUT #1, 22, primary.axis + PUT #1, 23, secondary.axis + PUT #1, 24, scrdown.axis + PUT #1, 25, scrup.axis + PUT #1, 26, pick.axis + END IF + IF menu(14) THEN + EXIT DO + END IF + clickonce + cursor + _DISPLAY + LOOP + CLOSE #1 + _FONT 16 + IF quartz& <> 0 AND quartz& <> -1 THEN _FREEFONT (quartz&) + IF cyberbit& <> 0 AND cyberbit& <> -1 THEN _FREEFONT (cyberbit&) + _FREEIMAGE brushedmetal& +END SUB + +SUB pickres 'screen resolution picking dialogue + quartz& = _LOADFONT("fonsts\Segment14.otf", sheight / 16, "") + cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") + premetal& = _LOADIMAGE("bg\brushedmetal.png") + brushedmetal& = _NEWIMAGE(swidth, sheight, 32) + _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& + _FREEIMAGE premetal& + DIM resarray(16) AS res + RESTORE resolutions + FOR a% = 1 TO 16 + READ resarray(a%).x, resarray(a%).y, resarray(a%).caption + NEXT + DO + _LIMIT 60 + CLS + _PUTIMAGE (0, 0), brushedmetal& + _FONT quartz& + COLOR _RGB(255, 200, 0) + center "SCREEN RESOLUTION", 1 + _FONT cyberbit& + COLOR _RGB(255, 255, 255) + FOR a% = 1 TO 16 + center LTRIM$(STR$(resarray(a%).x)) + " x " + LTRIM$(STR$(resarray(a%).y)) + " " + RTRIM$(resarray(a%).caption), a% + 3 + NEXT + center "Back", 21 + FOR a% = 1 TO 16 + IF menu(3 + a%) THEN + swidth = resarray(a%).x + sheight = resarray(a%).y + SCREEN _NEWIMAGE(swidth, sheight, 32) + _PRINTMODE _KEEPBACKGROUND + premetal& = _LOADIMAGE("bg\brushedmetal.png") + brushedmetal& = _NEWIMAGE(swidth, sheight, 32) + _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& + _FREEIMAGE premetal& + _FONT 16 + quartz& = _LOADFONT("fonts\Segment14.otf", sheight / 16, "") + cyberbit& = _LOADFONT("fonts\cyberbit.ttf", sheight / 32, "") + END IF + NEXT + IF menu(21) THEN + _FONT 16 + EXIT DO + END IF + cursor + clickonce + _DISPLAY + LOOP + IF quartz& <> 0 THEN _FREEFONT (quartz&) + 'IF cyberbit& <> 0 THEN _FREEFONT (cyberbit&) + _FREEIMAGE brushedmetal& + + resolutions: + DATA 800,600,"(Smallest supported resolution, SVGA)" + DATA 1024,600,"(Most netbooks)" + DATA 1024,768,"(XGA, Many older 4:3 LCD monitors)" + DATA 1280,720,"(720p)" + DATA 1280,768,"(Wide XGA 5:3)" + DATA 1280,800,"(Wide XGA 16:10)" + DATA 1280,960,"(SXGA-)" + DATA 1280,1024,"(SXGA)" + DATA 1366,768,"(Many consumer laptops)" + DATA 1440,900,"(Wide SXGA)" + DATA 1600,900,"(900p, many modern 16:9 monitors)" + DATA 1600,1200,"(UXGA)" + DATA 1680,1050,"(Common widescreen 16:10 monitors)" + DATA 1920,1080,"(Full HD)" + DATA 1920,1200,"(Common 23''-25'' monitor resolution)" + DATA 2560,1600,"(High-end gaming monitors)" + +END SUB + +FUNCTION colorhint$ (red, green, blue) 'The 64 color names + colorint% = red \ 64 + 4 * (green \ 64) + 16 * (blue \ 64) + SELECT CASE colorint% + CASE 0: colorhint$ = "Black" + CASE 1: colorhint$ = "Dark Red" + CASE 2: colorhint$ = "Crimson" + CASE 3: colorhint$ = "Red" + CASE 4: colorhint$ = "Forest Green" + CASE 5: colorhint$ = "Dark yellow" + CASE 6: colorhint$ = "Brown" + CASE 7: colorhint$ = "Orange" + CASE 8: colorhint$ = "Green" + CASE 9: colorhint$ = "Dark Olive" + CASE 10: colorhint$ = "Deep Yellow" + CASE 11: colorhint$ = "Yellow Orange" + CASE 12: colorhint$ = "Bright Green" + CASE 13: colorhint$ = "Grass Green" + CASE 14: colorhint$ = "Yellow Green" + CASE 15: colorhint$ = "Yellow" + CASE 16: colorhint$ = "Dark Blue" + CASE 17: colorhint$ = "Dark Purple" + CASE 18: colorhint$ = "Maroon" + CASE 19: colorhint$ = "Hot Pink" + CASE 20: colorhint$ = "Dark Teal" + CASE 21: colorhint$ = "Dark Grey" + CASE 22: colorhint$ = "Rose" + CASE 23: colorhint$ = "Light Red" + CASE 24: colorhint$ = "Dark Blue Green" + CASE 25: colorhint$ = "Drab Green" + CASE 26: colorhint$ = "Drab Yellow" + CASE 27: colorhint$ = "Salmon" + CASE 28: colorhint$ = "Mint" + CASE 29: colorhint$ = "Sage" + CASE 30: colorhint$ = "Lime" + CASE 31: colorhint$ = "Dusty Yellow" + CASE 32: colorhint$ = "Indigo" + CASE 33: colorhint$ = "Purple" + CASE 34: colorhint$ = "Violet" + CASE 35: colorhint$ = "Bright Purple" + CASE 36: colorhint$ = "8 Blue" + CASE 37: colorhint$ = "Navy" + CASE 38: colorhint$ = "Lavender" + CASE 39: colorhint$ = "Pink" + CASE 40: colorhint$ = "That color that looks bad on cars" + CASE 41: colorhint$ = "Seafoam Blue" + CASE 42: colorhint$ = "Light Grey" + CASE 43: colorhint$ = "Light Pink" + CASE 44: colorhint$ = "Light Teal" + CASE 45: colorhint$ = "Seafoam Green" + CASE 46: colorhint$ = "Light Green" + CASE 47: colorhint$ = "Pale Yellow" + CASE 48: colorhint$ = "Electric Blue" + CASE 49: colorhint$ = "Light Indigo" + CASE 50: colorhint$ = "Light Purple" + CASE 51: colorhint$ = "Magenta" + CASE 52: colorhint$ = "Blue" + CASE 53: colorhint$ = "Light Blue" + CASE 54: colorhint$ = "Light Lavender" + CASE 55: colorhint$ = "Light Magenta" + CASE 56: colorhint$ = "Sky Blue" + CASE 57: colorhint$ = "Cornfield" + CASE 58: colorhint$ = "Pale Blue" + CASE 59: colorhint$ = "Pale Magenta" + CASE 60: colorhint$ = "Cyan" + CASE 61: colorhint$ = "Light Cyan" + CASE 62: colorhint$ = "Pale Cyan" + CASE 63: colorhint$ = "White" + END SELECT +END FUNCTION + +SUB buttonbind (gamepad, button AS control) + numdevice% = _DEVICES + done% = 0 + center "?", 9 + _DISPLAY + DO WHILE _DEVICEINPUT(gamepad) + LOOP + DO + IF _DEVICEINPUT(gamepad) THEN + FOR a% = 1 TO _LASTBUTTON(gamepad) + IF _BUTTONCHANGE(a%) THEN + button.number = a% + button.axis = 0 + done% = 1 + END IF + NEXT + FOR a% = 1 TO _LASTAXIS(gamepad) + IF ABS(_AXIS(a%)) >= .5 THEN + button.number = a% + button.axis = 1 + done% = 1 + END IF + NEXT + END IF + LOOP UNTIL done% = 1 +END SUB + +SUB keybind (gamepad, steering AS control, throttle AS control, primary AS control, secondary AS control, scrdown AS control, scrup AS control, pick AS control) + premetal& = _LOADIMAGE("bg\brushedmetal.png") + brushedmetal& = _NEWIMAGE(swidth, sheight, 32) + _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& + _FREEIMAGE premetal& + numdevice% = _DEVICES + IF gamepad <= numdevice% AND gamepad <> 0 THEN + DO + _LIMIT 60 + CLS + _PUTIMAGE (0, 0), brushedmetal& + IF steering.axis THEN steerstring$ = "Steering: Axis " + LTRIM$(STR$(steering.number)) ELSE steerstring$ = "Steering: Button " + LTRIM$(STR$(steering.number)) + center steerstring$, 1 + IF throttle.axis THEN throtstring$ = "Throttle: Axis " + LTRIM$(STR$(throttle.number)) ELSE throtstring$ = "Throttle: Button " + LTRIM$(STR$(throttle.number)) + center throtstring$, 2 + IF primary.axis THEN primstring$ = "Fire Primary: Axis " + LTRIM$(STR$(primary.number)) ELSE primstring$ = "Fire Primary: Button " + LTRIM$(STR$(primary.number)) + center primstring$, 3 + IF secondary.axis THEN secondstring$ = "Fire Secondary: Axis " + LTRIM$(STR$(secondary.number)) ELSE secondstring$ = "Fire Secondary: Button " + LTRIM$(STR$(secondary.number)) + center secondstring$, 4 + IF scrup.axis THEN upstring$ = "Next Weapon/Mod: Axis " + LTRIM$(STR$(scrup.number)) ELSE upstring$ = "Next Weapon/Mod: Button " + LTRIM$(STR$(scrup.number)) + center upstring$, 5 + IF scrdown.axis THEN downstring$ = "Last Weapon/Mod: Axis " + LTRIM$(STR$(scrdown.number)) ELSE downstring$ = "Last Weapon/Mod: Button " + LTRIM$(STR$(scrdown.number)) + center downstring$, 6 + IF pick.axis THEN pickstring$ = "Toggle Weapon/Mod: Axis " + LTRIM$(STR$(pick.number)) ELSE pickstring$ = "Toggle Weapon/Mod: Button " + LTRIM$(STR$(pick.number)) + center pickstring$, 7 + center "Back", 8 + IF menu(1) THEN buttonbind gamepad, steering + IF menu(2) THEN buttonbind gamepad, throttle + IF menu(3) THEN buttonbind gamepad, primary + IF menu(4) THEN buttonbind gamepad, secondary + IF menu(5) THEN buttonbind gamepad, scrup + IF menu(6) THEN buttonbind gamepad, scrdown + IF menu(7) THEN buttonbind gamepad, pick + testaxis = 0 + IF menu(8) THEN EXIT DO + cursor + clickonce + _DISPLAY + LOOP + END IF + _FREEIMAGE brushedmetal& + CLOSE #2 +END SUB + +SUB colorslider (red, green, blue, livery) 'The RGB color sliders to choose plane colors + DIM colory(2) + plane& = _LOADIMAGE("ui\plane.png") + _CLEARCOLOR _RGB(0, 0, 0), plane& + premetal& = _LOADIMAGE("bg\brushedmetal.png") + brushedmetal& = _NEWIMAGE(swidth, sheight, 32) + _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& + _FREEIMAGE premetal& + liv1& = recolor&(plane&, _RGB(255, 255, 255), _RGB(red, green, blue)) + liv2& = colorgreyspectrum(plane&, _RGB(red, green, blue)) + DO + DO + mousex% = _MOUSEX + mousey% = _MOUSEY + lclick% = _MOUSEBUTTON(1) + LOOP WHILE _MOUSEINPUT + _LIMIT 60 + CLS + _PUTIMAGE (0, 0), brushedmetal& + PRINT "Press 'Esc' to go back." + colory(0) = 279 - red + colory(1) = 279 - green + colory(2) = 279 - blue + LINE (swidth / 2 - 33, 24)-(swidth / 2 - 32, 279), _RGB(127, 0, 0), B + LINE (swidth / 2 - 1, 24)-(swidth / 2, 279), _RGB(0, 127, 0), B + LINE (swidth / 2 + 31, 24)-(swidth / 2 + 32, 279), _RGB(0, 0, 127), B + IF trigger(swidth / 2 - 40, 16, swidth / 2 - 25, 287, mousex%, mousey%) AND lclick% THEN colory(0) = mousey%: liv1& = recolor&(plane&, _RGB(255, 255, 255), _RGB(red, green, blue)): liv2& = colorgreyspectrum(plane&, _RGB(red, green, blue)) + IF trigger(swidth / 2 - 8, 16, swidth / 2 + 7, 287, mousex%, mousey%) AND lclick% THEN colory(1) = mousey%: liv1& = recolor&(plane&, _RGB(255, 255, 255), _RGB(red, green, blue)): liv2& = colorgreyspectrum(plane&, _RGB(red, green, blue)) + IF trigger(swidth / 2 + 24, 16, swidth / 2 + 39, 287, mousex%, mousey%) AND lclick% THEN colory(2) = mousey%: liv1& = recolor&(plane&, _RGB(255, 255, 255), _RGB(red, green, blue)): liv2& = colorgreyspectrum(plane&, _RGB(red, green, blue)) + FOR a% = 0 TO 2 + IF colory(a%) < 24 THEN colory(a%) = 24 + IF colory(a%) > 279 THEN colory(a%) = 279 + NEXT + LINE (swidth / 2 - 40, colory(0) - 8)-(swidth / 2 - 25, colory(0) + 7), _RGB(255, 0, 0), BF + LINE (swidth / 2 - 8, colory(1) - 8)-(swidth / 2 + 7, colory(1) + 7), _RGB(0, 255, 0), BF + LINE (swidth / 2 + 24, colory(2) - 8)-(swidth / 2 + 39, colory(2) + 7), _RGB(0, 0, 255), BF + red = 279 - colory(0) + green = 279 - colory(1) + blue = 279 - colory(2) + center LTRIM$(STR$(red)) + ", " + LTRIM$(STR$(green)) + ", " + LTRIM$(STR$(blue)), 16 + _PUTIMAGE (swidth / 2 - 32, 310), liv1&, , (64, 0)-(95, 31) + _PUTIMAGE (swidth / 2, 310), liv2&, , (64, 0)-(95, 31) + IF trigger(swidth / 2 - 32, 310, swidth / 2 - 1, 341, mousex%, mousey%) AND lclick% THEN livery = 0 + IF trigger(swidth / 2, 310, swidth / 2 + 31, 341, mousex%, mousey%) AND lclick% THEN livery = 1 + IF livery = 0 THEN LINE (swidth / 2 - 32, 310)-(swidth / 2 - 1, 341), _RGB(255, 255, 255), B + IF livery = 1 THEN LINE (swidth / 2, 310)-(swidth / 2 + 31, 341), _RGB(255, 255, 255), B + cursor + _DISPLAY + LOOP UNTIL _KEYDOWN(27) + _FREEIMAGE plane& + _FREEIMAGE brushedmetal& +END SUB + +SUB volumeslider (vol) + premetal& = _LOADIMAGE("bg\brushedmetal.png") + brushedmetal& = _NEWIMAGE(swidth, sheight, 32) + _PUTIMAGE (0, 0)-(swidth - 1, sheight - 1), premetal&, brushedmetal& + _FREEIMAGE premetal& + DO + DO + mousex% = _MOUSEX + mousey% = _MOUSEY + lclick% = _MOUSEBUTTON(1) + LOOP WHILE _MOUSEINPUT + _LIMIT 60 + CLS + _PUTIMAGE (0, 0), brushedmetal& + PRINT "Press 'Esc' to go back." + LINE (swidth / 2 - 1, 24)-(swidth / 2, 279), _RGB(255, 255, 255), B + IF trigger(swidth / 2 - 8, 16, swidth / 2 + 7, 287, mousex%, mousey%) AND lclick% THEN vol = INT((279 - mousey%) / 2.55) / 100 + IF vol > 1 THEN vol = 1 + IF vol < 0 THEN vol = 0 + LINE (swidth / 2 - 8, 279 - vol * 255 - 8)-(swidth / 2 + 7, 279 - vol * 255 + 7), _RGB(255, 255, 255), BF + center LTRIM$(STR$(INT(vol * 100))) + "%", 16 + cursor + _DISPLAY + LOOP UNTIL _KEYDOWN(27) + _FREEIMAGE brushedmetal& +END SUB + +SUB genground (topo%()) + FOR y% = 0 TO 15 + FOR x% = 0 TO 15 + IF topo%(x%, y%) = 0 THEN + IF x% - 1 >= 0 AND y% - 1 >= 0 THEN IF topo%(x% - 1, y% - 1) = 1 THEN topo%(x%, y%) = 3 + IF x% + 1 <= 15 AND y% - 1 >= 0 THEN IF topo%(x% + 1, y% - 1) = 1 THEN topo%(x%, y%) = 4 + IF x% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 THEN topo%(x%, y%) = 5 + IF x% + 1 <= 15 AND y% + 1 <= 15 THEN IF topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 6 + IF x% - 1 >= 0 AND y% - 1 >= 0 AND x% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% + 1, y% - 1) = 1 THEN topo%(x%, y%) = 19 + IF x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% + 1, y% - 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 20 + IF x% - 1 >= 0 AND y% + 1 <= 15 AND x% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 21 + IF x% - 1 >= 0 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% - 1, y% + 1) = 1 THEN topo%(x%, y%) = 22 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 AND topo%(x% + 1, y% - 1) = 1 THEN topo%(x%, y%) = 42 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 43 + IF y% - 1 >= 0 THEN IF topo%(x%, y% - 1) = 1 THEN topo%(x%, y%) = 7 + IF x% + 1 <= 15 THEN IF topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 8 + IF y% + 1 <= 15 THEN IF topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 9 + IF x% - 1 >= 0 THEN IF topo%(x% - 1, y%) = 1 THEN topo%(x%, y%) = 10 + IF x% - 1 >= 0 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 24 + IF x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% + 1, y% - 1) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 25 + IF x% - 1 >= 0 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x% - 1, y% + 1) = 1 THEN topo%(x%, y%) = 26 + IF x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 27 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x% + 1, y% - 1) = 1 THEN topo%(x%, y%) = 28 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 29 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 30 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 31 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% + 1, y% - 1) = 1 AND topo%(x, y% + 1) = 1 THEN topo%(x%, y%) = 34 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x% + 1, y% - 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 35 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 AND topo%(x% + 1, y% + 1) = 1 AND topo%(x%, y% - 1) = 1 THEN topo%(x%, y%) = 36 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x% - 1, y% + 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 37 + IF x% + 1 <= 15 AND y% - 1 >= 0 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 11 + IF x% + 1 <= 15 AND y% + 1 <= 15 THEN IF topo%(x% + 1, y%) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 12 + IF x% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 13 + IF x% - 1 >= 0 AND y% - 1 >= 0 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x% - 1, y%) = 1 THEN topo%(x%, y%) = 14 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% + 1) = 1 AND topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 38 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y% - 1) = 1 AND topo%(x%, y% + 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 39 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% + 1) = 1 AND topo%(x% + 1, y% - 1) = 1 THEN topo%(x%, y%) = 40 + IF x% - 1 >= 0 AND x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y% + 1) = 1 THEN topo%(x%, y%) = 41 + IF y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 32 + IF x% - 1 >= 0 AND x% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 33 + IF x% - 1 >= 0 AND y% + 1 <= 15 AND x% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% + 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 15 + IF x% - 1 >= 0 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% - 1) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 16 + IF x% - 1 >= 0 AND y% - 1 >= 0 AND x% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 THEN topo%(x%, y%) = 17 + IF x% + 1 <= 15 AND y% - 1 >= 0 AND y% + 1 <= 15 THEN IF topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 18 + IF x% - 1 >= 0 AND y% - 1 >= 0 AND x% + 1 <= 15 AND y% + 1 <= 15 THEN IF topo%(x% - 1, y%) = 1 AND topo%(x%, y% - 1) = 1 AND topo%(x% + 1, y%) = 1 AND topo%(x%, y% + 1) = 1 THEN topo%(x%, y%) = 23 + END IF + NEXT + NEXT +END SUB + +SUB scrollground (allground&) 'Makes the scrolling background with all the grass -- rivers are planned for the future. Demensions are 4096 + screen width - 200 x 4096 + screen height. + IF allground& THEN + _PUTIMAGE (0, 0)-(swidth - 200, sheight), allground&, 0, (screenanchorx%, screenanchory%)-(screenanchorx% + swidth - 200, screenanchory% + sheight) + END IF +END SUB + +SUB aimarket (player AS airplane, plane%, weapons() AS weapon, wepstorage() AS weapon) + DIM switchvar AS weapon + FOR k% = 0 TO 15 + FOR l% = 1 TO 5 + IF wepstorage(plane%, k%).wep = 0 AND weapons(plane%, l%).wep <> 0 THEN + switchvar = weapons(plane%, l%) + weapons(plane%, l%) = wepstorage(plane%, k%) + wepstorage(plane%, k%) = switchvar + IF l% = 2 OR l% = 3 THEN + FOR look% = 0 TO 15 + IF wepstorage(plane%, look%).wep = 0 THEN wepstorage(plane%, look%) = switchvar: EXIT FOR + NEXT + END IF + EXIT FOR + END IF + NEXT + NEXT + choice% = INT(RND * 14) + 1 + SELECT CASE choice% + CASE 1: IF player.credits >= 3 THEN selectweapon 1, plane%, wepstorage(): player.credits = player.credits - 3 + CASE 2: IF player.credits >= 3 THEN selectweapon 2, plane%, wepstorage(): player.credits = player.credits - 3 + CASE 3: IF player.credits >= 3 THEN selectweapon 3, plane%, wepstorage(): player.credits = player.credits - 3 + CASE 4: IF player.credits >= 3 THEN selectweapon 4, plane%, wepstorage(): player.credits = player.credits - 3 + CASE 5: IF player.credits >= 3 THEN selectweapon 5, plane%, wepstorage(): player.credits = player.credits - 3 + CASE 6: IF player.credits >= 5 THEN selectweapon 6, plane%, wepstorage(): player.credits = player.credits - 5 + CASE 9: IF player.credits >= 4 THEN selectmissile 1, plane%, wepstorage(): player.credits = player.credits - 4 + CASE 10: IF player.credits >= 5 THEN selectmissile 2, plane%, wepstorage(): player.credits = player.credits - 5 + CASE 11: IF player.credits >= 6 THEN selectmissile 3, plane%, wepstorage(): player.credits = player.credits - 6 + CASE 12: IF player.credits >= 5 AND player.generator < 1 THEN player.generator = player.generator + .1: player.credits = player.credits - 5 + CASE 13: IF player.credits >= 5 AND player.maxbatt < 200 THEN player.maxbatt = player.maxbatt + 10: player.credits = player.credits - 5 + CASE 14: IF player.credits >= 5 AND player.maxarm < 20 THEN player.maxarm = player.maxarm + 1: player.credits = player.credits - 5 + CASE 15: IF player.credits >= 1 AND player.ammo < 10000 THEN player.ammo = player.ammo + 1000: player.credits = player.credits - 1 + END SELECT + FOR a% = 2 TO 3 + FOR k% = 0 TO 15 + IF wepstorage(plane%, k%).wep <> 0 AND wepstorage(plane%, k%).wep <= 8 THEN + FOR look% = 0 TO 15 + IF wepstorage(plane%, look%).wep = wepstorage(plane%, k%).wep AND look% <> k% THEN + switchvar = weapons(plane%, a%) + weapons(plane%, a%) = wepstorage(plane%, k%) + wepstorage(plane%, k%) = switchvar + wepstorage(plane%, look%) = switchvar + EXIT FOR: EXIT FOR + END IF + NEXT + END IF + NEXT + NEXT + FOR k% = 0 TO 15 + IF wepstorage(plane%, k%).wep <> 0 AND wepstorage(plane%, k%).wep <= 8 THEN + switchvar = weapons(plane%, 1) + weapons(plane%, 1) = wepstorage(plane%, k%) + wepstorage(plane%, k%) = switchvar + EXIT FOR + END IF + NEXT + FOR a% = 4 TO 5 + FOR k% = 0 TO 15 + IF wepstorage(plane%, k%).wep >= 9 THEN + switchvar = weapons(plane%, a%) + weapons(plane%, a%) = wepstorage(plane%, k%) + wepstorage(plane%, k%) = switchvar + EXIT FOR + END IF + NEXT + NEXT + player.market = 0 + player.force = 3 + player.speed = 3 + player.battery = player.maxbatt + SELECT CASE player.team + CASE 0 + player.x = 32 + player.dir = 0 + CASE 1 + player.x = 4063 + player.dir = pi + CASE 2 + player.y = 32 + player.dir = pi / 2 + CASE 3 + player.y = 4063 + player.dir = 3 * pi / 2 + END SELECT +END SUB + +SUB market (player AS airplane, plane%, weapons() AS weapon, mods() AS aug, wepimage&(), modimage&(), statimage&(), wepstorage() AS weapon, modstorage() AS aug, wepmouse AS weapon, modmouse AS aug, whichstore%, quartz&, quartz2&, cyberbit&, brushedmetal&, tooltips&(), difficulty) + 'Handles the markets + _FONT cyberbit& + DO + mousex% = _MOUSEX + mousey% = _MOUSEY + lclick% = _MOUSEBUTTON(1) + LOOP WHILE _MOUSEINPUT + CLS + _PUTIMAGE (0, 0), brushedmetal& + IF trigger(0, 0, 191, 31, mousex%, mousey%) AND lclick% THEN whichstore% = 0 + IF trigger(192, 0, 383, 31, mousex%, mousey%) AND lclick% THEN whichstore% = 1 + IF trigger(384, 0, 575, 31, mousex%, mousey%) AND lclick% THEN whichstore% = 2 + SELECT CASE whichstore% + CASE 0: wepmarket player.credits, plane%, weapons(), wepimage&(), wepstorage(), wepmouse, quartz2& + CASE 1: modmarket player.credits, plane%, mods(), modimage&(), modstorage(), modmouse, tooltips&() + CASE 2: statmarket player, statimage&(), quartz2& + END SELECT + _FONT quartz& + PRINT " WEAPONS | MODS | STATS |" + _FONT cyberbit& + IF difficulty <> 0 THEN _PRINTSTRING (swidth - _PRINTWIDTH("Time: " + LTRIM$(STR$(60 - player.markettime \ 60))), sheight - 72), "Time: " + LTRIM$(STR$(60 - player.markettime \ 60)) + _PRINTSTRING (swidth - _PRINTWIDTH("Cr. " + LTRIM$(STR$(player.credits))), sheight - 48), "Cr. " + LTRIM$(STR$(player.credits)) + _PRINTSTRING (swidth - _PRINTWIDTH("EXIT"), sheight - 24), "EXIT" + IF trigger(swidth - _PRINTWIDTH("EXIT"), sheight - 24, swidth - 1, sheight - 1, mousex%, mousey%) AND lclick% = -1 AND ignore` = 0 OR player.markettime >= 3600 AND difficulty <> 0 OR _KEYDOWN(27) THEN + player.market = 0 + player.x = 32 + player.dir = 0 + player.force = 3 + player.speed = 3 + player.battery = player.maxbatt + player.waittime = player.waittime + player.markettime * 2 + player.markettime = 0 + _FONT 16 + ignore` = -1 + END IF + player.markettime = player.markettime + 1 + cursor + clickonce +END SUB + +SUB wepmarket (credits%, plane%, weapons() AS weapon, wepimage&(), storage() AS weapon, inmouse AS weapon, quartz&) 'The market with the weapons in it + DIM switchvar AS weapon + DIM blankspace AS weapon + DO + mousex% = _MOUSEX + mousey% = _MOUSEY + lclick% = _MOUSEBUTTON(1) + rclick% = _MOUSEBUTTON(2) + LOOP WHILE _MOUSEINPUT + LINE (0, 0)-(191, 31), _RGB(127, 0, 0), BF + FOR wep% = 1 TO 11 + _PUTIMAGE (0, wep% * 32), wepimage&(wep%) + NEXT + _PRINTSTRING (32, 32), "Laser - Cr.3" + _PRINTSTRING (32, 64), "Vulcan - Cr.3" + _PRINTSTRING (32, 96), "Spread - Cr.3" + _PRINTSTRING (32, 128), "Plasma - Cr.3" + _PRINTSTRING (32, 160), "Gauss - Cr.3" + _PRINTSTRING (32, 192), "Avenger - Cr.5" + _PRINTSTRING (32, 224), "Homing Plasma - Cr.5" + _PRINTSTRING (32, 256), "Pulse - Cr.5" + _PRINTSTRING (32, 288), "10 Heat-Seeker Missiles - Cr.4" + _PRINTSTRING (32, 320), "10 Radar-Guided Missiles - Cr.5" + _PRINTSTRING (32, 352), "4 Cruise Missiles - Cr.6" + weaponhud swidth - 180, 20, weapons(), plane%, wepimage&(), 0 + _PRINTSTRING (swidth - 180, 104), "STORAGE" + grid swidth - 164, 128 + FOR y% = 0 TO 3 + FOR x% = 0 TO 3 + _PUTIMAGE (swidth - 164 + x% * 32, 128 + y% * 32), wepimage&(storage(0, x% + 4 * y%).wep) + IF storage(0, x% + 4 * y%).wep >= 9 THEN _PRINTSTRING (swidth - 133 - _PRINTWIDTH(LTRIM$(STR$(storage(0, x% + 4 * y%).ammo))) + x% * 32, 159 - _FONTHEIGHT + y% * 32), LTRIM$(STR$(storage(0, x% + 4 * y%).ammo)) + IF trigger(swidth - 164 + x% * 32, 128 + y% * 32, swidth - 133 + x% * 32, 159 + y% * 32, mousex%, mousey%) AND lclick% AND ignore` = 0 THEN + IF storage(0, x% + 4 * y%).wep >= 9 THEN + IF storage(0, x% + 4 * y%).wep = inmouse.wep THEN + storage(0, x% + 4 * y%).ammo = storage(0, x% + 4 * y%).ammo + inmouse.ammo + inmouse = blankspace + END IF + END IF + switchvar = inmouse + inmouse = storage(0, x% + 4 * y%) + storage(0, x% + 4 * y%) = switchvar + ignore` = -1 + END IF + IF trigger(swidth - 164 + x% * 32, 128 + y% * 32, swidth - 133 + x% * 32, 159 + y% * 32, mousex%, mousey%) AND rclick% AND ignore` = 0 THEN + storage(0, x% + 4 * y%) = blankspace + ignore` = -1 + END IF + NEXT + NEXT + changeweapons swidth - 180, 20, mousex%, mousey%, lclick%, plane%, inmouse, weapons(), storage() + _PUTIMAGE (mousex% - 16, mousey% - 16), wepimage&(inmouse.wep) + IF trigger(0, 32, swidth - 200, 63, mousex%, mousey%) THEN + nrg = 1.25: dam = 25: rpm = 300: spd = 16: amo = 0 + specattr1$ = "None" + 'wot "A standard laser cannon, with medium rate of fire, medium power, and medium energy consumption.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectweapon 1, 0, storage(): credits% = credits% - 3: ignore` = -1 + END IF + IF trigger(0, 64, swidth - 200, 95, mousex%, mousey%) THEN + nrg = 0: dam = 30: rpm = 3600: spd = 20: amo = 60 + specattr1$ = "Spread angle = 3" + CHR$(248) + 'wot "A heavy machine gun with a high fire rate. Since it's a balistic weapon, it uses bullets rather than energy.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectweapon 2, 0, storage(): credits% = credits% - 3: ignore` = -1 + END IF + IF trigger(0, 96, swidth - 200, 127, mousex%, mousey%) THEN + nrg = 2.25: dam = 56.25: rpm = 450: spd = 16: amo = 0 + specattr1$ = "Bullets/shot = 3" + specattr2$ = "Spread angle = 60" + CHR$(248) + 'wot "A unique energy weapon that fires three shots at even angles -- one strait forward, and one on each side.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectweapon 3, 0, storage(): credits% = credits% - 3: ignore` = -1 + END IF + IF trigger(0, 128, swidth - 200, 159, mousex%, mousey%) THEN + nrg = 5: dam = 100: rpm = 600: spd = 18: amo = 0 + specattr1$ = "None" + 'wot "A high-power blaster. It has a high firing rate and energy consumption, so watch your battery.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectweapon 4, 0, storage(): credits% = credits% - 3: ignore` = -1 + END IF + IF trigger(0, 160, swidth - 200, 191, mousex%, mousey%) THEN + nrg = 0: dam = 30: rpm = 450: spd = 20: amo = 60 + specattr1$ = "Bullets/shot = 8" + specattr2$ = "Spread angle = 3" + CHR$(248) + 'wot "A machine gun that, instead of firing individual bullets consecutively, loads all barrels and fires them all at once.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectweapon 5, 0, storage(): credits% = credits% - 3: ignore` = -1 + END IF + IF trigger(0, 192, swidth - 200, 223, mousex%, mousey%) THEN + nrg = 0: dam = 60: rpm = 3600: spd = 20: amo = 60 + specattr1$ = "Recoil effect" + specattr2$ = "Spread angle = 3" + CHR$(248) + 'wot "This powerful machine gun's recoil is more powerful than your engine, so throttle up.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 5 AND ignore` = 0 THEN selectweapon 6, 0, storage(): credits% = credits% - 5: ignore` = -1 + END IF + IF trigger(0, 224, swidth - 200, 255, mousex%, mousey%) THEN + nrg = 10: dam = 60: rpm = 3600: spd = 12: amo = 0 + specattr1$ = "Charged" + specattr2$ = "Homing" + 'wot "A charging weapon that fires a slow homing shot. Good to have when you run out of missiles.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 5 AND ignore` = 0 THEN selectweapon 7, 0, storage(): credits% = credits% - 5: ignore` = -1 + END IF + IF trigger(0, 256, swidth - 200, 287, mousex%, mousey%) THEN + nrg = 10: dam = 60: rpm = 3600: spd = 16: amo = 0 + specattr1$ = "Charged" + specattr2$ = "Ghost" + 'wot "A charging weapon who'se shots continue after hitting something.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 5 AND ignore` = 0 THEN selectweapon 8, 0, storage(): credits% = credits% - 5: ignore` = -1 + END IF + IF trigger(0, 288, swidth - 200, 319, mousex%, mousey%) THEN + nrg = 0: dam = 50: rpm = 60: spd = 16: amo = 1 + specattr1$ = "Homing" + 'wot "Missiles that home in on whatever they see first.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 4 AND ignore` = 0 THEN selectmissile 1, 0, storage(): credits% = credits% - 4: ignore` = -1 + END IF + IF trigger(0, 320, swidth - 200, 351, mousex%, mousey%) THEN + nrg = 0: dam = 50: rpm = 60: spd = 16: amo = 1 + specattr1$ = "Homing (Leads)" + 'wot "Homes more accurately than a heat-seeker, and has longer range as well.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 5 AND ignore` = 0 THEN selectmissile 2, 0, storage(): credits% = credits% - 5: ignore` = -1 + END IF + IF trigger(0, 352, swidth - 200, 383, mousex%, mousey%) THEN + nrg = 0: dam = 300: rpm = 60: spd = 16: amo = 1 + specattr1$ = "Splash range = 300" + specattr2$ = "Homing (weak)" + 'wot "It doesn't home very tightly, but it flies for a long time and has a very, very big explosion. It also doesn't require a direct hit.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 6 AND ignore` = 0 THEN selectmissile 3, 0, storage(): credits% = credits% - 6: ignore` = -1 + END IF + hudbar 8, "NRG", nrg, 10, _RGB(127, 127, 0), "/sec", quartz& + hudbar 9, "DAM", dam, 100, _RGB(0, 0, 127), "/sec", quartz& + hudbar 10, "RPM", rpm, 3600, _RGB(0, 127, 0), "", quartz& + hudbar 11, "SPD", spd, 20, _RGB(0, 127, 127), "", quartz& + hudbar 12, "AMO", amo, 60, _RGB(31, 31, 31), "/sec", quartz& + _PRINTSTRING (swidth - 200, 416), specattr1$ + _PRINTSTRING (swidth - 200, 448), specattr2$ +END SUB + +SUB modmarket (credits%, plane%, mods() AS aug, modimage&(), storage() AS aug, inmouse AS aug, tooltips&()) 'The market with the mods in it + DIM switchvar AS aug + DIM blankspace AS aug + DO + mousex% = _MOUSEX + mousey% = _MOUSEY + lclick% = _MOUSEBUTTON(1) + rclick% = _MOUSEBUTTON(2) + LOOP WHILE _MOUSEINPUT + LINE (192, 0)-(383, 31), _RGB(0, 127, 0), BF + FOR wep% = 1 TO 4 + _PUTIMAGE (0, wep% * 32), modimage&(wep%) + NEXT + _PRINTSTRING (32, 32), "Aimer - Cr.3" + _PRINTSTRING (32, 64), "Energy ==> Armor - Cr.3" + _PRINTSTRING (32, 96), "Solid Rocket Booster - Cr.3" + _PRINTSTRING (32, 128), "Flare Pack - Cr.3" + modhud swidth - 180, 20, mods(), plane%, modimage&(), 0 + _PRINTSTRING (swidth - 180, 104), "STORAGE" + grid swidth - 164, 128 + FOR y% = 0 TO 3 + FOR x% = 0 TO 3 + _PUTIMAGE (swidth - 164 + x% * 32, 128 + y% * 32), modimage&(storage(0, x% + 4 * y%).kind) + IF storage(0, x% + 4 * y%).ammo > 0 THEN _PRINTSTRING (swidth - 133 - _PRINTWIDTH(LTRIM$(STR$(storage(0, x% + 4 * y%).ammo))) + x% * 32, 159 - _FONTHEIGHT + y% * 32), LTRIM$(STR$(storage(0, x% + 4 * y%).ammo)) + IF trigger(swidth - 164 + x% * 32, 128 + y% * 32, swidth - 133 + x% * 32, 159 + y% * 32, mousex%, mousey%) AND lclick% AND ignore` = 0 THEN + IF storage(0, x% + 4 * y%).ammo > 0 THEN + IF storage(0, x% + 4 * y%).kind = inmouse.kind THEN + storage(0, x% + 4 * y%).ammo = storage(0, x% + 4 * y%).ammo + inmouse.ammo + inmouse = blankspace + END IF + END IF + switchvar = inmouse + inmouse = storage(0, x% + 4 * y%) + storage(0, x% + 4 * y%) = switchvar + ignore` = -1 + END IF + IF trigger(swidth - 164 + x% * 32, 128 + y% * 32, swidth - 133 + x% * 32, 159 + y% * 32, mousex%, mousey%) AND rclick% AND ignore` = 0 THEN + storage(0, x% + 4 * y%) = blankspace + ignore` = -1 + END IF + NEXT + NEXT + changemods swidth - 180, 20, mousex%, mousey%, lclick%, plane%, inmouse, mods() + _PUTIMAGE (mousex% - 16, mousey% - 16), modimage&(inmouse.kind) + IF trigger(0, 32, swidth - 200, 63, mousex%, mousey%) THEN + _PUTIMAGE (mousex%, mousey%), tooltips&(1) + 'wot "This device displays an estimate of where enemy planes will be when your shots get there, as well as a line to help you aim. Fire when the line crosses a circle. Calibrated for lasers.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectmod 1, 0, storage(): credits% = credits% - 3: ignore` = -1 + END IF + IF trigger(0, 64, swidth - 200, 95, mousex%, mousey%) THEN + _PUTIMAGE (mousex%, mousey%), tooltips&(2) + 'wot "This device slowly regenerates armor at the cost of electricity. Watch your battery.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectmod 2, 0, storage(): credits% = credits% - 3: ignore` = -1 + END IF + IF trigger(0, 96, swidth - 200, 127, mousex%, mousey%) THEN + _PUTIMAGE (mousex%, mousey%), tooltips&(3) + 'wot "Simple, but effective, SRBs are used to provide a short boost of speed in case the need for a quick escape arises. It takes no energy, but runs out of fuel after only one use.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectmod 3, 0, storage(): credits% = credits% - 3: ignore` = -1 + END IF + IF trigger(0, 128, swidth - 200, 159, mousex%, mousey%) THEN + _PUTIMAGE (mousex%, mousey%), tooltips&(4) + 'wot "Using one of these fires four flares that can trick all kinds of missiles. It works 4 out of 5 times.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND credits% >= 3 AND ignore` = 0 THEN selectmod 4, 0, storage(): credits% = credits% - 3: ignore` = -1 + END IF +END SUB + +SUB statmarket (player AS airplane, statimage&(), quartz&) 'The market with the stats in it + DO + mousex% = _MOUSEX + mousey% = _MOUSEY + lclick% = _MOUSEBUTTON(1) + rclick% = _MOUSEBUTTON(2) + LOOP WHILE _MOUSEINPUT + LINE (384, 0)-(575, 31), _RGB(0, 0, 127), BF + FOR wep% = 1 TO 4 + _PUTIMAGE (0, wep% * 32), statimage&(wep%) + NEXT + _PRINTSTRING (32, 32), "+ 5% Generator - Cr. 5 (Currently " + LTRIM$(STR$(INT(player.generator * 50))) + ")" + _PRINTSTRING (32, 64), "+ 10% Battery life - Cr.5 (Currently " + LTRIM$(STR$(player.maxbatt)) + ")" + _PRINTSTRING (32, 96), "+ 10% Armor - Cr.5 (Currently " + LTRIM$(STR$(player.maxarm * 10)) + ")" + _PRINTSTRING (32, 128), "1000 Bullets - Cr.1 (currently " + LTRIM$(STR$(player.ammo)) + ")" + IF trigger(0, 32, swidth - 200, 63, mousex%, mousey%) THEN + 'wot "A generator upgrade that increases its effectiveness.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND player.credits >= 5 AND ignore` = 0 AND player.generator < 2 THEN player.generator = player.generator + .1: player.credits = player.credits - 5: ignore` = -1 + END IF + IF trigger(0, 64, swidth - 200, 95, mousex%, mousey%) THEN + 'wot "Increases battery storage capacity. Note that the meter on your dashboard displays % of total battery charge.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND player.credits >= 5 AND ignore` = 0 AND player.maxbatt < 200 THEN player.maxbatt = player.maxbatt + 10: player.credits = player.credits - 5: ignore` = -1 + END IF + IF trigger(0, 96, swidth - 200, 127, mousex%, mousey%) THEN + 'wot "Increases the strength of your armor. Note that the meter on your dashboard displays % of total armor.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND player.credits >= 5 AND ignore` = 0 AND player.maxarm < 20 THEN player.maxarm = player.maxarm + 1: player.credits = player.credits - 5: ignore` = -1 + END IF + IF trigger(0, 128, swidth - 200, 159, mousex%, mousey%) THEN + 'wot "Machine gun ammunition.", mousex%, mousey%, mousex% + 256 + IF lclick% = -1 AND player.credits >= 1 AND ignore` = 0 AND player.ammo < 10000 THEN player.ammo = player.ammo + 1000: player.credits = player.credits - 1: ignore` = -1 + END IF + hudbar 8, "GEN", player.generator / 2 * 100, 100, _RGB(0, 127, 0), "/100", quartz& + hudbar 9, "BAT", player.maxbatt, 200, _RGB(127, 127, 0), "/200", quartz& + hudbar 10, "ARM", player.maxarm * 10, 200, _RGB(0, 0, 127), "/200", quartz& + hudbar 11, "AMO", player.ammo, 10000, _RGB(31, 31, 31), "/10000", quartz& +END SUB + +SUB grid (x AS INTEGER, y AS INTEGER) 'Makes the storage grid at coordinates ("x", "y") + FOR y2% = 0 TO 4 + LINE (x, y + y2% * 32)-(x + 128, y + y2% * 32), _RGB(255, 255, 255) + NEXT + FOR x2% = 0 TO 4 + LINE (x + x2% * 32, y)-(x + x2% * 32, y + 128), _RGB(255, 255, 255) + NEXT +END SUB + +SUB selectweapon (num AS INTEGER, plane AS INTEGER, storage() AS weapon) 'Gives the player weapons that pchk buys, and puts them in storage. + DIM selection(8) AS weapon + selection(1).wep = 1 + selection(1).ifon = -1 + selection(1).total = 12 + selection(1).energy = .25 + selection(2).wep = 2 + selection(2).ifon = -1 + selection(2).total = 1 + selection(2).ammo = 1 + selection(3).wep = 3 + selection(3).ifon = -1 + selection(3).total = 8 + selection(3).energy = .3 + selection(4).wep = 4 + selection(4).ifon = -1 + selection(4).total = 6 + selection(4).energy = .5 + selection(5).wep = 5 + selection(5).ifon = -1 + selection(5).total = 8 + selection(5).ammo = 8 + selection(6).wep = 6 + selection(6).ifon = -1 + selection(6).total = 1 + selection(6).ammo = 1 + selection(7).wep = 7 + selection(7).ifon = -1 + selection(7).kind = 1 + selection(8).wep = 8 + selection(8).ifon = -1 + selection(8).kind = 1 + FOR stor% = 0 TO 15 + IF storage(plane, stor%).wep = 0 THEN storage(plane, stor%) = selection(num): EXIT FOR + NEXT +END SUB + +SUB selectmissile (num AS INTEGER, plane AS INTEGER, storage() AS weapon) 'Gives the player missiles that pchk buys, and puts them in storage. + DIM selection(3) AS weapon + selection(1).wep = 9 + selection(1).ifon = -1 + selection(1).total = 60 + selection(1).ammo = 10 + selection(2).wep = 10 + selection(2).ifon = -1 + selection(2).total = 60 + selection(2).ammo = 10 + selection(3).wep = 11 + selection(3).ammo = 4 + selection(3).ifon = -1 + selection(3).total = 60 + FOR stor% = 0 TO 15 + IF storage(plane, stor%).wep = selection(num).wep THEN storage(plane, stor%).ammo = storage(plane, stor%).ammo + selection(num).ammo: skip` = -1: EXIT FOR + NEXT + IF skip` = 0 THEN + FOR stor% = 0 TO 15 + IF storage(plane, stor%).wep = 0 THEN storage(plane, stor%) = selection(num): EXIT FOR + NEXT + END IF +END SUB + +SUB selectmod (num AS INTEGER, plane AS INTEGER, storage() AS aug) 'Gives the player mods that pchk buys, and puts them in storage. + DIM selection(4) AS aug + selection(1).kind = 1 + selection(1).energy = .5 + selection(2).kind = 2 + selection(2).energy = 9 + selection(3).kind = 3 + selection(3).fuel = 180 + selection(3).ammo = 1 + selection(4).kind = 4 + selection(4).ammo = 3 + FOR stor% = 0 TO 15 + IF storage(plane, stor%).kind = selection(num).kind AND selection(num).ammo > 0 THEN storage(plane, stor%).ammo = storage(plane, stor%).ammo + selection(num).ammo: skip% = -1: EXIT FOR + NEXT + IF skip% = 0 THEN + FOR stor% = 0 TO 15 + IF storage(plane, stor%).kind = 0 THEN storage(plane, stor%) = selection(num): EXIT FOR + NEXT + END IF +END SUB + +SUB weaponhud (x AS INTEGER, y AS INTEGER, weapons() AS weapon, plane AS INTEGER, wepimage&(), picked%) 'The HUD for the weapons. + LINE (x + 64, y)-(x + 95, y + 31), _RGB(255, 0, 0), B + IF picked% = 1 THEN LINE (x + 65, y + 1)-(x + 94, y + 30), _RGB(255, 255, 255), B + IF weapons(plane, 1).ifon = -1 THEN LINE (x + 66, y + 2)-(x + 93, y + 29), _RGB(127, 0, 0), BF + _PUTIMAGE (x + 64, y), wepimage&(weapons(plane, 1).wep) + _PRINTSTRING (x + 64, y), "1" + LINE (x + 32, y + 16)-(x + 63, y + 47), _RGB(255, 0, 0), B: LINE (x + 96, y + 16)-(x + 127, y + 47), _RGB(255, 0, 0), B + IF picked% = 2 THEN LINE (x + 33, y + 17)-(x + 62, y + 46), _RGB(255, 255, 255), B: LINE (x + 97, y + 17)-(x + 126, y + 46), _RGB(255, 255, 255), B + IF weapons(plane, 2).ifon = -1 THEN LINE (x + 34, y + 18)-(x + 61, y + 45), _RGB(127, 0, 0), BF: LINE (x + 98, y + 18)-(x + 125, y + 45), _RGB(127, 0, 0), BF + _PUTIMAGE (x + 32, y + 16), wepimage&(weapons(plane, 2).wep): _PUTIMAGE (x + 96, y + 16), wepimage&(weapons(plane, 2).wep) + _PRINTSTRING (x + 32, y + 16), "2": _PRINTSTRING (x + 96, y + 16), "2" + LINE (x, y + 32)-(x + 31, y + 63), _RGB(255, 0, 0), B: LINE (x + 128, y + 32)-(x + 159, y + 63), _RGB(255, 0, 0), B + IF picked% = 3 THEN LINE (x + 1, y + 33)-(x + 30, y + 62), _RGB(255, 255, 255), B: LINE (x + 129, y + 33)-(x + 158, y + 62), _RGB(255, 255, 255), B + IF weapons(plane, 3).ifon = -1 THEN LINE (x + 2, y + 34)-(x + 29, y + 61), _RGB(127, 0, 0), BF: LINE (x + 130, y + 34)-(x + 157, y + 61), _RGB(127, 0, 0), BF + _PUTIMAGE (x, y + 32), wepimage&(weapons(plane, 3).wep): _PUTIMAGE (x + 128, y + 32), wepimage&(weapons(plane, 3).wep) + _PRINTSTRING (x, y + 32), "3": _PRINTSTRING (x + 128, y + 32), "3" + LINE (x + 64, y + 32)-(x + 95, y + 63), _RGB(0, 0, 255), B + IF picked% = 4 THEN LINE (x + 65, y + 33)-(x + 94, y + 62), _RGB(255, 255, 255), B + IF weapons(plane, 4).ifon = -1 THEN LINE (x + 66, y + 34)-(x + 93, y + 61), _RGB(0, 0, 127), BF + _PUTIMAGE (x + 64, y + 32), wepimage&(weapons(plane, 4).wep) + _PRINTSTRING (x + 64, y + 32), "4" + _PRINTSTRING (x + 95 - _PRINTWIDTH(LTRIM$(STR$(weapons(plane, 4).ammo))), y + 63 - _FONTHEIGHT), LTRIM$(STR$(weapons(plane, 4).ammo)) + LINE (x + 32, y + 48)-(x + 63, y + 79), _RGB(0, 0, 255), B: LINE (x + 96, y + 48)-(x + 127, y + 79), _RGB(0, 0, 255), B + IF picked% = 5 THEN LINE (x + 33, y + 49)-(x + 62, y + 78), _RGB(255, 255, 255), B: LINE (x + 97, y + 49)-(x + 126, y + 78), _RGB(255, 255, 255), B + IF weapons(plane, 5).ifon = -1 THEN LINE (x + 34, y + 50)-(x + 61, y + 77), _RGB(0, 0, 127), BF: LINE (x + 98, y + 50)-(x + 125, y + 77), _RGB(0, 0, 127), BF + _PUTIMAGE (x + 32, y + 48), wepimage&(weapons(plane, 5).wep): _PUTIMAGE (x + 96, y + 48), wepimage&(weapons(plane, 5).wep) + _PRINTSTRING (x + 32, y + 48), "5": _PRINTSTRING (x + 96, y + 48), "5" + _PRINTSTRING (x + 63 - _PRINTWIDTH(LTRIM$(STR$(weapons(plane, 5).ammo))), y + 79 - _FONTHEIGHT), LTRIM$(STR$(weapons(plane, 5).ammo)): _PRINTSTRING (x + 127 - _PRINTWIDTH(LTRIM$(STR$(weapons(plane, 5).ammo))), y + 79 - _FONTHEIGHT), LTRIM$(STR$(weapons(plane, 5).ammo)) +END SUB + +SUB modhud (x AS INTEGER, y AS INTEGER, mods() AS aug, plane AS INTEGER, modimage&(), picked%) 'The HUD for the mods. + LINE (x, y)-(x + 31, y + 31), _RGB(0, 255, 0), B + IF picked% = 6 THEN LINE (x + 1, y + 1)-(x + 30, y + 30), _RGB(255, 255, 255), B + IF mods(plane, 1).ifon = -1 THEN LINE (x + 2, y + 2)-(x + 29, y + 29), _RGB(0, 127, 0), BF + _PUTIMAGE (x, y), modimage&(mods(plane, 1).kind) + _PRINTSTRING (x, y), "6" + IF mods(plane, 1).ammo > 0 THEN _PRINTSTRING (x + 31 - _PRINTWIDTH(LTRIM$(STR$(mods(plane, 1).ammo))), y + 31 - _FONTHEIGHT), LTRIM$(STR$(mods(plane, 1).ammo)) + LINE (x + 32, y)-(x + 63, y + 31), _RGB(0, 255, 0), B + IF picked% = 7 THEN LINE (x + 33, y + 1)-(x + 62, y + 30), _RGB(255, 255, 255), B + IF mods(plane, 2).ifon = -1 THEN LINE (x + 34, y + 2)-(x + 61, y + 29), _RGB(0, 127, 0), BF + _PUTIMAGE (x + 32, y), modimage&(mods(plane, 2).kind) + _PRINTSTRING (x + 32, y), "7" + IF mods(plane, 2).ammo > 0 THEN _PRINTSTRING (x + 63 - _PRINTWIDTH(LTRIM$(STR$(mods(plane, 1).ammo))), y + 31 - _FONTHEIGHT), LTRIM$(STR$(mods(plane, 2).ammo)) + LINE (x + 64, y)-(x + 95, y + 31), _RGB(0, 255, 0), B + IF picked% = 8 THEN LINE (x + 65, y + 1)-(x + 94, y + 30), _RGB(255, 255, 255), B + IF mods(plane, 3).ifon = -1 THEN LINE (x + 66, y + 2)-(x + 93, y + 29), _RGB(0, 127, 0), BF + _PUTIMAGE (x + 64, y), modimage&(mods(plane, 3).kind) + _PRINTSTRING (x + 64, y), "8" + IF mods(plane, 3).ammo > 0 THEN _PRINTSTRING (x + 95 - _PRINTWIDTH(LTRIM$(STR$(mods(plane, 1).ammo))), y + 31 - _FONTHEIGHT), LTRIM$(STR$(mods(plane, 3).ammo)) + LINE (x + 96, y)-(x + 127, y + 31), _RGB(0, 255, 0), B + IF picked% = 9 THEN LINE (x + 97, y + 1)-(x + 126, y + 30), _RGB(255, 255, 255), B + IF mods(plane, 4).ifon = -1 THEN LINE (x + 98, y + 2)-(x + 125, y + 29), _RGB(0, 127, 0), BF + _PUTIMAGE (x + 96, y), modimage&(mods(plane, 4).kind) + _PRINTSTRING (x + 96, y), "9" + IF mods(plane, 4).ammo > 0 THEN _PRINTSTRING (x + 127 - _PRINTWIDTH(LTRIM$(STR$(mods(plane, 1).ammo))), y + 31 - _FONTHEIGHT), LTRIM$(STR$(mods(plane, 4).ammo)) +END SUB + +SUB changeweapons (x AS INTEGER, y AS INTEGER, mousex AS INTEGER, mousey AS INTEGER, lclick AS INTEGER, plane AS INTEGER, inmouse AS weapon, weapons() AS weapon, storage() AS weapon) 'Allows the player to change the weapons on board + DIM switchvar AS weapon + DIM blankspace AS weapon + SELECT CASE inmouse.wep + CASE 0 + IF trigger(x + 64, y, x + 95, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN + switchvar = inmouse + inmouse = weapons(plane, 1) + weapons(plane, 1) = switchvar + ignore` = -1 + END IF + IF trigger(x + 32, y + 16, x + 63, y + 47, mousex, mousey) OR trigger(x + 96, y + 16, x + 127, y + 47, mousex, mousey) THEN + IF lclick = -1 AND ignore` = 0 THEN + FOR look = 0 TO 15 + IF storage(0, look).wep = inmouse.wep THEN + switchvar = inmouse + inmouse = weapons(plane, 2) + storage(0, look) = weapons(plane, 2) + weapons(plane, 2) = switchvar + ignore` = -1 + EXIT FOR + END IF + NEXT + END IF + END IF + IF trigger(x, y + 32, x + 31, y + 63, mousex, mousey) OR trigger(x + 128, y + 32, x + 159, y + 63, mousex, mousey) THEN + IF lclick = -1 AND ignore` = 0 THEN + FOR look = 0 TO 15 + IF storage(0, look).wep = inmouse.wep THEN + switchvar = inmouse + inmouse = weapons(plane, 3) + storage(0, look) = weapons(plane, 3) + weapons(plane, 3) = switchvar + ignore` = -1 + EXIT FOR + END IF + NEXT + END IF + END IF + IF trigger(x + 64, y + 32, x + 95, y + 63, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN + switchvar = inmouse + inmouse = weapons(plane, 4) + weapons(plane, 4) = switchvar + ignore` = -1 + END IF + IF trigger(x + 32, y + 48, x + 63, y + 79, mousex, mousey) OR trigger(x + 96, y + 48, x + 127, y + 79, mousex, mousey) THEN + IF lclick = -1 AND ignore` = 0 THEN + switchvar = inmouse + inmouse = weapons(plane, 5) + weapons(plane, 5) = switchvar + ignore` = -1 + END IF + END IF + CASE 1, 2, 3, 4, 5, 6, 7, 8 + IF trigger(x + 64, y, x + 95, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN + switchvar = inmouse + inmouse = weapons(plane, 1) + weapons(plane, 1) = switchvar + ignore` = -1 + END IF + IF trigger(x + 32, y + 16, x + 63, y + 47, mousex, mousey) OR trigger(x + 96, y + 16, x + 127, y + 47, mousex, mousey) THEN + IF lclick = -1 AND ignore` = 0 THEN + FOR look% = 0 TO 15 + IF storage(0, look%).wep = inmouse.wep THEN + switchvar = inmouse + inmouse = weapons(plane, 2) + storage(0, look%) = weapons(plane, 2) + weapons(plane, 2) = switchvar + ignore` = -1 + EXIT FOR + END IF + NEXT + END IF + END IF + IF trigger(x, y + 32, x + 31, y + 63, mousex, mousey) OR trigger(x + 128, y + 32, x + 159, y + 63, mousex, mousey) THEN + IF lclick = -1 AND ignore` = 0 THEN + FOR look% = 0 TO 15 + IF storage(0, look%).wep = inmouse.wep THEN + switchvar = inmouse + inmouse = weapons(plane, 3) + storage(0, look%) = weapons(plane, 3) + weapons(plane, 3) = switchvar + ignore` = -1 + EXIT FOR + END IF + NEXT + END IF + END IF + CASE 9, 10, 11 + IF trigger(x + 64, y + 32, x + 95, y + 63, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN + IF weapons(plane, 4).wep = inmouse.wep THEN + weapons(plane, 4).ammo = weapons(plane, 4).ammo + inmouse.ammo + inmouse = blankspace + ELSE + switchvar = inmouse + inmouse = weapons(plane, 4) + weapons(plane, 4) = switchvar + END IF + ignore` = -1 + END IF + IF trigger(x + 32, y + 48, x + 63, y + 79, mousex, mousey) OR trigger(x + 96, y + 48, x + 127, y + 79, mousex, mousey) THEN + IF lclick = -1 AND ignore` = 0 THEN + IF weapons(plane, 5).wep = inmouse.wep THEN + weapons(plane, 5).ammo = weapons(plane, 5).ammo + inmouse.ammo + inmouse = blankspace + ELSE + switchvar = inmouse + inmouse = weapons(plane, 5) + weapons(plane, 5) = switchvar + END IF + ignore` = -1 + END IF + END IF + END SELECT +END SUB + +SUB changemods (x AS INTEGER, y AS INTEGER, mousex AS INTEGER, mousey AS INTEGER, lclick AS INTEGER, plane AS INTEGER, inmouse AS aug, mods() AS aug) 'Allows the player to change mods on board. + DIM switchvar AS aug + DIM blankspace AS aug + IF trigger(x, y, x + 31, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN + IF mods(plane, 1).kind = inmouse.kind AND mods(plane, 1).ammo > 0 THEN + mods(plane, 1).ammo = mods(plane, 1).ammo + inmouse.ammo + inmouse = blankspace + ELSE + switchvar = inmouse + inmouse = mods(plane, 1) + mods(plane, 1) = switchvar + END IF + ignore` = -1 + END IF + IF trigger(x + 32, y, x + 63, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN + IF mods(plane, 2).kind = inmouse.kind AND mods(plane, 2).ammo > 0 THEN + mods(plane, 2).ammo = mods(plane, 2).ammo + inmouse.ammo + inmouse = blankspace + ELSE + switchvar = inmouse + inmouse = mods(plane, 2) + mods(plane, 2) = switchvar + END IF + ignore` = -1 + END IF + IF trigger(x + 64, y, x + 95, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN + IF mods(plane, 3).kind = inmouse.kind AND mods(plane, 3).ammo > 0 THEN + mods(plane, 3).ammo = mods(plane, 3).ammo + inmouse.ammo + inmouse = blankspace + ELSE + switchvar = inmouse + inmouse = mods(plane, 3) + mods(plane, 3) = switchvar + END IF + ignore` = -1 + END IF + IF trigger(x + 96, y, x + 127, y + 31, mousex, mousey) AND lclick = -1 AND ignore` = 0 THEN + IF mods(plane, 4).kind = inmouse.kind AND mods(plane, 4).ammo > 0 THEN + mods(plane, 4).ammo = mods(plane, 4).ammo + inmouse.ammo + inmouse = blankspace + ELSE + switchvar = inmouse + inmouse = mods(plane, 4) + mods(plane, 4) = switchvar + END IF + ignore` = -1 + END IF +END SUB + +SUB aiplane (plane AS INTEGER, planes() AS airplane, weapons() AS weapon, difficulty) 'The other planes' AI + angle = planes(plane).dir + IF planes(plane).market = 0 THEN + distx% = planes(planes(plane).lasthit).x - planes(plane).x + disty% = planes(planes(plane).lasthit).y - planes(plane).y + totaldist = SQR(distx% ^ 2 + disty% ^ 2) + IF difficulty = 1 THEN + newposx% = totaldist / 16 * planes(planes(plane).lasthit).speed * COS(planes(planes(plane).lasthit).dir) + newposy% = totaldist / 16 * planes(planes(plane).lasthit).speed * SIN(planes(planes(plane).lasthit).dir) + distx% = distx% + newposx% + disty% = disty% + newposy% + planes(plane).force = planes(planes(plane).lasthit).speed + 1 / 256 * (totaldist - 256) + IF planes(plane).force > 10 THEN planes(plane).force = 10 + IF planes(plane).force < 2 THEN planes(plane).force = 2 + END IF + IF distx% <> 0 THEN angle2 = ATN(disty% / distx%) ELSE angle2 = 0 + IF distx% < 0 THEN angle2 = angle2 + pi + IF angle2 < 0 THEN angle2 = angle2 + 2 * pi + ELSE + SELECT CASE planes(plane).team + CASE 0: angle2 = pi + CASE 1: angle2 = 0 + CASE 2: angle2 = 3 * pi / 2 + CASE 3: angle2 = pi / 2 + END SELECT + END IF + IF ABS(angle - angle2) > rad(2) THEN + IF angle >= pi THEN + IF angle - angle2 < pi AND angle - angle2 > 0 THEN planes(plane).yaw = planes(plane).yaw - .1 ELSE planes(plane).yaw = planes(plane).yaw + .1 + END IF + IF angle < pi THEN + IF angle2 - angle < pi AND angle2 - angle > 0 THEN planes(plane).yaw = planes(plane).yaw + .1 ELSE planes(plane).yaw = planes(plane).yaw - .1 + END IF + ELSE + IF planes(plane).market = 0 THEN + IF totaldist <= swidth / 2 - 100 THEN + FOR fire% = 1 TO 3 + IF weapons(plane, fire%).ifon = -1 THEN + IF weapons(plane, fire%).kind = 0 AND weapons(plane, fire%).remaining >= weapons(plane, fire%).total THEN + IF weapons(plane, fire%).energy > 0 THEN IF planes(plane).battery > weapons(plane, fire%).energy THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 + IF weapons(plane, fire%).ammo > 0 THEN IF planes(plane).ammo > 0 THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 + END IF + IF weapons(plane, fire%).kind = 1 AND planes(plane).battery > 1 THEN weapons(plane, fire%).firing = weapons(plane, fire%).firing + 1 + END IF + NEXT + END IF + IF INT(RND * 180) = 0 THEN + FOR fire% = 4 TO 5 + IF weapons(plane, fire%).ifon = -1 THEN + IF weapons(plane, fire%).remaining >= weapons(plane, fire%).total THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 + IF fire% = 5 THEN IF weapons(plane, fire%).remaining = weapons(plane, fire%).total / 2 THEN weapons(plane, fire%).firing = 1 + END IF + NEXT + END IF + END IF + END IF + IF planes(plane).yaw > ABS(deg(angle - angle2)) / 3 THEN planes(plane).yaw = ABS(deg(angle - angle2)) / 3 + IF planes(plane).yaw < -(ABS(deg(angle - angle2)) / 3) THEN planes(plane).yaw = -(ABS(deg(angle - angle2)) / 3) + IF planes(plane).yaw > 1 THEN planes(plane).yaw = 1 + IF planes(plane).yaw < -1 THEN planes(plane).yaw = -1 + IF deg(planes(plane).dir) > 359 THEN planes(plane).dir = planes(plane).dir - 2 * pi + IF deg(planes(plane).dir) < 0 THEN planes(plane).dir = planes(plane).dir + 2 * pi +END SUB + +SUB fakephysics (force, speed) '"speed"'s relationship to "force" + net = force - speed + speed = speed + net / 500 +END SUB + +SUB playercontrol (angle, force, yaw, yawcontrol, forcecontrol) 'Allows the player to control pchk's own plane. + IF gamepad = 0 THEN + IF ignorethrot` = 0 THEN + IF _KEYDOWN(119) THEN force = INT(force) + 1: ignorethrot` = -1 + IF _KEYDOWN(115) THEN force = INT(force + .9) - 1: ignorethrot` = -1 + END IF + IF ignorethrot` = -1 AND NOT _KEYDOWN(119) AND NOT _KEYDOWN(115) THEN ignorethrot` = 0 + IF _KEYDOWN(97) THEN + yaw = -1 + ELSEIF _KEYDOWN(100) THEN + yaw = 1 + ELSE + yaw = 0 + END IF + ELSE + force = (-forcecontrol + 1) * 5 + IF force < .5 THEN force = 0 + IF force > 9.5 THEN force = 10 + IF force > 4.5 AND force < 5.5 THEN force = 5 + yaw = yawcontrol + IF yaw < -.95 THEN yaw = -1 + IF yaw > .95 THEN yaw = 1 + IF yaw > -.05 AND yaw < .05 THEN yaw = 0 + END IF + IF force < 0 THEN force = 0 + IF force > 10 THEN force = 10 + IF deg(angle) > 359 THEN angle = angle - rad(360) + IF deg(angle) < 0 THEN angle = angle + rad(360) +END SUB + +SUB playerfire (planes() AS airplane, plane AS INTEGER, weapons() AS weapon, primary AS INTEGER, secondary AS INTEGER) 'Allows the player to fire pchk's own weapons. + IF gamepad = 0 THEN + DO + fire1% = _MOUSEBUTTON(1) + fire2% = _MOUSEBUTTON(2) + LOOP WHILE _MOUSEINPUT + ELSE + fire1% = primary + fire2% = secondary + END IF + IF _KEYDOWN(32) OR fire1% AND ignore` = 0 THEN + FOR fire% = 1 TO 3 + IF weapons(plane, fire%).ifon = -1 THEN + IF weapons(plane, fire%).kind = 0 AND weapons(plane, fire%).remaining >= weapons(plane, fire%).total THEN + IF weapons(plane, fire%).energy > 0 THEN IF planes(plane).battery > 1 THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 + IF weapons(plane, fire%).ammo > 0 THEN IF planes(plane).ammo > 0 THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 + END IF + IF weapons(plane, fire%).kind = 1 AND planes(plane).battery > 1 THEN weapons(plane, fire%).firing = weapons(plane, fire%).firing + 1 + END IF + NEXT + END IF + IF _KEYDOWN(102) OR fire2% THEN + FOR fire% = 4 TO 5 + IF weapons(plane, fire%).ifon = -1 THEN + IF weapons(plane, fire%).remaining >= weapons(plane, fire%).total THEN weapons(plane, fire%).firing = 1: weapons(plane, fire%).remaining = 0 + IF fire% = 5 THEN IF weapons(plane, fire%).remaining = weapons(plane, fire%).total / 2 THEN weapons(plane, fire%).firing = 1 + END IF + NEXT + END IF +END SUB + +SUB toggle (num%, change%, ignoretog%) 'Toggles weapons and mods. "num" is the weapon/mod's place (1-3 for primary weapons, 4-5 for missiles, 6-9 for mods). "change" is "*.ifon". "ignoretog" is like clickonce for toggling. + IF _KEYDOWN(num% + 48) AND ignoretog% = 0 THEN + IF change% = 0 THEN change% = -1 ELSE change% = 0 + ignoretog% = -1 + END IF +END SUB + +SUB togglecontrol (plane AS INTEGER, weapons() AS weapon, mods() AS aug, ignoretog%, picked%, pick) 'Allows the player to toggle things. + FOR k% = 1 TO 5 + toggle k%, weapons(plane, k%).ifon, ignoretog% + NEXT + FOR l% = 6 TO 9 + toggle l%, mods(plane, l% - 5).ifon, ignoretog% + NEXT + IF gamepad <> 0 THEN + IF picked% >= 1 AND picked% <= 5 AND ABS(pick) >= .5 AND ignoretog% = 0 THEN + IF weapons(plane, picked%).ifon = 0 THEN weapons(plane, picked%).ifon = -1 ELSE weapons(plane, picked%).ifon = 0 + ignoretog% = -1 + END IF + IF picked% >= 6 AND picked% <= 9 AND ABS(pick) >= .5 AND ignoretog% = 0 THEN + IF mods(plane, picked% - 5).ifon = 0 THEN mods(plane, picked% - 5).ifon = -1 ELSE mods(plane, picked% - 5).ifon = 0 + ignoretog% = -1 + END IF + END IF +END SUB + +SUB hudbar (slot AS INTEGER, title$, display, limit, barcolor~&, suffix$, quartz&) 'The simple meter, used for PWR, GEN, etc. + 'slot: distance from the top (16 + 32 * slot) + 'title: three char title + 'display: amount of whatever you are measuring + 'limit: the upper limit of whatever you are measuring should be + 'barcolor: the color of the meter (dark color recomended) + 'suffix: the unit you are using (usually "%") + 'quartz: the font + IF display < limit THEN LINE (swidth - 167, 16 + 32 * slot + 1)-(swidth - 167 + display / limit * 100, 16 + 32 * slot + 14), barcolor~&, BF ELSE LINE (swidth - 167, 16 + 32 * slot + 1)-(swidth - 67, 16 + 32 * slot + 14), barcolor~&, BF + LINE (swidth - 168, 16 + 32 * slot)-(swidth - 66, 16 + 32 * slot + 15), _RGB(255, 255, 255), B + IF LEN(title$) > 3 THEN title$ = LEFT$(title$, 3) + _FONT quartz& + IF display >= limit + 1 THEN COLOR _RGB(255, 127, 0) + _PRINTSTRING (swidth - 200, 16 + 32 * slot), title$ + " " + LTRIM$(STR$(INT(display + .5))) + suffix$ + COLOR _RGB(255, 255, 255) + _FONT 16 +END SUB + +SUB rotator (originx AS INTEGER, originy AS INTEGER, angle, image&, minx%, miny%, maxx%, maxy%, size) 'Makes images that can rotate. + DIM rotx(3), roty(3) + dist = SQR(((size / 2) ^ 2) + ((size / 2) ^ 2)) + rotx(0) = originx + COS(angle + rad(45)) * dist - 1: rotx(1) = originx + COS(angle + rad(135)) * dist - 1: rotx(2) = originx + COS(angle + rad(225)) * dist: rotx(3) = originx + COS(angle + rad(315)) * dist + roty(0) = originy + SIN(angle + rad(45)) * dist: roty(1) = originy + SIN(angle + rad(135)) * dist - 1: roty(2) = originy + SIN(angle + rad(225)) * dist - 1: roty(3) = originy + SIN(angle + rad(315)) * dist + _MAPTRIANGLE (minx%, miny%)-(minx%, maxy%)-(maxx%, maxy%), image& TO(rotx(3), roty(3))-(rotx(2), roty(2))-(rotx(1), roty(1)) + _MAPTRIANGLE _SEAMLESS(minx%, miny%)-(maxx%, miny%)-(maxx%, maxy%), image& TO(rotx(3), roty(3))-(rotx(0), roty(0))-(rotx(1), roty(1)) +END SUB + +FUNCTION getfact$ + DIM facts$(7) + 'facts$(0) = "The airplane in this game is losely based on the Lockheed-Martin F-35 Lightning II and the General Dynamics F-16 Fighting Falcon, the major difference being the means of propultion." + 'facts$(1) = "The premise for 'Electric' was conceived when I discovered this tidbit of information about Lt. Surge from 'Pokemon: Fire Red': 'Lt. Surge is rumored to have been a pilot while home in America. He used the electricity generated by Pok�mon to power his plane.' Having said that, the generators in 'Electric' are just normal generators." + 'facts$(2) = "'Descent II' by Parallax had a significant influence on 'Electric', which is ironic because 'Electric' has nothing to do with space." + facts$(0) = "In most of the code, " + CHR$(34) + "laser" + CHR$(34) + " is misspelled " + CHR$(34) + "lazer." + CHR$(34) + facts$(1) = "Change 'Planes per Team' to 2 or more. Shoot your AI helper. Look in the top left corner of the screen. It only appears for 1/60 of a second." + facts$(2) = "'Electric v0.1:0001' was just a white triangle that pointed toward the mouse in the center of an 800x600 window." + facts$(3) = "There are only 4 fun facts, including this one." + 'facts$(6) = "Some of these facts won't make it into the final product due to issues with using the words 'pokemon' and 'Descent II'." + getfact$ = facts$(INT(RND * 4)) +END FUNCTION 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 diff --git a/bolt.wav b/sfx/bolt.wav similarity index 100% rename from bolt.wav rename to sfx/bolt.wav diff --git a/factory_destroyed.wav b/sfx/factory_destroyed.wav similarity index 100% rename from factory_destroyed.wav rename to sfx/factory_destroyed.wav diff --git a/gauss.wav b/sfx/gauss.wav similarity index 100% rename from gauss.wav rename to sfx/gauss.wav diff --git a/hit.wav b/sfx/hit.wav similarity index 100% rename from hit.wav rename to sfx/hit.wav diff --git a/laser.wav b/sfx/laser.wav similarity index 100% rename from laser.wav rename to sfx/laser.wav diff --git a/missile.wav b/sfx/missile.wav similarity index 100% rename from missile.wav rename to sfx/missile.wav diff --git a/missilehit.wav b/sfx/missilehit.wav similarity index 100% rename from missilehit.wav rename to sfx/missilehit.wav diff --git a/plane.wav b/sfx/plane.wav similarity index 100% rename from plane.wav rename to sfx/plane.wav diff --git a/plasma.wav b/sfx/plasma.wav similarity index 100% rename from plasma.wav rename to sfx/plasma.wav diff --git a/shoot.wav b/sfx/shoot.wav similarity index 100% rename from shoot.wav rename to sfx/shoot.wav diff --git a/electricicon.png b/ui/electricicon.png similarity index 100% rename from electricicon.png rename to ui/electricicon.png diff --git a/electricmods.png b/ui/electricmods.png similarity index 100% rename from electricmods.png rename to ui/electricmods.png diff --git a/electricstats.png b/ui/electricstats.png similarity index 100% rename from electricstats.png rename to ui/electricstats.png diff --git a/electricweapons.png b/ui/electricweapons.png similarity index 100% rename from electricweapons.png rename to ui/electricweapons.png diff --git a/missile.png b/ui/missile.png similarity index 100% rename from missile.png rename to ui/missile.png diff --git a/plane.png b/ui/plane.png similarity index 100% rename from plane.png rename to ui/plane.png diff --git a/player.png b/ui/player.png similarity index 100% rename from player.png rename to ui/player.png diff --git a/aimer_tooltip.png b/ui/tooltips/aimer_tooltip.png similarity index 100% rename from aimer_tooltip.png rename to ui/tooltips/aimer_tooltip.png diff --git a/energy_armor_tooltip.png b/ui/tooltips/energy_armor_tooltip.png similarity index 100% rename from energy_armor_tooltip.png rename to ui/tooltips/energy_armor_tooltip.png diff --git a/flare_tooltip.png b/ui/tooltips/flare_tooltip.png similarity index 100% rename from flare_tooltip.png rename to ui/tooltips/flare_tooltip.png diff --git a/srb_tooltip.png b/ui/tooltips/srb_tooltip.png similarity index 100% rename from srb_tooltip.png rename to ui/tooltips/srb_tooltip.png