Skip to content
Permalink
Browse files

Level 4 added with working bombs

Added Horiztonal and Vertical bombs.
Which allowed level 4 to be added.
Consolidated some of the logic into a common file.
Moving tiles won't redraw if they are off screen, and will also move faster.
  • Loading branch information...
thegouldfish committed May 29, 2019
1 parent 7e8d47e commit b137083383dee7c15993fd57ba073bc5690478ab
@@ -9,7 +9,7 @@ param
[String]$SourceLocation = "",
[String]$AssemblyName = "",
[String]$Flavour = "Release",
[String]$SGDK = "E:\Programming\sgdk134" # Set me
[String]$SGDK = "E:\Programming\MegaDrive\sgdk140" # Set me
)

if(-not $Action)
@@ -0,0 +1 @@
UULRDDRRDRRDDUUUUULLRDDDDLDLLLLUDDDDDDURLRURUDRRUDDDLRDDDDDDDUUUUUUUUULLLLUUURRRUUULLLLLUUDDDDDDDDDDDDDDDDUUURLDDRRRRDUUUUDDDDLDDDDDRRRDLLRRUUUDDDDDDUUULLLRRRDLLLLRLLDDDDLRDDLRUURLUURDRLDDRRRDUURRLDUDRRDRRRRRRRRRLUURRUDLLLLDLURUUURRDURRRRRDDDLUUULLLLLLLRRRDDDLLUULLLLLLUDRRUDDDUURRRRURRRRRRRRDLDDDDRRRURRDRRRLLLULLUDRRUDLLLUDRRRDRRRULRULLLDLLLLLLxLRRUDLLDLLLUDULULLDDUDLLLLUULDLRLDDDDDRURLDRRRUURRRDLULLDRLDDRLUUURRRDLLDDRRRRRRRRLUURLLLLUDRRDDRRRDDDDDDDDDDDDDDDUULLLLDLDDDRRRRRDULLDUUUUURRUUUUUUUUUUUUULULDRRDDDDDDDDDDDDDLLLLLUULRRRRUUULLLUUURDRRDULLLUUDRUDURURLDLLUUDDDDDDDDDLLDDDDLLLLLLLLLLLLLLUUUDDDRRRRRRRRRRRRRRUUUUUUULLLLLLLLLLLLRRRRRRRRRRRRUUUUUUDDDDLULLRRRUUUDDDLLLLUURURRDLRRDDLLLLUURRRDDLLLLLLLLLUULRRDDRUULLLLDDDRLUUURRRRDDRRRRRRRRDDDDDDDDDDLLLLLLUUUULURRRRRDDDLLLLUUURRRRDDDLLLLLUUURRRRRDDDLLLLUUURRDDDLLLLLUUULRDLLLDDUULULUUUUUUUUUURRDRRUDRRLLLLLRUUUUUUUUDDDDRLURRRUUUDDDDDULLLDDDDRRRRRRR
@@ -0,0 +1,3 @@
char _solution[901]={
'U','U','L','R','D','D','R','R','D','R','R','D','D','U','U','U','U','U','L','L','R','D','D','D','D','L','D','L','L','L','L','U','D','D','D','D','D','D','U','R','L','R','U','R','U','D','R','R','U','D','D','D','L','R','D','D','D','D','D','D','D','U','U','U','U','U','U','U','U','U','L','L','L','L','U','U','U','R','R','R','U','U','U','L','L','L','L','L','U','U','D','D','D','D','D','D','D','D','D','D','D','D','D','D','D','D','U','U','U','R','L','D','D','R','R','R','R','D','U','U','U','U','D','D','D','D','L','D','D','D','D','D','R','R','R','D','L','L','R','R','U','U','U','D','D','D','D','D','D','U','U','U','L','L','L','R','R','R','D','L','L','L','L','R','L','L','D','D','D','D','L','R','D','D','L','R','U','U','R','L','U','U','R','D','R','L','D','D','R','R','R','D','U','U','R','R','L','D','U','D','R','R','D','R','R','R','R','R','R','R','R','R','L','U','U','R','R','U','D','L','L','L','L','D','L','U','R','U','U','U','R','R','D','U','R','R','R','R','R','D','D','D','L','U','U','U','L','L','L','L','L','L','L','R','R','R','D','D','D','L','L','U','U','L','L','L','L','L','L','U','D','R','R','U','D','D','D','U','U','R','R','R','R','U','R','R','R','R','R','R','R','R','D','L','D','D','D','D','R','R','R','U','R','R','D','R','R','R','L','L','L','U','L','L','U','D','R','R','U','D','L','L','L','U','D','R','R','R','D','R','R','R','U','L','R','U','L','L','L','D','L','L','L','L','L','L','x','L','R','R','U','D','L','L','D','L','L','L','U','D','U','L','U','L','L','D','D','U','D','L','L','L','L','U','U','L','D','L','R','L','D','D','D','D','D','R','U','R','L','D','R','R','R','U','U','R','R','R','D','L','U','L','L','D','R','L','D','D','R','L','U','U','U','R','R','R','D','L','L','D','D','R','R','R','R','R','R','R','R','L','U','U','R','L','L','L','L','U','D','R','R','D','D','R','R','R','D','D','D','D','D','D','D','D','D','D','D','D','D','D','D','U','U','L','L','L','L','D','L','D','D','D','R','R','R','R','R','D','U','L','L','D','U','U','U','U','U','R','R','U','U','U','U','U','U','U','U','U','U','U','U','U','L','U','L','D','R','R','D','D','D','D','D','D','D','D','D','D','D','D','D','L','L','L','L','L','U','U','L','R','R','R','R','U','U','U','L','L','L','U','U','U','R','D','R','R','D','U','L','L','L','U','U','D','R','U','D','U','R','U','R','L','D','L','L','U','U','D','D','D','D','D','D','D','D','D','L','L','D','D','D','D','L','L','L','L','L','L','L','L','L','L','L','L','L','L','U','U','U','D','D','D','R','R','R','R','R','R','R','R','R','R','R','R','R','R','U','U','U','U','U','U','U','L','L','L','L','L','L','L','L','L','L','L','L','R','R','R','R','R','R','R','R','R','R','R','R','U','U','U','U','U','U','D','D','D','D','L','U','L','L','R','R','R','U','U','U','D','D','D','L','L','L','L','U','U','R','U','R','R','D','L','R','R','D','D','L','L','L','L','U','U','R','R','R','D','D','L','L','L','L','L','L','L','L','L','U','U','L','R','R','D','D','R','U','U','L','L','L','L','D','D','D','R','L','U','U','U','R','R','R','R','D','D','R','R','R','R','R','R','R','R','D','D','D','D','D','D','D','D','D','D','L','L','L','L','L','L','U','U','U','U','L','U','R','R','R','R','R','D','D','D','L','L','L','L','U','U','U','R','R','R','R','D','D','D','L','L','L','L','L','U','U','U','R','R','R','R','R','D','D','D','L','L','L','L','U','U','U','R','R','D','D','D','L','L','L','L','L','U','U','U','L','R','D','L','L','L','D','D','U','U','L','U','L','U','U','U','U','U','U','U','U','U','U','R','R','D','R','R','U','D','R','R','L','L','L','L','L','R','U','U','U','U','U','U','U','U','D','D','D','D','R','L','U','R','R','R','U','U','U','D','D','D','D','D','U','L','L','L','D','D','D','D','R','R','R','R','R','R','R',
};
@@ -7,7 +7,7 @@
# # #o #@# o#@# -# !@ #@| -##
# # ####### ####@o # o##### @##
# # #@#@# #@!##### -# #
# # !!@ # - E######## #
# # !!@ # - E########### #
# # -!# # ########## #@#### #
# # o!@ # #! !# o ###!@# #
# ##### # ##o |<# !# # |x<# #
@@ -26,7 +26,7 @@
#xxxx## #@#@## # -o- #
#######@#@ @#o # # o-@ @#
##@!@######@#- #<!< #########
#@ -## @#@#x< # #|@<@<!<#
#x |< ### ### #@|#
#@ #@## # #
#@ -## @##@#x< # #|@<@<!<#
#x |< ### ### #@|#
#@ #@## # #
################################
@@ -0,0 +1,34 @@
char _map[1024]={
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 4, 0, 0, 4, 8, 0, 8, 1, 1, 0, 1,11, 0, 4, 0, 9, 1, 4, 0, 0, 1, 1, 1, 0, 0, 0, 0, 9, 1, 8, 0,
0, 4, 0, 0, 1, 1, 9, 0, 1, 1, 0, 1, 9, 9, 4, 0, 2, 1, 1, 0, 1, 1, 1, 0,12, 3,10, 0, 8, 7, 1, 0,
0, 1, 2, 0,11, 5, 2, 1, 9,10, 0, 1, 9,11, 4, 0,12, 0, 1, 0,11, 1, 3,10, 0, 1, 1, 0,11, 0, 0, 0,
0, 1, 0, 0, 0, 0, 1, 1, 2, 1, 0, 1, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 4, 1, 0, 1, 1,11, 0, 0, 1, 9, 2, 0, 0, 1, 0, 9, 0, 1, 1, 1, 1, 0, 4,12, 1, 1, 9,10, 0,
0, 1, 0, 1, 1, 0,11, 1, 0, 4, 0, 1,11, 0, 4, 0, 1, 1, 2, 0, 1, 9, 4, 1, 0, 4, 3, 1, 1, 2, 0, 0,
0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 4,11, 1, 0, 1,11, 0, 0, 0, 0, 0, 1, 1, 4, 0, 0,
0, 1, 0, 1, 0, 4, 0, 4, 0, 1,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4, 1, 1, 1, 0, 4, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
No changes.
@@ -1,11 +1,23 @@
Plan.
Plan
----

* DMA transfer for drawing new rows and columns
* Add death state
To do
=====
* move game states out of player
* tidy up player code
* Update mini map when mask is collected
* use a list's for chickens and fish.
* record player input
* add completed solutions
* add basic replay
* Speed up code
* Add bombs killing players
* Add Level 5
* Add user initated replays

Done
====
* DMA transfer for drawing new rows and columns
* Update mini map when mask is collected
* use a list's for chickens and fish.
* record player input
* add completed solutions
* add basic replay
* Add death state
* Add bombs
* Add (and fix up) Level 4
@@ -88,7 +88,11 @@
<ClInclude Include="res\sound.h" />
<ClInclude Include="res\sprite.h" />
<ClInclude Include="src\ActiveTrackers.h" />
<ClInclude Include="src\BombH.h" />
<ClInclude Include="src\BombV.h" />
<ClInclude Include="src\ChickenLogic.h" />
<ClInclude Include="src\CommonLogic.h" />
<ClInclude Include="src\Explosion.h" />
<ClInclude Include="src\FishLogic.h" />
<ClInclude Include="src\GameMaps.h" />
<ClInclude Include="src\Globals.h" />
@@ -116,8 +120,12 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\ActiveTrackers.c" />
<ClCompile Include="src\BombH.c" />
<ClCompile Include="src\BombV.c" />
<ClCompile Include="src\boot\rom_head.c" />
<ClCompile Include="src\ChickenLogic.c" />
<ClCompile Include="src\CommonLogic.c" />
<ClCompile Include="src\Explosion.c" />
<ClCompile Include="src\FishLogic.c" />
<ClCompile Include="src\GameMaps.c" />
<ClCompile Include="src\main.c" />
@@ -75,6 +75,18 @@
<ClInclude Include="src\StateSelectLevel.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\BombH.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\Explosion.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\BombV.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\CommonLogic.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Resource Include="res\gfx.res">
@@ -139,6 +151,18 @@
<ClCompile Include="src\StateSelectLevel.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\BombH.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Explosion.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\BombV.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\CommonLogic.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="Make.ps1">
@@ -2,8 +2,11 @@
#define _RES_GFX_H_

extern const Image tile_set1;
extern const Image Forcefield_H_anim;
extern const Image Forcefield_V_anim;
extern const Image tile_set2;
extern const Image tile_set3;
extern const Image tile_explosion;
extern const Image window;
extern const Image levelSelect_Background;

@@ -1,7 +1,11 @@
// IMAGE bgb_image "gfx/bgb.png" BEST

IMAGE tile_set1 "gfx/tileset1.bmp" NONE
IMAGE tile_set2 "gfx/tileset2.bmp" NONE
IMAGE tile_set1 "gfx/tileset1.bmp" NONE NONE
IMAGE Forcefield_H_anim "gfx/Forcefield_H_animation.bmp" NONE NONE
IMAGE Forcefield_V_anim "gfx/Forcefield_V_animation.bmp" NONE NONE
IMAGE tile_set2 "gfx/tileset2.bmp" NONE NONE
IMAGE tile_set3 "gfx/tileset3.bmp" NONE
IMAGE tile_explosion "gfx/Explosion2.bmp" NONE NONE

IMAGE window "gfx/window3.bmp" BEST
IMAGE levelSelect_Background "gfx/LevelSelect.bmp" BEST
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN +288 Bytes (120%) Xor/res/gfx/TileSet1.bmp
Binary file not shown.
BIN +864 Bytes (170%) Xor/res/gfx/TileSet2.bmp
Binary file not shown.
@@ -0,0 +1,19 @@
JASC-PAL
0100
16
255 0 255
0 140 0
82 82 82
123 8 8
123 123 107
140 206 140
189 255 189
198 198 198
222 16 16
0 0 0
255 255 255
192 192 0
255 255 64
255 255 255
255 255 255
255 255 255
@@ -0,0 +1,19 @@
JASC-PAL
0100
16
255 0 255
0 140 0
82 82 82
123 8 8
123 123 107
140 206 140
189 255 189
198 198 198
222 16 16
0 0 0
255 255 255
192 192 0
255 255 64
255 255 255
255 255 255
255 255 255
@@ -4,5 +4,6 @@
extern const SpriteDefinition ShieldSprites;
extern const SpriteDefinition sp_numbers;
extern const SpriteDefinition sp_whoops;
extern const SpriteDefinition sp_set2;

#endif // _RES_SPRITE_H_
@@ -2,4 +2,5 @@

SPRITE ShieldSprites "sprites/SpriteSet1.bmp" 3 3 BEST 0
SPRITE sp_numbers "sprites/numbers.bmp" 1 1 BEST 0
SPRITE sp_whoops "sprites/whoops.bmp" 16 8 BEST 0
SPRITE sp_whoops "sprites/whoops.bmp" 16 8 BEST 0
SPRITE sp_set2 "sprites/SpriteSet2.bmp" 3 3 BEST 0
Binary file not shown.

0 comments on commit b137083

Please sign in to comment.
You can’t perform that action at this time.