summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-05-14 12:28:02 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-05-14 12:28:02 (GMT)
commit16f014b06ae69c17f6ea2c817e2830023880bbdf (patch)
treec79383f120e76e50d22a510bcf6fcce966420520 /includes
parentd0f236d6b9e7c3de6998b8394b0dfb9241f727cf (diff)
downloadpowder-16f014b06ae69c17f6ea2c817e2830023880bbdf.zip
powder-16f014b06ae69c17f6ea2c817e2830023880bbdf.tar.gz
Move wall drawing to graphics.c
Diffstat (limited to 'includes')
-rw-r--r--includes/graphics.h2
-rw-r--r--includes/interface.h30
-rw-r--r--includes/powder.h33
3 files changed, 35 insertions, 30 deletions
diff --git a/includes/graphics.h b/includes/graphics.h
index d028e9b..6d9a273 100644
--- a/includes/graphics.h
+++ b/includes/graphics.h
@@ -114,6 +114,8 @@ void xor_rect(pixel *vid, int x, int y, int w, int h);
void draw_parts(pixel *vid);
+void draw_walls(pixel *vid);
+
void draw_decorations(pixel *vid_buf,pixel *decorations);
void draw_wavelengths(pixel *vid, int x, int y, int h, int wl);
diff --git a/includes/interface.h b/includes/interface.h
index 9dc07f8..cadffd9 100644
--- a/includes/interface.h
+++ b/includes/interface.h
@@ -12,36 +12,6 @@ struct menu_section
};
typedef struct menu_section menu_section;
-struct menu_wall
-{
- pixel colour;
- const char *descs;
-};
-typedef struct menu_wall menu_wall;
-
-static menu_wall mwalls[] =
-{
- {PIXPACK(0xC0C0C0), "Wall. Indestructible. Blocks everything. Conductive."},
- {PIXPACK(0x808080), "E-Wall. Becomes transparent when electricity is connected."},
- {PIXPACK(0xFF8080), "Detector. Generates electricity when a particle is inside."},
- {PIXPACK(0x808080), "Streamline. Set start point of a streamline."},
- {PIXPACK(0x808080), "Sign. Click on a sign to edit it or anywhere else to place a new one."},
- {PIXPACK(0x8080FF), "Fan. Accelerates air. Use line tool to set direction and strength."},
- {PIXPACK(0xC0C0C0), "Wall. Blocks most particles but lets liquids through. Conductive."},
- {PIXPACK(0x808080), "Wall. Absorbs particles but lets air currents through."},
- {PIXPACK(0x808080), "Erases walls."},
- {PIXPACK(0x808080), "Wall. Indestructible. Blocks everything."},
- {PIXPACK(0x3C3C3C), "Wall. Indestructible. Blocks particles, allows air"},
- {PIXPACK(0x575757), "Wall. Indestructible. Blocks liquids and gasses, allows solids"},
- {PIXPACK(0xFFFF22), "Conductor, allows particles, conducts electricity"},
- {PIXPACK(0x242424), "E-Hole, absorbs particles, release them when powered"},
- {PIXPACK(0xFFFFFF), "Air, creates airflow and pressure"},
- {PIXPACK(0xFFBB00), "Heats the targetted element."},
- {PIXPACK(0x00BBFF), "Cools the targetted element."},
- {PIXPACK(0x303030), "Vacuum, reduces air pressure."},
- {PIXPACK(0x579777), "Wall. Indestructible. Blocks liquids and solids, allows gasses"},
-};
-
#define SC_WALL 0
#define SC_SPECIAL 8
#define SC_POWDERS 5
diff --git a/includes/powder.h b/includes/powder.h
index 5d71e8f..66c7f8a 100644
--- a/includes/powder.h
+++ b/includes/powder.h
@@ -782,6 +782,39 @@ static int lolzrule[9][9] =
{0,1,0,0,0,0,0,1,0},
{0,1,0,0,0,0,0,1,0},
};
+
+struct wall_type
+{
+ pixel colour;
+ pixel eglow; // if emap set, add this to fire glow
+ int drawstyle;
+ const char *descs;
+};
+typedef struct wall_type wall_type;
+
+static wall_type wtypes[] =
+{
+ {PIXPACK(0xC0C0C0), PIXPACK(0x101010), 0, "Wall. Indestructible. Blocks everything. Conductive."},
+ {PIXPACK(0x808080), PIXPACK(0x808080), 0, "E-Wall. Becomes transparent when electricity is connected."},
+ {PIXPACK(0xFF8080), PIXPACK(0xFF2008), 1, "Detector. Generates electricity when a particle is inside."},
+ {PIXPACK(0x808080), PIXPACK(0x000000), 0, "Streamline. Set start point of a streamline."},
+ {PIXPACK(0x808080), PIXPACK(0x000000), 0, "Sign. Click on a sign to edit it or anywhere else to place a new one."},
+ {PIXPACK(0x8080FF), PIXPACK(0x000000), 1, "Fan. Accelerates air. Use line tool to set direction and strength."},
+ {PIXPACK(0xC0C0C0), PIXPACK(0x101010), 2, "Wall. Blocks most particles but lets liquids through. Conductive."},
+ {PIXPACK(0x808080), PIXPACK(0x000000), 1, "Wall. Absorbs particles but lets air currents through."},
+ {PIXPACK(0x808080), PIXPACK(0x000000), 1, "Erases walls."},
+ {PIXPACK(0x808080), PIXPACK(0x000000), 3, "Wall. Indestructible. Blocks everything."},
+ {PIXPACK(0x3C3C3C), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks particles, allows air"},
+ {PIXPACK(0x575757), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks liquids and gasses, allows solids"},
+ {PIXPACK(0xFFFF22), PIXPACK(0x101010), 2, "Conductor, allows particles, conducts electricity"},
+ {PIXPACK(0x242424), PIXPACK(0x101010), 0, "E-Hole, absorbs particles, release them when powered"},
+ {PIXPACK(0xFFFFFF), PIXPACK(0x000000), -1, "Air, creates airflow and pressure"},
+ {PIXPACK(0xFFBB00), PIXPACK(0x000000), -1, "Heats the targetted element."},
+ {PIXPACK(0x00BBFF), PIXPACK(0x000000), -1, "Cools the targetted element."},
+ {PIXPACK(0x303030), PIXPACK(0x000000), -1, "Vacuum, reduces air pressure."},
+ {PIXPACK(0x579777), PIXPACK(0x000000), 1, "Wall. Indestructible. Blocks liquids and solids, allows gasses"},
+};
+
#define CHANNELS ((int)(MAX_TEMP-73.15f)/100+2)
particle portalp[CHANNELS][8][80];
const particle emptyparticle;