diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-11-12 20:44:15 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-11-12 20:44:15 (GMT) |
| commit | 0f4c0915d9bdfbd9e865200941083bd463d03d69 (patch) | |
| tree | eb01e996656c59b303d74bfd79f9a947fa32f277 /includes | |
| parent | 1b984200f3059680f6ad3cfe9805bff234d00737 (diff) | |
| download | powder-0f4c0915d9bdfbd9e865200941083bd463d03d69.zip powder-0f4c0915d9bdfbd9e865200941083bd463d03d69.tar.gz | |
Replace cmode with more flexible render options, TODO: Saving and render options UI
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/font.h | 16 | ||||
| -rw-r--r-- | includes/graphics.h | 9 | ||||
| -rw-r--r-- | includes/interface.h | 2 | ||||
| -rw-r--r-- | includes/powdergraphics.h | 55 |
4 files changed, 56 insertions, 26 deletions
diff --git a/includes/font.h b/includes/font.h index 3eee73e..c5a9ded 100644 --- a/includes/font.h +++ b/includes/font.h @@ -219,9 +219,9 @@ char font_data[] = { 0x0A, 0xE0, 0x2F, 0xC0, 0x01, 0x0D, 0x06, 0x40, 0x32, 0x00, 0x30, 0x03, 0x00, 0x33, 0x00, 0x30, 0x06, 0x40, 0xC2, 0x01, 0x0D, 0xE0, 0x2F, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x20, 0x00, 0x20, 0x23, 0x80, 0x32, 0x0A, 0x0D, 0xC3, 0xD1, 0x10, 0x1C, 0x0D, 0xC0, 0x81, 0x02, 0x0A, 0xE0, 0x2F, 0x00, 0x54, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xFC, 0x03, 0xB0, 0xE0, 0x00, 0x03, 0x0C, 0x30, 0xC0, 0x00, 0x0B, 0x0E, 0xC0, 0x3F, 0x00, 0xAC, 0x03, 0xC0, 0x3A, 0x00, 0xAC, 0x03, - 0x06, 0x74, 0xC0, 0x0C, 0xDC, 0xC0, 0x0C, 0xDC, 0xC0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C, - 0x0F16, 0x0F26, 0x0F36, 0x0F46, 0x0F56, 0x0F66, 0x0F76, 0x0F86, - 0x0F96, 0x0FA6, 0x0FB6, 0x0FC6, 0x0FD6, 0x0FE6, 0x0FF6, 0x1006, - 0x1016, 0x1026, 0x1036, 0x1046, 0x1056, 0x1066, 0x1076, 0x1086, - 0x1096, 0x10A6, 0x10B6, 0x10C6, 0x10D6, 0x10E6, 0x10F6, 0x1106, - 0x1116, 0x1126, 0x1136, 0x1146, 0x1156, 0x1166, 0x1176, 0x1186, + 0x0F16, 0x0F24, 0x0F39, 0x0F51, 0x0F61, 0x0F71, 0x0F81, 0x0F91, + 0x0FA1, 0x0FB1, 0x0FC1, 0x0FD1, 0x0FE1, 0x0FF1, 0x1001, 0x1011, + 0x1021, 0x1031, 0x1041, 0x1051, 0x1061, 0x1071, 0x1081, 0x1091, + 0x10A1, 0x10B1, 0x10C1, 0x10D1, 0x10E1, 0x10F1, 0x1101, 0x1111, + 0x1121, 0x1131, 0x1141, 0x1151, 0x1161, 0x1171, 0x1181, 0x1191, }; #endif #endif diff --git a/includes/graphics.h b/includes/graphics.h index b704a54..957c160 100644 --- a/includes/graphics.h +++ b/includes/graphics.h @@ -45,7 +45,12 @@ extern int emp_decor; -extern unsigned cmode; +extern unsigned int *render_modes; +extern unsigned int render_mode; +extern unsigned int colour_mode; +extern unsigned int *display_modes; +extern unsigned int display_mode; + extern SDL_Surface *sdl_scrn; extern int sdl_scale; @@ -120,6 +125,8 @@ void draw_menu(pixel *vid_buf, int i, int hover); void drawpixel(pixel *vid, int x, int y, int r, int g, int b, int a); +int addchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a); + int drawchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a); int drawtext(pixel *vid, int x, int y, const char *s, int r, int g, int b, int a); diff --git a/includes/interface.h b/includes/interface.h index 64d1352..f8247d3 100644 --- a/includes/interface.h +++ b/includes/interface.h @@ -328,6 +328,8 @@ int report_ui(pixel *vid_buf, char *save_id); char *console_ui(pixel *vid_buf, char error[255],char console_more); +void render_ui(pixel *vid_buf); + void simulation_ui(pixel *vid_buf); unsigned int decorations_ui(pixel *vid_buf, int *bsx, int *bsy, unsigned int savedColor); diff --git a/includes/powdergraphics.h b/includes/powdergraphics.h index a073c71..34b99b7 100644 --- a/includes/powdergraphics.h +++ b/includes/powdergraphics.h @@ -1,29 +1,50 @@ #ifndef PGRAPHICS_H #define PGRAPHICS_H -#define PMODE 0x00000FFF -#define PMODE_NONE 0x00000000 -#define PMODE_FLAT 0x00000001 -#define PMODE_BLOB 0x00000002 -#define PMODE_BLUR 0x00000004 -#define PMODE_GLOW 0x00000008 -#define PMODE_SPARK 0x00000010 -#define PMODE_FLARE 0x00000020 -#define PMODE_LFLARE 0x00000040 -#define PMODE_ADD 0x00000080 -#define PMODE_BLEND 0x00000100 - +#define PMODE 0x00000FFF +#define PMODE_NONE 0x00000000 +#define PMODE_FLAT 0x00000001 +#define PMODE_BLOB 0x00000002 +#define PMODE_BLUR 0x00000004 +#define PMODE_GLOW 0x00000008 +#define PMODE_SPARK 0x00000010 +#define PMODE_FLARE 0x00000020 +#define PMODE_LFLARE 0x00000040 +#define PMODE_ADD 0x00000080 +#define PMODE_BLEND 0x00000100 #define PSPEC_STICKMAN 0x00000200 -#define NO_DECO 0x00001000 -#define DECO_FIRE 0x00002000 +#define OPTIONS 0x0000F000 +#define NO_DECO 0x00001000 +#define DECO_FIRE 0x00002000 -#define FIREMODE 0x00FF0000 -#define FIRE_ADD 0x00010000 -#define FIRE_BLEND 0x00020000 +#define FIREMODE 0x00FF0000 +#define FIRE_ADD 0x00010000 +#define FIRE_BLEND 0x00020000 #define EFFECT 0xFF000000 #define EFFECT_GRAVIN 0x01000000 #define EFFECT_GRAVOUT 0x02000000 +#define RENDER_EFFE OPTIONS | PSPEC_STICKMAN | EFFECT +#define RENDER_FIRE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND | FIREMODE +#define RENDER_GLOW OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_GLOW | PMODE_SPARK | PMODE_FLARE | PMODE_LFLARE | PMODE_ADD | PMODE_BLEND +#define RENDER_BLUR OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_BLUR | PMODE_ADD | PMODE_BLEND +#define RENDER_BASC OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND +#define RENDER_NONE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT + +#define COLOUR_HEAT 0x00000001 +#define COLOUR_LIFE 0x00000002 + +#define COLOUR_DEFAULT 0x00000000 + +#define DISPLAY_AIRC 0x00000001 +#define DISPLAY_AIRP 0x00000002 +#define DISPLAY_AIRV 0x00000004 +#define DISPLAY_AIRH 0x00000008 +#define DISPLAY_AIR 0x0000000F +#define DISPLAY_WARP 0x00000010 +#define DISPLAY_PERS 0x00000020 +#define DISPLAY_EFFE 0x00000020 + #endif |
