You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

880 lines
45 KiB

// title: Chi-Tor
// author: Fabien Freling
// desc: Destroy enemies and achieve high scores (Major Jam 8)
// script: wren
import "random" for Random
var W = 240
var H = 136
var R = Random.new()
var TileSize = 8
var DbgBox = false
class Color {
static black { 0 }
static purple { 1 }
static red { 2 }
static orange { 3 }
static yellow { 4 }
static green_light { 5 }
static green { 6 }
static green_dark { 7 }
static white { 12 }
static grey_light { 13 }
static grey { 14 }
static grey_dark { 15 }
}
class D {
static up { 0 }
static down { 1 }
static left { 2 }
static right { 3 }
static toRot(dir) {
if (dir == D.up) {
return 0
}
if (dir == D.right) {
return 1
}
if (dir == D.down) {
return 2
}
if (dir == D.left) {
return 3
}
return -1
}
}
class Cheat {
static seq { [D.up, D.up, D.left, D.right, D.up, D.down] }
static enabled { __enabled }
static enabled=(b) { __enabled = b }
static doublePoints { __double_points }
static doublePoints=(b) { __double_points = b }
static noCollision { __no_collision }
static noCollision=(b) { __no_collision = b }
}
class Star {
construct new(x, y, size, scrollSpeed, color) {
_x = x
_y = y
_size = size
_scrollSpeed = scrollSpeed
_color = color
}
update() {
_x = _x - _scrollSpeed
}
draw() {
TIC.circ(_x, _y, _size, _color)
}
expired {
_x + _size < 0
}
}
class HintPlanet {
construct new(x, y, scrollSpeed, dir) {
_x = x
_y = y
_scrollSpeed = scrollSpeed
_rot = D.toRot(dir)
_size = 32
}
update() {
_x = _x - _scrollSpeed
}
draw() {
TIC.spr(64, _x - _size / 2, _y - _size / 2, 0, 1, 0, 0, _size / TileSize, _size / TileSize)
if (_rot != -1) {
TIC.spr(68, _x - 2, _y - 4, 0, 1, 0, _rot)
}
}
expired {
_x + _size / 2 < 0
}
}
class Bullet {
construct new(x, y) {
_x = x
_y = y
_w = 8
_h = 6
_speed = 5
}
x { _x }
y { _y }
w { _w }
h { _h }
update() {
_x = _x + _speed
}
draw() {
TIC.spr(288, _x, _y - 4, 0)
}
expired {
_x > W
}
}
class Enemy {
construct new(x, y) {
_x = x
_y = y
_w = 16
_h = 16
_speed = 1
_alive = true
}
x { _x }
y { _y }
w { _w }
h { _h }
expired { !_alive }
update() {
_x = _x - _speed
if (_x < -_w) {
_alive = false
}
}
draw() {
var tw = _w / TileSize
var th = _h / TileSize
TIC.spr(259, _x - _w / 2, _y - _h / 2, 0, 1, 0, 0, tw, th)
}
hit() {
_alive = false
var points = 1
if (Cheat.doublePoints) {
points = 2
}
Game.score = Game.score + points
}
}
class Player {
construct new(x, y) {
_x = x
_y = y
_w = 16
_h = 16
// box size
_bw = 12
_bh = 10
_speed = 2
_bullets = []
_alive = true
}
x { _x }
y { _y }
w { _w }
h { _h }
bw { _bw }
bh { _bh }
bullets { _bullets }
alive { _alive }
update() {
if (TIC.btn(0)) {
_y = _y - _speed
}
if (TIC.btn(1)) {
_y = _y + _speed
}
if (TIC.btn(2)) {
_x = _x - _speed
}
if (TIC.btn(3)) {
_x = _x + _speed
}
_x = _x.clamp(_w / 2, W - _w / 2)
_y = _y.clamp(_h / 2, H - _h / 2)
if (TIC.btnp(4, 5, 10)) {
shoot()
}
for (b in _bullets) {
b.update()
}
while (_bullets.count > 0 && _bullets[0].expired) {
_bullets.removeAt(0)
}
}
draw() {
if (_alive) {
TIC.spr(256, _x - _w / 2, _y - _h / 2, 0, 1, 0, 0, 2, 2)
}
for (b in _bullets) {
b.draw()
}
if (DbgBox) {
TIC.rectb(_x - _w / 2, _y - _h / 2, _w, _h, 5)
TIC.rectb(_x - _bw / 2, _y - _bh / 2, _bw, _bh, Color.red)
}
}
shoot() {
TIC.sfx(1)
_bullets.add(Bullet.new(_x + _w / 2, _y))
}
die() {
_alive = false
Game.state = Game.gameover
}
}
class Explosion {
construct new(x, y) {
_x = x
_y = y
_countdown = 10
_t = 0
TIC.sfx(0)
}
expired { _t > _countdown }
update() {
_t = _t + 1
}
draw() {
if (_t <= 2) {
TIC.circ(_x, _y, 10, Color.white)
} else if (_t <= 4) {
TIC.circ(_x, _y, 10, Color.red)
} else if (_t <= 6) {
TIC.circ(_x - 4, _y - 4, 4, Color.white)
TIC.circ(_x - 4, _y + 4, 4, Color.white)
TIC.circ(_x + 4, _y + 4, 4, Color.white)
TIC.circ(_x + 4, _y - 4, 4, Color.white)
} else if (_t <= 8) {
TIC.circ(_x - 4, _y - 4, 4, Color.red)
TIC.circ(_x - 4, _y + 4, 4, Color.red)
TIC.circ(_x + 4, _y + 4, 4, Color.red)
TIC.circ(_x + 4, _y - 4, 4, Color.red)
}
}
}
class World {
endReached { _world_x >= 210 }
construct new() {
_t = 0
_stars = []
_enemies = []
_vfx = []
_player = Player.new(W / 2, H / 2)
_world_x = 0
_world_y = 0
_w_offset_x = 0
_world_scroll_speed = 60 / 5
_hint_planet_i = 0
TIC.sync(0,0,false)
// init background
for (i in 0..W) {
update()
}
_remap = Fn.new {|tile, x, y|
if (tile == 33) {
this.spawn(tile, x, y)
return 0
}
return tile
}
}
collect(list) {
var i = 0
while (i < list.count) {
if (list[i].expired) {
list.removeAt(i)
} else {
i = i + 1
}
}
}
spawn(tile, x, y) {
var localX = (x - _world_x) * TileSize + TileSize / 2
var localY = y * TileSize + TileSize / 2
//System.print("enemy at (%(x), %(y)) -> (%(localX), %(localY))")
_enemies.add(Enemy.new(localX, localY))
TIC.mset(x, y, 0)
}
update() {
if (Game.state == Game.pause) {
return
}
if (_player.alive) {
if (Game.state == Game.game) {
_player.update()
}
for (s in _stars) {
s.update()
}
}
for (e in _enemies) {
e.update()
}
for (v in _vfx) {
v.update()
}
// Generation
//
// small stars
if (_t % 30 == 0) {
_stars.add(Star.new(W, R.int(0,H), 1, 1, Color.grey))
}
// medium stars
var width = 10
var spaceBetween = width * 10
var speed = 0.5
var mediumTick = (spaceBetween + width) / speed
if (_t % mediumTick == 0) {
var dir = -1
if (_hint_planet_i < Cheat.seq.count) {
dir = Cheat.seq[_hint_planet_i]
}
_stars.add(HintPlanet.new(W+16, R.int(16,H-32), speed, dir))
_hint_planet_i = _hint_planet_i + 1
}
// Map scrolling
if (Game.state == Game.game) {
if (!endReached) {
if (_t % _world_scroll_speed == 0) {
_world_x = _world_x + 1
}
_w_offset_x = -(_t % _world_scroll_speed) / (_world_scroll_speed / 8)
}
}
if (_player.alive) {
_t = _t + 1
}
// Collect
while (_stars.count > 0 && _stars[0].expired) {
_stars.removeAt(0)
}
collect(_enemies)
collect(_vfx)
// Collisions
var i = 0
while (i < _player.bullets.count) {
var b = _player.bullets[i]
var touched = false
for (e in _enemies) {
if (collide(b.x, b.y, b.w, b.h, e.x, e.y, e.w, e.h)) {
_player.bullets.removeAt(i)
e.hit()
_vfx.add(Explosion.new(e.x, e.y))
touched = true
break
}
}
if (!touched) {
i = i + 1
}
}
if (_player.alive && !Cheat.noCollision) {
var bx = _player.x - _player.bw / 2
var by = _player.y - _player.bh / 2
if (!(fgCheck(bx, by) &&
fgCheck(bx, by + _player.bh) &&
fgCheck(bx + _player.bw, by + _player.bh) &&
fgCheck(bx + _player.bw, by))) {
_player.die()
_vfx.add(Explosion.new(_player.x, _player.y))
}
for (e in _enemies) {
if (collide(bx, by, _player.bw, _player.bh, e.x, e.y, e.w, e.h)) {
_player.die()
_vfx.add(Explosion.new(_player.x, _player.y))
}
}
}
}
collide(x1, y1, w1, h1, x2, y2, w2, h2) {
// [x1] [x2]
if (x1 + w1 < x2) {
return false
}
// [x2] [x1]
if (x1 > x2 + w2) {
return false
}
// [y1]
// [y2]
if (y1 + h2 < y2) {
return false
}
// [y2]
// [y1]
if (y1 > y2 + h2) {
return false
}
return true
}
fgCheck(x, y) {
var mapX = ((x - _w_offset_x) / TileSize) + _world_x
var mapY = (y / TileSize) + _world_y
var tile = TIC.mget(mapX, mapY)
if (tile == 0) {
return true
}
//System.print("collision at %(x), %(y)!")
return false
}
draw() {
for (s in _stars) {
s.draw()
}
TIC.map(_world_x, _world_y, 30 + 1, 17 + 1, _w_offset_x, 0, 0, 1, _remap)
for (v in _vfx) {
v.draw()
}
for (e in _enemies) {
e.draw()
}
_player.draw()
if (endReached) {
var w = 80
var h = H/2-10
if (Game.score >= Game.goal) {
TIC.print("YOU WIN", w+1, h+1, Color.black, true, 2)
TIC.print("YOU WIN", w, h, Color.white, true, 2)
} else {
TIC.print("YOU LOSE", w+1, h+1, Color.black, true, 2)
TIC.print("YOU LOSE", w, h, Color.white, true, 2)
var p = Game.goal - Game.score
TIC.print("You need %(p) more points to win", w+1, h + 21, Color.black, false, 1, true)
TIC.print("You need %(p) more points to win", w, h + 20, Color.white, false, 1, true)
}
}
}
}
class Game is TIC{
static state { __state }
static state=(s) { __state = s }
static title { "title" }
static game { "game" }
static pause { "pause" }
static gameover { "gameover" }
static score { __score }
static score=(s) { __score = s }
static goal { __goal }
construct new() {
_t=0
_x=96
_y=24
__state = Game.title
_world = World.new()
_p_buttons = []
_p_index = 0
_c_index = 0
__score = 0
__goal = 30
_t_delay = 0
}
TIC() {
update()
draw()
_t=_t+1
}
OVR() {
if (Game.state == Game.game ||
Game.state == Game.gameover) {
TIC.print("SCORE: %(__score)", 1, 1, Color.black, true)
TIC.print("SCORE: %(__score)", 0, 0, Color.white, true)
TIC.print("GOAL: %(__goal)", 121, 1, Color.black, true)
TIC.print("GOAL: %(__goal)", 120, 0, Color.white, true)
}
if (Game.state == Game.gameover) {
if (_t_delay > 10) {
var h = 40
TIC.rect(0, (H - h) / 2, W, h, Color.red)
TIC.print("GAME OVER", 70, H/2-10, Color.white, true, 2)
TIC.print("press Z to restart", 90, H/2+8, Color.white, false, 1, true)
}
}
}
update() {
if (Game.state == Game.title) {
if (TIC.btnp(4)) {
newGame()
}
} else if (Game.state == Game.game) {
if (TIC.btnp(5)) {
__state = Game.pause
_p_buttons = List.filled(10, -1)
_p_index = 0
}
} else if (Game.state == Game.gameover) {
if (_t_delay > 10) {
if (TIC.btnp(4)) {
_world = World.new()
newGame()
}
}
_t_delay = _t_delay + 1
} else if (Game.state == Game.pause) {
if (TIC.btnp(5)) {
__state = Game.game
}
if (!Cheat.enabled) {
for (k in 0..3) {
if (TIC.btnp(k)) {
_p_buttons[_p_index % _p_buttons.count] = k
_p_index = _p_index + 1
}
}
if (cheatFound()) {
Cheat.enabled = true
}
} else {
if (TIC.btnp(D.up)) {
_c_index = (_c_index-1).clamp(0, 1)
}
if (TIC.btnp(D.down)) {
_c_index = (_c_index+1).clamp(0, 1)
}
if (TIC.btnp(4)) {
if (_c_index == 0) {
Cheat.doublePoints = !Cheat.doublePoints
}
if (_c_index == 1) {
Cheat.noCollision = !Cheat.noCollision
}
}
}
}
_world.update()
}
newGame() {
__state = Game.game
__score = 0
_t_delay = 0
}
cheatFound() {
var end = _p_index
var start = (end - Cheat.seq.count)
if (start < 0) {
return false
}
for (i in 0...Cheat.seq.count) {
var dir = _p_buttons[(start + i) % _p_buttons.count]
var cheat = Cheat.seq[i]
if (dir != cheat) {
return false
}
}
return true
}
draw() {
TIC.cls(Color.black)
if (Game.state == Game.title) {
_world.draw()
TIC.print("Chi-Tor", 69, H/4, Color.white, false, 3)
TIC.print("Chi-Tor", 70, H/4-1, Color.red, false, 3)
TIC.print("Z", 60, 110, Color.red)
TIC.print(": shoot", 68, 110, Color.white)
TIC.print("X", 130, 110, Color.red)
TIC.print(": pause", 138, 110, Color.white)
} else if (Game.state == Game.game) {
_world.draw()
} else if (Game.state == Game.gameover) {
_world.draw()
} else if (Game.state == Game.pause) {
TIC.print("PAUSE", 90, H/4, Color.white, false, 2)
if (!Cheat.enabled) {
TIC.print("debug mode: disabled", 60, H - 10, Color.white)
var end = _p_index
var start = (end - 10).max(0)
for (i in start...end) {
var pos = i - start
var dir = _p_buttons[i % _p_buttons.count]
var rot = D.toRot(dir)
var sprId = 84
TIC.spr(sprId, 5 + pos * 10, H - 20, 0, 1, 0, rot)
}
} else {
var h = H/4 + 30
TIC.spr(116, 50, (h + _c_index * 16) - 1, 0)
TIC.print("double points:", 60, h, Color.white)
if (Cheat.doublePoints) {
TIC.print("ON", 140, h, Color.green)
} else {
TIC.print("OFF", 140, h, Color.red)
}
h = h + 16
TIC.print("no collision:", 60, h, Color.white)
if (Cheat.noCollision) {
TIC.print("ON", 140, h, Color.green)
} else {
TIC.print("OFF", 140, h, Color.red)
}
TIC.print("debug mode: enabled", 60, H - 10, Color.white)
}
}
}
}
// <TILES>
// 001:eccccccccc888888caaaaaaaca888888cacccccccacc0ccccacc0ccccacc0ccc
// 002:ccccceee8888cceeaaaa0cee888a0ceeccca0ccc0cca0c0c0cca0c0c0cca0c0c
// 003:eccccccccc888888caaaaaaaca888888cacccccccacccccccacc0ccccacc0ccc
// 004:ccccceee8888cceeaaaa0cee888a0ceeccca0cccccca0c0c0cca0c0c0cca0c0c
// 005:2222222223312331231123112111211122222222233123312311231121112111
// 006:0444444041111114411113344113333441133334413333344133333404444440
// 017:cacccccccaaaaaaacaaacaaacaaaaccccaaaaaaac8888888cc000cccecccccec
// 018:ccca00ccaaaa0ccecaaa0ceeaaaa0ceeaaaa0cee8888ccee000cceeecccceeee
// 019:cacccccccaaaaaaacaaacaaacaaaaccccaaaaaaac8888888cc000cccecccccec
// 020:ccca00ccaaaa0ccecaaa0ceeaaaa0ceeaaaa0cee8888ccee000cceeecccceeee
// 033:0000000000000000005555000050050000555500005005000000000000000000
// 034:0000000000000000000000000003300000033000000000000000000000000000
// 064:0000000000000000000000000000000200000022000002220000222200022221
// 065:0000000000002222022222222222222222222222212222221112222211112222
// 066:0000000022220000222222202222222222222222222222222222222222222222
// 067:0000000000000000000000002000000022000000222000002222000022222000
// 068:0000000000011000001111000111111011111111000110000001100000011000
// 080:0002222200022222002222220022222200222222022222220222222202222222
// 081:1112222221222222222222222222222222222222222222222222222222222222
// 082:2222222222222222222222222222222222222222222222222222222222222222
// 083:2222200022222000222222002222220022222200222222202222222022222220
// 084:0000000000022000002222000222222022222222000220000002200000022000
// 096:0222222202222222022222220022222200222222002222220002222200022222
// 097:2222222222222222222222222222222222222222222222222222222222222222
// 098:2222222222222222222222222222222222222222222222222222222222222222
// 099:2222222022222220222222202222220022222200222222002222200022222000
// 100:0000000000066000006666000666666066666666000660000006600000066000
// 112:0002222200002222000002220000002200000002000000000000000000000000
// 113:2222222222222222222222222222222222222222022222220000222200000000
// 114:2222222222222222222222222222222222222222222222202222000000000000
// 115:2222200022220000222000002200000020000000000000000000000000000000
// 116:00c0000000cc000000ccc00000cccc0000ccc00000cc000000c0000000000000
// </TILES>
// <SPRITES>
// 000:00000000000000000ccc000000eccccc00eeeeee4ddddddd4cccccdd433333cc
// 001:00000000000000000000000000000000ee990000ddaa9900ddaaaa90ccaaaaa9
// 002:2000000202333320032222300320023003200230032222300233332020000002
// 003:000000ff0000ffee000feeee00feeedd0feeedcc0feedc33feedc332feedc332
// 004:ff000000eeff0000eeeef000ddeeef00ccdeeef033cdeef0333cdeef223cdeef
// 016:43eeeeee4eeddddd4ccceeee0000eeee00000000000000000000000000000000
// 017:eeccccccdddddd00eeee00000000000000000000000000000000000000000000
// 019:feedc322feedc3330feedc330feeedcc00feeedd000feeee0000ffee000000ff
// 020:233cdeef233cdeef33cdeef0ccdeeef0ddeeef00eeeef000eeff0000ff000000
// 032:0000000099aab000899aabbc08899aab08899aab899aabbc99aab00000000000
// </SPRITES>
// <MAP>
// 000:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000606060606060606060606060606060606060606060606060606060606060000000000000000000000000000000000000000000000000000000000000606060606060606060606060600000000000000000000000000000000000606060606060606060606060600000000000000000000000000000000000606060606060606060606060606060606060606060606060606060606060
// 001:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060606060606060606060600000000000000000000000000000000000000000000000000000000000000000000060606060606060606060600000000000000000000000000000000000000000000000006060606060600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060
// 002:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000606060606060606060000000000000000000000000000000000000000000000000000000000000000000000000006060606060606060600000000000000000000000000000000000000000000000006060606060600000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000060
// 003:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000006060606060606000000000000000000000000000000000000000000000000000000000000000000000000000000000606060606060600000000000000000000000000000000000000000000000006060606060600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060
// 004:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000606060600000000000000000000000000000000000000000000000120000000000000000000000000000000000000060606060600000000000000000000000000000000000120000000000000060606060600000000000000060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 005:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006060600000000000000000000000000000000000000000000000000000606060600000000000000060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 006:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000006060600000000000006060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 007:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060606060600000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000006060600000000000006060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 008:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000120000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000001200000000000060606060600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060600000000000006060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 009:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000001200000000000060600000000000606060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 010:000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000006060600000000000000000000000000000000000000000000000000000000060600000000000606060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 011:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060606060600000000000000000000000000000000000000000000000000000000060600000000000606060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 012:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000000000000000606060606060600000000000000000000012000000000000000000000000000000000060600000000000606060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 013:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060606000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000006060606060606060600000000000000000000000000000000000000000000000000000000000000000000000606060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 014:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006060000000000000000060600000000000000000000000606060606000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060606060606060606060600000000000000000000000000000000000000000000000000000000012000000000000606060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 015:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000606060600000000000006060606000000000000000006060606060606000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000606060606060606060606060600000000000000000000000000000000000000000000000000000000000000000000000606060600000000000000000000000000000000000000000000000000000000000000000000000000060
// 016:000000000000000000000000000000000000000000000000000000000000606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060606060
// </MAP>
// <WAVES>
// 000:00000000ffffffff00000000ffffffff
// 001:0123456789abcdeffedcba9876543210
// 002:0123456789abcdef0123456789abcdef
// 003:ffffffff00000000ffffffff00000000
// </WAVES>
// <SFX>
// 000:05000500150015002500250035003500450045005500550065006500750075008500850095009500a500a500b500b500c500c500d500d500e500f500304000000000
// 001:0330037003a003cf03ff03ff03fe03fe03fd03fd03fc03fc03fb03faf3f9f3f9f3f8f3f8f3f8f3f8f3f8f3f8f3f8f3f8f3f8f3f8f3f8f3f8f3f8f3f8cbb000000000
// </SFX>
// <SCREEN>
// 013:000000000000000000000000000000002222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 014:000000000000000000000000000002222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 015:000000000000000000000000000222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 016:00000000000000000000000000222222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e
// 017:000000000000000000000000022221222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 018:000000000000000000000000222211122222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 019:000000000000000000000002222111112222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 020:000000000000000000000002222211122222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 021:000000000000000000000002222221222222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 022:000000000000000000000022222222222222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 023:000000000000000000000022222222222222222222222222220000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 024:00000000000000000000002222222222222222222222222222000000000000000000000000000000000000000eee0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 025:000000000000000000000222222222222222222222222222222000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 026:000000000000000000000222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 027:000000000000000000000222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 028:000000000000000000000222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 029:000000000000000000000222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 030:000000000000000000000222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 031:000000000000000000000022222222222222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 032:000000000000000000000022222222222222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 033:000000000000000000000022222222222222222222222222220000000000000000000000022222222200000022222200000000000022222200000000000000022222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 034:000000000000000000000002222222222222222222222222200000000000000000000000c22222222200000c22222200000000000c22222200000000000000c22222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 035:000000000000000000000002222222222222222222222222200000000000000000000000c22222222200000c22222200000000000c22222200000000000000c22222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 036:0000000000000000000000022222222222222222222222222000000000000000000000222222ccccc022200c22222222222200000cccccc000000000000000cccc222222cc000000022222222200000022222222222200000000000000000000000000000000000000000000000000000000000000000000
// 037:000000000000000000000000222222222222222222222222000000000000000000000c22222200000c22200c22222222222200000000000000000000e00000000c22222200000000c22222222200000c22222222222200000000000000000000000000000000000000000000000000000000000000000000
// 038:000000000000000000000000022222222222222222222220000000000000000000000c22222200000c22200c2222222222220000000000000000000eee0000000c22222200000000c22222222200000c22222222222200000000000000000000000000000000000000000000000000000000000000000000
// 039:000000000000000000000000002222222222222222222200000000000000000000000c22222200000ccc000c222222ccccc022200022222200022222222200000c222222000000222222ccccc022200c222222ccccc022200000000000000000000000000000000000000000000000000000000000000000
// 040:000000000000000000000000000222222222222222222000000000000000000000000c22222200000000000c22222200000c22200c22222200c22222222200000c22222200000c22222200000c22200c22222200000c22200000000000000000000000000000000000000000000000000000000000000000
// 041:000000000000000000000000000002222222222222200000000000000000000000000c22222200000000000c22222200000c22200c22222200c22222222200000c22222200000c22222200000c22200c22222200000c22200000000000000000000000000000000000000000000000000000000000000000
// 042:000000000000000000000000000000002222222200000000000000000000000000000c22222200000022200c22222200000c22200c22222200ccccccccc000000c22222200000c22222200000c22200c22222200000ccc000000000000000000000000000000000000000000000000000000000000000000
// 043:000000000000000000000000000000000000000000000000000000000000000000000c22222200000c22200c22222200000c22200c22222200000000000000000c22222200000c22222200000c22200c22222200000000000000000000000000000000000000000000000000000000000000000000000000
// 044:000000000000000000000000000000000000000000000000000000000000000000000c22222200000c22200c22222200000c22200c22222200000000000000000c22222200000c22222200000c22200c22222200000000000000000000000000000000000000000000000000000000000000000000000000
// 045:000000000000000000000000000000000000000000000000000000000000000000000cccc222222222cc000c22222200000c22200c22222200000000000000000c22222200000cccc222222222cc000c22222200000000000000000000000000000000000000000000000000000000000000000000000000
// 046:000000000000000000000000000000000000000000000000000000000000000000000000c22222222200000c22222200000c22200c22222200000000000000000c22222200000000c22222222200000c22222200000000000000000000000000000000000000000000000000000000000000000000000000
// 047:000000000000000000000000000000000000000000000000000000000000000000000000c22222222200000c22222200000c22200c22222200000000000000000c22222200000000c22222222200000c22222200000000000000000000000000000000000000000000000000000000000000000000000000
// 048:000000000000000000000000000000000000000000000000000000000000e00000000000ccccccccc000000cccccc000000ccc000cccccc000000000000000000cccccc000000000ccccccccc000000cccccc000000000000000000000000000000000000000000000000000000000000000000000000000
// 049:00000000000000000000000000000000000000000000000000000000000eee0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 050:000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 062:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 063:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eccccc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 064:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eeeeeeee9900000000000000000022222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 065:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004dddddddddaa99000000000000022222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 066:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004cccccddddaaaa900000000002222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 067:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000433333ccccaaaaa90000000022222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 068:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043eeeeeeeecccccc0000000222212222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 069:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004eeddddddddddd000000002222111222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 070:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004ccceeeeeeee00000000022221111122222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 071:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eeee000000000000022222111222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 072:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022222212222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 073:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000
// 074:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000
// 075:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000
// 076:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000
// 077:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000
// 078:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000
// 079:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002222222222222222222222222222220000000000000000000000000000000000000000000000000e00000000000000000000000000000
// 080:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222222222222222222222222222222000000000000000000000000000000000000000000000000eee0000000000000000000000000000
// 081:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002222222222222222222222222222220000000000000000000000000000000000000000000000000e00000000000000000000000000000
// 082:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000
// 083:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000
// 084:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000
// 085:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 086:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 087:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 088:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002222222222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 089:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222222222222222222222200000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 090:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 091:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002222222222222222220000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 092:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 093:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 094:000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 095:00000000000000000000000000000eee0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 096:000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 110:00000000000000000000000000000000000000000000000000000000000022222000cc00000000000cc00000000000000000cc000000000000000000000000000022002000cc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 111:00000000000000000000000000000000000000000000000000000000000000220000cc000000cccc0cccc000ccc000ccc00ccccc0000000000000000000000000022002000cc00000cccc000cccc0cc00c00cccc00ccc0000000000000000000000000000000000000000000000000000000000000000000
// 112:000000000000000000000000000000000000000000000000000000000000022000000000000ccc000cc00c0cc00c0cc00c00cc0000000000000000000000000000022200000000000cc00c0c00cc0cc00c0ccc000cc0cc000000000000000000000000000000000000000000000000000000000000000000
// 113:00000000000000000000000000000000000000000000000000000000000022000000cc0000000ccc0cc00c0cc00c0cc00c00cc000000000000000000000000000022002000cc00000cc00c0c00cc0cc00c000ccc0ccc00000000000000000000000000000000000000000000000000000000000000000000
// 114:e0000000000000000000000000000000000000000000000000000000000022222000cc00000cccc00cc00c00ccc000ccc0000ccc0000000000000000000000000022002000cc00000cccc000cccc00ccc00cccc000ccc0000000000000000000000000000000000000000000000000000000000000000000
// 115:ee00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 116:e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 119:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000
// 120:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eee0000000000000000000000000000000000000000000000000000000000
// 121:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000
// 123:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 124:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eee0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// 125:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// </SCREEN>
// <PALETTE>
// 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57
// </PALETTE>