; Tank Battle Game for the XGameStation Micro Edition
; by Jeff Tranter
; Copyright (c) 2006 Jeff Tranter
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;
; Tank Battle revision history:
;
; 3 Mar 2006 - version 1.0 - basic game is working
; XGS-ME TILE GRAPHICS ENGINE
; Version 1.3.1
; Alex Varanese
; 1.5.2005
; **** NOTES ******************************************************************
; ---- OVERVIEW ---------------------------------------------------------------
; This is a tile-based graphics system that makes it easy to create complex,
; graphically-detailed games on the XGameStation Micro Edition. Instead of
; directly generating the TV signal, client programs manipulate a framebuffer
; stored in SRAM.
;
; The framebuffer consists of 16x24 tiles. Each tile is 8x8 pixels and has its
; own foreground and background color. The system supports up to 64 unique
; tiles.
; ---- WRITING CLIENT PROGRAMS ------------------------------------------------
; Client programs can be written easily by filling in the empty Game_Init()
; and Game_Update() subroutines. Game_Init() is called once before the TV signal
; is generated, and Game_Update() is called once per frame.
;
; Game_Update() is given a timeslice of about 60,672 clocks, after which the TV
; signal will be corrupted. As long as the subroutine does not exceed this time
; limit, timing issues will be handled automatically and client programs need
; not worry about stalling for the remainder of the timeslice.
;
; The easiest way to draw graphics to the screen is with the following macros:
;
; M_SET_TILE x, y, tile_index, fg_color, bg_color
;
; Sets a tile at any place on the screen. This macro allows control over
; the tile's foreground and background colors as well. specifies
; the location of the tile to set. can range from 0-15, and can
; range from 0-23. Clipping is automatically performed to the screen
; boundaries.
;
; M_FILL_ROW y, tile_index, fg_color, bg_color
;
; Fills an entire horizontal row of tiles to the specified tile graphic
; and colors. specifies which screen row to fill (0-23).
;
; M_FILL_SCREEN tile_index, fg_color, bg_color
;
; Fills the entire screen with the specified tile graphic and colors.
; Most useful for laying down a full-screen background pattern or color
; at the start of the program.
;
; A better way is to create screen-sized maps in program memory which reference
; a TAT (tile attribute table) to save memory by using a limited palette of
; tiles:
;
; M_LOAD_MAP map, tat
;
; Loads the map located at label
               (
geocities.com/jefftranter@rogers.com)