summaryrefslogtreecommitdiff
path: root/src/renderer.h
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2016-04-02 15:56:38 +0200
committerPaweł Redman <pawel.redman@gmail.com>2016-04-02 15:56:38 +0200
commite40ab41ae226e257d57a73c69d9bdd8d19f64cb5 (patch)
tree9f2e4af0f58b6db4ae850939999c642357301003 /src/renderer.h
parentf8420e0a46e1069220dcd642bca30c3fcb8c1b91 (diff)
Better UI (E/H switching).
Diffstat (limited to 'src/renderer.h')
-rw-r--r--src/renderer.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/renderer.h b/src/renderer.h
index ce373df..fadcd68 100644
--- a/src/renderer.h
+++ b/src/renderer.h
@@ -40,26 +40,28 @@ float r_text_width(float h, char *text);
void r_draw_text(r_window *rw, float x, float y, float h, char *text,
float *color, int flags);
-typedef enum {
- XSECTION_XY,
- XSECTION_XZ,
- XSECTION_YZ
-} r_xsection_type;
+
+#define XSECTION_XY 0x0001
+#define XSECTION_XZ 0x0002
+#define XSECTION_YZ 0x0004
+#define XSECTION_PLANES (XSECTION_XY|XSECTION_XZ|XSECTION_YZ)
+#define XSECTION_E 0x0008
+#define XSECTION_H 0x0010
+
typedef struct {
SDL_Texture *texture;
float aspect_ratio;
- r_xsection_type last_type;
+ int last_flags;
float last_frac;
int64_t frame_index;
} r_xsection;
void r_xsection_create(r_xsection *xsection);
void r_xsection_destroy(r_xsection *xsection);
-int r_xsection_update(r_window *rw, r_xsection *xsection,
- phy_field_info *fi, float *field, int64_t frame_index,
- r_xsection_type type, float frac);
+int r_xsection_update(r_window *rw, r_xsection *xsection, phy_sim *sim,
+ int flags, float frac);
void r_xsection_draw(r_window *rw, r_xsection *xsection,
float x, float y, float w, float h);