@DATABASE TGE-Commands.guide @MASTER TGE-Commands.guide @$VER: 1.01 @AUTHOR "Jonathan A. Jones, Giark and PAC" @NODE "Main" "The Game Extension" @TOC "Contents" @{B} ________ ___ ________ / // /____ / ___ _ / ______ _ _ _ / ___// __ // ___/ _ _ _ ______ __________) \___/~\ \__/~/ / \_ /~~\ (__________ | /_____\ /__/__\ /______\ | | ¯~~~~~¯ ¯~~ ~~¯ ¯~~~~~~¯ | | ________ ________ ________ ________ | | / //_____ // _ // ___ _ / | | / _____//¯ _ // /~ _// ___/ | | \_ \~~/ \_ _/~ / \__/ / \ \_ /~~\ | ¦ /____\ /_____\ /_/___\ /______\ ¦ ¦ ¯~~~~¯ ¯~~~~~¯ ¯~¯~~~¯ ¯~~~~~~¯ ¦ :_______ ________ ________ ________ ________ ________ _____ ________ _____:__ / ___ _ // / // // ___ _ // // // _ // _ // / / ___// / ©_ _// ___// ___// _ _// ____// ~// /~__// _ _/ \_ /~~\ \_ /~ \ \___/~\ \_ /~~\ \_ /~ \ \___~~\ \___/ \_ / \ \_ /~ \ /______\ /_/____\ /_____\ /______\ /_/____\ /_____\ /__\ /_____\ /_/____\ ¯~~~~~~¯ ¯~¯~~~~¯ ¯~~~~~¯ ¯~~~~~~¯ ¯~¯~~~~¯ ¯~~~~~¯ ¯~~¯ ¯~~~~~¯ ¯~¯~~~~¯ ¦ ¦ |____________________________________________.[.the.game.extension.]._____| @{UB} @{" Click Here " LINK "Contents"} @ENDNODE @NODE "Contents" @NEXT "Introduction" @PREV "Main" @TOC "Contents" @{B}The Game Extension by Peter Cahill Finally a AMOSPro Extension which adds AGA and RTG !!! along with heaps of new and MUCH FASTER functions @{UB} @{U}Contents@{UU} @{" Introduction " LINK "Introduction"} - So Whats this all about eh ? @{" Disclaimer " LINK "Disclaimer"} - I didn't do it! @{" Requirements " LINK "Requirements"} - So then, what do I need to run this ? @{" Installation " LINK "Installation"} - How do I install it ? @{" How To Code Games " LINK "How to code games"} - Tips on coding games PROPERLY @{" How To use TGE " LINK "How to use TGE"} - Genral info on using TGE @{" Game Master System " LINK "GMS"} - The Games Master System @{" Mouse Commands " LINK "Mouse Commands"} - The Various mouse commands @{" Tracker Commands " LINK "Tracker Commands"} - The Pro Tracker support @{" Graphics Commands " LINK "Graphics Commands"} - AGA and all the other gfx stuff @{" Encryption Commands " LINK "Encryption Commands"} - Protect your data files !!! @{" Workbench Commands " LINK "Workbench Commands"} - System related commands @{" Other Commands " LINK "Other Commands"} - Other commands @{" Command List " LINK "Index"} - Complete instruction index @ENDNODE @NODE "Introduction" @NEXT "Disclaimer" @PREV "Contents" @TOC "Contents" @{U}Introduction@{UU} @{C}Hello and welcome to the most anticipated Amos extension in years!@{uC} The Game Extension (TGE) finally brings AmosPro users full AGA and RTG screen support, along with all the trimmings. AGA Bobs and Sprites are only part of the new set of commands. TGE emulates Amos' existing gfx command set and brings it bang up to date with AGA/RTG compatability, whilst making the commands much, much faster. @ENDNODE @NODE "Disclaimer" @NEXT "Requirements" @PREV "Introduction" @TOC "Contents" @{U}Disclaimer@{UU} By Using TGE, You accept and agree with the following lines. TGE is @{b}NOT@{ub} guaranteed to: Help you take over the world. Never Crash. Work. Do anything. Make your life worth living. Make you be able to program AMOS properly. Make you to be able to make decent games (or any games...) Make you intelligent. TGE is guaranteed to: TGE uses GMS, and so TGE inherits the GMS legal issues, therefore, if your program uses GMS, you MUST agree with the GMS lisence (see GMS Docs, or GMSlisence.txt in this archive). By agreeing with it you will have to purchase a lisence for your programs IF and ONLY IF your program isnt freeware. AMOS Uses TGE, therefore by using this you must also agree with the current AMOS legal issues, on the date of this TGE release and there after. I didn't think anyone would ever read the disclaimer, as most people dont, thanks :) @ENDNODE @NODE "Requirements" @NEXT "Installation" @PREV "Disclaimer" @TOC "Contents" @{U}Requirements@{UU} AMOS Pro 2.0+ ptreplay.library (Included) stc.library (Included) GMS 2.1 (Included) When TGE is installing, it will install new things to your system, or upgrade the above. So it is best to have a harddrive and if you dont, you should get one, they are dirt cheap these days. @ENDNODE @NODE "Installation" @NEXT "GMS" @PREV "Requirements" @TOC "Contents" @{U}Installation@{UU} To install just run 'Install_TGE' it sets up EVERYTHING!! or: For Manual Installation: To install copy AMOSPro_Game.lib to your AMOSPro_System:apsystem/ and then enter it in slot 14 in your interpreter config. and copy the TGE drawer to a place of your own. I recommend AMOSPro_System:TGE/ @ENDNODE @NODE "GMS" @NEXT "Mouse Commands" @PREV "Installation" @TOC "Contents" @{U}Game Master System@{UU} TGE uses GMS, and so you must pay all according gms lisences, and your program will require gms(if you use TGE gfx). The advantage of this is that you can upgrade your GMS from getting the latest gms_user.lha off aminet, and it will work with your TGE, and hence adding faster functions and bugfixes. Please read the attached GMSlisence file for info on the GMS lisence. @ENDNODE @NODE "Mouse Commands" @NEXT "A=G Left Click" @PREV "GMS" @TOC "Contents" @{U}Mouse Commands@{UU} @{" A=G Left Click " LINK "A=G Left Click"} @{" A=G Right Click " LINK "A=G Right Click"} @{" G Wait Lmb " LINK "G Wait Lmb"} @{" G Wait Rmb " LINK "G Wait Rmb"} @{" A=G X Mouse " LINK "A=G X Mouse"} @{" A=G Y Mouse " LINK "A=G Y Mouse"} @ENDNODE @NODE "A=G Left Click" @NEXT "A=G Right Click" @PREV "Mouse Commands" @TOC "Mouse Commands" @{b}G Left Click Synopsis:@{ub} A=G Left Click @{b}Notes:@{ub} Checks for lmb press. @{b}Example:@{ub} If G Left Click Then Bell @ENDNODE @NODE "A=G Right Click" @NEXT "G Wait Lmb" @PREV "A=GLeft Click" @TOC "Mouse Commands" @{b}G Right Click Synopsis:@{ub} A=G Right Click @{b}Notes:@{ub} Checks for rmb press. @{b}Example:@{ub} If G Right Click Then Bell @ENDNODE @NODE "G Wait Lmb" @NEXT "G Wait Rmb" @PREV "A=G Right Click" @TOC "Mouse Commands" @{b}G Wait Lmb Notes:@{ub} Waits for lmb press, all amal and stuff will still work. @ENDNODE @NODE "G Wait Rmb" @NEXT "Tracker Commands" @PREV "GWait Lmb" @TOC "Mouse Commands" @{b}G Wait Rmb Nopes:@{ub} Waits for rmb press, all amal and stuff will still work. @ENDNODE @NODE "Tracker Commands" @NEXT "G Ptload A$" @PREV "G Wait Rmb" @TOC "Contents" @{U}Tracker Commands@{UU} (requires ptreplay.library) @{" G Ptload A$ " LINK "G Ptload A$"} @{" G Ptplay " LINK "G Ptplay"} @{" G Ptstop " LINK "G Ptstop"} @{" G Ptfade A " LINK "G Ptfade A"} @{" G Ptpause " LINK "G Ptpause"} @{" G Ptunpause " LINK "G Ptunpause"} @{" G Ptvolume A " LINK "G Ptvolume A"} @{" G Ptchan On A " LINK "G Ptchan On A"} @{" G Ptchan Off A " LINK "G Ptchan Off A"} @{" G Ptset Pos A " LINK "G Ptset Pos A"} @{" A=G Ptlength " LINK "A=G Ptlength"} @ENDNODE @NODE "G Ptload A$" @NEXT "G Ptplay" @PREV "Tracker Commands" @TOC "Tracker Commands" @{b}G Ptload @{ub}A$ @{b}Synopsis:@{ub} G Ptload File$ @{b}Notes:@{ub} Loads a protracker module. @{b}Arguments@{ub} File$ -> The protracker module to load. @ENDNODE @NODE "G Ptplay" @NEXT "G Ptstop" @PREV "G Ptload A$" @TOC "Tracker Commands" @{b}G Ptplay@{ub} @{b}Notes:@{ub} Plays the mod that you've loaded, with @{"G PtLoad" LINK "G Ptload A$"}. @ENDNODE @NODE "G Ptstop" @NEXT "G Ptfade A" @PREV "G Ptplay" @TOC "Tracker Commands" @{b}G Ptstop Notes:@{ub} Stops the playing protracker module playing. @ENDNODE @NODE "G Ptfade A" @NEXT "G Ptpause" @PREV "G Ptstop" @TOC "Tracker Commands" @{b}G Ptfade@{ub} T @{b}Synopsis:@{ub} G Ptfade Time @{b}Notes:@{ub} Fades the protracker module's volume to 0 over the specified ammount of time. @{b}Arguments:@{ub} Time -> Amount of time in seconds. @ENDNODE @NODE "G Ptpause" @NEXT "G Ptunpause" @PREV "G Ptfade A" @TOC "Tracker Commands" @{b}G Ptpause Notes:@{ub} Pauses at current position in protracker module. @ENDNODE @NODE "G Ptunpause" @NEXT "G Ptvolume A" @PREV "G Ptpause" @TOC "Tracker Commands" @{b}G Ptunpause Notes:@{ub} Continues playing the protracker module from pause position, after using a @{"G Ptpause" LINK "G Ptpause"}. @ENDNODE @NODE "G Ptvolume A" @NEXT "G Ptchan On A" @PREV "G Ptunpause" @TOC "Tracker Commands" @{b}G Ptvolume@{ub} L @{b}Synopsis:@{ub} G Ptvolume Level @{b}Notes:@{ub} Sets volume of the current protracker module in memory. @{b}Arguments:@{ub} Level -> Sound volume/level from 0-63. @ENDNODE @NODE "G Ptchan On A" @NEXT "G Ptchan Off A" @PREV "G Ptvolume A" @TOC "Tracker Commands" @{b}G Ptchan On @{ub}N @{b}Synopsis:@{ub} G Ptchan On Numbers @{b}Notes:@{ub} Turns on the channels specified. @{b}Arguments:@{ub} Numbers -> Channel numbers in bitmap form. @{b}Example:@{ub} G Ptchan %0101 for chan 2 and 4 to be turned on. @{i}Warning: Dont turn a channel on if it's already on!@{ui} @ENDNODE @NODE "G Ptchan Off A" @NEXT "G Ptset Pos A" @PREV "G Ptchan On A" @TOC "Tracker Commands" @{b}G Ptchan Off @{ub}N @{b}Synopsis:@{ub} G Ptchan Off Numbers @{b}Notes:@{ub} Turns off the channels specified. @{b}Arguments:@{ub} Numbers -> Channel numbers in bitmap form. @{b}Example:@{ub} G Ptchan %0101 for chan 2 and 4 to be turned off. @{i}Warning: Dont turn a channel off if it's already off!@{ui} @ENDNODE @NODE "G Ptset Pos A" @NEXT "A=G Ptlength" @PREV "G Ptchan Off A" @TOC "Tracker Commands" G Ptset Pos A set the position of the player *** jono not done. Pac, position meaning the pattern to continue from? *** @ENDNODE @NODE "A=G Ptlength" @NEXT "Graphics Commands" @PREV "G Ptset Pos A" @TOC "Tracker Commands" @{b}G Ptlength Synopsis:@{ub} A=G Ptlength @{b}Notes:@{ub} Returns the length of the mod. @ENDNODE @NODE "Graphics Commands" @NEXT "G Screen Open A,B,C,D,E" @PREV "A=G Ptlength" @TOC "Contents" @{U}Graphics Commands@{UU} (needs GMS system installed) @{" G Screen Open N,X,Y,C,M " LINK "G Screen Open A,B,C,D,E"} @{" G Screen Close N " LINK "G Screen Close A"} @{" G Screen Hide N " LINK "G Screen Hide A"} @{" G Screen Show N " LINK "G Screen Show A"} @{" G Screen Offset N,X,Y " LINK "G Screen Offset A,X,Y"} @{" G Screen Copy A,B " LINK "G Screen Copy A,B"} @{" G Double Buffer " LINK "G Double Buffer"} @{" G Triple Buffer " LINK "G Triple Buffer"} @{" G Swap Buffers " LINK "G Swap Buffers"} @{" G Load Iff File$,N " LINK "G Load Iff A$,B"} @{" G Reset " LINK "G Reset"} @{" G Get Palette A,B " LINK "G Get Palette A,B"} @{" G Palette A,B,C,D,E,F,G,H,I " LINK "G Palette A,B,C,D,E,F,G,H,I"} @{" G Def Palette S,A,B,C,D,E,F,G,H " LINK "G Def Palette A,B,C,D,E,F,G,H,I"} @{" G Colour C,$RRGGBB " LINK "G Colour A,B"} @{" G Plot X,Y,C " LINK "G Plot A,B,C"} @{" C=G Point(X,Y) " LINK "A=G Pixel(B,C)"} @{" G Line A,B To C,D,E " LINK "G Line A,B To C,D,E"} @{" G Line A,B,C " LINK "G Line A,B,C"} @{" G Circle A,B,C " LINK "G Circle A,B,C"} @{" G Rectangle A,B,C,D " LINK "G Rectangle A,B,C,D"} @{" G Cls " LINK "G Cls"} @{" G Ink A " LINK "G Ink A"} @{" G Set Pen A,B " LINK "G Set Pen A,B"} @{" G Update " LINK "G Update"} @{" G Getbob A,B,C,D,E To F,G " LINK "G Getbob A,B,C,D,E To F,G"} @{" G Getscr " LINK "G Getscr"} @{" G Init Bobs A,B " LINK "G Init Bobs A,B"} @{" G Setup Bobs " LINK "G Setup Bobs"} @{" G Set Bob A " LINK "G Set Bob A"} @{" G Bob A,B,C,D " LINK "G Bob A,B,C,D"} @{" A=G Getmem " LINK "A=G Getmem"} @{" G Init Mbobs A " LINK "G Init Mbobs A"} @{" G Set Mbob A,B,C,D " LINK "G Set Mbob A,B,C,D"} @{" G Save Bitmap A$,B " LINK "G Save Bitmap A$,B"} @{" G Set Raster " LINK "G Set Raster"} @{u}Special Effects:@{uu} @{" G Blur P,X,Y To C,U " LINK "G Blur A,B,C To D,E"} @{" G Copyarea S,D,X,Y To C,U,S,T " LINK "G Copyarea A,B,C,D To E,F,G,H"} @{" (An explanation of the $RRGGBB colour definition) " LINK "RRGGBB"} @ENDNODE @NODE "G Screen Open A,B,C,D,E" @NEXT "G Screen Close A" @PREV "Graphics Commands" @TOC "Graphics Commands" @{B}G Screen Open@{ub} N,X,Y,C,M @{b}Synopsis:@{ub} G Screen Open Number,X,Y,Colours,Mode @{B}Notes:@{ub} Opens a screen in front of the amigas current display. Virtually identical to the normal AMOS command except it works in ECS,AGA and RTG. @{b}Arguments:@{ub} N -> Screen Number 0-7 X -> The size of the X axis(eg. 320 for lowres) Y -> The size of the Y axis(eg. 256 for lowres pal) C -> Amount of colours, more than 64 needs a AGA amiga more than 256 needs RTG. M -> Screen mode, one of: Lowres, Hires, SuperHires Ebh, EHam, Chunky8 and Chunky16. @{B}DO NOT USE THIS COMMAND IN DIRECT MODE! See Also:@{ub} @{"G Screen Close" LINK "G Screen Close A"} @ENDNODE @NODE "G Screen Close A" @NEXT "G Screen Offset A,X,Y" @PREV "G Screen Open A,B,C,D,E" @TOC "Graphics Commands" @{b}G Screen Close@{ub} N @{b}Synopsis:@{ub} G Screen Close Number @{b}Notes:@{ub} Closes the specified TGE screen. @{b}Arguments:@{ub} Number -> Screen Number to close, 0-7. @ENDNODE @NODE "G Screen Offset A,X,Y" @NEXT "G Double Buffer" @PREV "G Screen Close A" @TOC "Graphics Commands" @{b}G Screen Offset @{ub}N,X,Y @{b}Synopsis:@{ub} G Screen Offset Number,X,Y @{b}Notes:@{ub} Used to change the position of the first pixel displayed on the screen ie. when you have a screen that is larger than the display area, you can set where the first pixel displayed is using offsets. It is mostly used to move outside parts of a large screen into view. And can be used as a method fr scrolling in games. The X and Y offsets are HARDWARE, coordinates. @{b}Arguments:@{ub} Number -> Screen Number 0-7. X -> X Hardware coordinate, of where the first pixel to display. Y -> Y Hardware coordinate, of where the first pixel to display. @ENDNODE @NODE "G Screen Copy A,B" @NEXT "G Double Buffer" @PREV "G Screen Offset N,X,Y" @TOC "Graphics Commands" @{b}G Screen Copy@{ub} A,B @{b}Synopsis:@{ub} G Screen Copy SrcScreen,DstScreen @{b}Notes:@{ub} Copies the Source screen to the Detination screen. @{b}Arguments:@{ub} SrcScreen -> Screen to copy FROM. DstScreen -> Screen to copy TO. @ENDNODE @NODE "G Double Buffer" @NEXT "G Triple Buffer" @PREV "G Screen Offset N,X,Y" @TOC "Graphics Commands" @{b}G Double Buffer@{ub} @{b}Synopsis:@{ub} G Double Buffer @{b}Notes:@{ub} Used before G Screen Open, causes a double buffer to be set up. @ENDNODE @NODE "G Triple Buffer" @NEXT "G Swap Buffers" @PREV "G Double Buffer" @TOC "Graphics Commands" @{b}G Triple Buffer@{ub} @{b}Synopsis:@{ub} G Triple Buffer @{b}Notes:@{ub} Used before G Screen Open, causes a triple buffer to be set up. @ENDNODE @NODE "G Swap Buffers" @NEXT "G Agaplasma" @PREV "G Triple Buffer" @TOC "Graphics Commands" @{b}G Swap Buffers@{ub} @{b}Synopsis:@{ub} G Swap Buffers @{b}Notes:@{ub} Cycles between the buffers in a Double or Triple buffered screen. @ENDNODE @NODE "G Agaplasma" @NEXT "G Plot A,B,C" @PREV "G Screen Close A" @TOC "Graphics Commands" G Agaplasma NOT DONE @ENDNODE @NODE "G Plot A,B,C" @NEXT "G Load Iff A$,B" @PREV "G Agaplasma" @TOC "Graphics Commands" @{b}G Plot@{ub} X,Y,C @{b}Synopsis:@{ub} G Plot X-coord,Y-coord,Colour @{b}Notes:@{ub} Places a pixel, in the specified colour, at the specified point. If X and Y are bigger than the screen (like x=340) no error will report and no pixel will be drawn. @{b}Arguments:@{ub} X-coord -> X coordinate. Y-coord -> Y coordinate. Colour -> Colour Index Number. @ENDNODE @NODE "G Load Iff A$,B" @NEXT "G Reset" @PREV "G Plot A,B,C" @TOC "Graphics Commands" @{b}G Load Iff@{ub} A$,N @{b}Synopsis:@{ub} G Load Iff File$,Number @{b}Notes:@{ub} Loads an IFF picture file to the specified screen. Note that a screen is opened by the command, to accommodate the picture. @{b}Arguments:@{ub} File$ -> The path and name of the .iff file. Number -> Screen Number 0-7. @{b}Example:@{ub} G Load Iff "Ram:cat.iff",0 @ENDNODE @NODE "G Reset" @NEXT "G Screen Hide A" @PREV "G Load Iff A$,B" @TOC "Graphics Commands" @{b}G Reset Notes:@{ub} Closes all opened TGE screens. Use this just before Amos To Back : Break On, when exiting the program. @ENDNODE @NODE "G Screen Hide A" @NEXT "G Screen Show A" @PREV "G Reset" @TOC "Graphics Commands" @{b}G Screen Hide@{ub} N @{b}Synopsis:@{ub} G Screen Hide Number @{b}Notes:@{ub} Hides the specified TGE screen (As with the amos command). @{b}Arguments:@{ub} Number -> Screen Number 0-7. See Also:@{ub} @{"G Screen Show" LINK "G Screen Show A"} @ENDNODE @NODE "G Screen Show A" @NEXT "G Getbob A,B,C,D,E To F,G" @PREV "G Screen Hide A" @TOC "Graphics Commands" @{b}G Screen Show@{ub} N @{b}Synopsis:@{ub} G Screen Show Number @{b}Notes:@{ub} Shows the specified (previously hidden) TGE screen (As with the amos command). @{b}Arguments:@{ub} Number -> Screen Number 0-7. See Also:@{ub} @{"G Screen Hide" LINK "G Screen Hide A"} @ENDNODE @NODE "G Getbob A,B,C,D,E To F,G" @NEXT "G Cls" @PREV "G Screen Show A" @TOC "Graphics Commands" G Getbob A,B,C,D,E To F,G @ENDNODE @NODE "G Cls" @NEXT "G Update" @PREV "G Getbob A,B,C,D,E To F,G" @TOC "Graphics Commands" @{b}G Cls@{ub} @{b}Notes:@{ub} Clears the TGE screen with colour 0 @ENDNODE @NODE "G Update" @NEXT "G Line A,B To C,D,E" @PREV "G Cls" @TOC "Graphics Commands" @{b}G Update Notes:@{ub} Waits for a vbl, and also checks for an Amiga+M keypress (ie. allows the screen to multitask!). @ENDNODE @NODE "G Line A,B To C,D,E" @NEXT "G Palette A,B,C,D,E,F,G,H,I" @PREV "A=G Getmem" @TOC "Graphics Commands" @{b}G Line@{ub} X2,Y1 To X2,Y2,C @{b}Synopsis:@{ub} G Line X1-coord,Y1-coord To X2-coord,Y2-coord,Colour @{b}Notes:@{ub} Draws a line, in the chosen colour, from one point to another. @{b}Arguments:@{ub} X1-coord -> The X-Coordinate of the starting point of the line. Y1-coord -> The Y-Coordinate of the starting point of the line. X2-coord -> The X-Coordinate of the ending point of the line Y2-coord -> The Y-Coordinate of the ending point of the line Colour -> The colour number. @ENDNODE @NODE "G Circle A,B,C" @NEXT "G Rectangle A,B,C,D" @PREV "G Line A,B To C,D,E" @TOC "Graphics Commands" @{b}G Circle@{ub} X,Y,R @{b}Synopsis:@{ub} G Circle X-coord,Y-coord,Radius @{b}Notes:@{ub} Draws a circle with a centre at the specified coordinates, with the specified radius. @{b} Arguments:@{ub} X-coord -> The x coordinate used for the centre point of the circle. Y-coord -> The y coordinate used for the centre point of the circle. Radius -> The radius of the the circle. @ENDNODE @NODE "G Rectangle A,B,C,D" @NEXT "G Palette A,B,C,D,E,F,G,H,I" @PREV "G Circle A,B,C" @TOC "Graphics Commands" @{b}G Rectangle@{ub} X1,Y1,X2,Y2 @{b}Synopsis:@{ub} G Rectangle X1-Coord,Y1-Coord,X2-Coord,Y2-Coord, @{b}Notes:@{ub} Draws a rectangle with corners at the specified points. @{b} Arguments:@{ub} X1-Coord -> The x coordinate used for the top-left corner point. Y1-Coord -> The y coordinate used for the top-left corner point. X2-Coord -> The x coordinate used for the bottom-right corner point. Y2-Coord -> The y coordinate used for the bottom-right corner point. @ENDNODE @NODE "G Get Palette A,B" @NEXT "G Palette A,B,C,D,E,F,G,H,I" @PREV "G Circle A,B,C" @TOC "Graphics Commands" @{b}G Get Palette@{ub} A,B @{b}Synopsis:@{ub} G Get Palette SrcScreen,DstScreen @{b}Notes:@{ub} Changes the palette in DstScreen to the SrcScreen's Palette. @{b} Arguments:@{ub} SrcScreen -> The screen whoose palette is copied. DstScreen -> The screen that adopts the other's palette. @ENDNODE @NODE "G Palette A,B,C,D,E,F,G,H,I" @NEXT "G Def Palette A,B,C,D,E,F,G,H,I" @PREV "G Get Palette A,B" @TOC "Graphics Commands" @{b}G Palette@{ub} A,B,C,D,E,F,G,H,I @{b}Synopsis:@{ub} G Palette First,Colour1,Col2,Col3,Col4,Col5,Col6,Col7,Col8 @{b}Notes:@{ub} Sets the palette in the format of: @{b}Arguments:@{ub} First -> The first colour of the palette to change. Colour1 -> The $RRGGBB value that the `first' colour is set to. | | -> The $RRGGBB value given to the 2nd (col2), 3rd, 4th etc... | Col8 -> ...up to col8. ie. It changes the colours starting from First. @{b}Example:@{ub} G Palette 3,$000000,$FFFFFF,$000000,$000000,$000000,$000000, $000000,$000000 ...will start at colour 3 (0,1,2,`3'). Putting 3 as black, 4 as white, 5 as black etc... @ENDNODE @NODE "G Def Palette A,B,C,D,E,F,G,H,I" @NEXT "G Colour A,B" @PREV "G Palette A,B,C,D,E,F,G,H,I" @TOC "Graphics Commands" @{b}G Def Palette@{ub} A,B,C,D,E,F,G,H,I @{b}Notes:@{ub} As with @{"G Palette" LINK "G Palette A,B,C,D,E,F,G,H,I"}, but you use this one BEFORE you open a screen, this way all screens will have this palette when openend. @ENDNODE @NODE "G Ink A" @NEXT "G Colour A,B" @PREV "G Def Palette A,B,C,D,E,F,G,H,I" @TOC "Graphics Commands" @{b}G Ink @{ub}C @{b}Synopsis:@{ub} G Ink Colour @{b}Notes:@{ub} Changes the current ink colour for use with the @{"G Circle" LINK "G Circle A,B,C"} and @{"G Rectangle" LINK "G Rectangle A,B,C,D"} commands. @{b}Arguments:@{ub} Colour -> The number (not $RRGGBB value) of the colour to use. @ENDNODE @NODE "G Set Pen A,B" @NEXT "G Colour A,B" @PREV "G Ink A" @TOC "Graphics Commands" @{b}G Set Pen @{ub}T,R @{b}Synopsis:@{ub} G Set Pen Type,Radius @{b}Notes:@{ub} Sets the style and radius of the brush to be used in drawing circles and rectangles. @{b}Arguments:@{ub} Type -> values 0-2, 0-> Pixel 1-> Square 2-> Circle Radius -> The radius/width of the brush. @ENDNODE @NODE "G Colour A,B" @NEXT "RRGGBB" @PREV "G Def Palette A,B,C,D,E,F,G,H,I" @TOC "Graphics Commands" @{b}G Colour@{ub} N,$Colour @{b}Synopsis:@{ub} G Colour Number,$RRGGBB @{b}Notes:@{ub} Changes the specified colour to the RRGGBB values given. @{b}Arguments:@{ub} Number -> Number of the colour you wish to change. $RRGGBB -> Hex values of Red, Green and Blue to use. @ENDNODE @NODE "RRGGBB" @NEXT "A=G X Mouse" @PREV "G Colour A,B" @TOC "Graphics Commands" $RRGGBB is the same as the $RGB you will be used to, but now there is the ability to define 256 levels of red,green and blue, where as the old $RGB allowed only 16. Values for RGB in the old $RGB were given in hexidecimal ie. 0,1, 2,3,4,5,6,7,8,9,a,b,c,d,e,f (so `a' has the decimal value 10). It has a base of 16. Values in $RRGGBB work with hexidecimal, but two `digits' of hexidecimal are now used for each colour part (ie R,G or B). Because paint programs you've got most probably use decimal values for the amounts of R,G and B, I will now explain how two `digits' in hexidecimal make each of the 256 levels of R,G and B. To explain all this we can look at decimal values. Decimal works with base 10. So 31 is 3x10's + 1x1's. With hexidecimal working with base 16, our value $31 would be 3x16's + 1x1's, having a decimal value of (3x16)+(1x1)=47. Just as an imaginary number system `poomal' ;) could have base 42, so %31 would give 3x42's + 1x1's, equaling 127 ;) The best way to show how hexidecimal against decimal working is to think of the first value as the y coordinate and the second as the x coordinate in a table..so we're using $yx.. (The inner, non-bold, values are the decimal equivelants of the hex) @{b} x 0 1 2 3 . . . d e f 0@{ub} 0 1 2 3 . . . . . 15 @{b} 1@{ub} 16 17 18 .. carries on up to .. @{b} 2 3@{ub} <- $31=(3x16)+(1x1)=47 @{b} . y . . d e f@{ub} ... . . 256 To find the hexidecimal value you need, from the decimal value in your paint program, you would either look up the values from the table above (when completed) or divide 16 into your decimal value. This will give you the first hex `digit' plus the `remainder', which would be the second value. So 234/16=14 with remainder 10. 14=e, 10=a, so we get, $ea :) @ENDNODE @NODE "A=G X Mouse" @NEXT "A=G Y Mouse" @PREV "G Colour A,B" @TOC "Graphics Commands" @{b}G X Mouse Synopsis:@{ub} A=G X Mouse @{b}Notes:@{ub} Returns the X HARDWARE coordinate of the mouse pointer. @{b}Example:@{ub} Sprite 0,G X Mouse,G Y Mouse,1 This will display a sprite at the mouse's coordinates. It can be used to display a mouse pointer! @{i}*GMS REQUIRED*@{ui} @ENDNODE @NODE "A=G Y Mouse" @NEXT "G Set Mouse A,B" @PREV "A=G X Mouse" @TOC "Graphics Commands" @{b}G Y Mouse Synopsis:@{ub} A=G Y Mouse @{b}Notes:@{ub} Returns the Y HARDWARE coordinate of the mouse pointer. @{b}Example:@{ub} Sprite 0,G X Mouse,G Y Mouse,1 This will display a sprite at the mouse's coordinates. It can be used to display a mouse pointer! @{i}*GMS REQUIRED*@{ui} @ENDNODE @NODE "G Set Mouse A,B" @NEXT "A=G Pixel(B,C)" @PREV "A=G Y Mouse" @TOC "Graphics Commands" @{b}G Set Mouse@{ub} A,B @{b}Synopsis:@{ub} G Set Mouse A,B @{b}Notes:@{ub} @{b}Arguments@{ub} A -> B -> DONT USE @ENDNODE @NODE "A=G Pixel(B,C)" @NEXT "G Init Mbobs A" @PREV "G Set Mouse A,B" @TOC "Graphics Commands" @{b}G Point(@{ub}X,Y@{b})@{ub} @{b}Synopsis:@{ub} A=G point(X-coord,Y-coord) @{b}Notes:@{ub} Returns the number of the on-screen colour at the specified coordinates. @{b}Arguments:@{ub} X-coord -> The x coordinate of the point to check. Y-coord -> The y coordinate of the point to check @ENDNODE @NODE "G Save Bitmap A$,B" @NEXT "G Set Raster" @PREV "G Set Mbob A,B,C,D" @TOC "Graphics Commands" G Save Bitmap A$,B dont use @ENDNODE @NODE "G Set Raster" @NEXT "Encryption Commands" @PREV "G Save Bitmap A$,B" @TOC "Graphics Commands" G Set Raster NOT done yet. @ENDNODE @NODE "Encryption Commands" @NEXT "G Encyrpt A$,B" @PREV "G Set Raster" @TOC "Contents" @{U}Encryption Commands@{UU} (requires stc.library) @{" G Encyrpt A$,B " LINK "G Encyrpt A$,B"} @{" G Decyrpt " LINK "G Decyrpt"} @ENDNODE @NODE "G Encyrpt A$,B" @NEXT "G Decyrpt" @PREV "Encryption Commands" @TOC "Encryption Commands" G Encyrpt File$,Bank,Password$ @ENDNODE @NODE "G Decyrpt" @NEXT "Workbench Commands" @PREV "G Encyrpt A$,B" @TOC "Encryption Commands" G Decyrpt sourcebank to destbank @ENDNODE @NODE "Workbench Commands" @NEXT "G Reboot" @PREV "G Decyrpt" @TOC "Contents" @{U}Workbench Commands@{UU} @{" G Reboot " LINK "G Reboot"} @{" A=G Open Req " LINK "A=G Open Req"} @{" G Close Req " LINK "G Close Req"} @{" A=G Open Reqtools " LINK "A=G Open Reqtools"} @{" G Close Reqtools " LINK "G Close Reqtools"} @{" A=G Cli(B$) " LINK "A=G Cli(B$)"} @{" G Iconify A$,B$ " LINK "G Iconify A$,B$"} @{" G Iconify A$,B$,C " LINK "G Iconify A$,B$,C"} @{" A=G Icon Check " LINK "A=G Icon Check"} @ENDNODE @NODE "G Reboot" @NEXT "A=G Open Req" @PREV "Workbench Commands" @TOC "Workbench Commands" G Reboot Reboot the system @ENDNODE @NODE "A=G Open Req" @NEXT "G Close Req" @PREV "G Reboot" @TOC "Workbench Commands" A=G Open Req Removed @ENDNODE @NODE "G Close Req" @NEXT "A=G Open Reqtools" @PREV "A=G Open Req" @TOC "Workbench Commands" G Close Req Removed @ENDNODE @NODE "A=G Open Reqtools" @NEXT "G Close Reqtools" @PREV "G Close Req" @TOC "Workbench Commands" A=G Open Reqtools Removed @ENDNODE @NODE "G Close Reqtools" @NEXT "A=G Cli(B$)" @PREV "A=G Open Reqtools" @TOC "Workbench Commands" G Close Reqtools Removed @ENDNODE @NODE "A=G Cli(B$)" @NEXT "G Iconify A$,B$" @PREV "G Close Reqtools" @TOC "Workbench Commands" A=G Cli(B$) similar to exec but allows expressions in the structure @ENDNODE @NODE "G Iconify A$,B$" @NEXT "G Iconify A$,B$,C" @PREV "A=G Cli(B$)" @TOC "Workbench Commands" @{b}G Iconify T$,B$, G Iconify T$,B$,C Synopsis:@{ub} G Iconify T$,B$, G Iconify T$,B$,C @{b}Notes:@{ub} G Iconify T$,B$ puts a icon on WB, and waits for the user to Double-Click before returning. G Iconify T$,B$,C Puts a Icon on WB, and returns straight away, to check for the users doubleclick on the icon use @{"G Icon Check" LINK "A=G Icon Check"}. Inputs: T$ -> A Text String for the Icon.(this appears under the icon on wb) B$ -> The Icons File$ WITHOUT the .info. (eg. "Ram:disk" or "Work:Games") C -> Set this to 1 if you want a multitasking iconify. see above. @{b}See Also:@{ub} @{"G Icon Check" LINK "A=G Icon Check"}. @ENDNODE @NODE "G Iconify A$,B$,C" @NEXT "A=G Icon Check" @PREV "G Iconify A$,B$" @TOC "Workbench Commands" @{b}G Iconify T$,B$, G Iconify T$,B$,C Synopsis:@{ub} G Iconify T$,B$, G Iconify T$,B$,C @{b}Notes:@{ub} G Iconify T$,B$ puts a icon on WB, and waits for the user to Double-Click before returning. G Iconify T$,B$,C Puts a Icon on WB, and returns straight away, to check for the users doubleclick on the icon use @{"G Icon Check" LINK "A=G Icon Check"}. Inputs: T$ -> A Text String for the Icon.(this appears under the icon on wb) B$ -> The Icons File$ WITHOUT the .info. (eg. "Ram:disk" or "Work:Games") C -> Set this to 1 if you want a multitasking iconify. see above. @{b}See Also:@{ub} @{"G Icon Check" LINK "A=G Icon Check"}. @ENDNODE @NODE "A=G Icon Check" @NEXT "Other Commands" @PREV "G Iconify A$,B$,C" @TOC "Workbench Commands" @{b}G Icon Check Synopsis:@{ub} A=G Icon Check @{b}Notes:@{ub} This command checks to see if the icon which was put on wb by @{"G Iconify" LINK "G Iconify A$,B$,C"} has been double clicked on. If it has been double clicked on it automagically removes it, and returns True(-1). @ENDNODE @NODE "Other Commands" @NEXT "A=G Check Vbl" @PREV "A=G Icon Check" @TOC "Contents" @{U}Other Commands@{UU} @{" A=G Check Vbl " LINK "A=G Check Vbl"} @{" A=G Cd32(B) " LINK "A=G Cd32(B)"} @{" A=G File Size(B$) " LINK "A=G File Size(B$)"} @{" A$=G Word$(B$,C,D) " LINK "A$=G Word$(B$,C,D)"} @{" A=Gsin(B) " LINK "A=Gsin(B)"} @{" A=Gcos(B) " LINK "A=Gcos(B)"} @{" G Handicap " LINK "G Handicap"} @{" G Unhandicap " LINK "G Unhandicap"} @ENDNODE @NODE "A=G Check Vbl" @NEXT "A=G Cd32(B)" @PREV "Other Commands" @TOC "Other Commands" @{b}G Check Vbl Synopsis:@{ub} A=G Check Vbl @{b}Notes:@{ub} Check if it is time for a vbl (PPC). @ENDNODE @NODE "A=G Cd32(B)" @NEXT "A=G Oddno(B#)" @PREV "A=G Check Vbl" @TOC "Other Commands" A=G Cd32(B) B=port 0-3, returns lowlevel bitmap @ENDNODE @NODE "A=G Oddno(B#)" @NEXT "A=G File Size(B$)" @PREV "A=G Cd32(B)" @TOC "Other Commands" A=G Oddno(B#) @ENDNODE @NODE "A=G File Size(B$)" @NEXT "A$=G Word$(B$,C,D)" @PREV "A=G Oddno(B#)" @TOC "Other Commands" @{b}G File Size(@{ub}B$@{b}) Synopsis:@{ub} A=G FileSize(Files$) @{b}Notes:@{ub} Returns the length of the specified file. @{b} Arguments@{ub} File$ -> The file that the command will find the size of. @ENDNODE @NODE "A$=G Word$(B$,C,D)" @NEXT "A=Gsin(B)" @PREV "A=G File Size(B$)" @TOC "Other Commands" A$=G Word$(B$,C,D) Not DONE @ENDNODE @NODE "A=Gsin(B)" @NEXT "A=Gcos(B)" @PREV "A$=G Word$(B$,C,D)" @TOC "Other Commands" A=Gsin(B) returns sin of angle B multiplyed by 128 @ENDNODE @NODE "A=Gcos(B)" @NEXT "Index" @PREV "A=Gsin(B)" @TOC "Other Commands" @{b}Gcos(@{ub}B@{b}) Synopsis:@{ub} A=Gcos(Angle) @{b}Notes:@{ub} Returns the cosine of the angle multiplied by 128. @{b}Arguments@{ub} Angle -> The angle to use in degrees. @ENDNODE @NODE "G Handicap" @NEXT "G Unhandicap" @PREV "A=Gcos(B)" @TOC "Other Commands" @{b}G Handicap Synopsis:@{ub} G Handicap @{b}Notes:@{ub} Gives Amos a priority of 256! Shutting off many system funcions thus speeding up your code. @ENDNODE @NODE "G Unhandicap" @NEXT "Index" @PREV "G Handicap" @TOC "Other Commands" @{b}G Unhandicap Synopsis:@{ub} G Unhandicap @{b}Notes:@{ub} Removes the system restrictions brought abut by the G Handicap command. @ENDNODE @NODE "Index" @PREV "A=Gcos(B)" @TOC "Contents" @{U}Command List@{UU} @INDEX "Index" @{U}Mouse Commands@{UU} @{" A=G Left Click " LINK "A=G Left Click"} @{" A=G Right Click " LINK "A=G Right Click"} @{" G Wait Lmb " LINK "G Wait Lmb"} @{" G Wait Rmb " LINK "G Wait Rmb"} @{" X=G X Mouse " LINK "A=G X Mouse"} @{" X=G Y Mouse " LINK "A=G Y Mouse"} @{" G Set Mouse X,Y " LINK "G Set Mouse A,B"} @{U}Tracker Commands@{UU} @{" G Ptload File$ " LINK "G Ptload A$"} @{" G Ptplay " LINK "G Ptplay"} @{" G Ptstop " LINK "G Ptstop"} @{" G Ptfade S " LINK "G Ptfade A"} @{" G Ptpause " LINK "G Ptpause"} @{" G Ptunpause " LINK "G Ptunpause"} @{" G Ptvolume V " LINK "G Ptvolume A"} @{" G Ptchan On B " LINK "G Ptchan On A"} @{" G Ptchan Off B " LINK "G Ptchan Off A"} @{" G Ptset Pos P " LINK "G Ptset Pos A"} @{" L=G Ptlength " LINK "A=G Ptlength"} @{U}Graphics Commands@{UU} (needs GMS system installed) @{" G Screen Open N,X,Y,C,M " LINK "G Screen Open A,B,C,D,E"} @{" G Screen Close N " LINK "G Screen Close A"} @{" G Screen Hide N " LINK "G Screen Hide A"} @{" G Screen Show N " LINK "G Screen Show A"} @{" G Screen Offset N,X,Y " LINK "G Screen Offset A,X,Y"} @{" G Load Iff File$,N " LINK "G Load Iff A$,B"} @{" G Reset " LINK "G Reset"} @{" G Palette A,B,C,D,E,F,G,H,I " LINK "G Palette A,B,C,D,E,F,G,H,I"} @{" G Def Palette S,A,B,C,D,E,F,G,H " LINK "G Def Palette A,B,C,D,E,F,G,H,I"} @{" G Colour C,$RRGGBB " LINK "G Colour A,B"} @{" G Plot X,Y,C " LINK "G Plot A,B,C"} @{" C=G Point(X,Y) " LINK "A=G Pixel(B,C)"} @{" G Line A,B To C,D,E " LINK "G Line A,B To C,D,E"} @{" G Line A,B,C " LINK "G Line A,B,C"} @{" G Circle A,B,C " LINK "G Circle A,B,C"} @{" G Cls " LINK "G Cls"} @{" G Ink A " LINK "G Ink A"} @{" G Update " LINK "G Update"} @{u}Special Effects:@{uu} @{" G Blur P,X,Y To C,U " LINK "G Blur A,B,C To D,E"} @{" G Copyarea S,D,X,Y To C,U,S,T " LINK "G Copyarea A,B,C,D To E,F,G,H"} @{" (An explanation of the $RRGGBB colour definition) " LINK "RRGGBB"} @{U}Encryption Commands@{UU} @{" G Encyrpt File$,B,P$ " LINK "G Encyrpt A$,B"} @{" G Decyrpt B,P$ " LINK "G Decyrpt"} @{U}Workbench Commands@{UU} @{" G Reboot " LINK "G Reboot"} @{" Z=G Cli(Cli$) " LINK "A=G Cli(B$)"} @{" G Iconify I$,T$ " LINK "G Iconify A$,B$"} @{" G Iconify I$,T$,T " LINK "G Iconify A$,B$,C"} @{" A=G Icon Check " LINK "A=G Icon Check"} @{U}Other Commands@{UU} @{" Z=G Cd32(P) " LINK "A=G Cd32(B)"} @{" S=G File Size(File$)" LINK "A=G File Size(B$)"} @{" A$=G Word$(T$,N,D) " LINK "A$=G Word$(B$,C,D)"} @{" Z=Gsin(A) " LINK "A=Gsin(B)"} @{" Z=Gcos(A) " LINK "A=Gcos(B)"} @ENDNODE @NODE "How To code games" @PREV "Index" @TOC "Contents" @{U}How To Code Games - The Proper Way@{UU} @INDEX "Index" blah blah @ENDNODE @NODE "How to use TGE" @PREV "How to code games" @TOC "Contents" @{U}Usage:@{UU} @INDEX "Index" This Section explains how to use the TGE functions. @{U}Graphics:@{UU} TGE uses GMS for graphics, so before you try to use any graphics commands make sure you @{"Open a Screen" LINK "G Screen Open a,b,c,d,e"} at the top of your code, just before when you call and graphic related commands. To use TGE @{"Screens" LINK "G Screen Open a,b,c,d,e"} you @{b}MUST@{ub} do this at the End of your code... G Reset This is essintal, as it closes off all TGE screens, and resets TGE. The reason for this is that it makes things easier and garuntees amos not to collide with the TGE screens. Also, With the TGE screens - In Direct Mode if you do a @{"G Screen Open" LINK "G Screen Open a,b,c,d,e"} The Screen will open but it will open IN FRONT of direct mode, making it impossible to close the screen ;) This is unavoidable, so no mails asking for a fix please! @{U}Bobs:@{UU} After you have opened your screen you will probably want to use bobs as they are essintal in games. TGE bobs operate in a diffrent way than AMOS. This gains speed. Firstly, to LOAD a tge bob bank, use @{"G Load Bobs" LINK "G Load Bobs A$,B"} then, you can draw to your screen with the bobs you just loaded by these commands: @{"G Set Bob" LINK "G Set Bob a,b,c,d"} - Gets a bob ready to be drawn. @{"G Draw Bob" LINK "G Draw Bob"} - Draws the images that were setup with G Set Bob. Then to Save TGE bob bank, use @{"G Save Bobs" LINK "G Save Bobs A$,b"} . For a list of all TGE commands go to the @{"Contents" LINK "Contents"} @{U}Other Gfx:@{UU} TGE does all normal @{"Plot" LINK "G Plot A,B,C"} @{"Line" LINK "G Line A,B To C,D,e"} @{"Circle" LINK "G Circle A,B,C"} and the majority of all gfx commands that amos does. The TGE ones will be much faster though,espically on 030/040/060. @ENDNODE @NODE "G Blur A,B,C To D,E" @{B}G Blur P,X1,Y1 To X2,Y2 Synopsis:@{ub} G Blur Percent,X1,Y1 To X2,Y2 @{B}Notes:@{ub} This command Blur's a area of the current screen with the roughness of Percent. Its fairly fast, and easy to use. @{b}Arguments:@{ub} P -> Percentage (1-100) of how much you want it to smudge the area. The Speed is roughly the same for all 1-100. X1 -> These are the coordanates of the top left hand side of the Y1 ^ area its going to blur. X2 -> These are the coordanates of the bottom right corner of the Y2 ^ area you want it to blur. @{b}Example:@{ub} G Blur 50,10,10 To 100,100 @ENDNODE @NODE "G Copyarea A,B,C,D To E,F,G,H" @{B} G Copyarea S,D,X,Y To C,U,DX,DY Synopsis:@{ub} G Copyarea SrcScreen,DestScreen,X1,Y1 To X2,Y2,DestX,DestY @{B}Notes:@{ub} This command copys a rectangular area from one screen to another screen at any position. @{b}Arguments:@{ub} SrcScreen -> Screen Number from 0-7 on which screen it will copy FROM. DestScreen -> Screen Number from 0-7 on which screen it will copy TO. It is OK and faster to have the src and dest screen the same. X1 -> These are the coordanates of the top left hand side of the Y1 ^ area its going to copy. X2 -> These are the coordanates of the bottom right corner of the Y2 ^ area you want it to copy. DestX -> These are the coordinates of where it will copy the block TO DestY ^ On the destination screen. @{b}Example:@{ub} G Copyarea 0,1,10,10 to 100,100,150,150 @ENDNODE