]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Mario/bulldozer' into 'master'
authorMario <zacjardine@y7mail.com>
Mon, 16 Nov 2015 08:16:10 +0000 (08:16 +0000)
committerMario <zacjardine@y7mail.com>
Mon, 16 Nov 2015 08:16:10 +0000 (08:16 +0000)
Merge branch Mario/bulldozer (M merge request)

Bulldozer (Sokoban) minigame.

Assets are all from OpenClipArt, license should be fine.

See merge request !258

23 files changed:
gfx/hud/default/minigames/bd/board.jpg [new file with mode: 0644]
gfx/hud/default/minigames/bd/boulder.tga [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick1.jpg [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick2.tga [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick3.jpg [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick4.jpg [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick5.jpg [new file with mode: 0644]
gfx/hud/default/minigames/bd/brick6.tga [new file with mode: 0644]
gfx/hud/default/minigames/bd/delete.tga [new file with mode: 0644]
gfx/hud/default/minigames/bd/dozer.tga [new file with mode: 0644]
gfx/hud/default/minigames/bd/icon.jpg [new file with mode: 0644]
gfx/hud/default/minigames/bd/icon_notif.jpg [new file with mode: 0644]
gfx/hud/default/minigames/bd/icon_notif_alpha.jpg [new file with mode: 0644]
gfx/hud/default/minigames/bd/target.tga [new file with mode: 0644]
minigames/bulldozer/storage_level1.txt [new file with mode: 0644]
minigames/bulldozer/storage_level2.txt [new file with mode: 0644]
minigames/bulldozer/storage_level3.txt [new file with mode: 0644]
minigames/bulldozer/storage_level4.txt [new file with mode: 0644]
minigames/bulldozer/storage_level5.txt [new file with mode: 0644]
qcsrc/common/minigames/cl_minigames.qh
qcsrc/common/minigames/minigame/all.qh
qcsrc/common/minigames/minigame/bd.qc [new file with mode: 0644]
qcsrc/common/minigames/sv_minigames.qh

diff --git a/gfx/hud/default/minigames/bd/board.jpg b/gfx/hud/default/minigames/bd/board.jpg
new file mode 100644 (file)
index 0000000..dfe8914
Binary files /dev/null and b/gfx/hud/default/minigames/bd/board.jpg differ
diff --git a/gfx/hud/default/minigames/bd/boulder.tga b/gfx/hud/default/minigames/bd/boulder.tga
new file mode 100644 (file)
index 0000000..872e6ce
Binary files /dev/null and b/gfx/hud/default/minigames/bd/boulder.tga differ
diff --git a/gfx/hud/default/minigames/bd/brick1.jpg b/gfx/hud/default/minigames/bd/brick1.jpg
new file mode 100644 (file)
index 0000000..cb1eba6
Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick1.jpg differ
diff --git a/gfx/hud/default/minigames/bd/brick2.tga b/gfx/hud/default/minigames/bd/brick2.tga
new file mode 100644 (file)
index 0000000..f8a4385
Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick2.tga differ
diff --git a/gfx/hud/default/minigames/bd/brick3.jpg b/gfx/hud/default/minigames/bd/brick3.jpg
new file mode 100644 (file)
index 0000000..3a6330c
Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick3.jpg differ
diff --git a/gfx/hud/default/minigames/bd/brick4.jpg b/gfx/hud/default/minigames/bd/brick4.jpg
new file mode 100644 (file)
index 0000000..2b6c14f
Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick4.jpg differ
diff --git a/gfx/hud/default/minigames/bd/brick5.jpg b/gfx/hud/default/minigames/bd/brick5.jpg
new file mode 100644 (file)
index 0000000..8867955
Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick5.jpg differ
diff --git a/gfx/hud/default/minigames/bd/brick6.tga b/gfx/hud/default/minigames/bd/brick6.tga
new file mode 100644 (file)
index 0000000..39ba0d1
Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick6.tga differ
diff --git a/gfx/hud/default/minigames/bd/delete.tga b/gfx/hud/default/minigames/bd/delete.tga
new file mode 100644 (file)
index 0000000..f69334c
Binary files /dev/null and b/gfx/hud/default/minigames/bd/delete.tga differ
diff --git a/gfx/hud/default/minigames/bd/dozer.tga b/gfx/hud/default/minigames/bd/dozer.tga
new file mode 100644 (file)
index 0000000..b3a985a
Binary files /dev/null and b/gfx/hud/default/minigames/bd/dozer.tga differ
diff --git a/gfx/hud/default/minigames/bd/icon.jpg b/gfx/hud/default/minigames/bd/icon.jpg
new file mode 100644 (file)
index 0000000..53ee21c
Binary files /dev/null and b/gfx/hud/default/minigames/bd/icon.jpg differ
diff --git a/gfx/hud/default/minigames/bd/icon_notif.jpg b/gfx/hud/default/minigames/bd/icon_notif.jpg
new file mode 100644 (file)
index 0000000..8c4fcbe
Binary files /dev/null and b/gfx/hud/default/minigames/bd/icon_notif.jpg differ
diff --git a/gfx/hud/default/minigames/bd/icon_notif_alpha.jpg b/gfx/hud/default/minigames/bd/icon_notif_alpha.jpg
new file mode 100644 (file)
index 0000000..040990f
Binary files /dev/null and b/gfx/hud/default/minigames/bd/icon_notif_alpha.jpg differ
diff --git a/gfx/hud/default/minigames/bd/target.tga b/gfx/hud/default/minigames/bd/target.tga
new file mode 100644 (file)
index 0000000..355332e
Binary files /dev/null and b/gfx/hud/default/minigames/bd/target.tga differ
diff --git a/minigames/bulldozer/storage_level1.txt b/minigames/bulldozer/storage_level1.txt
new file mode 100644 (file)
index 0000000..d82be65
--- /dev/null
@@ -0,0 +1,399 @@
+// bulldozer storage "level1" last updated 16-11-2015 03:11:33
+nextlevel = "level2"
+"k11" 1 "0 -1 0"
+"a20" 6 "0 0 0"
+"a19" 6 "0 0 0"
+"a18" 6 "0 0 0"
+"a17" 6 "0 0 0"
+"a15" 6 "0 0 0"
+"a14" 6 "0 0 0"
+"a13" 6 "0 0 0"
+"a12" 6 "0 0 0"
+"a11" 6 "0 0 0"
+"a10" 6 "0 0 0"
+"a9" 6 "0 0 0"
+"a8" 6 "0 0 0"
+"a7" 6 "0 0 0"
+"a6" 6 "0 0 0"
+"a5" 6 "0 0 0"
+"a4" 6 "0 0 0"
+"a3" 6 "0 0 0"
+"a2" 6 "0 0 0"
+"a1" 6 "0 0 0"
+"b1" 6 "0 0 0"
+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"o10" 4 "0 0 0"
+"o9" 4 "0 0 0"
+"o8" 4 "0 0 0"
+"o7" 4 "0 0 0"
+"o6" 4 "0 0 0"
+"o5" 4 "0 0 0"
+"o4" 4 "0 0 0"
+"o3" 4 "0 0 0"
+"q8" 4 "0 0 0"
+"q15" 4 "0 0 0"
+"q16" 4 "0 0 0"
+"q17" 4 "0 0 0"
+"q18" 4 "0 0 0"
+"q3" 4 "0 0 0"
+"q4" 4 "0 0 0"
+"q6" 4 "0 0 0"
+"q7" 4 "0 0 0"
+"q5" 4 "0 0 0"
+"q9" 4 "0 0 0"
+"q10" 4 "0 0 0"
+"q11" 4 "0 0 0"
+"q12" 4 "0 0 0"
+"q13" 4 "0 0 0"
+"q14" 4 "0 0 0"
+"b14" 4 "0 0 0"
+"b13" 4 "0 0 0"
+"d13" 4 "0 0 0"
+"d14" 4 "0 0 0"
+"d15" 4 "0 0 0"
+"b15" 4 "0 0 0"
+"b16" 4 "0 0 0"
+"d16" 4 "0 0 0"
+"b17" 4 "0 0 0"
+"b18" 4 "0 0 0"
+"b19" 4 "0 0 0"
+"f2" 4 "0 0 0"
+"g2" 4 "0 0 0"
+"h2" 4 "0 0 0"
+"i2" 4 "0 0 0"
+"k2" 4 "0 0 0"
+"l2" 4 "0 0 0"
+"n2" 4 "0 0 0"
+"o2" 4 "0 0 0"
+"q2" 4 "0 0 0"
+"f14" 4 "0 0 0"
+"b12" 4 "0 0 0"
+"b11" 4 "0 0 0"
+"b10" 4 "0 0 0"
+"b9" 4 "0 0 0"
+"b8" 4 "0 0 0"
+"b7" 4 "0 0 0"
+"b6" 4 "0 0 0"
+"b5" 4 "0 0 0"
+"b4" 4 "0 0 0"
+"b3" 4 "0 0 0"
+"d2" 4 "0 0 0"
diff --git a/minigames/bulldozer/storage_level2.txt b/minigames/bulldozer/storage_level2.txt
new file mode 100644 (file)
index 0000000..1be5fb6
--- /dev/null
@@ -0,0 +1,247 @@
+// bulldozer storage "level2" last updated 16-11-2015 03:34:13
+nextlev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"0 0 0"
+"g8" 4 "0 0 0"
+"h8" 4 "0 0 0"
+"i8" 4 "0 0 0"
+"j8" 4 "0 0 0"
+"k8" 4 "0 0 0"
+"l8" 4 "0 0 0"
+"m8" 4 "0 0 0"
+"n8" 4 "0 0 0"
+"o8" 4 "0 0 0"
+"p8" 4 "0 0 0"
+"q8" 4 "0 0 0"
+"r8" 4 "0 0 0"
+"s8" 4 "0 0 0"
+"t8" 4 "0 0 0"
+"g3" 5 "0 0 0"
+"g7" 5 "0 0 0"
+"g4" 5 "0 0 0"
+"g6" 5 "0 0 0"
+"g5" 5 "0 0 0"
+"f7" 5 "0 0 0"
+"j5" 5 "0 0 0"
+"i7" 5 "0 0 0"
+"j7" 5 "0 0 0"
+"k7" 5 "0 0 0"
+"i4" 5 "0 0 0"
+"i3" 5 "0 0 0"
+"j3" 5 "0 0 0"
+"k3" 5 "0 0 0"
+"m7" 5 "0 0 0"
+"m6" 5 "0 0 0"
+"m4" 5 "0 0 0"
+"m5" 5 "0 0 0"
+"m3" 5 "0 0 0"
+"n3" 5 "0 0 0"
+"o3" 5 "0 0 0"
+"n5" 5 "0 0 0"
+"n7" 5 "0 0 0"
+"o7" 5 "0 0 0"
+"q7" 5 "0 0 0"
+"q6" 5 "0 0 0"
+"q4" 5 "0 0 0"
+"q5" 5 "0 0 0"
+"q3" 5 "0 0 0"
+"r5" 5 "0 0 0"
+"r4" 5 "0 0 0"
+"s3" 5 "0 0 0"
+"s5" 5 "0 0 0"
+"s6" 5 "0 0 0"
+"s7" 5 "0 0 0"
+"r7" 5 "0 0 0"
+"b6" 4 "0 0 0"
+"b5" 4 "0 0 0"
+"b4" 4 "0 0 0"
diff --git a/minigames/bulldozer/storage_level3.txt b/minigames/bulldozer/storage_level3.txt
new file mode 100644 (file)
index 0000000..7433ae2
--- /dev/null
@@ -0,0 +1,279 @@
+// bulldozer storage "level3" last updated 16-11-2015 04:06:54
+nextlevel = "level4"
+"a20" 4 "0 0 0"
+"a19" 4 "0 0 0"
+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"l14" 5 "0 0 0"
+"l16" 5 "0 0 0"
+"g15" 5 "0 0 0"
+"h15" 5 "0 0 0"
+"i15" 5 "0 0 0"
+"j15" 5 "0 0 0"
+"k15" 5 "0 0 0"
+"p9" 5 "0 0 0"
+"p10" 5 "0 0 0"
+"q10" 5 "0 0 0"
+"q8" 2 "0 0 0"
+"r8" 2 "0 0 0"
+"r9" 2 "0 0 0"
+"j9" 3 "0 0 0"
+"i13" 2 "0 0 0"
+"k13" 1 "0 -1 0"
+"n13" 3 "0 0 0"
+"n14" 3 "0 0 0"
+"n12" 3 "0 0 0"
diff --git a/minigames/bulldozer/storage_level4.txt b/minigames/bulldozer/storage_level4.txt
new file mode 100644 (file)
index 0000000..596ae6e
--- /dev/null
@@ -0,0 +1,370 @@
+// bulldozer storage "level4" last updated 16-11-2015 05:09:50
+nextlevel = "level5"
+"k10" 9 "0 -1 0"
+"k11" 9 "0 -1 0"
+"k13" 9 "0 -1 0"
+"j14" 9 "0 -1 0"
+"k14" 9 "0 -1 0"
+"k8" 5 "0 -1 0"
+"k9" 5 "0 -1 0"
+"k7" 5 "0 -1 0"
+"m8" 4 "0 -1 0"
+"l14" 9 "0 -1 0"
+"i14" 9 "0 -1 0"
+"m12" 1 "0 -1 0"
+"l11" 2 "0 -1 0"
+"m11" 2 "0 -1 0"
+"m10" 2 "0 -1 0"
+"l10" 2 "0 -1 0"
+"k12" 3 "0 -1 0"
+"m16" 5 "0 -1 0"
+"l16" 5 "0 -1 0"
+"k16" 5 "0 -1 0"
+"j4" 4 "0 -1 0"
+"i4" 4 "0 -1 0"
+"h4" 4 "0 -1 0"
+"g4" 4 "0 -1 0"
+"f4" 4 "0 -1 0"
+"e4" 4 "0 -1 0"
+"d4" 4 "0 -1 0"
+"c4" 4 "0 -1 0"
+"b4" 4 "0 -1 0"
+"h11" 3 "0 -1 0"
+"f20" 4 "0 -1 0"
+"f19" 4 "0 -1 0"
+"f17" 4 "0 -1 0"
+"f18" 4 "0 -1 0"
+"h16" 5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 -1 0"
+"e16" 4 "0 -1 0"
+"e17" 4 "0 -1 0"
+"d17" 4 "0 -1 0"
+"c17" 4 "0 -1 0"
+"b17" 4 "0 -1 0"
+"a17" 4 "0 -1 0"
+"a18" 4 "0 -1 0"
+"b18" 4 "0 -1 0"
+"c18" 4 "0 -1 0"
+"d18" 4 "0 -1 0"
+"e18" 4 "0 -1 0"
+"e19" 4 "0 -1 0"
+"d19" 4 "0 -1 0"
+"c19" 4 "0 -1 0"
+"b19" 4 "0 -1 0"
+"a19" 4 "0 -1 0"
+"a20" 4 "0 -1 0"
+"b20" 4 "0 -1 0"
+"c20" 4 "0 -1 0"
+"d20" 4 "0 -1 0"
+"e20" 4 "0 -1 0"
+"f11" 5 "0 -1 0"
+"c14" 8 "0 -1 0"
+"c8" 8 "0 -1 0"
+"f13" 5 "0 -1 0"
+"g15" 5 "0 -1 0"
+"g16" 5 "0 -1 0"
+"i16" 5 "0 -1 0"
+"j16" 5 "0 -1 0"
+"n15" 5 "0 -1 0"
+"n14" 5 "0 -1 0"
+"h7" 5 "0 -1 0"
diff --git a/minigames/bulldozer/storage_level5.txt b/minigames/bulldozer/storage_level5.txt
new file mode 100644 (file)
index 0000000..42e3186
--- /dev/null
@@ -0,0 +1,307 @@
+// bulldozer storage "level4" last updated 16-11-2015 04:16:07
+nextlevel = "level1"
+"e15" 3 "0 0 0"
+"f14" 3 "0 0 0"
+"g13" 3 "0 0 0"
+"k13" 3 "0 0 0"
+"b14" 4 "0 0 0"
+"a14" 4 "0 0 0"
+"a13" 4 "0 0 0"
+"b13" 4 "0 0 0"
+"i13" 3 "0 0 0"
+"m13" 3 "0 0 0"
+"n14" 3 "0 0 0"
+"o15" 3 "0 0 0"
+"h17" 2 "0 0 0"
+"l17" 2 "0 0 0"
+"c12" 2 "0 0 0"
+"c13" 2 "0 0 0"
+"c14" 2 "0 0 0"
+"r14" 2 "0 0 0"
+"r13" 2 "0 0 0"
+"r12" 2 "0 0 0"
+"j15" 1 "0 -1 0"
+"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h19" 4 "0 0 0"
+"g19" 4 "0 0 0"
+"f19" 4 "0 0 0"
+"e19" 4 "0 0 0"
+"d19" 4 "0 0 0"
+"c19" 4 "0 0 0"
+"b19" 4 "0 0 0"
+"a19" 4 "0 0 0"
+"a20" 4 "0 0 0"
+"b20" 4 "0 0 0"
+"c20" 4 "0 0 0"
+"d20" 4 "0 0 0"
+"e20" 4 "0 0 0"
+"f20" 4 "0 0 0"
+"g20" 4 "0 0 0"
+"h20" 4 "0 0 0"
+"i20" 4 "0 0 0"
+"j20" 4 "0 0 0"
+"k20" 4 "0 0 0"
+"l20" 4 "0 0 0"
+"m20" 4 "0 0 0"
+"n20" 4 "0 0 0"
+"o20" 4 "0 0 0"
+"p20" 4 "0 0 0"
+"q20" 4 "0 0 0"
+"r20" 4 "0 0 0"
+"s20" 4 "0 0 0"
+"t20" 4 "0 0 0"
index fe75e038b6e2d054be9b9d8720f20ff948ba2568..3f10e89e93d09c9627e065af7e6533dde76862f7 100644 (file)
@@ -111,7 +111,7 @@ void HUD_MinigameMenu_CustomEntry(entity parent, string message, string event_ar
        while( (entityvar = findentity(entityvar,owner,active_minigame)) )
 
 
-REGISTRY(Minigames, BITS(3))
+REGISTRY(Minigames, BITS(4))
 #define Minigames_from(i) _Minigames_from(i, NULL)
 REGISTER_REGISTRY(Minigames)
 REGISTRY_CHECK(Minigames)
index d3874e7aa77cb42b79bc8c42230982cb0a4781f6..f552db98b5f4208ecd104537d785bcdfa4cbfa86 100644 (file)
@@ -68,6 +68,7 @@ that .owner is set to the minigame session entity and .minigame_autoclean is tru
 #include "ps.qc"
 #include "pp.qc"
 #include "snake.qc"
+#include "bd.qc"
 
 /**
  * Set up automatic entity read/write functionality
diff --git a/qcsrc/common/minigames/minigame/bd.qc b/qcsrc/common/minigames/minigame/bd.qc
new file mode 100644 (file)
index 0000000..6c096a7
--- /dev/null
@@ -0,0 +1,1152 @@
+REGISTER_MINIGAME(bd, "Bulldozer");
+
+const int BD_TURN_MOVE  = 0x0100; // player must move the bulldozer
+const int BD_TURN_WIN   = 0x0200; // victory
+const int BD_TURN_LOSS  = 0x0400; // they did it?!
+const int BD_TURN_EDIT  = 0x0800; // editing mode
+const int BD_TURN_TYPE  = 0x0f00; // turn type mask
+
+const int BD_SF_PLAYERMOVES = MINIG_SF_CUSTOM;
+
+// 240 tiles...
+const int BD_LET_CNT = 20;
+const int BD_NUM_CNT = 20;
+
+const int BD_TILE_SIZE = 20;
+
+const int BD_TEAMS = 1;
+
+.vector bd_dir;
+
+.int bd_moves;
+
+.string bd_levelname;
+.string bd_nextlevel;
+
+#ifdef SVQC
+.bool bd_canedit;
+#endif
+
+.int bd_tiletype;
+const int BD_TILE_DOZER = 1;
+const int BD_TILE_TARGET = 2;
+const int BD_TILE_BOULDER = 3;
+const int BD_TILE_BRICK1 = 4;
+const int BD_TILE_BRICK2 = 5;
+const int BD_TILE_BRICK3 = 6;
+const int BD_TILE_BRICK4 = 7;
+const int BD_TILE_BRICK5 = 8;
+const int BD_TILE_BRICK6 = 9;
+const int BD_TILE_LAST = 9;
+
+string autocvar_sv_minigames_bulldozer_startlevel = "level1";
+
+// find same game piece given its tile name
+entity bd_find_piece(entity minig, string tile, bool check_target)
+{
+       entity e = world;
+       while ( ( e = findentity(e,owner,minig) ) )
+               if ( e.classname == "minigame_board_piece" && e.netname == tile && ((check_target) ? e.bd_tiletype == BD_TILE_TARGET : e.bd_tiletype != BD_TILE_TARGET) )
+                       return e;
+       return world;
+}
+
+// check if the tile name is valid (15x15 grid)
+bool bd_valid_tile(string tile)
+{
+       if ( !tile )
+               return false;
+       int number = minigame_tile_number(tile);
+       int letter = minigame_tile_letter(tile);
+       return 0 <= number && number < BD_NUM_CNT && 0 <= letter && letter < BD_LET_CNT;
+}
+
+entity bd_find_dozer(entity minig)
+{
+       entity e = world;
+       while ( ( e = findentity(e,owner,minig) ) )
+               if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_DOZER )
+                       return e;
+       return world;
+}
+
+void bd_check_winner(entity minig)
+{
+       int total = 0, valid = 0;
+       entity e = world;
+       while ( ( e = findentity(e,owner,minig) ) )
+               if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_TARGET )
+               {
+                       ++total;
+                       if(bd_find_piece(minig, e.netname, false).bd_tiletype == BD_TILE_BOULDER)
+                               ++valid;
+               }
+
+       if(valid >= total)
+       {
+               minig.minigame_flags = BD_TURN_WIN;
+               minigame_server_sendflags(minig,MINIG_SF_UPDATE);
+       }
+}
+
+bool bd_canfill(int ttype)
+{
+       switch(ttype)
+       {
+               case BD_TILE_BRICK6:
+               case BD_TILE_BRICK5:
+               case BD_TILE_BRICK4:
+               case BD_TILE_BRICK3:
+               case BD_TILE_BRICK2:
+               case BD_TILE_BRICK1: return true;
+       }
+
+       return false;
+}
+
+bool bd_move_dozer(entity minigame, entity dozer)
+{
+       if(!dozer.bd_dir_x && !dozer.bd_dir_y)
+               return false; // nope!
+
+       int myx = minigame_tile_letter(dozer.netname);
+       int myy = minigame_tile_number(dozer.netname);
+
+       myx += dozer.bd_dir_x;
+       myy += dozer.bd_dir_y;
+
+       string newpos = minigame_tile_buildname(myx, myy);
+       entity hit = bd_find_piece(minigame, newpos, false);
+
+       if(!bd_valid_tile(newpos))
+               return false;
+
+       if(hit)
+       switch(hit.bd_tiletype)
+       {
+               case BD_TILE_DOZER: // wtf, but let's do this incase
+               case BD_TILE_BRICK6:
+               case BD_TILE_BRICK5:
+               case BD_TILE_BRICK4:
+               case BD_TILE_BRICK3:
+               case BD_TILE_BRICK2:
+               case BD_TILE_BRICK1: return false;
+               case BD_TILE_BOULDER:
+               {
+                       string testpos;
+                       int tx = minigame_tile_letter(hit.netname);
+                       int ty = minigame_tile_number(hit.netname);
+
+                       tx += dozer.bd_dir_x;
+                       ty += dozer.bd_dir_y;
+
+                       testpos = minigame_tile_buildname(tx, ty);
+                       entity testhit = bd_find_piece(minigame, testpos, false);
+
+                       if(!bd_valid_tile(testpos) || testhit)
+                               return false;
+
+                       if(hit.netname) { strunzone(hit.netname); }
+                       hit.netname = strzone(testpos);
+                       minigame_server_sendflags(hit,MINIG_SF_UPDATE);
+                       break;
+               }
+       }
+
+       if(dozer.netname) { strunzone(dozer.netname); }
+       dozer.netname = strzone(newpos);
+
+       return true;
+}
+
+// make a move
+void bd_move(entity minigame, entity player, string dir)
+{
+       if ( minigame.minigame_flags & BD_TURN_MOVE )
+       if ( dir )
+       {
+               //if ( bd_valid_tile(pos) )
+               //if ( bd_find_piece(minigame, pos, false) )
+               {
+                       entity dozer = bd_find_dozer(minigame);
+                       if(!dozer)
+                       {
+                               LOG_INFO("Dozer wasn't found!\n");
+                               return; // should not happen... TODO: end match?
+                       }
+
+                       int dxs = 0, dys = 0;
+                       string thedir = strtolower(dir);
+                       if(thedir == "up" || thedir == "u") { dxs = 0; dys = 1; }
+                       if(thedir == "down" || thedir == "dn" || thedir == "d") { dxs = 0; dys = -1; }
+                       if(thedir == "left" || thedir == "lt" || thedir == "l") { dxs = -1; dys = 0; }
+                       if(thedir == "right" || thedir == "rt" || thedir == "r") { dxs = 1; dys = 0; }
+
+                       int dx = bound(-1, dxs, 1);
+                       int dy = bound(-1, dys, 1);
+
+                       dozer.bd_dir_x = dx;
+                       dozer.bd_dir_y = dy;
+                       dozer.bd_dir_z = 0;
+
+                       if(bd_move_dozer(minigame, dozer))
+                               player.bd_moves++;
+
+                       bd_check_winner(minigame);
+
+                       minigame_server_sendflags(dozer,MINIG_SF_UPDATE); // update anyway
+                       minigame_server_sendflags(player,BD_SF_PLAYERMOVES);
+                       minigame_server_sendflags(minigame,MINIG_SF_UPDATE);
+               }
+       }
+}
+
+// editor
+void bd_editor_place(entity minigame, entity player, string pos, int thetile, string thedir)
+{
+       if ( minigame.minigame_flags & BD_TURN_EDIT )
+       if ( pos && thetile )
+       {
+               if ( bd_valid_tile(pos) )
+               {
+                       entity found_piece = bd_find_piece(minigame, pos, false);
+                       entity targ = bd_find_piece(minigame, pos, true);
+
+                       if(found_piece.bd_tiletype == BD_TILE_DOZER && thedir != "")
+                       {
+                               int dxs = 0, dys = 0;
+                               string newdir = strtolower(thedir);
+                               if(newdir == "up" || newdir == "u") { dxs = 0; dys = 1; }
+                               if(newdir == "down" || newdir == "dn" || newdir == "d") { dxs = 0; dys = -1; }
+                               if(newdir == "left" || newdir == "lt" || newdir == "l") { dxs = -1; dys = 0; }
+                               if(newdir == "right" || newdir == "rt" || newdir == "r") { dxs = 1; dys = 0; }
+
+                               int dx = bound(-1, dxs, 1);
+                               int dy = bound(-1, dys, 1);
+
+                               found_piece.bd_dir_x = dx;
+                               found_piece.bd_dir_y = dy;
+                               found_piece.bd_dir_z = 0;
+                               minigame_server_sendflags(found_piece,MINIG_SF_UPDATE); // update anyway
+                               return;
+                       }
+
+                       entity dozer = bd_find_dozer(minigame);
+                       if(dozer && thetile == BD_TILE_DOZER && pos != dozer.netname)
+                               return; // nice try
+
+                       if(found_piece || (targ && thetile != BD_TILE_BOULDER))
+                       {
+                               entity piece = bd_find_piece(minigame, pos, false);
+                               if(!piece) piece = bd_find_piece(minigame, pos, true);
+                               if(!piece)
+                                       return; // how?!
+
+                               if(piece.netname) { strunzone(piece.netname); }
+                               remove(piece);
+                               minigame_server_sendflags(minigame,MINIG_SF_UPDATE);
+                               return;
+                       }
+
+                       entity piece = msle_spawn(minigame,"minigame_board_piece");
+                       piece.team = 1;
+                       piece.netname = strzone(pos);
+                       piece.bd_tiletype = thetile;
+                       piece.bd_dir = '0 -1 0';
+                       minigame_server_sendflags(piece,MINIG_SF_UPDATE);
+
+                       minigame_server_sendflags(minigame,MINIG_SF_UPDATE);
+               }
+       }
+}
+
+void bd_do_move(entity minigame, entity player, string dir, string thetile, string thedir)
+{
+       if(minigame.minigame_flags & BD_TURN_MOVE)
+               bd_move(minigame, player, dir);
+
+       if(minigame.minigame_flags & BD_TURN_EDIT)
+               bd_editor_place(minigame, player, dir, stof(thetile), thedir);
+}
+
+void bd_fill_recurse(entity minigame, entity player, int thetype, int letter, int number)
+{
+       string pos = minigame_tile_buildname(letter,number);
+       if(!bd_valid_tile(pos))
+               return;
+       if(bd_find_piece(minigame, pos, false) || bd_find_piece(minigame, pos, true))
+               return;
+
+       bd_editor_place(minigame, player, pos, thetype, "");
+
+       bd_fill_recurse(minigame, player, thetype, letter - 1, number);
+       bd_fill_recurse(minigame, player, thetype, letter + 1, number);
+       bd_fill_recurse(minigame, player, thetype, letter, number - 1);
+       bd_fill_recurse(minigame, player, thetype, letter, number + 1);
+}
+
+void bd_unfill_recurse(entity minigame, entity player, int thetype, int letter, int number)
+{
+       string pos = minigame_tile_buildname(letter,number);
+       if(!bd_valid_tile(pos))
+               return;
+
+       entity targ = bd_find_piece(minigame, pos, true);
+       entity piece = bd_find_piece(minigame, pos, false);
+
+       if(targ && thetype == targ.bd_tiletype)
+       {
+               if(targ.netname) { strunzone(targ.netname); }
+               remove(targ);
+       }
+       else if(piece && thetype == piece.bd_tiletype)
+       {
+               if(piece.netname) { strunzone(piece.netname); }
+               remove(piece);
+       }
+       else return;
+
+       bd_unfill_recurse(minigame, player, thetype, letter - 1, number);
+       bd_unfill_recurse(minigame, player, thetype, letter + 1, number);
+       bd_unfill_recurse(minigame, player, thetype, letter, number - 1);
+       bd_unfill_recurse(minigame, player, thetype, letter, number + 1);
+}
+
+void bd_do_fill(entity minigame, entity player, string dir, string thetile)
+{
+       if(minigame.minigame_flags & BD_TURN_EDIT)
+       {
+               int thetype = stof(thetile);
+
+               entity targ = bd_find_piece(minigame, dir, true);
+               entity piece = bd_find_piece(minigame, dir, false);
+
+               if(!bd_canfill(thetype) || (piece || targ))
+               {
+                       int killtype = 0;
+
+                       if(targ) { killtype = targ.bd_tiletype; }
+                       if(piece) { killtype = piece.bd_tiletype; }
+
+                       if(killtype)
+                       {
+                               int letter = minigame_tile_letter(dir);
+                               int number = minigame_tile_number(dir);
+                               bd_unfill_recurse(minigame, player, killtype, letter, number);
+                       }
+
+                       return;
+               }
+
+               int letter = minigame_tile_letter(dir);
+               int number = minigame_tile_number(dir);
+
+               bd_fill_recurse(minigame, player, thetype, letter, number);
+       }
+}
+
+void bd_reset_moves(entity minigame)
+{
+       entity e;
+#ifdef SVQC
+       for(e = minigame.minigame_players; e; e = e.list_next)
+#elif defined(CSQC)
+       e = world;
+       while( (e = findentity(e,owner,minigame)) )
+               if ( e.classname == "minigame_player" )
+#endif
+               {
+                       e.bd_moves = 0;
+                       minigame_server_sendflags(e,BD_SF_PLAYERMOVES);
+               }
+}
+
+void bd_load_level(entity minigame);
+void bd_setup_pieces(entity minigame)
+{
+       entity e = world;
+       while( (e = findentity(e, owner, minigame)) )
+               if(e.classname == "minigame_board_piece")
+               {
+                       if(e.netname) { strunzone(e.netname); }
+                       remove(e);
+               }
+
+       bd_load_level(minigame);
+}
+
+void bd_do_next_match(entity minigame, entity player)
+{
+       minigame.minigame_flags = BD_TURN_MOVE;
+       minigame_server_sendflags(minigame,MINIG_SF_UPDATE);
+
+       if(minigame.bd_nextlevel && minigame.bd_nextlevel != "")
+       {
+               if(minigame.bd_levelname) { strunzone(minigame.bd_levelname); }
+               minigame.bd_levelname = strzone(minigame.bd_nextlevel);
+       }
+
+       bd_setup_pieces(minigame);
+
+       bd_reset_moves(minigame);
+}
+
+void bd_set_next_match(entity minigame, string next)
+{
+       if(minigame.bd_nextlevel) { strunzone(minigame.bd_nextlevel); }
+       minigame.bd_nextlevel = strzone(next);
+}
+
+void bd_next_match(entity minigame, entity player, string next)
+{
+       if(minigame.minigame_flags & BD_TURN_WIN)
+               bd_do_next_match(minigame, player);
+       if(minigame.minigame_flags & BD_TURN_EDIT)
+               bd_set_next_match(minigame, next);
+}
+
+// request a new match
+void bd_restart_match(entity minigame, entity player)
+{
+       minigame.minigame_flags = BD_TURN_MOVE;
+       minigame_server_sendflags(minigame,MINIG_SF_UPDATE);
+
+       bd_setup_pieces(minigame);
+
+       bd_reset_moves(minigame);
+}
+
+void bd_activate_editor(entity minigame, entity player)
+{
+#ifdef SVQC
+       if(!player.minigame_players.bd_canedit)
+       {
+               sprint(player.minigame_players, "You're not allowed to edit levels, sorry!\n");
+               return;
+       }
+#endif
+
+       minigame.minigame_flags = BD_TURN_EDIT;
+       minigame_server_sendflags(minigame,MINIG_SF_UPDATE);
+
+       bd_reset_moves(minigame);
+
+       bd_setup_pieces(minigame);
+}
+
+string bd_save_piece(entity minigame, entity e)
+{
+       string bd_string = "";
+
+       bd_string = strcat(bd_string, "\"", e.netname, "\" ");
+       bd_string = strcat(bd_string, ftos(e.bd_tiletype), " ");
+       bd_string = strcat(bd_string, sprintf("\"%.9v\"", e.bd_dir));
+
+       return bd_string;
+}
+
+void bd_set_nextlevel(entity minigame, string s)
+{
+       tokenize_console(s);
+
+       if(minigame.bd_nextlevel) { strunzone(minigame.bd_nextlevel); }
+       minigame.bd_nextlevel = strzone(argv(2));
+}
+
+entity bd_load_piece(entity minigame, string s)
+{
+       // separate pieces between the ; symbols
+       string bd_string = s;
+
+       tokenize_console(bd_string);
+
+       entity e = msle_spawn(minigame,"minigame_board_piece");
+       e.team = 1;
+       e.bd_dir = '0 -1 0';
+
+       int argv_num = 0;
+       e.netname = strzone(argv(argv_num)); ++argv_num;
+       e.bd_tiletype = stof(argv(argv_num)); ++argv_num;
+       e.bd_dir = stov(argv(argv_num)); ++argv_num;
+
+       minigame_server_sendflags(e,MINIG_SF_ALL);
+
+       return e;
+}
+
+bool bd_save_level(entity minigame)
+{
+       if(minigame.bd_levelname && minigame.bd_levelname != "")
+       {
+               int target_count = 0, boulder_count = 0;
+               entity piece = world;
+               while((piece = findentity(piece,owner,minigame)))
+               if(piece.classname == "minigame_board_piece")
+                       if(piece.bd_tiletype == BD_TILE_BOULDER)
+                               ++boulder_count;
+                       else if(piece.bd_tiletype == BD_TILE_TARGET)
+                               ++target_count;
+
+               if(boulder_count != target_count)
+               {
+                       LOG_INFO("Not enough targets or boulders, fix your level!\n");
+                       return false;
+               }
+
+               // saves all objects to the database file
+               string file_name;
+               float file_get;
+
+               file_name = strcat("minigames/bulldozer/storage_", minigame.bd_levelname, ".txt");
+               file_get = fopen(file_name, FILE_WRITE);
+               fputs(file_get, strcat("// bulldozer storage \"", minigame.bd_levelname, "\" last updated ", strftime(true, "%d-%m-%Y %H:%M:%S"), "\n"));
+
+               if(minigame.bd_nextlevel && minigame.bd_nextlevel != "" && fexists(strcat("minigames/bulldozer/storage_", minigame.bd_nextlevel, ".txt")))
+                       fputs(file_get, strcat("nextlevel = \"", minigame.bd_nextlevel, "\"\n"));
+
+               entity e = world;
+               while ( ( e = findentity(e,owner,minigame) ) )
+               if ( e.classname == "minigame_board_piece" )
+               {
+                       // use a line of text for each object, listing all properties
+                       fputs(file_get, strcat(bd_save_piece(minigame, e), "\n"));
+               }
+               fclose(file_get);
+
+               return true;
+       }
+
+       return false;
+}
+
+void bd_load_level(entity minigame)
+{
+       // loads all items from the database file
+       string file_read, file_name;
+       float file_get;
+
+       file_name = strcat("minigames/bulldozer/storage_", minigame.bd_levelname, ".txt");
+       file_get = fopen(file_name, FILE_READ);
+       if(file_get < 0)
+       {
+               LOG_INFO("^3BULLDOZER: ^7could not find storage file ^3", file_name, "^7, no items were loaded\n");
+       }
+       else
+       {
+               for(;;)
+               {
+                       file_read = fgets(file_get);
+                       if(file_read == "")
+                               break;
+                       if(substring(file_read, 0, 2) == "//")
+                               continue;
+                       if(substring(file_read, 0, 1) == "#")
+                               continue;
+                       if(substring(file_read, 0, 9) == "nextlevel")
+                       {
+                               bd_set_nextlevel(minigame, file_read);
+                               continue;
+                       }
+
+                       entity e;
+                       e = bd_load_piece(minigame, file_read);
+               }
+       }
+       fclose(file_get);
+}
+
+void bd_close_editor(entity minigame)
+{
+       entity dozer = bd_find_dozer(minigame);
+       if(!dozer)
+       {
+               LOG_INFO("You need to place a bulldozer on the level to save it!\n");
+               return;
+       }
+
+       if(bd_save_level(minigame))
+       {
+               minigame.minigame_flags = BD_TURN_MOVE;
+               minigame_server_sendflags(minigame,MINIG_SF_UPDATE);
+       }
+       else
+       {
+               LOG_INFO("You need to set the level name!\n");
+               return;
+       }
+}
+
+#ifdef SVQC
+
+// required function, handle server side events
+int bd_server_event(entity minigame, string event, ...)
+{
+       switch(event)
+       {
+               case "start":
+               {
+                       if(minigame.bd_levelname) { strunzone(minigame.bd_levelname); }
+                       minigame.bd_levelname = strzone(autocvar_sv_minigames_bulldozer_startlevel);
+                       bd_setup_pieces(minigame);
+                       minigame.minigame_flags = BD_TURN_MOVE;
+                       
+                       return true;
+               }
+               case "end":
+               {
+                       entity e = world;
+                       while( (e = findentity(e, owner, minigame)) )
+                       if(e.classname == "minigame_board_piece")
+                       {
+                               if(e.netname) { strunzone(e.netname); }
+                               remove(e);
+                       }
+
+                       if(minigame.bd_nextlevel) { strunzone(minigame.bd_nextlevel); }
+                       if(minigame.bd_levelname) { strunzone(minigame.bd_levelname); }
+                       return false;
+               }
+               case "join":
+               {
+                       int pl_num = minigame_count_players(minigame);
+
+                       if(pl_num >= BD_TEAMS) { return false; }
+
+                       return 1;
+               }
+               case "cmd":
+               {
+                       switch(argv(0))
+                       {
+                               case "move":
+                                       bd_do_move(minigame, ...(0,entity), ((...(1,int)) >= 2 ? argv(1) : string_null), ((...(1,int)) >= 3 ? argv(2) : string_null), ((...(1,int)) >= 4 ? argv(3) : string_null)); 
+                                       return true;
+                               case "next":
+                                       bd_next_match(minigame,...(0,entity), ((...(1,int) >= 2 ? argv(1) : string_null)));
+                                       return true;
+                               case "restart":
+                                       bd_restart_match(minigame,...(0,entity));
+                                       return true;
+                               case "edit":
+                                       bd_activate_editor(minigame,...(0,entity));
+                                       return true;
+                               case "save":
+                                       bd_close_editor(minigame);
+                                       return true;
+                               case "fill":
+                                       bd_do_fill(minigame, ...(0,entity), ((...(1,int)) >= 2 ? argv(1) : string_null), ((...(1,int)) >= 3 ? argv(2) : string_null)); 
+                                       return true;
+                       }
+
+                       return false;
+               }
+               case "network_send":
+               {
+                       entity sent = ...(0,entity);
+                       int sf = ...(1,int);
+                       if ( sent.classname == "minigame_board_piece" && (sf & MINIG_SF_UPDATE) )
+                       {
+                               int letter = minigame_tile_letter(sent.netname);
+                               int number = minigame_tile_number(sent.netname);
+
+                               WriteByte(MSG_ENTITY,letter);
+                               WriteByte(MSG_ENTITY,number);
+
+                               WriteByte(MSG_ENTITY,sent.bd_tiletype);
+
+                               int dx = sent.bd_dir_x;
+                               int dy = sent.bd_dir_y;
+                               if(dx == -1) dx = 2;
+                               if(dy == -1) dy = 2;
+                               WriteByte(MSG_ENTITY,dx);
+                               WriteByte(MSG_ENTITY,dy);
+                       }
+                       else if(sent.classname == "minigame_player" && (sf & BD_SF_PLAYERMOVES))
+                               WriteShort(MSG_ENTITY,sent.bd_moves);
+                       return false;
+               }
+       }
+       
+       return false;
+}
+
+
+#elif defined(CSQC)
+
+int bd_curr_tile;
+string bd_curr_pos;
+
+vector bd_boardpos; // HUD board position
+vector bd_boardsize;// HUD board size
+
+string bd_get_tile_pic(int tileid)
+{
+       switch(tileid)
+       {
+               case BD_TILE_BOULDER: return "bd/boulder";
+               case BD_TILE_BRICK1: return "bd/brick1";
+               case BD_TILE_BRICK2: return "bd/brick2";
+               case BD_TILE_BRICK3: return "bd/brick3";
+               case BD_TILE_BRICK4: return "bd/brick4";
+               case BD_TILE_BRICK5: return "bd/brick5";
+               case BD_TILE_BRICK6: return "bd/brick6";
+               case BD_TILE_TARGET: return "bd/target";
+               case BD_TILE_DOZER: return "bd/dozer";
+       }
+
+       return string_null;
+}
+
+// Required function, draw the game board
+void bd_hud_board(vector pos, vector mySize)
+{
+       minigame_hud_fitsqare(pos, mySize);
+       bd_boardpos = pos;
+       bd_boardsize = mySize;
+       
+       minigame_hud_simpleboard(pos,mySize,minigame_texture("bd/board"));
+
+       vector tile_size = minigame_hud_denormalize_size('1 1 0' / BD_TILE_SIZE,pos,mySize);
+       vector tile_pos;
+
+       entity e;
+       FOREACH_MINIGAME_ENTITY(e)
+       {
+               if ( e.classname == "minigame_board_piece" && e.bd_tiletype != BD_TILE_TARGET && e.bd_tiletype != BD_TILE_DOZER )
+               {
+                       tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT);
+                       tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize);
+
+                       string thepiece = bd_get_tile_pic(e.bd_tiletype);
+
+                       minigame_drawpic_centered( tile_pos,  
+                                       minigame_texture(thepiece),
+                                       tile_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL );
+               }
+
+               if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_TARGET && e.bd_tiletype != BD_TILE_DOZER )
+               {
+                       tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT);
+                       tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize);
+
+                       minigame_drawpic_centered( tile_pos,  
+                                       minigame_texture("bd/target"),
+                                       tile_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL );
+               }
+
+               if ( e.classname == "minigame_board_piece" && e.bd_tiletype != BD_TILE_TARGET && e.bd_tiletype == BD_TILE_DOZER )
+               {
+                       tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT);
+                       tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize);
+
+                       vector thedir = e.bd_dir;
+                       float theang = 0;
+
+                       if(thedir_y == -1) { theang = M_PI; }
+                       if(thedir_x == 1) { theang = M_PI/2; }
+                       if(thedir_x == -1) { theang = M_PI*3/2; }
+
+                       drawrotpic(tile_pos, theang, minigame_texture("bd/dozer"),
+                                               tile_size, tile_size/2, '1 1 1',
+                                               panel_fg_alpha, DRAWFLAG_NORMAL );
+               }
+       }
+
+       FOREACH_MINIGAME_ENTITY(e)
+       {
+               if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_TARGET )
+               {
+                       tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT);
+                       tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize);
+
+                       minigame_drawpic_centered( tile_pos,  
+                                       minigame_texture("bd/target"),
+                                       tile_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL );
+               }
+       }
+
+       FOREACH_MINIGAME_ENTITY(e)
+       {
+               if ( e.classname == "minigame_board_piece" && e.bd_tiletype == BD_TILE_DOZER )
+               {
+                       tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT);
+                       tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize);
+
+                       vector thedir = e.bd_dir;
+                       float theang = 0;
+
+                       if(thedir_y == -1) { theang = M_PI; }
+                       if(thedir_x == 1) { theang = M_PI/2; }
+                       if(thedir_x == -1) { theang = M_PI*3/2; }
+
+                       drawrotpic(tile_pos, theang, minigame_texture("bd/dozer"),
+                                               tile_size, tile_size/2, '1 1 1',
+                                               panel_fg_alpha, DRAWFLAG_NORMAL );
+               }
+       }
+
+       if(active_minigame.minigame_flags & BD_TURN_EDIT)
+       if(bd_valid_tile(bd_curr_pos))
+       {
+               entity piece = bd_find_piece(active_minigame, bd_curr_pos, false);
+               entity targ = bd_find_piece(active_minigame, bd_curr_pos, true);
+               string thepiece = ((piece || (targ && bd_curr_tile != BD_TILE_BOULDER)) ? "bd/delete" : bd_get_tile_pic(bd_curr_tile));
+
+               tile_pos = minigame_tile_pos(bd_curr_pos,BD_LET_CNT,BD_NUM_CNT);
+               tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize);
+               if(bd_curr_tile == BD_TILE_DOZER)
+               {
+                       drawrotpic(tile_pos, M_PI, minigame_texture("bd/dozer"),
+                                               tile_size, tile_size/2, '1 1 1',
+                                               panel_fg_alpha/2, DRAWFLAG_NORMAL );
+               }
+               else
+               {
+                       minigame_drawpic_centered( tile_pos,
+                                       minigame_texture(thepiece),
+                                       tile_size, '1 1 1', panel_fg_alpha/2, DRAWFLAG_NORMAL );
+               }
+       }
+
+       if ( (active_minigame.minigame_flags & BD_TURN_LOSS) || (active_minigame.minigame_flags & BD_TURN_WIN) )
+       {
+               vector winfs = hud_fontsize*2;
+               string victory_text = "Game over!";
+
+               if(active_minigame.minigame_flags & BD_TURN_WIN)
+                       victory_text = "Well done! Click 'Next Level' to continue";
+               
+               vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
+               vector win_sz;
+               win_sz = minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
+                       sprintf("%s", victory_text), 
+                       winfs, 0, DRAWFLAG_NORMAL, 0.5);
+               
+               drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'0.3 0.3 1',0.8,DRAWFLAG_ADDITIVE);
+               
+               minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
+                       sprintf("%s", victory_text), 
+                       winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5);
+       }
+}
+
+
+// Required function, draw the game status panel
+void bd_hud_status(vector pos, vector mySize)
+{
+       HUD_Panel_DrawBg(1);
+       vector ts;
+       ts = minigame_drawstring_wrapped(mySize_x,pos,active_minigame.descriptor.message,
+               hud_fontsize * 2, '0.25 0.47 0.72', panel_fg_alpha, DRAWFLAG_NORMAL,0.5);
+
+       pos_y += ts_y;
+       mySize_y -= ts_y;
+
+       vector player_fontsize = hud_fontsize * 1.75;
+       ts_y = ( mySize_y - 2*player_fontsize_y ) / BD_TEAMS;
+       ts_x = mySize_x;
+       vector mypos;
+       vector tile_size = '48 48 0';
+
+       mypos = pos;
+       drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE);
+       mypos_y += player_fontsize_y;
+       drawfill(mypos,eX*mySize_x+eY*tile_size_y,'1 1 1',0.25,DRAWFLAG_ADDITIVE);
+
+       entity e;
+       FOREACH_MINIGAME_ENTITY(e)
+       {
+               if ( e.classname == "minigame_player" )
+               {
+                       mypos = pos;
+                       minigame_drawcolorcodedstring_trunc(mySize_x,mypos,
+                               GetPlayerName(e.minigame_playerslot-1),
+                               player_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
+
+                       mypos_y += player_fontsize_y;
+                       string thepiece = "bd/dozer";
+                       if(active_minigame.minigame_flags & BD_TURN_EDIT)
+                               thepiece = bd_get_tile_pic(bd_curr_tile);
+                       drawpic( mypos,
+                                       minigame_texture(thepiece),
+                                       tile_size * 0.7, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL );
+
+                       mypos_x += tile_size_x;
+
+                       drawstring(mypos,ftos(e.bd_moves),tile_size,
+                                          '0.7 0.84 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               }
+       }
+}
+
+// Turn a set of flags into a help message
+string bd_turn_to_string(int turnflags)
+{
+       if ( turnflags & BD_TURN_LOSS )
+               return _("Better luck next time!");
+
+       if ( turnflags & BD_TURN_WIN )
+               if(random() > 0.5)
+                       return _("Tubular! Press \"Next Level\" to continue!");
+               else
+                       return _("Wicked! Press \"Next Level\" to continue!");
+
+       if( turnflags & BD_TURN_EDIT )
+               return _("Press the space bar to change your currently selected tile");
+
+       if ( turnflags & BD_TURN_MOVE )
+               return _("Push the boulders onto the targets");
+       
+       return "";
+}
+
+// Make the correct move
+void bd_make_move(entity minigame, string dir)
+{
+       if ( minigame.minigame_flags == BD_TURN_MOVE )
+       {
+               minigame_cmd("move ", dir);
+       }
+}
+
+void bd_editor_make_move(entity minigame, string dir)
+{
+       if ( minigame.minigame_flags == BD_TURN_EDIT )
+       {
+               minigame_cmd("move ", bd_curr_pos, " ", ftos(bd_curr_tile), " ", dir);
+       }
+}
+
+void bd_editor_fill(entity minigame)
+{
+       if ( minigame.minigame_flags == BD_TURN_EDIT )
+       {
+               minigame_cmd("fill ", bd_curr_pos, " ", ftos(bd_curr_tile));
+       }
+}
+
+void bd_set_curr_pos(string s)
+{
+       if ( bd_curr_pos )
+               strunzone(bd_curr_pos);
+       if ( s )
+               s = strzone(s);
+       bd_curr_pos = s;
+}
+
+bool bd_normal_move(entity minigame, int themove)
+{
+       switch ( themove )
+       {
+               case K_RIGHTARROW:
+               case K_KP_RIGHTARROW:
+                       bd_make_move(minigame, "r");
+                       return true;
+               case K_LEFTARROW:
+               case K_KP_LEFTARROW:
+                       bd_make_move(minigame, "l");
+                       return true;
+               case K_UPARROW:
+               case K_KP_UPARROW:
+                       bd_make_move(minigame, "u");
+                       return true;
+               case K_DOWNARROW:
+               case K_KP_DOWNARROW:
+                       bd_make_move(minigame, "d");
+                       return true;
+       }
+
+       return false;
+}
+
+bool bd_change_dozer_angle(entity minigame)
+{
+       entity dozer = bd_find_piece(minigame, bd_curr_pos, false);
+       if(!dozer || dozer.bd_tiletype != BD_TILE_DOZER)
+               return false;
+
+       string thedir = "";
+       vector dir = dozer.bd_dir;
+       if(dir.x == 0 && dir.y == 0) { thedir = "r"; }
+
+       if(dir.x == 0 && dir.y == 1) { thedir = "r"; }
+       if(dir.x == 0 && dir.y ==-1) { thedir = "l"; }
+       if(dir.x ==-1 && dir.y == 0) { thedir = "u"; }
+       if(dir.x == 1 && dir.y == 0) { thedir = "d"; }
+
+       bd_editor_make_move(minigame, thedir);
+       return true;
+}
+
+bool bd_editor_move(entity minigame, int themove)
+{
+       switch ( themove )
+       {
+               case K_RIGHTARROW:
+               case K_KP_RIGHTARROW:
+                       if ( ! bd_curr_pos )
+                               bd_set_curr_pos("a3");
+                       else
+                               bd_set_curr_pos(minigame_relative_tile(bd_curr_pos,1,0,BD_NUM_CNT,BD_LET_CNT));
+                       return true;
+               case K_LEFTARROW:
+               case K_KP_LEFTARROW:
+                       if ( ! bd_curr_pos )
+                               bd_set_curr_pos("c3");
+                       else
+                               bd_set_curr_pos(minigame_relative_tile(bd_curr_pos,-1,0,BD_NUM_CNT,BD_LET_CNT));
+                       return true;
+               case K_UPARROW:
+               case K_KP_UPARROW:
+                       if ( ! bd_curr_pos )
+                               bd_set_curr_pos("a1");
+                       else
+                               bd_set_curr_pos(minigame_relative_tile(bd_curr_pos,0,1,BD_NUM_CNT,BD_LET_CNT));
+                       return true;
+               case K_DOWNARROW:
+               case K_KP_DOWNARROW:
+                       if ( ! bd_curr_pos )
+                               bd_set_curr_pos("a3");
+                       else
+                               bd_set_curr_pos(minigame_relative_tile(bd_curr_pos,0,-1,BD_NUM_CNT,BD_LET_CNT));
+                       return true;
+               case K_ENTER:
+               case K_KP_ENTER:
+                       bd_editor_make_move(minigame, "");
+                       return true;
+               case K_SPACE:
+                       if(bd_change_dozer_angle(minigame))
+                               return true;
+                       bd_curr_tile += 1;
+                       if(bd_curr_tile > BD_TILE_LAST)
+                               bd_curr_tile = 1;
+                       return true;
+       }
+
+       return false;
+}
+
+// Required function, handle client events
+int bd_client_event(entity minigame, string event, ...)
+{
+       switch(event)
+       {
+               case "activate":
+               {
+                       minigame.message = bd_turn_to_string(minigame.minigame_flags);
+                       bd_set_curr_pos("");
+                       bd_curr_tile = BD_TILE_BRICK1;
+                       return false;
+               }
+               case "key_pressed":
+               {
+                       if(minigame.minigame_flags & BD_TURN_MOVE)
+                       {
+                               if(bd_normal_move(minigame, ...(0,int)))
+                                       return true;
+                       }
+
+                       if(minigame.minigame_flags & BD_TURN_EDIT)
+                       {
+                               if(bd_editor_move(minigame, ...(0,int)))
+                                       return true;
+                       }
+
+                       return false;
+               }
+               case "mouse_pressed":
+               {
+                       if(minigame.minigame_flags & BD_TURN_EDIT)
+                       {
+                               if(...(0,int) == K_MOUSE1)
+                               {
+                                       bd_editor_make_move(minigame, "");
+                                       return true;
+                               }
+
+                               if(...(0,int) == K_MOUSE2)
+                               {
+                                       bd_editor_fill(minigame);
+                                       return true;
+                               }
+                       }
+
+                       return false;
+               }
+               case "mouse_moved":
+               {
+                       if(minigame.minigame_flags & BD_TURN_EDIT)
+                       {
+                               vector mouse_pos = minigame_hud_normalize(mousepos,bd_boardpos,bd_boardsize);
+                               bd_set_curr_pos(minigame_tile_name(mouse_pos,BD_LET_CNT,BD_NUM_CNT));
+                               if ( ! bd_valid_tile(bd_curr_pos) )
+                                       bd_set_curr_pos("");
+                       }
+                       return true;
+               }
+               case "network_receive":
+               {
+                       entity sent = ...(0,entity);
+                       int sf = ...(1,int);
+                       if ( sent.classname == "minigame" )
+                       {
+                               if ( sf & MINIG_SF_UPDATE )
+                               {
+                                       sent.message = bd_turn_to_string(sent.minigame_flags);
+                                       //if ( sent.minigame_flags & minigame_self.team )
+                                               minigame_prompt();
+                               }
+                       }
+                       else if(sent.classname == "minigame_board_piece")
+                       {
+                               if(sf & MINIG_SF_UPDATE)
+                               {
+                                       int letter = ReadByte();
+                                       int number = ReadByte();
+                                       if(sent.netname) { strunzone(sent.netname); }
+                                       sent.netname = strzone(minigame_tile_buildname(letter, number));
+
+                                       sent.bd_tiletype = ReadByte();
+
+                                       int dx = ReadByte();
+                                       int dy = ReadByte();
+
+                                       if(dx == 2) dx = -1;
+                                       if(dy == 2) dy = -1;
+
+                                       sent.bd_dir_x = dx;
+                                       sent.bd_dir_y = dy;
+                                       sent.bd_dir_z = 0;
+                               }
+                       }
+                       else if(sent.classname == "minigame_player" && (sf & BD_SF_PLAYERMOVES))
+                               sent.bd_moves = ReadShort(); // make this a byte when possible
+
+                       return false;
+               }
+               case "menu_show":
+               {
+                       HUD_MinigameMenu_CustomEntry(...(0,entity),_("Next Level"),"next");
+                       HUD_MinigameMenu_CustomEntry(...(0,entity),_("Restart"),"restart");
+                       HUD_MinigameMenu_CustomEntry(...(0,entity),_("Editor"),"edit");
+                       HUD_MinigameMenu_CustomEntry(...(0,entity),_("Save"),"save");
+                       return false;
+               }
+               case "menu_click":
+               {
+                       if(...(0,string) == "next")
+                               minigame_cmd("next");
+                       if(...(0,string) == "restart")
+                               minigame_cmd("restart");
+                       if(...(0,string) == "edit")
+                               minigame_cmd("edit");
+                       if(...(0,string) == "save")
+                               minigame_cmd("save");
+                       return false;
+               }
+       }
+
+       return false;
+}
+
+#endif
\ No newline at end of file
index 0fb3d572cc6996d2849bb9ccc17f69c94c58d4ba..10e0a039fe3a5755bd22d4a075637150206dc449 100644 (file)
@@ -46,7 +46,7 @@ entity minigame_sessions;
 
 bool minigame_SendEntity(entity this, entity to, int sf);
 
-REGISTRY(Minigames, BITS(3))
+REGISTRY(Minigames, BITS(4))
 #define Minigames_from(i) _Minigames_from(i, NULL)
 REGISTER_REGISTRY(Minigames)
 REGISTRY_CHECK(Minigames)