path: root/apps/plugins/sdl/progs/wolf3d/wl_cloudsky.h
diff options
authorFranklin Wei <>2019-07-07 22:00:20 -0400
committerFranklin Wei <>2019-07-09 11:20:55 -0400
commit3f59fc8b771625aca9c3aefe03cf1038d8461963 (patch)
treee0623a323613baa0b0993411b38bcaed144b27ed /apps/plugins/sdl/progs/wolf3d/wl_cloudsky.h
parent439a0d1d91fa040d261fc39b87278bc9f5391dcc (diff)
Wolfenstein 3-D!
This is a port of Wolf4SDL, which is derived from the original id software source release. The port runs on top of the SDL plugin runtime and is loaded as an overlay. Licensing of the game code is not an issue, as discussed below (essentially, the Debian project treats Wolf4SDL as GPLv2, with an email from John Carmack backing it up): Included is a copy of MAME's Yamaha OPL sound chip emulator (fmopl_gpl.c). This file was not part of the original Wolf4SDL source (which includes a non-GPL'd version), but was rather rebased from from a later MAME source which had been relicensed to GPLv2. Change-Id: I64c2ba035e0be7e2f49252f40640641416613439
Diffstat (limited to 'apps/plugins/sdl/progs/wolf3d/wl_cloudsky.h')
1 files changed, 46 insertions, 0 deletions
diff --git a/apps/plugins/sdl/progs/wolf3d/wl_cloudsky.h b/apps/plugins/sdl/progs/wolf3d/wl_cloudsky.h
new file mode 100644
index 0000000000..ad0316d643
--- /dev/null
+++ b/apps/plugins/sdl/progs/wolf3d/wl_cloudsky.h
@@ -0,0 +1,46 @@
+#if defined(USE_CLOUDSKY) && !defined(_WL_CLOUDSKY_H_)
+#define _WL_CLOUDSKY_H_
+typedef struct
+ int length;
+ int startAndDir;
+} colormapentry_t;
+typedef struct
+ int numColors;
+ colormapentry_t *entries;
+} colormap_t;
+typedef struct
+ // The seed defines the look of the sky and every value (0-4294967295)
+ // describes an unique sky. You can play around with these inside the game
+ // when pressing <TAB>+Z in debug mode. There you'll be able to change the
+ // active seed to find out a value, which is suitable for your needs.
+ uint32_t seed;
+ // The speed defines how fast the clouds will move (0-65535)
+ uint32_t speed;
+ // The angle defines the move direction (0-359)
+ uint32_t angle;
+ // An index selecting the color map to be used for this sky definition.
+ // This value can also be chosen with <TAB>+Z
+ uint32_t colorMapIndex;
+} cloudsky_t;
+extern cloudsky_t *curSky;
+extern colormap_t colorMaps[];
+extern const int numColorMaps;
+void InitSky();
+void DrawClouds(byte *vbuf, unsigned vbufPitch, int min_wallheight);
+int GetCloudSkyDefID();