summaryrefslogtreecommitdiff
path: root/src/graphics.c
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2012-03-26 14:56:16 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2012-03-26 15:03:27 (GMT)
commit156d50d903ff205f0ad2986dcb449c029d456d03 (patch)
tree3831376b4f4f89d11bbea26abf6d88badfb66e9a /src/graphics.c
parent74c72b8e90df6f68b248e6718d39b20bec0c2d22 (diff)
downloadpowder-156d50d903ff205f0ad2986dcb449c029d456d03.zip
powder-156d50d903ff205f0ad2986dcb449c029d456d03.tar.gz
Remove duplicate information in set_cmode
Calculating render_mode and display_mode variables from the arrays means less chance of mistakes (e.g. blob mode RENDER_EFFE was set in render_modes array but not in render_mode)
Diffstat (limited to 'src/graphics.c')
-rw-r--r--src/graphics.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 5ca2067..6a02146 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -89,6 +89,13 @@ void init_display_modes()
render_modes[0] = RENDER_FIRE;
render_modes[1] = 0;
+ update_display_modes();
+}
+
+// Combine all elements of the display_modes and render_modes arrays into single variables using bitwise or
+void update_display_modes()
+{
+ int i;
display_mode = 0;
i = 0;
while(display_modes[i])