summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/wolf3d/wl_cloudsky.h
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2019-07-07 22:00:20 -0400
committerFranklin Wei <git@fwei.tk>2019-07-09 11:20:55 -0400
commit3f59fc8b771625aca9c3aefe03cf1038d8461963 (patch)
treee0623a323613baa0b0993411b38bcaed144b27ed /apps/plugins/sdl/progs/wolf3d/wl_cloudsky.h
parent439a0d1d91fa040d261fc39b87278bc9f5391dcc (diff)
downloadrockbox-3f59fc8b771625aca9c3aefe03cf1038d8461963.tar.gz
rockbox-3f59fc8b771625aca9c3aefe03cf1038d8461963.zip
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): http://forums.rockbox.org/index.php?topic=52872 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')
-rw-r--r--apps/plugins/sdl/progs/wolf3d/wl_cloudsky.h46
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 @@
1#if defined(USE_CLOUDSKY) && !defined(_WL_CLOUDSKY_H_)
2#define _WL_CLOUDSKY_H_
3
4typedef struct
5{
6 int length;
7 int startAndDir;
8} colormapentry_t;
9
10typedef struct
11{
12 int numColors;
13 colormapentry_t *entries;
14} colormap_t;
15
16typedef struct
17{
18 // The seed defines the look of the sky and every value (0-4294967295)
19 // describes an unique sky. You can play around with these inside the game
20 // when pressing <TAB>+Z in debug mode. There you'll be able to change the
21 // active seed to find out a value, which is suitable for your needs.
22 uint32_t seed;
23
24 // The speed defines how fast the clouds will move (0-65535)
25 uint32_t speed;
26
27 // The angle defines the move direction (0-359)
28 uint32_t angle;
29
30 // An index selecting the color map to be used for this sky definition.
31 // This value can also be chosen with <TAB>+Z
32 uint32_t colorMapIndex;
33} cloudsky_t;
34
35extern cloudsky_t *curSky;
36extern colormap_t colorMaps[];
37extern const int numColorMaps;
38
39void InitSky();
40void DrawClouds(byte *vbuf, unsigned vbufPitch, int min_wallheight);
41
42#ifndef USE_FEATUREFLAGS
43int GetCloudSkyDefID();
44#endif
45
46#endif