diff --git a/arena.c b/arena.c index 33477d3..d56e350 100644 --- a/arena.c +++ b/arena.c @@ -1,13 +1,14 @@ #include "bmpload.h" #include "const.h" #include "arena.h" +#include "system/vga.h" char arenaLayout[10][10] = { { 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 }, - { 1, 2, 2, 2, 0, 0, 2, 2, 2, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, - { 2, 0, 0, 0, 0, 0, 0, 0, 0, 2 }, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, @@ -37,9 +38,14 @@ void setupWallSprites(struct BMPImage *spritesheetImage) { ); } +extern void renderFloorTile(byte *); +// push items onto stack +#pragma aux (__cdecl) renderFloorTile "renderFloorTile_" + void renderArenaTile(int x, int y) { char tile; struct SpriteRender *target; + byte *drawBuffer; tile = arenaLayout[y][x]; @@ -58,7 +64,15 @@ void renderArenaTile(int x, int y) { target->x = x * TILE_SIZE; target->y = y * TILE_SIZE; - drawSprite(target); + if (tile == 0) { + drawBuffer = getDrawBuffer(); + + renderFloorTile( + drawBuffer + target->x + target->y * VGA_DISPLAY_WIDTH + ); + } else { + drawSprite(target); + } } char arenaRedrawRequests[ARENA_HEIGHT_TILES][ARENA_WIDTH_TILES]; diff --git a/bin/build_spritesheet_asm.rb b/bin/build_spritesheet_asm.rb new file mode 100755 index 0000000..dffed0f --- /dev/null +++ b/bin/build_spritesheet_asm.rb @@ -0,0 +1,174 @@ +#!/usr/bin/env ruby + +require 'rmagick' +require 'yaml' +require 'erb' + +data = YAML.load(File.read('spritesheet.yml')) + +class Sprite + def initialize(image:, sx:, sy:, width:, height:) + @image = image + @sx = sx + @sy = sy + @width = width + @height = height + end + + def pixel_data + @height.times.each_with_object([]) do |y, obj| + obj << @width.times.map do |x| + color = @image.pixel_color(x + @sx, y + @sy) + + colormap.find_index { |c| c == color } + end + end + end + + private + + def colormap + @colormap ||= @image.colors.times.map do |i| + Magick::Pixel.from_color(@image.colormap(i)) + end + end +end + +MovBytePtr = Data.define(:offset, :data) + +ASM_TEMPLATE = <<~ASM + <% sprites.each do |sprite| %> + PUBLIC <%= sprite.exported_name %><% end %> + + .386 + .model flat,c + + .CODE + + <% sprites.each do |sprite| %> + <%= sprite.exported_name %>: + push ebp + mov ebp, esp + push ebx + + mov eax, [ebp + 8] + + <% sprite.bytes.each do |byte| %> + mov BYTE PTR [eax + <%= byte.offset %>], <%= byte.data %><% end %> + + pop ebx + pop ebp + ret + + <% end %> + end +ASM + +C_TEMPLATE = <<~C + <% sprites.each do |sprite| %> + extern void <%= sprite.function_name %>(byte *); + #pragma aux (__cdecl) <%= sprite.function_name %> "<%= sprite.exported_name %>" + <% end %> +C + +class AssemblerSprite + def initialize( + name:, + pixel_data:, + screen_width:, + transparent_color:, + offset_x:, + offset_y:, + prefix: + ) + @name = name + @pixel_data = pixel_data + @screen_width = screen_width + @transparent_color = transparent_color + @offset_x = offset_x + @offset_y = offset_y + @prefix = prefix + end + + def exported_name + "#{function_name}_" + end + + def function_name + "#{@prefix}_#{@name}" + end + + def bytes + return @bytes if defined?(@bytes) + + bytes = [] + + @pixel_data.each_with_index do |row, y| + row.each_with_index do |column, x| + next if @pixel_data[y][x] == @transparent_color + + bytes << MovBytePtr.new( + data: @pixel_data[y][x], + offset: x - @offset_x + (y - @offset_y) * @screen_width + ) + end + end + + bytes + end +end + +Screen = Data.define(:width, :transparent_color) +SpriteData = Data.define(:image, :name, :position, :dimensions, :offset, :prefix) + +screen = Screen.new( + width: data["screen"]["width"], + transparent_color: data["screen"]["transparentColor"] +) + +sprite_data = [] + +data["files"].each do |spritesheet| + image = Magick::Image.read(spritesheet["file"]).first + + spritesheet["sprites"].each do |name, details| + sprite_data << SpriteData.new( + image:, + name:, + prefix: spritesheet["prefix"], + position: details["position"], + dimensions: details["dimensions"], + offset: details["offset"] + ) + end +end + +sprites = sprite_data.map do |sd| + sprite = Sprite.new( + image: sd.image, + sx: sd.position[0], + sy: sd.position[1], + width: sd.dimensions[0], + height: sd.dimensions[1], + ) + + AssemblerSprite.new( + name: sd.name, + prefix: sd.prefix, + pixel_data: sprite.pixel_data, + screen_width: screen.width, + transparent_color: screen.transparent_color, + offset_x: sd.offset[0], + offset_y: sd.offset[1], + ) +end + +File.open('sprites.asm', 'w') do |fh| + fh.puts ERB.new(ASM_TEMPLATE).result_with_hash(sprites:) +end + +File.open('sprites.h', 'w') do |fh| + fh.puts ERB.new(C_TEMPLATE).result_with_hash(sprites:) +end + +puts "sprites.{asm,h} written" diff --git a/game.c b/game.c index 04f061d..286b13c 100644 --- a/game.c +++ b/game.c @@ -331,16 +331,11 @@ int currentSpeedCalc = 0; double averageSpeedCalc; clock_t startTime; -extern int doAThing(int); -#pragma aux (__cdecl) doAThing "doAThing_" +// non cdecl is put params into eax, ebx, and ecx int main(void) { int keepRunning = 1; - fprintf(stderr, "%d\n", doAThing(1000)); - - return 0; - if (setupGame()) return 1; maybeSpawnEnemy(); diff --git a/makefile b/makefile index 534e09c..6aafbe6 100644 --- a/makefile +++ b/makefile @@ -10,6 +10,9 @@ system/system.lib: .SYMBOLIC .c.o: wcc386 -q -bt=dos $< +.asm.o: + wasm $< + game.exe: $(obj) system/system.lib wcl386 -q -bt=dos -l=dos4g $(obj) system/system.lib diff --git a/sprites.asm b/sprites.asm new file mode 100644 index 0000000..b47b482 --- /dev/null +++ b/sprites.asm @@ -0,0 +1,1434 @@ + +PUBLIC sprite_arenaWallTop_ +PUBLIC sprite_arenaWallSide_ +PUBLIC sprite_arenaFloor_ +PUBLIC sprite_rabbit_ +PUBLIC sprite_mouse_ +PUBLIC sprite_bullet_ +PUBLIC sprite_enemy_ + +.386 +.model flat,c + +.CODE + + +sprite_arenaWallTop_: + push ebp + mov ebp, esp + push ebx + + mov eax, [ebp + 8] + + + mov BYTE PTR [eax + -3210], 2 + mov BYTE PTR [eax + -3209], 2 + mov BYTE PTR [eax + -3208], 2 + mov BYTE PTR [eax + -3207], 2 + mov BYTE PTR [eax + -3206], 2 + mov BYTE PTR [eax + -3205], 2 + mov BYTE PTR [eax + -3204], 2 + mov BYTE PTR [eax + -3203], 2 + mov BYTE PTR [eax + -3202], 2 + mov BYTE PTR [eax + -3201], 2 + mov BYTE PTR [eax + -3200], 2 + mov BYTE PTR [eax + -3199], 2 + mov BYTE PTR [eax + -3198], 2 + mov BYTE PTR [eax + -3197], 2 + mov BYTE PTR [eax + -3196], 2 + mov BYTE PTR [eax + -3195], 2 + mov BYTE PTR [eax + -3194], 2 + mov BYTE PTR [eax + -3193], 2 + mov BYTE PTR [eax + -3192], 2 + mov BYTE PTR [eax + -3191], 2 + mov BYTE PTR [eax + -2890], 2 + mov BYTE PTR [eax + -2889], 2 + mov BYTE PTR [eax + -2888], 2 + mov BYTE PTR [eax + -2887], 2 + mov BYTE PTR [eax + -2886], 2 + mov BYTE PTR [eax + -2885], 2 + mov BYTE PTR [eax + -2884], 2 + mov BYTE PTR [eax + -2883], 2 + mov BYTE PTR [eax + -2882], 2 + mov BYTE PTR [eax + -2881], 2 + mov BYTE PTR [eax + -2880], 2 + mov BYTE PTR [eax + -2879], 2 + mov BYTE PTR [eax + -2878], 2 + mov BYTE PTR [eax + -2877], 2 + mov BYTE PTR [eax + -2876], 2 + mov BYTE PTR [eax + -2875], 2 + mov BYTE PTR [eax + -2874], 2 + mov BYTE PTR [eax + -2873], 2 + mov BYTE PTR [eax + -2872], 2 + mov BYTE PTR [eax + -2871], 2 + mov BYTE PTR [eax + -2570], 2 + mov BYTE PTR [eax + -2569], 2 + mov BYTE PTR [eax + -2568], 2 + mov BYTE PTR [eax + -2567], 2 + mov BYTE PTR [eax + -2566], 2 + mov BYTE PTR [eax + -2565], 2 + mov BYTE PTR [eax + -2564], 2 + mov BYTE PTR [eax + -2563], 2 + mov BYTE PTR [eax + -2562], 2 + mov BYTE PTR [eax + -2561], 2 + mov BYTE PTR [eax + -2560], 2 + mov BYTE PTR [eax + -2559], 2 + mov BYTE PTR [eax + -2558], 2 + mov BYTE PTR [eax + -2557], 2 + mov BYTE PTR [eax + -2556], 2 + mov BYTE PTR [eax + -2555], 2 + mov BYTE PTR [eax + -2554], 2 + mov BYTE PTR [eax + -2553], 2 + mov BYTE PTR [eax + -2552], 2 + mov BYTE PTR [eax + -2551], 2 + mov BYTE PTR [eax + -2250], 2 + mov BYTE PTR [eax + -2249], 2 + mov BYTE PTR [eax + -2248], 2 + mov BYTE PTR [eax + -2247], 2 + mov BYTE PTR [eax + -2246], 2 + mov BYTE PTR [eax + -2245], 2 + mov BYTE PTR [eax + -2244], 2 + mov BYTE PTR [eax + -2243], 2 + mov BYTE PTR [eax + -2242], 2 + mov BYTE PTR [eax + -2241], 2 + mov BYTE PTR [eax + -2240], 2 + mov BYTE PTR [eax + -2239], 2 + mov BYTE PTR [eax + -2238], 2 + mov BYTE PTR [eax + -2237], 2 + mov BYTE PTR [eax + -2236], 2 + mov BYTE PTR [eax + -2235], 2 + mov BYTE PTR [eax + -2234], 2 + mov BYTE PTR [eax + -2233], 2 + mov BYTE PTR [eax + -2232], 2 + mov BYTE PTR [eax + -2231], 2 + mov BYTE PTR [eax + -1930], 2 + mov BYTE PTR [eax + -1929], 2 + mov BYTE PTR [eax + -1928], 2 + mov BYTE PTR [eax + -1927], 2 + mov BYTE PTR [eax + -1926], 2 + mov BYTE PTR [eax + -1925], 2 + mov BYTE PTR [eax + -1924], 2 + mov BYTE PTR [eax + -1923], 2 + mov BYTE PTR [eax + -1922], 2 + mov BYTE PTR [eax + -1921], 2 + mov BYTE PTR [eax + -1920], 2 + mov BYTE PTR [eax + -1919], 2 + mov BYTE PTR [eax + -1918], 2 + mov BYTE PTR [eax + -1917], 2 + mov BYTE PTR [eax + -1916], 2 + mov BYTE PTR [eax + -1915], 2 + mov BYTE PTR [eax + -1914], 2 + mov BYTE PTR [eax + -1913], 2 + mov BYTE PTR [eax + -1912], 2 + mov BYTE PTR [eax + -1911], 2 + mov BYTE PTR [eax + -1610], 2 + mov BYTE PTR [eax + -1609], 2 + mov BYTE PTR [eax + -1608], 2 + mov BYTE PTR [eax + -1607], 2 + mov BYTE PTR [eax + -1606], 2 + mov BYTE PTR [eax + -1605], 2 + mov BYTE PTR [eax + -1604], 2 + mov BYTE PTR [eax + -1603], 2 + mov BYTE PTR [eax + -1602], 2 + mov BYTE PTR [eax + -1601], 2 + mov BYTE PTR [eax + -1600], 2 + mov BYTE PTR [eax + -1599], 2 + mov BYTE PTR [eax + -1598], 2 + mov BYTE PTR [eax + -1597], 2 + mov BYTE PTR [eax + -1596], 2 + mov BYTE PTR [eax + -1595], 2 + mov BYTE PTR [eax + -1594], 2 + mov BYTE PTR [eax + -1593], 2 + mov BYTE PTR [eax + -1592], 2 + mov BYTE PTR [eax + -1591], 2 + mov BYTE PTR [eax + -1290], 2 + mov BYTE PTR [eax + -1289], 2 + mov BYTE PTR [eax + -1288], 2 + mov BYTE PTR [eax + -1287], 2 + mov BYTE PTR [eax + -1286], 2 + mov BYTE PTR [eax + -1285], 2 + mov BYTE PTR [eax + -1284], 2 + mov BYTE PTR [eax + -1283], 2 + mov BYTE PTR [eax + -1282], 2 + mov BYTE PTR [eax + -1281], 2 + mov BYTE PTR [eax + -1280], 2 + mov BYTE PTR [eax + -1279], 2 + mov BYTE PTR [eax + -1278], 2 + mov BYTE PTR [eax + -1277], 2 + mov BYTE PTR [eax + -1276], 2 + mov BYTE PTR [eax + -1275], 2 + mov BYTE PTR [eax + -1274], 2 + mov BYTE PTR [eax + -1273], 2 + mov BYTE PTR [eax + -1272], 2 + mov BYTE PTR [eax + -1271], 2 + mov BYTE PTR [eax + -970], 2 + mov BYTE PTR [eax + -969], 2 + mov BYTE PTR [eax + -968], 2 + mov BYTE PTR [eax + -967], 2 + mov BYTE PTR [eax + -966], 2 + mov BYTE PTR [eax + -965], 2 + mov BYTE PTR [eax + -964], 2 + mov BYTE PTR [eax + -963], 2 + mov BYTE PTR [eax + -962], 2 + mov BYTE PTR [eax + -961], 2 + mov BYTE PTR [eax + -960], 2 + mov BYTE PTR [eax + -959], 2 + mov BYTE PTR [eax + -958], 2 + mov BYTE PTR [eax + -957], 2 + mov BYTE PTR [eax + -956], 2 + mov BYTE PTR [eax + -955], 2 + mov BYTE PTR [eax + -954], 2 + mov BYTE PTR [eax + -953], 2 + mov BYTE PTR [eax + -952], 2 + mov BYTE PTR [eax + -951], 2 + mov BYTE PTR [eax + -650], 2 + mov BYTE PTR [eax + -649], 2 + mov BYTE PTR [eax + -648], 2 + mov BYTE PTR [eax + -647], 2 + mov BYTE PTR [eax + -646], 2 + mov BYTE PTR [eax + -645], 2 + mov BYTE PTR [eax + -644], 2 + mov BYTE PTR [eax + -643], 2 + mov BYTE PTR [eax + -642], 2 + mov BYTE PTR [eax + -641], 2 + mov BYTE PTR [eax + -640], 2 + mov BYTE PTR [eax + -639], 2 + mov BYTE PTR [eax + -638], 2 + mov BYTE PTR [eax + -637], 2 + mov BYTE PTR [eax + -636], 2 + mov BYTE PTR [eax + -635], 2 + mov BYTE PTR [eax + -634], 2 + mov BYTE PTR [eax + -633], 2 + mov BYTE PTR [eax + -632], 2 + mov BYTE PTR [eax + -631], 2 + mov BYTE PTR [eax + -330], 2 + mov BYTE PTR [eax + -329], 2 + mov BYTE PTR [eax + -328], 2 + mov BYTE PTR [eax + -327], 2 + mov BYTE PTR [eax + -326], 2 + mov BYTE PTR [eax + -325], 2 + mov BYTE PTR [eax + -324], 2 + mov BYTE PTR [eax + -323], 2 + mov BYTE PTR [eax + -322], 2 + mov BYTE PTR [eax + -321], 2 + mov BYTE PTR [eax + -320], 2 + mov BYTE PTR [eax + -319], 2 + mov BYTE PTR [eax + -318], 2 + mov BYTE PTR [eax + -317], 2 + mov BYTE PTR [eax + -316], 2 + mov BYTE PTR [eax + -315], 2 + mov BYTE PTR [eax + -314], 2 + mov BYTE PTR [eax + -313], 2 + mov BYTE PTR [eax + -312], 2 + mov BYTE PTR [eax + -311], 2 + mov BYTE PTR [eax + -10], 2 + mov BYTE PTR [eax + -9], 2 + mov BYTE PTR [eax + -8], 2 + mov BYTE PTR [eax + -7], 2 + mov BYTE PTR [eax + -6], 2 + mov BYTE PTR [eax + -5], 2 + mov BYTE PTR [eax + -4], 2 + mov BYTE PTR [eax + -3], 2 + mov BYTE PTR [eax + -2], 2 + mov BYTE PTR [eax + -1], 2 + mov BYTE PTR [eax + 0], 2 + mov BYTE PTR [eax + 1], 2 + mov BYTE PTR [eax + 2], 2 + mov BYTE PTR [eax + 3], 2 + mov BYTE PTR [eax + 4], 2 + mov BYTE PTR [eax + 5], 2 + mov BYTE PTR [eax + 6], 2 + mov BYTE PTR [eax + 7], 2 + mov BYTE PTR [eax + 8], 2 + mov BYTE PTR [eax + 9], 2 + mov BYTE PTR [eax + 310], 2 + mov BYTE PTR [eax + 311], 2 + mov BYTE PTR [eax + 312], 2 + mov BYTE PTR [eax + 313], 2 + mov BYTE PTR [eax + 314], 2 + mov BYTE PTR [eax + 315], 2 + mov BYTE PTR [eax + 316], 2 + mov BYTE PTR [eax + 317], 2 + mov BYTE PTR [eax + 318], 2 + mov BYTE PTR [eax + 319], 2 + mov BYTE PTR [eax + 320], 2 + mov BYTE PTR [eax + 321], 2 + mov BYTE PTR [eax + 322], 2 + mov BYTE PTR [eax + 323], 2 + mov BYTE PTR [eax + 324], 2 + mov BYTE PTR [eax + 325], 2 + mov BYTE PTR [eax + 326], 2 + mov BYTE PTR [eax + 327], 2 + mov BYTE PTR [eax + 328], 2 + mov BYTE PTR [eax + 329], 2 + mov BYTE PTR [eax + 630], 2 + mov BYTE PTR [eax + 631], 2 + mov BYTE PTR [eax + 632], 2 + mov BYTE PTR [eax + 633], 2 + mov BYTE PTR [eax + 634], 2 + mov BYTE PTR [eax + 635], 2 + mov BYTE PTR [eax + 636], 2 + mov BYTE PTR [eax + 637], 2 + mov BYTE PTR [eax + 638], 2 + mov BYTE PTR [eax + 639], 2 + mov BYTE PTR [eax + 640], 2 + mov BYTE PTR [eax + 641], 2 + mov BYTE PTR [eax + 642], 2 + mov BYTE PTR [eax + 643], 2 + mov BYTE PTR [eax + 644], 2 + mov BYTE PTR [eax + 645], 2 + mov BYTE PTR [eax + 646], 2 + mov BYTE PTR [eax + 647], 2 + mov BYTE PTR [eax + 648], 2 + mov BYTE PTR [eax + 649], 2 + mov BYTE PTR [eax + 950], 2 + mov BYTE PTR [eax + 951], 2 + mov BYTE PTR [eax + 952], 2 + mov BYTE PTR [eax + 953], 2 + mov BYTE PTR [eax + 954], 2 + mov BYTE PTR [eax + 955], 2 + mov BYTE PTR [eax + 956], 2 + mov BYTE PTR [eax + 957], 2 + mov BYTE PTR [eax + 958], 2 + mov BYTE PTR [eax + 959], 2 + mov BYTE PTR [eax + 960], 2 + mov BYTE PTR [eax + 961], 2 + mov BYTE PTR [eax + 962], 2 + mov BYTE PTR [eax + 963], 2 + mov BYTE PTR [eax + 964], 2 + mov BYTE PTR [eax + 965], 2 + mov BYTE PTR [eax + 966], 2 + mov BYTE PTR [eax + 967], 2 + mov BYTE PTR [eax + 968], 2 + mov BYTE PTR [eax + 969], 2 + mov BYTE PTR [eax + 1270], 2 + mov BYTE PTR [eax + 1271], 2 + mov BYTE PTR [eax + 1272], 2 + mov BYTE PTR [eax + 1273], 2 + mov BYTE PTR [eax + 1274], 2 + mov BYTE PTR [eax + 1275], 2 + mov BYTE PTR [eax + 1276], 2 + mov BYTE PTR [eax + 1277], 2 + mov BYTE PTR [eax + 1278], 2 + mov BYTE PTR [eax + 1279], 2 + mov BYTE PTR [eax + 1280], 2 + mov BYTE PTR [eax + 1281], 2 + mov BYTE PTR [eax + 1282], 2 + mov BYTE PTR [eax + 1283], 2 + mov BYTE PTR [eax + 1284], 2 + mov BYTE PTR [eax + 1285], 2 + mov BYTE PTR [eax + 1286], 2 + mov BYTE PTR [eax + 1287], 2 + mov BYTE PTR [eax + 1288], 2 + mov BYTE PTR [eax + 1289], 2 + mov BYTE PTR [eax + 1590], 2 + mov BYTE PTR [eax + 1591], 2 + mov BYTE PTR [eax + 1592], 2 + mov BYTE PTR [eax + 1593], 2 + mov BYTE PTR [eax + 1594], 2 + mov BYTE PTR [eax + 1595], 2 + mov BYTE PTR [eax + 1596], 2 + mov BYTE PTR [eax + 1597], 2 + mov BYTE PTR [eax + 1598], 2 + mov BYTE PTR [eax + 1599], 2 + mov BYTE PTR [eax + 1600], 2 + mov BYTE PTR [eax + 1601], 2 + mov BYTE PTR [eax + 1602], 2 + mov BYTE PTR [eax + 1603], 2 + mov BYTE PTR [eax + 1604], 2 + mov BYTE PTR [eax + 1605], 2 + mov BYTE PTR [eax + 1606], 2 + mov BYTE PTR [eax + 1607], 2 + mov BYTE PTR [eax + 1608], 2 + mov BYTE PTR [eax + 1609], 2 + mov BYTE PTR [eax + 1910], 2 + mov BYTE PTR [eax + 1911], 2 + mov BYTE PTR [eax + 1912], 2 + mov BYTE PTR [eax + 1913], 2 + mov BYTE PTR [eax + 1914], 2 + mov BYTE PTR [eax + 1915], 2 + mov BYTE PTR [eax + 1916], 2 + mov BYTE PTR [eax + 1917], 2 + mov BYTE PTR [eax + 1918], 2 + mov BYTE PTR [eax + 1919], 2 + mov BYTE PTR [eax + 1920], 2 + mov BYTE PTR [eax + 1921], 2 + mov BYTE PTR [eax + 1922], 2 + mov BYTE PTR [eax + 1923], 2 + mov BYTE PTR [eax + 1924], 2 + mov BYTE PTR [eax + 1925], 2 + mov BYTE PTR [eax + 1926], 2 + mov BYTE PTR [eax + 1927], 2 + mov BYTE PTR [eax + 1928], 2 + mov BYTE PTR [eax + 1929], 2 + mov BYTE PTR [eax + 2230], 2 + mov BYTE PTR [eax + 2231], 2 + mov BYTE PTR [eax + 2232], 2 + mov BYTE PTR [eax + 2233], 2 + mov BYTE PTR [eax + 2234], 2 + mov BYTE PTR [eax + 2235], 2 + mov BYTE PTR [eax + 2236], 2 + mov BYTE PTR [eax + 2237], 2 + mov BYTE PTR [eax + 2238], 2 + mov BYTE PTR [eax + 2239], 2 + mov BYTE PTR [eax + 2240], 2 + mov BYTE PTR [eax + 2241], 2 + mov BYTE PTR [eax + 2242], 2 + mov BYTE PTR [eax + 2243], 2 + mov BYTE PTR [eax + 2244], 2 + mov BYTE PTR [eax + 2245], 2 + mov BYTE PTR [eax + 2246], 2 + mov BYTE PTR [eax + 2247], 2 + mov BYTE PTR [eax + 2248], 2 + mov BYTE PTR [eax + 2249], 2 + mov BYTE PTR [eax + 2550], 2 + mov BYTE PTR [eax + 2551], 2 + mov BYTE PTR [eax + 2552], 2 + mov BYTE PTR [eax + 2553], 2 + mov BYTE PTR [eax + 2554], 2 + mov BYTE PTR [eax + 2555], 2 + mov BYTE PTR [eax + 2556], 2 + mov BYTE PTR [eax + 2557], 2 + mov BYTE PTR [eax + 2558], 2 + mov BYTE PTR [eax + 2559], 2 + mov BYTE PTR [eax + 2560], 2 + mov BYTE PTR [eax + 2561], 2 + mov BYTE PTR [eax + 2562], 2 + mov BYTE PTR [eax + 2563], 2 + mov BYTE PTR [eax + 2564], 2 + mov BYTE PTR [eax + 2565], 2 + mov BYTE PTR [eax + 2566], 2 + mov BYTE PTR [eax + 2567], 2 + mov BYTE PTR [eax + 2568], 2 + mov BYTE PTR [eax + 2569], 2 + mov BYTE PTR [eax + 2870], 2 + mov BYTE PTR [eax + 2871], 2 + mov BYTE PTR [eax + 2872], 2 + mov BYTE PTR [eax + 2873], 2 + mov BYTE PTR [eax + 2874], 2 + mov BYTE PTR [eax + 2875], 2 + mov BYTE PTR [eax + 2876], 2 + mov BYTE PTR [eax + 2877], 2 + mov BYTE PTR [eax + 2878], 2 + mov BYTE PTR [eax + 2879], 2 + mov BYTE PTR [eax + 2880], 2 + mov BYTE PTR [eax + 2881], 2 + mov BYTE PTR [eax + 2882], 2 + mov BYTE PTR [eax + 2883], 2 + mov BYTE PTR [eax + 2884], 2 + mov BYTE PTR [eax + 2885], 2 + mov BYTE PTR [eax + 2886], 2 + mov BYTE PTR [eax + 2887], 2 + mov BYTE PTR [eax + 2888], 2 + mov BYTE PTR [eax + 2889], 2 + + pop ebx + pop ebp + ret + + +sprite_arenaWallSide_: + push ebp + mov ebp, esp + push ebx + + mov eax, [ebp + 8] + + + mov BYTE PTR [eax + 0], 3 + mov BYTE PTR [eax + 1], 3 + mov BYTE PTR [eax + 2], 3 + mov BYTE PTR [eax + 3], 3 + mov BYTE PTR [eax + 4], 3 + mov BYTE PTR [eax + 5], 3 + mov BYTE PTR [eax + 6], 3 + mov BYTE PTR [eax + 7], 3 + mov BYTE PTR [eax + 8], 3 + mov BYTE PTR [eax + 9], 3 + mov BYTE PTR [eax + 10], 3 + mov BYTE PTR [eax + 11], 3 + mov BYTE PTR [eax + 12], 3 + mov BYTE PTR [eax + 13], 3 + mov BYTE PTR [eax + 14], 3 + mov BYTE PTR [eax + 15], 3 + mov BYTE PTR [eax + 16], 3 + mov BYTE PTR [eax + 17], 3 + mov BYTE PTR [eax + 18], 3 + mov BYTE PTR [eax + 19], 3 + mov BYTE PTR [eax + 320], 3 + mov BYTE PTR [eax + 321], 3 + mov BYTE PTR [eax + 322], 3 + mov BYTE PTR [eax + 323], 3 + mov BYTE PTR [eax + 324], 3 + mov BYTE PTR [eax + 325], 3 + mov BYTE PTR [eax + 326], 3 + mov BYTE PTR [eax + 327], 3 + mov BYTE PTR [eax + 328], 3 + mov BYTE PTR [eax + 329], 3 + mov BYTE PTR [eax + 330], 3 + mov BYTE PTR [eax + 331], 3 + mov BYTE PTR [eax + 332], 3 + mov BYTE PTR [eax + 333], 3 + mov BYTE PTR [eax + 334], 3 + mov BYTE PTR [eax + 335], 3 + mov BYTE PTR [eax + 336], 3 + mov BYTE PTR [eax + 337], 3 + mov BYTE PTR [eax + 338], 3 + mov BYTE PTR [eax + 339], 3 + mov BYTE PTR [eax + 640], 3 + mov BYTE PTR [eax + 641], 3 + mov BYTE PTR [eax + 642], 3 + mov BYTE PTR [eax + 643], 3 + mov BYTE PTR [eax + 644], 3 + mov BYTE PTR [eax + 645], 3 + mov BYTE PTR [eax + 646], 3 + mov BYTE PTR [eax + 647], 3 + mov BYTE PTR [eax + 648], 3 + mov BYTE PTR [eax + 649], 3 + mov BYTE PTR [eax + 650], 3 + mov BYTE PTR [eax + 651], 3 + mov BYTE PTR [eax + 652], 3 + mov BYTE PTR [eax + 653], 3 + mov BYTE PTR [eax + 654], 3 + mov BYTE PTR [eax + 655], 3 + mov BYTE PTR [eax + 656], 3 + mov BYTE PTR [eax + 657], 3 + mov BYTE PTR [eax + 658], 3 + mov BYTE PTR [eax + 659], 3 + mov BYTE PTR [eax + 960], 3 + mov BYTE PTR [eax + 961], 3 + mov BYTE PTR [eax + 962], 3 + mov BYTE PTR [eax + 963], 3 + mov BYTE PTR [eax + 964], 3 + mov BYTE PTR [eax + 965], 3 + mov BYTE PTR [eax + 966], 3 + mov BYTE PTR [eax + 967], 3 + mov BYTE PTR [eax + 968], 3 + mov BYTE PTR [eax + 969], 3 + mov BYTE PTR [eax + 970], 3 + mov BYTE PTR [eax + 971], 3 + mov BYTE PTR [eax + 972], 3 + mov BYTE PTR [eax + 973], 3 + mov BYTE PTR [eax + 974], 3 + mov BYTE PTR [eax + 975], 3 + mov BYTE PTR [eax + 976], 3 + mov BYTE PTR [eax + 977], 3 + mov BYTE PTR [eax + 978], 3 + mov BYTE PTR [eax + 979], 3 + mov BYTE PTR [eax + 1280], 3 + mov BYTE PTR [eax + 1281], 3 + mov BYTE PTR [eax + 1282], 3 + mov BYTE PTR [eax + 1283], 3 + mov BYTE PTR [eax + 1284], 3 + mov BYTE PTR [eax + 1285], 3 + mov BYTE PTR [eax + 1286], 3 + mov BYTE PTR [eax + 1287], 3 + mov BYTE PTR [eax + 1288], 3 + mov BYTE PTR [eax + 1289], 3 + mov BYTE PTR [eax + 1290], 3 + mov BYTE PTR [eax + 1291], 3 + mov BYTE PTR [eax + 1292], 3 + mov BYTE PTR [eax + 1293], 3 + mov BYTE PTR [eax + 1294], 3 + mov BYTE PTR [eax + 1295], 3 + mov BYTE PTR [eax + 1296], 3 + mov BYTE PTR [eax + 1297], 3 + mov BYTE PTR [eax + 1298], 3 + mov BYTE PTR [eax + 1299], 3 + mov BYTE PTR [eax + 1600], 3 + mov BYTE PTR [eax + 1601], 3 + mov BYTE PTR [eax + 1602], 3 + mov BYTE PTR [eax + 1603], 3 + mov BYTE PTR [eax + 1604], 3 + mov BYTE PTR [eax + 1605], 3 + mov BYTE PTR [eax + 1606], 3 + mov BYTE PTR [eax + 1607], 3 + mov BYTE PTR [eax + 1608], 3 + mov BYTE PTR [eax + 1609], 3 + mov BYTE PTR [eax + 1610], 3 + mov BYTE PTR [eax + 1611], 3 + mov BYTE PTR [eax + 1612], 3 + mov BYTE PTR [eax + 1613], 3 + mov BYTE PTR [eax + 1614], 3 + mov BYTE PTR [eax + 1615], 3 + mov BYTE PTR [eax + 1616], 3 + mov BYTE PTR [eax + 1617], 3 + mov BYTE PTR [eax + 1618], 3 + mov BYTE PTR [eax + 1619], 3 + mov BYTE PTR [eax + 1920], 3 + mov BYTE PTR [eax + 1921], 3 + mov BYTE PTR [eax + 1922], 3 + mov BYTE PTR [eax + 1923], 3 + mov BYTE PTR [eax + 1924], 3 + mov BYTE PTR [eax + 1925], 3 + mov BYTE PTR [eax + 1926], 3 + mov BYTE PTR [eax + 1927], 3 + mov BYTE PTR [eax + 1928], 3 + mov BYTE PTR [eax + 1929], 3 + mov BYTE PTR [eax + 1930], 3 + mov BYTE PTR [eax + 1931], 3 + mov BYTE PTR [eax + 1932], 3 + mov BYTE PTR [eax + 1933], 3 + mov BYTE PTR [eax + 1934], 3 + mov BYTE PTR [eax + 1935], 3 + mov BYTE PTR [eax + 1936], 3 + mov BYTE PTR [eax + 1937], 3 + mov BYTE PTR [eax + 1938], 3 + mov BYTE PTR [eax + 1939], 3 + mov BYTE PTR [eax + 2240], 3 + mov BYTE PTR [eax + 2241], 3 + mov BYTE PTR [eax + 2242], 3 + mov BYTE PTR [eax + 2243], 3 + mov BYTE PTR [eax + 2244], 3 + mov BYTE PTR [eax + 2245], 3 + mov BYTE PTR [eax + 2246], 3 + mov BYTE PTR [eax + 2247], 3 + mov BYTE PTR [eax + 2248], 3 + mov BYTE PTR [eax + 2249], 3 + mov BYTE PTR [eax + 2250], 3 + mov BYTE PTR [eax + 2251], 3 + mov BYTE PTR [eax + 2252], 3 + mov BYTE PTR [eax + 2253], 3 + mov BYTE PTR [eax + 2254], 3 + mov BYTE PTR [eax + 2255], 3 + mov BYTE PTR [eax + 2256], 3 + mov BYTE PTR [eax + 2257], 3 + mov BYTE PTR [eax + 2258], 3 + mov BYTE PTR [eax + 2259], 3 + mov BYTE PTR [eax + 2560], 3 + mov BYTE PTR [eax + 2561], 3 + mov BYTE PTR [eax + 2562], 3 + mov BYTE PTR [eax + 2563], 3 + mov BYTE PTR [eax + 2564], 3 + mov BYTE PTR [eax + 2565], 3 + mov BYTE PTR [eax + 2566], 3 + mov BYTE PTR [eax + 2567], 3 + mov BYTE PTR [eax + 2568], 3 + mov BYTE PTR [eax + 2569], 3 + mov BYTE PTR [eax + 2570], 3 + mov BYTE PTR [eax + 2571], 3 + mov BYTE PTR [eax + 2572], 3 + mov BYTE PTR [eax + 2573], 3 + mov BYTE PTR [eax + 2574], 3 + mov BYTE PTR [eax + 2575], 3 + mov BYTE PTR [eax + 2576], 3 + mov BYTE PTR [eax + 2577], 3 + mov BYTE PTR [eax + 2578], 3 + mov BYTE PTR [eax + 2579], 3 + mov BYTE PTR [eax + 2880], 3 + mov BYTE PTR [eax + 2881], 3 + mov BYTE PTR [eax + 2882], 3 + mov BYTE PTR [eax + 2883], 3 + mov BYTE PTR [eax + 2884], 3 + mov BYTE PTR [eax + 2885], 3 + mov BYTE PTR [eax + 2886], 3 + mov BYTE PTR [eax + 2887], 3 + mov BYTE PTR [eax + 2888], 3 + mov BYTE PTR [eax + 2889], 3 + mov BYTE PTR [eax + 2890], 3 + mov BYTE PTR [eax + 2891], 3 + mov BYTE PTR [eax + 2892], 3 + mov BYTE PTR [eax + 2893], 3 + mov BYTE PTR [eax + 2894], 3 + mov BYTE PTR [eax + 2895], 3 + mov BYTE PTR [eax + 2896], 3 + mov BYTE PTR [eax + 2897], 3 + mov BYTE PTR [eax + 2898], 3 + mov BYTE PTR [eax + 2899], 3 + mov BYTE PTR [eax + 3200], 3 + mov BYTE PTR [eax + 3201], 3 + mov BYTE PTR [eax + 3202], 3 + mov BYTE PTR [eax + 3203], 3 + mov BYTE PTR [eax + 3204], 3 + mov BYTE PTR [eax + 3205], 3 + mov BYTE PTR [eax + 3206], 3 + mov BYTE PTR [eax + 3207], 3 + mov BYTE PTR [eax + 3208], 3 + mov BYTE PTR [eax + 3209], 3 + mov BYTE PTR [eax + 3210], 3 + mov BYTE PTR [eax + 3211], 3 + mov BYTE PTR [eax + 3212], 3 + mov BYTE PTR [eax + 3213], 3 + mov BYTE PTR [eax + 3214], 3 + mov BYTE PTR [eax + 3215], 3 + mov BYTE PTR [eax + 3216], 3 + mov BYTE PTR [eax + 3217], 3 + mov BYTE PTR [eax + 3218], 3 + mov BYTE PTR [eax + 3219], 3 + mov BYTE PTR [eax + 3520], 3 + mov BYTE PTR [eax + 3521], 3 + mov BYTE PTR [eax + 3522], 3 + mov BYTE PTR [eax + 3523], 3 + mov BYTE PTR [eax + 3524], 3 + mov BYTE PTR [eax + 3525], 3 + mov BYTE PTR [eax + 3526], 3 + mov BYTE PTR [eax + 3527], 3 + mov BYTE PTR [eax + 3528], 3 + mov BYTE PTR [eax + 3529], 3 + mov BYTE PTR [eax + 3530], 3 + mov BYTE PTR [eax + 3531], 3 + mov BYTE PTR [eax + 3532], 3 + mov BYTE PTR [eax + 3533], 3 + mov BYTE PTR [eax + 3534], 3 + mov BYTE PTR [eax + 3535], 3 + mov BYTE PTR [eax + 3536], 3 + mov BYTE PTR [eax + 3537], 3 + mov BYTE PTR [eax + 3538], 3 + mov BYTE PTR [eax + 3539], 3 + mov BYTE PTR [eax + 3840], 3 + mov BYTE PTR [eax + 3841], 3 + mov BYTE PTR [eax + 3842], 3 + mov BYTE PTR [eax + 3843], 3 + mov BYTE PTR [eax + 3844], 3 + mov BYTE PTR [eax + 3845], 3 + mov BYTE PTR [eax + 3846], 3 + mov BYTE PTR [eax + 3847], 3 + mov BYTE PTR [eax + 3848], 3 + mov BYTE PTR [eax + 3849], 3 + mov BYTE PTR [eax + 3850], 3 + mov BYTE PTR [eax + 3851], 3 + mov BYTE PTR [eax + 3852], 3 + mov BYTE PTR [eax + 3853], 3 + mov BYTE PTR [eax + 3854], 3 + mov BYTE PTR [eax + 3855], 3 + mov BYTE PTR [eax + 3856], 3 + mov BYTE PTR [eax + 3857], 3 + mov BYTE PTR [eax + 3858], 3 + mov BYTE PTR [eax + 3859], 3 + mov BYTE PTR [eax + 4160], 3 + mov BYTE PTR [eax + 4161], 3 + mov BYTE PTR [eax + 4162], 3 + mov BYTE PTR [eax + 4163], 3 + mov BYTE PTR [eax + 4164], 3 + mov BYTE PTR [eax + 4165], 3 + mov BYTE PTR [eax + 4166], 3 + mov BYTE PTR [eax + 4167], 3 + mov BYTE PTR [eax + 4168], 3 + mov BYTE PTR [eax + 4169], 3 + mov BYTE PTR [eax + 4170], 3 + mov BYTE PTR [eax + 4171], 3 + mov BYTE PTR [eax + 4172], 3 + mov BYTE PTR [eax + 4173], 3 + mov BYTE PTR [eax + 4174], 3 + mov BYTE PTR [eax + 4175], 3 + mov BYTE PTR [eax + 4176], 3 + mov BYTE PTR [eax + 4177], 3 + mov BYTE PTR [eax + 4178], 3 + mov BYTE PTR [eax + 4179], 3 + mov BYTE PTR [eax + 4480], 3 + mov BYTE PTR [eax + 4481], 3 + mov BYTE PTR [eax + 4482], 3 + mov BYTE PTR [eax + 4483], 3 + mov BYTE PTR [eax + 4484], 3 + mov BYTE PTR [eax + 4485], 3 + mov BYTE PTR [eax + 4486], 3 + mov BYTE PTR [eax + 4487], 3 + mov BYTE PTR [eax + 4488], 3 + mov BYTE PTR [eax + 4489], 3 + mov BYTE PTR [eax + 4490], 3 + mov BYTE PTR [eax + 4491], 3 + mov BYTE PTR [eax + 4492], 3 + mov BYTE PTR [eax + 4493], 3 + mov BYTE PTR [eax + 4494], 3 + mov BYTE PTR [eax + 4495], 3 + mov BYTE PTR [eax + 4496], 3 + mov BYTE PTR [eax + 4497], 3 + mov BYTE PTR [eax + 4498], 3 + mov BYTE PTR [eax + 4499], 3 + mov BYTE PTR [eax + 4800], 3 + mov BYTE PTR [eax + 4801], 3 + mov BYTE PTR [eax + 4802], 3 + mov BYTE PTR [eax + 4803], 3 + mov BYTE PTR [eax + 4804], 3 + mov BYTE PTR [eax + 4805], 3 + mov BYTE PTR [eax + 4806], 3 + mov BYTE PTR [eax + 4807], 3 + mov BYTE PTR [eax + 4808], 3 + mov BYTE PTR [eax + 4809], 3 + mov BYTE PTR [eax + 4810], 3 + mov BYTE PTR [eax + 4811], 3 + mov BYTE PTR [eax + 4812], 3 + mov BYTE PTR [eax + 4813], 3 + mov BYTE PTR [eax + 4814], 3 + mov BYTE PTR [eax + 4815], 3 + mov BYTE PTR [eax + 4816], 3 + mov BYTE PTR [eax + 4817], 3 + mov BYTE PTR [eax + 4818], 3 + mov BYTE PTR [eax + 4819], 3 + mov BYTE PTR [eax + 5120], 3 + mov BYTE PTR [eax + 5121], 3 + mov BYTE PTR [eax + 5122], 3 + mov BYTE PTR [eax + 5123], 3 + mov BYTE PTR [eax + 5124], 3 + mov BYTE PTR [eax + 5125], 3 + mov BYTE PTR [eax + 5126], 3 + mov BYTE PTR [eax + 5127], 3 + mov BYTE PTR [eax + 5128], 3 + mov BYTE PTR [eax + 5129], 3 + mov BYTE PTR [eax + 5130], 3 + mov BYTE PTR [eax + 5131], 3 + mov BYTE PTR [eax + 5132], 3 + mov BYTE PTR [eax + 5133], 3 + mov BYTE PTR [eax + 5134], 3 + mov BYTE PTR [eax + 5135], 3 + mov BYTE PTR [eax + 5136], 3 + mov BYTE PTR [eax + 5137], 3 + mov BYTE PTR [eax + 5138], 3 + mov BYTE PTR [eax + 5139], 3 + mov BYTE PTR [eax + 5440], 3 + mov BYTE PTR [eax + 5441], 3 + mov BYTE PTR [eax + 5442], 3 + mov BYTE PTR [eax + 5443], 3 + mov BYTE PTR [eax + 5444], 3 + mov BYTE PTR [eax + 5445], 3 + mov BYTE PTR [eax + 5446], 3 + mov BYTE PTR [eax + 5447], 3 + mov BYTE PTR [eax + 5448], 3 + mov BYTE PTR [eax + 5449], 3 + mov BYTE PTR [eax + 5450], 3 + mov BYTE PTR [eax + 5451], 3 + mov BYTE PTR [eax + 5452], 3 + mov BYTE PTR [eax + 5453], 3 + mov BYTE PTR [eax + 5454], 3 + mov BYTE PTR [eax + 5455], 3 + mov BYTE PTR [eax + 5456], 3 + mov BYTE PTR [eax + 5457], 3 + mov BYTE PTR [eax + 5458], 3 + mov BYTE PTR [eax + 5459], 3 + mov BYTE PTR [eax + 5760], 3 + mov BYTE PTR [eax + 5761], 3 + mov BYTE PTR [eax + 5762], 3 + mov BYTE PTR [eax + 5763], 3 + mov BYTE PTR [eax + 5764], 3 + mov BYTE PTR [eax + 5765], 3 + mov BYTE PTR [eax + 5766], 3 + mov BYTE PTR [eax + 5767], 3 + mov BYTE PTR [eax + 5768], 3 + mov BYTE PTR [eax + 5769], 3 + mov BYTE PTR [eax + 5770], 3 + mov BYTE PTR [eax + 5771], 3 + mov BYTE PTR [eax + 5772], 3 + mov BYTE PTR [eax + 5773], 3 + mov BYTE PTR [eax + 5774], 3 + mov BYTE PTR [eax + 5775], 3 + mov BYTE PTR [eax + 5776], 3 + mov BYTE PTR [eax + 5777], 3 + mov BYTE PTR [eax + 5778], 3 + mov BYTE PTR [eax + 5779], 3 + mov BYTE PTR [eax + 6080], 3 + mov BYTE PTR [eax + 6081], 3 + mov BYTE PTR [eax + 6082], 3 + mov BYTE PTR [eax + 6083], 3 + mov BYTE PTR [eax + 6084], 3 + mov BYTE PTR [eax + 6085], 3 + mov BYTE PTR [eax + 6086], 3 + mov BYTE PTR [eax + 6087], 3 + mov BYTE PTR [eax + 6088], 3 + mov BYTE PTR [eax + 6089], 3 + mov BYTE PTR [eax + 6090], 3 + mov BYTE PTR [eax + 6091], 3 + mov BYTE PTR [eax + 6092], 3 + mov BYTE PTR [eax + 6093], 3 + mov BYTE PTR [eax + 6094], 3 + mov BYTE PTR [eax + 6095], 3 + mov BYTE PTR [eax + 6096], 3 + mov BYTE PTR [eax + 6097], 3 + mov BYTE PTR [eax + 6098], 3 + mov BYTE PTR [eax + 6099], 3 + + pop ebx + pop ebp + ret + + +sprite_arenaFloor_: + push ebp + mov ebp, esp + push ebx + + mov eax, [ebp + 8] + + + mov BYTE PTR [eax + 0], 4 + mov BYTE PTR [eax + 1], 4 + mov BYTE PTR [eax + 2], 4 + mov BYTE PTR [eax + 3], 4 + mov BYTE PTR [eax + 4], 4 + mov BYTE PTR [eax + 5], 4 + mov BYTE PTR [eax + 6], 4 + mov BYTE PTR [eax + 7], 4 + mov BYTE PTR [eax + 8], 4 + mov BYTE PTR [eax + 9], 4 + mov BYTE PTR [eax + 10], 4 + mov BYTE PTR [eax + 11], 4 + mov BYTE PTR [eax + 12], 4 + mov BYTE PTR [eax + 13], 4 + mov BYTE PTR [eax + 14], 4 + mov BYTE PTR [eax + 15], 4 + mov BYTE PTR [eax + 16], 4 + mov BYTE PTR [eax + 17], 4 + mov BYTE PTR [eax + 18], 4 + mov BYTE PTR [eax + 19], 4 + mov BYTE PTR [eax + 320], 4 + mov BYTE PTR [eax + 321], 4 + mov BYTE PTR [eax + 322], 4 + mov BYTE PTR [eax + 323], 4 + mov BYTE PTR [eax + 324], 4 + mov BYTE PTR [eax + 325], 4 + mov BYTE PTR [eax + 326], 4 + mov BYTE PTR [eax + 327], 4 + mov BYTE PTR [eax + 328], 4 + mov BYTE PTR [eax + 329], 4 + mov BYTE PTR [eax + 330], 4 + mov BYTE PTR [eax + 331], 4 + mov BYTE PTR [eax + 332], 4 + mov BYTE PTR [eax + 333], 4 + mov BYTE PTR [eax + 334], 4 + mov BYTE PTR [eax + 335], 4 + mov BYTE PTR [eax + 336], 4 + mov BYTE PTR [eax + 337], 4 + mov BYTE PTR [eax + 338], 4 + mov BYTE PTR [eax + 339], 4 + mov BYTE PTR [eax + 640], 4 + mov BYTE PTR [eax + 641], 4 + mov BYTE PTR [eax + 642], 4 + mov BYTE PTR [eax + 643], 4 + mov BYTE PTR [eax + 644], 4 + mov BYTE PTR [eax + 645], 4 + mov BYTE PTR [eax + 646], 4 + mov BYTE PTR [eax + 647], 4 + mov BYTE PTR [eax + 648], 4 + mov BYTE PTR [eax + 649], 4 + mov BYTE PTR [eax + 650], 4 + mov BYTE PTR [eax + 651], 4 + mov BYTE PTR [eax + 652], 4 + mov BYTE PTR [eax + 653], 4 + mov BYTE PTR [eax + 654], 4 + mov BYTE PTR [eax + 655], 4 + mov BYTE PTR [eax + 656], 4 + mov BYTE PTR [eax + 657], 4 + mov BYTE PTR [eax + 658], 4 + mov BYTE PTR [eax + 659], 4 + mov BYTE PTR [eax + 960], 4 + mov BYTE PTR [eax + 961], 4 + mov BYTE PTR [eax + 962], 4 + mov BYTE PTR [eax + 963], 4 + mov BYTE PTR [eax + 964], 4 + mov BYTE PTR [eax + 965], 4 + mov BYTE PTR [eax + 966], 4 + mov BYTE PTR [eax + 967], 4 + mov BYTE PTR [eax + 968], 4 + mov BYTE PTR [eax + 969], 4 + mov BYTE PTR [eax + 970], 4 + mov BYTE PTR [eax + 971], 4 + mov BYTE PTR [eax + 972], 4 + mov BYTE PTR [eax + 973], 4 + mov BYTE PTR [eax + 974], 4 + mov BYTE PTR [eax + 975], 4 + mov BYTE PTR [eax + 976], 4 + mov BYTE PTR [eax + 977], 4 + mov BYTE PTR [eax + 978], 4 + mov BYTE PTR [eax + 979], 4 + mov BYTE PTR [eax + 1280], 4 + mov BYTE PTR [eax + 1281], 4 + mov BYTE PTR [eax + 1282], 4 + mov BYTE PTR [eax + 1283], 4 + mov BYTE PTR [eax + 1284], 4 + mov BYTE PTR [eax + 1285], 4 + mov BYTE PTR [eax + 1286], 4 + mov BYTE PTR [eax + 1287], 4 + mov BYTE PTR [eax + 1288], 4 + mov BYTE PTR [eax + 1289], 4 + mov BYTE PTR [eax + 1290], 4 + mov BYTE PTR [eax + 1291], 4 + mov BYTE PTR [eax + 1292], 4 + mov BYTE PTR [eax + 1293], 4 + mov BYTE PTR [eax + 1294], 4 + mov BYTE PTR [eax + 1295], 4 + mov BYTE PTR [eax + 1296], 4 + mov BYTE PTR [eax + 1297], 4 + mov BYTE PTR [eax + 1298], 4 + mov BYTE PTR [eax + 1299], 4 + mov BYTE PTR [eax + 1600], 4 + mov BYTE PTR [eax + 1601], 4 + mov BYTE PTR [eax + 1602], 4 + mov BYTE PTR [eax + 1603], 4 + mov BYTE PTR [eax + 1604], 4 + mov BYTE PTR [eax + 1605], 4 + mov BYTE PTR [eax + 1606], 4 + mov BYTE PTR [eax + 1607], 4 + mov BYTE PTR [eax + 1608], 4 + mov BYTE PTR [eax + 1609], 4 + mov BYTE PTR [eax + 1610], 4 + mov BYTE PTR [eax + 1611], 4 + mov BYTE PTR [eax + 1612], 4 + mov BYTE PTR [eax + 1613], 4 + mov BYTE PTR [eax + 1614], 4 + mov BYTE PTR [eax + 1615], 4 + mov BYTE PTR [eax + 1616], 4 + mov BYTE PTR [eax + 1617], 4 + mov BYTE PTR [eax + 1618], 4 + mov BYTE PTR [eax + 1619], 4 + mov BYTE PTR [eax + 1920], 4 + mov BYTE PTR [eax + 1921], 4 + mov BYTE PTR [eax + 1922], 4 + mov BYTE PTR [eax + 1923], 4 + mov BYTE PTR [eax + 1924], 4 + mov BYTE PTR [eax + 1925], 4 + mov BYTE PTR [eax + 1926], 4 + mov BYTE PTR [eax + 1927], 4 + mov BYTE PTR [eax + 1928], 4 + mov BYTE PTR [eax + 1929], 4 + mov BYTE PTR [eax + 1930], 4 + mov BYTE PTR [eax + 1931], 4 + mov BYTE PTR [eax + 1932], 4 + mov BYTE PTR [eax + 1933], 4 + mov BYTE PTR [eax + 1934], 4 + mov BYTE PTR [eax + 1935], 4 + mov BYTE PTR [eax + 1936], 4 + mov BYTE PTR [eax + 1937], 4 + mov BYTE PTR [eax + 1938], 4 + mov BYTE PTR [eax + 1939], 4 + mov BYTE PTR [eax + 2240], 4 + mov BYTE PTR [eax + 2241], 4 + mov BYTE PTR [eax + 2242], 4 + mov BYTE PTR [eax + 2243], 4 + mov BYTE PTR [eax + 2244], 4 + mov BYTE PTR [eax + 2245], 4 + mov BYTE PTR [eax + 2246], 4 + mov BYTE PTR [eax + 2247], 4 + mov BYTE PTR [eax + 2248], 4 + mov BYTE PTR [eax + 2249], 4 + mov BYTE PTR [eax + 2250], 4 + mov BYTE PTR [eax + 2251], 4 + mov BYTE PTR [eax + 2252], 4 + mov BYTE PTR [eax + 2253], 4 + mov BYTE PTR [eax + 2254], 4 + mov BYTE PTR [eax + 2255], 4 + mov BYTE PTR [eax + 2256], 4 + mov BYTE PTR [eax + 2257], 4 + mov BYTE PTR [eax + 2258], 4 + mov BYTE PTR [eax + 2259], 4 + mov BYTE PTR [eax + 2560], 4 + mov BYTE PTR [eax + 2561], 4 + mov BYTE PTR [eax + 2562], 4 + mov BYTE PTR [eax + 2563], 4 + mov BYTE PTR [eax + 2564], 4 + mov BYTE PTR [eax + 2565], 4 + mov BYTE PTR [eax + 2566], 4 + mov BYTE PTR [eax + 2567], 4 + mov BYTE PTR [eax + 2568], 4 + mov BYTE PTR [eax + 2569], 4 + mov BYTE PTR [eax + 2570], 4 + mov BYTE PTR [eax + 2571], 4 + mov BYTE PTR [eax + 2572], 4 + mov BYTE PTR [eax + 2573], 4 + mov BYTE PTR [eax + 2574], 4 + mov BYTE PTR [eax + 2575], 4 + mov BYTE PTR [eax + 2576], 4 + mov BYTE PTR [eax + 2577], 4 + mov BYTE PTR [eax + 2578], 4 + mov BYTE PTR [eax + 2579], 4 + mov BYTE PTR [eax + 2880], 4 + mov BYTE PTR [eax + 2881], 4 + mov BYTE PTR [eax + 2882], 4 + mov BYTE PTR [eax + 2883], 4 + mov BYTE PTR [eax + 2884], 4 + mov BYTE PTR [eax + 2885], 4 + mov BYTE PTR [eax + 2886], 4 + mov BYTE PTR [eax + 2887], 4 + mov BYTE PTR [eax + 2888], 4 + mov BYTE PTR [eax + 2889], 4 + mov BYTE PTR [eax + 2890], 4 + mov BYTE PTR [eax + 2891], 4 + mov BYTE PTR [eax + 2892], 4 + mov BYTE PTR [eax + 2893], 4 + mov BYTE PTR [eax + 2894], 4 + mov BYTE PTR [eax + 2895], 4 + mov BYTE PTR [eax + 2896], 4 + mov BYTE PTR [eax + 2897], 4 + mov BYTE PTR [eax + 2898], 4 + mov BYTE PTR [eax + 2899], 4 + mov BYTE PTR [eax + 3200], 4 + mov BYTE PTR [eax + 3201], 4 + mov BYTE PTR [eax + 3202], 4 + mov BYTE PTR [eax + 3203], 4 + mov BYTE PTR [eax + 3204], 4 + mov BYTE PTR [eax + 3205], 4 + mov BYTE PTR [eax + 3206], 4 + mov BYTE PTR [eax + 3207], 4 + mov BYTE PTR [eax + 3208], 4 + mov BYTE PTR [eax + 3209], 4 + mov BYTE PTR [eax + 3210], 4 + mov BYTE PTR [eax + 3211], 4 + mov BYTE PTR [eax + 3212], 4 + mov BYTE PTR [eax + 3213], 4 + mov BYTE PTR [eax + 3214], 4 + mov BYTE PTR [eax + 3215], 4 + mov BYTE PTR [eax + 3216], 4 + mov BYTE PTR [eax + 3217], 4 + mov BYTE PTR [eax + 3218], 4 + mov BYTE PTR [eax + 3219], 4 + mov BYTE PTR [eax + 3520], 4 + mov BYTE PTR [eax + 3521], 4 + mov BYTE PTR [eax + 3522], 4 + mov BYTE PTR [eax + 3523], 4 + mov BYTE PTR [eax + 3524], 4 + mov BYTE PTR [eax + 3525], 4 + mov BYTE PTR [eax + 3526], 4 + mov BYTE PTR [eax + 3527], 4 + mov BYTE PTR [eax + 3528], 4 + mov BYTE PTR [eax + 3529], 4 + mov BYTE PTR [eax + 3530], 4 + mov BYTE PTR [eax + 3531], 4 + mov BYTE PTR [eax + 3532], 4 + mov BYTE PTR [eax + 3533], 4 + mov BYTE PTR [eax + 3534], 4 + mov BYTE PTR [eax + 3535], 4 + mov BYTE PTR [eax + 3536], 4 + mov BYTE PTR [eax + 3537], 4 + mov BYTE PTR [eax + 3538], 4 + mov BYTE PTR [eax + 3539], 4 + mov BYTE PTR [eax + 3840], 4 + mov BYTE PTR [eax + 3841], 4 + mov BYTE PTR [eax + 3842], 4 + mov BYTE PTR [eax + 3843], 4 + mov BYTE PTR [eax + 3844], 4 + mov BYTE PTR [eax + 3845], 4 + mov BYTE PTR [eax + 3846], 4 + mov BYTE PTR [eax + 3847], 4 + mov BYTE PTR [eax + 3848], 4 + mov BYTE PTR [eax + 3849], 4 + mov BYTE PTR [eax + 3850], 4 + mov BYTE PTR [eax + 3851], 4 + mov BYTE PTR [eax + 3852], 4 + mov BYTE PTR [eax + 3853], 4 + mov BYTE PTR [eax + 3854], 4 + mov BYTE PTR [eax + 3855], 4 + mov BYTE PTR [eax + 3856], 4 + mov BYTE PTR [eax + 3857], 4 + mov BYTE PTR [eax + 3858], 4 + mov BYTE PTR [eax + 3859], 4 + mov BYTE PTR [eax + 4160], 4 + mov BYTE PTR [eax + 4161], 4 + mov BYTE PTR [eax + 4162], 4 + mov BYTE PTR [eax + 4163], 4 + mov BYTE PTR [eax + 4164], 4 + mov BYTE PTR [eax + 4165], 4 + mov BYTE PTR [eax + 4166], 4 + mov BYTE PTR [eax + 4167], 4 + mov BYTE PTR [eax + 4168], 4 + mov BYTE PTR [eax + 4169], 4 + mov BYTE PTR [eax + 4170], 4 + mov BYTE PTR [eax + 4171], 4 + mov BYTE PTR [eax + 4172], 4 + mov BYTE PTR [eax + 4173], 4 + mov BYTE PTR [eax + 4174], 4 + mov BYTE PTR [eax + 4175], 4 + mov BYTE PTR [eax + 4176], 4 + mov BYTE PTR [eax + 4177], 4 + mov BYTE PTR [eax + 4178], 4 + mov BYTE PTR [eax + 4179], 4 + mov BYTE PTR [eax + 4480], 4 + mov BYTE PTR [eax + 4481], 4 + mov BYTE PTR [eax + 4482], 4 + mov BYTE PTR [eax + 4483], 4 + mov BYTE PTR [eax + 4484], 4 + mov BYTE PTR [eax + 4485], 4 + mov BYTE PTR [eax + 4486], 4 + mov BYTE PTR [eax + 4487], 4 + mov BYTE PTR [eax + 4488], 4 + mov BYTE PTR [eax + 4489], 4 + mov BYTE PTR [eax + 4490], 4 + mov BYTE PTR [eax + 4491], 4 + mov BYTE PTR [eax + 4492], 4 + mov BYTE PTR [eax + 4493], 4 + mov BYTE PTR [eax + 4494], 4 + mov BYTE PTR [eax + 4495], 4 + mov BYTE PTR [eax + 4496], 4 + mov BYTE PTR [eax + 4497], 4 + mov BYTE PTR [eax + 4498], 4 + mov BYTE PTR [eax + 4499], 4 + mov BYTE PTR [eax + 4800], 4 + mov BYTE PTR [eax + 4801], 4 + mov BYTE PTR [eax + 4802], 4 + mov BYTE PTR [eax + 4803], 4 + mov BYTE PTR [eax + 4804], 4 + mov BYTE PTR [eax + 4805], 4 + mov BYTE PTR [eax + 4806], 4 + mov BYTE PTR [eax + 4807], 4 + mov BYTE PTR [eax + 4808], 4 + mov BYTE PTR [eax + 4809], 4 + mov BYTE PTR [eax + 4810], 4 + mov BYTE PTR [eax + 4811], 4 + mov BYTE PTR [eax + 4812], 4 + mov BYTE PTR [eax + 4813], 4 + mov BYTE PTR [eax + 4814], 4 + mov BYTE PTR [eax + 4815], 4 + mov BYTE PTR [eax + 4816], 4 + mov BYTE PTR [eax + 4817], 4 + mov BYTE PTR [eax + 4818], 4 + mov BYTE PTR [eax + 4819], 4 + mov BYTE PTR [eax + 5120], 4 + mov BYTE PTR [eax + 5121], 4 + mov BYTE PTR [eax + 5122], 4 + mov BYTE PTR [eax + 5123], 4 + mov BYTE PTR [eax + 5124], 4 + mov BYTE PTR [eax + 5125], 4 + mov BYTE PTR [eax + 5126], 4 + mov BYTE PTR [eax + 5127], 4 + mov BYTE PTR [eax + 5128], 4 + mov BYTE PTR [eax + 5129], 4 + mov BYTE PTR [eax + 5130], 4 + mov BYTE PTR [eax + 5131], 4 + mov BYTE PTR [eax + 5132], 4 + mov BYTE PTR [eax + 5133], 4 + mov BYTE PTR [eax + 5134], 4 + mov BYTE PTR [eax + 5135], 4 + mov BYTE PTR [eax + 5136], 4 + mov BYTE PTR [eax + 5137], 4 + mov BYTE PTR [eax + 5138], 4 + mov BYTE PTR [eax + 5139], 4 + mov BYTE PTR [eax + 5440], 4 + mov BYTE PTR [eax + 5441], 4 + mov BYTE PTR [eax + 5442], 4 + mov BYTE PTR [eax + 5443], 4 + mov BYTE PTR [eax + 5444], 4 + mov BYTE PTR [eax + 5445], 4 + mov BYTE PTR [eax + 5446], 4 + mov BYTE PTR [eax + 5447], 4 + mov BYTE PTR [eax + 5448], 4 + mov BYTE PTR [eax + 5449], 4 + mov BYTE PTR [eax + 5450], 4 + mov BYTE PTR [eax + 5451], 4 + mov BYTE PTR [eax + 5452], 4 + mov BYTE PTR [eax + 5453], 4 + mov BYTE PTR [eax + 5454], 4 + mov BYTE PTR [eax + 5455], 4 + mov BYTE PTR [eax + 5456], 4 + mov BYTE PTR [eax + 5457], 4 + mov BYTE PTR [eax + 5458], 4 + mov BYTE PTR [eax + 5459], 4 + mov BYTE PTR [eax + 5760], 4 + mov BYTE PTR [eax + 5761], 4 + mov BYTE PTR [eax + 5762], 4 + mov BYTE PTR [eax + 5763], 4 + mov BYTE PTR [eax + 5764], 4 + mov BYTE PTR [eax + 5765], 4 + mov BYTE PTR [eax + 5766], 4 + mov BYTE PTR [eax + 5767], 4 + mov BYTE PTR [eax + 5768], 4 + mov BYTE PTR [eax + 5769], 4 + mov BYTE PTR [eax + 5770], 4 + mov BYTE PTR [eax + 5771], 4 + mov BYTE PTR [eax + 5772], 4 + mov BYTE PTR [eax + 5773], 4 + mov BYTE PTR [eax + 5774], 4 + mov BYTE PTR [eax + 5775], 4 + mov BYTE PTR [eax + 5776], 4 + mov BYTE PTR [eax + 5777], 4 + mov BYTE PTR [eax + 5778], 4 + mov BYTE PTR [eax + 5779], 4 + mov BYTE PTR [eax + 6080], 4 + mov BYTE PTR [eax + 6081], 4 + mov BYTE PTR [eax + 6082], 4 + mov BYTE PTR [eax + 6083], 4 + mov BYTE PTR [eax + 6084], 4 + mov BYTE PTR [eax + 6085], 4 + mov BYTE PTR [eax + 6086], 4 + mov BYTE PTR [eax + 6087], 4 + mov BYTE PTR [eax + 6088], 4 + mov BYTE PTR [eax + 6089], 4 + mov BYTE PTR [eax + 6090], 4 + mov BYTE PTR [eax + 6091], 4 + mov BYTE PTR [eax + 6092], 4 + mov BYTE PTR [eax + 6093], 4 + mov BYTE PTR [eax + 6094], 4 + mov BYTE PTR [eax + 6095], 4 + mov BYTE PTR [eax + 6096], 4 + mov BYTE PTR [eax + 6097], 4 + mov BYTE PTR [eax + 6098], 4 + mov BYTE PTR [eax + 6099], 4 + + pop ebx + pop ebp + ret + + +sprite_rabbit_: + push ebp + mov ebp, esp + push ebx + + mov eax, [ebp + 8] + + + mov BYTE PTR [eax + -1921], 1 + mov BYTE PTR [eax + -1920], 1 + mov BYTE PTR [eax + -1602], 1 + mov BYTE PTR [eax + -1601], 1 + mov BYTE PTR [eax + -1600], 1 + mov BYTE PTR [eax + -1599], 1 + mov BYTE PTR [eax + -1282], 1 + mov BYTE PTR [eax + -1281], 1 + mov BYTE PTR [eax + -1280], 1 + mov BYTE PTR [eax + -1279], 1 + mov BYTE PTR [eax + -961], 1 + mov BYTE PTR [eax + -960], 1 + mov BYTE PTR [eax + -641], 1 + mov BYTE PTR [eax + -640], 1 + mov BYTE PTR [eax + -325], 1 + mov BYTE PTR [eax + -324], 1 + mov BYTE PTR [eax + -323], 1 + mov BYTE PTR [eax + -322], 1 + mov BYTE PTR [eax + -321], 1 + mov BYTE PTR [eax + -320], 1 + mov BYTE PTR [eax + -319], 1 + mov BYTE PTR [eax + -318], 1 + mov BYTE PTR [eax + -317], 1 + mov BYTE PTR [eax + -316], 1 + mov BYTE PTR [eax + -3], 1 + mov BYTE PTR [eax + -2], 1 + mov BYTE PTR [eax + -1], 1 + mov BYTE PTR [eax + 0], 1 + mov BYTE PTR [eax + 1], 1 + mov BYTE PTR [eax + 2], 1 + mov BYTE PTR [eax + 317], 1 + mov BYTE PTR [eax + 318], 1 + mov BYTE PTR [eax + 319], 1 + mov BYTE PTR [eax + 320], 1 + mov BYTE PTR [eax + 321], 1 + mov BYTE PTR [eax + 322], 1 + mov BYTE PTR [eax + 637], 1 + mov BYTE PTR [eax + 638], 1 + mov BYTE PTR [eax + 639], 1 + mov BYTE PTR [eax + 640], 1 + mov BYTE PTR [eax + 641], 1 + mov BYTE PTR [eax + 642], 1 + mov BYTE PTR [eax + 958], 1 + mov BYTE PTR [eax + 961], 1 + mov BYTE PTR [eax + 1278], 1 + mov BYTE PTR [eax + 1281], 1 + mov BYTE PTR [eax + 1598], 1 + mov BYTE PTR [eax + 1601], 1 + mov BYTE PTR [eax + 1918], 1 + mov BYTE PTR [eax + 1921], 1 + + pop ebx + pop ebp + ret + + +sprite_mouse_: + push ebp + mov ebp, esp + push ebx + + mov eax, [ebp + 8] + + + mov BYTE PTR [eax + -1281], 5 + mov BYTE PTR [eax + -1280], 5 + mov BYTE PTR [eax + -961], 5 + mov BYTE PTR [eax + -960], 5 + mov BYTE PTR [eax + -324], 5 + mov BYTE PTR [eax + -323], 5 + mov BYTE PTR [eax + -318], 5 + mov BYTE PTR [eax + -317], 5 + mov BYTE PTR [eax + -4], 5 + mov BYTE PTR [eax + -3], 5 + mov BYTE PTR [eax + 2], 5 + mov BYTE PTR [eax + 3], 5 + mov BYTE PTR [eax + 639], 5 + mov BYTE PTR [eax + 640], 5 + mov BYTE PTR [eax + 959], 5 + mov BYTE PTR [eax + 960], 5 + + pop ebx + pop ebp + ret + + +sprite_bullet_: + push ebp + mov ebp, esp + push ebx + + mov eax, [ebp + 8] + + + mov BYTE PTR [eax + 0], 5 + mov BYTE PTR [eax + 1], 5 + mov BYTE PTR [eax + 320], 5 + mov BYTE PTR [eax + 321], 5 + + pop ebx + pop ebp + ret + + +sprite_enemy_: + push ebp + mov ebp, esp + push ebx + + mov eax, [ebp + 8] + + + mov BYTE PTR [eax + -1921], 1 + mov BYTE PTR [eax + -1920], 1 + mov BYTE PTR [eax + -1602], 1 + mov BYTE PTR [eax + -1601], 1 + mov BYTE PTR [eax + -1600], 1 + mov BYTE PTR [eax + -1599], 1 + mov BYTE PTR [eax + -1282], 1 + mov BYTE PTR [eax + -1281], 1 + mov BYTE PTR [eax + -1280], 1 + mov BYTE PTR [eax + -1279], 1 + mov BYTE PTR [eax + -961], 1 + mov BYTE PTR [eax + -960], 1 + mov BYTE PTR [eax + -641], 1 + mov BYTE PTR [eax + -640], 1 + mov BYTE PTR [eax + -325], 1 + mov BYTE PTR [eax + -324], 1 + mov BYTE PTR [eax + -323], 1 + mov BYTE PTR [eax + -322], 1 + mov BYTE PTR [eax + -321], 1 + mov BYTE PTR [eax + -320], 1 + mov BYTE PTR [eax + -319], 1 + mov BYTE PTR [eax + -318], 1 + mov BYTE PTR [eax + -317], 1 + mov BYTE PTR [eax + -316], 1 + mov BYTE PTR [eax + -3], 1 + mov BYTE PTR [eax + -2], 1 + mov BYTE PTR [eax + -1], 1 + mov BYTE PTR [eax + 0], 1 + mov BYTE PTR [eax + 1], 1 + mov BYTE PTR [eax + 2], 1 + mov BYTE PTR [eax + 317], 1 + mov BYTE PTR [eax + 318], 1 + mov BYTE PTR [eax + 319], 1 + mov BYTE PTR [eax + 320], 1 + mov BYTE PTR [eax + 321], 1 + mov BYTE PTR [eax + 322], 1 + mov BYTE PTR [eax + 637], 1 + mov BYTE PTR [eax + 638], 1 + mov BYTE PTR [eax + 639], 1 + mov BYTE PTR [eax + 640], 1 + mov BYTE PTR [eax + 641], 1 + mov BYTE PTR [eax + 642], 1 + mov BYTE PTR [eax + 958], 1 + mov BYTE PTR [eax + 961], 1 + mov BYTE PTR [eax + 1278], 1 + mov BYTE PTR [eax + 1281], 1 + mov BYTE PTR [eax + 1598], 1 + mov BYTE PTR [eax + 1601], 1 + mov BYTE PTR [eax + 1918], 1 + mov BYTE PTR [eax + 1921], 1 + + pop ebx + pop ebp + ret + + +end diff --git a/sprites.h b/sprites.h new file mode 100644 index 0000000..f2d86c5 --- /dev/null +++ b/sprites.h @@ -0,0 +1,22 @@ + +extern void sprite_arenaWallTop(byte *); +#pragma aux (__cdecl) sprite_arenaWallTop "sprite_arenaWallTop_" + +extern void sprite_arenaWallSide(byte *); +#pragma aux (__cdecl) sprite_arenaWallSide "sprite_arenaWallSide_" + +extern void sprite_arenaFloor(byte *); +#pragma aux (__cdecl) sprite_arenaFloor "sprite_arenaFloor_" + +extern void sprite_rabbit(byte *); +#pragma aux (__cdecl) sprite_rabbit "sprite_rabbit_" + +extern void sprite_mouse(byte *); +#pragma aux (__cdecl) sprite_mouse "sprite_mouse_" + +extern void sprite_bullet(byte *); +#pragma aux (__cdecl) sprite_bullet "sprite_bullet_" + +extern void sprite_enemy(byte *); +#pragma aux (__cdecl) sprite_enemy "sprite_enemy_" + diff --git a/spritesheet.yml b/spritesheet.yml new file mode 100644 index 0000000..a1b6bdc --- /dev/null +++ b/spritesheet.yml @@ -0,0 +1,35 @@ +screen: + width: 320 + transparentColor: 0 +files: + - file: sprtsht.bmp + prefix: "sprite" + sprites: + arenaWallTop: + position: [0, 0] + dimensions: [20, 20] + offset: [10, 10] + arenaWallSide: + position: [20, 0] + dimensions: [20, 20] + offset: [0, 0] + arenaFloor: + position: [40, 0] + dimensions: [20, 20] + offset: [0, 0] + rabbit: + position: [0, 20] + dimensions: [16, 16] + offset: [8, 8] + mouse: + position: [16, 20] + dimensions: [8, 8] + offset: [4, 4] + bullet: + position: [16, 28] + dimensions: [4, 4] + offset: [1, 1] + enemy: + position: [0, 20] + dimensions: [16, 16] + offset: [8, 8] diff --git a/system/vga.c b/system/vga.c index 4f8043a..17ab604 100644 --- a/system/vga.c +++ b/system/vga.c @@ -22,7 +22,7 @@ byte *initializeDrawBuffer() { } void copyDrawBufferToDisplay() { - memcpy(VGA, drawBuffer, 320 * 200); + memcpy(VGA, drawBuffer, VGA_DISPLAY_WIDTH * VGA_DISPLAY_HEIGHT); } void freeDrawBuffer() { diff --git a/test.asm b/test.asm index f59ca4a..4665e94 100644 --- a/test.asm +++ b/test.asm @@ -1,10 +1,11 @@ -PUBLIC doAThing_ +#PUBLIC doAThing_ +#PUBLIC renderTopTile_ +PUBLIC renderFloorTile_ .386 .model flat,c -_TEXT segment byte public 'CODE' - +.CODE doAThing_: push ebp mov ebp, esp @@ -14,6 +15,53 @@ doAThing_: pop ebp ret -_TEXT ends +renderTopTile_: + push ebp + mov ebp, esp + push ebx + + mov eax, [ebp + 8] + mov ebx, 20 + +_renderNextLine: + mov DWORD PTR [eax], 02020202h + mov DWORD PTR [eax + 4], 02020202h + mov DWORD PTR [eax + 8], 02020202h + mov DWORD PTR [eax + 12], 02020202h + mov DWORD PTR [eax + 16], 02020202h + + add eax, 320 + dec ebx + cmp ebx, 0 + jne _renderNextLine + + pop ebx + pop ebp + ret + +renderFloorTile_: + push ebp + mov ebp, esp + push ebx + + mov eax, [ebp + 8] + mov ebx, 20 + +_renderNextFloorLine: + mov DWORD PTR [eax], 04040404h + mov DWORD PTR [eax + 4], 04040404h + mov DWORD PTR [eax + 8], 04040404h + mov DWORD PTR [eax + 12], 04040404h + mov DWORD PTR [eax + 16], 04040404h + + add eax, 320 + dec ebx + cmp ebx, 0 + jne _renderNextFloorLine + +_done: + pop ebx + pop ebp + ret end