summaryrefslogtreecommitdiff
path: root/src/win95/cl_init.cpp
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-07-01 00:55:22 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:09:04 +0200
commit2186d5f3f95cd74a070a490d899291648d58667a (patch)
tree55241a1afa3e1a22e0b6593a8dead0b703800f44 /src/win95/cl_init.cpp
parent218ca90543758a20ac326e444ca0643174ca7384 (diff)
Initial revision
Diffstat (limited to 'src/win95/cl_init.cpp')
-rw-r--r--src/win95/cl_init.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/win95/cl_init.cpp b/src/win95/cl_init.cpp
new file mode 100644
index 0000000..beab242
--- /dev/null
+++ b/src/win95/cl_init.cpp
@@ -0,0 +1,34 @@
+#include "cl_init.h"
+#include "system.h" // because the 3dc header files don't automatically include the ones they need
+#include "equates.h" // because the 3dc header files don't automatically include the ones they need
+#include "platform.h" // for VideoModeTypes
+#include "shape.h" // because the 3dc header files don't automatically include the ones they need
+#include "prototyp.h" // for SDB
+#include "d3_image.hpp" // for init functions
+
+extern "C" extern SCREENDESCRIPTORBLOCK ScreenDescriptorBlock;
+
+void CL_Init_All(void)
+{
+ switch (VideoModeTypeScreen)
+ {
+ case VideoModeType_8:
+ if (ScreenDescriptorBlock.SDB_Flags & SDB_Flag_TLTPalette)
+ CL_Init_DirectDrawMode(CLV_8TLT);
+ else
+ CL_Init_DirectDrawMode(CLV_8);
+ break;
+ case VideoModeType_15:
+ CL_Init_DirectDrawMode(CLV_15);
+ break;
+ case VideoModeType_24:
+ CL_Init_DirectDrawMode(CLV_24);
+ break;
+ case VideoModeType_8T:
+ CL_Init_DirectDrawMode(CLV_8T);
+ break;
+ }
+
+ if (ScanDrawDirectDraw != ScanDrawMode)
+ CL_Init_D3DMode(&(d3d.TextureFormat[d3d.CurrentTextureFormat].ddsd));
+}