From f759e35cd8399d8bffea4d59c5822db8f1002409 Mon Sep 17 00:00:00 2001 From: Steven Fuller Date: Sat, 28 Jul 2001 04:44:27 +0000 Subject: More compilation. Moved windows typedefs to a separate file. Included public domain md5 routines (from dpkg). --- src/win95/chunk.hpp | 3 ++ src/win95/dummyobjectchunk.cpp | 2 +- src/win95/huffman.cpp | 32 ++++++++++++---------- src/win95/iff.hpp | 3 +- src/win95/ilbm_ext.cpp | 2 +- src/win95/ilbm_ext.hpp | 2 +- src/win95/media.hpp | 2 +- src/win95/platform.h | 62 +++--------------------------------------- 8 files changed, 30 insertions(+), 78 deletions(-) (limited to 'src/win95') diff --git a/src/win95/chunk.hpp b/src/win95/chunk.hpp index e7afcb4..e021062 100644 --- a/src/win95/chunk.hpp +++ b/src/win95/chunk.hpp @@ -3,6 +3,7 @@ #ifndef _chunk_hpp #define _chunk_hpp 1 +#include "fixer.h" #if engine @@ -78,6 +79,8 @@ extern char users_name[]; #endif +#include "list_tem.hpp" + #ifndef RIFF_OPTIMIZE // define this to get compiler errors where you are calling the old slow functions extern List list_chunks_in_file (HANDLE &, const char * chunk_id); #endif diff --git a/src/win95/dummyobjectchunk.cpp b/src/win95/dummyobjectchunk.cpp index 7fa86c9..0b9a6b6 100644 --- a/src/win95/dummyobjectchunk.cpp +++ b/src/win95/dummyobjectchunk.cpp @@ -1,4 +1,4 @@ -#include "DummyObjectChunk.hpp" +#include "dummyobjectchunk.hpp" #ifdef cencon #define new my_new diff --git a/src/win95/huffman.cpp b/src/win95/huffman.cpp index b2a0275..64100e1 100644 --- a/src/win95/huffman.cpp +++ b/src/win95/huffman.cpp @@ -1,7 +1,9 @@ -#include "stdio.h" -#include "stdlib.h" -#include "string.h" -#include "malloc.h" +#include +#include +#include + +#include "fixer.h" + #include "huffman.hpp" /* KJL 17:12:25 17/09/98 - Huffman compression/decompression routines */ @@ -28,17 +30,17 @@ typedef struct HuffNode // 16-byte node structure struct HuffNode *parent; // the THIRD four bytes, parent node - union - { // the FOURTH four bytes +// union +// { // the FOURTH four bytes unsigned int bits; // the bit pattern of this end node - struct - { - unsigned char flag; - unsigned char curdepth; - unsigned char maxdepth; - unsigned char unused; - }; - }; +// struct +// { +// unsigned char flag; +// unsigned char curdepth; +// unsigned char maxdepth; +// unsigned char unused; +// }; +// }; } HuffNode; @@ -99,7 +101,7 @@ extern HuffmanPackage *HuffmanCompression(unsigned char *sourcePtr, int length) { outpackage->CodelengthCount[n] = Depths[n + 1]; } - for (n = 0; n < 256; n++) + for (int n = 0; n < 256; n++) { outpackage->ByteAssignment[n] = SymbolCensus[n + 1].Symbol; } diff --git a/src/win95/iff.hpp b/src/win95/iff.hpp index 9250171..b03b6b2 100644 --- a/src/win95/iff.hpp +++ b/src/win95/iff.hpp @@ -1,12 +1,13 @@ #ifndef _INCLUDED_IFF_HPP_ #define _INCLUDED_IFF_HPP_ +#include "fixer.h" + #if defined(_WIN32) || defined(WIN32) || defined(WINDOWS) || defined(_WINDOWS) #define _IFF_WIN_TARGET #include #else // ! WIN32 && ! _WIN32 && ! WINDOWS && ! _WINDOWS #include - #include #endif // ! WIN32 && ! _WIN32 && ! WINDOWS && ! _WINDOWS #include "media.hpp" diff --git a/src/win95/ilbm_ext.cpp b/src/win95/ilbm_ext.cpp index e1d8a4d..613cdd4 100644 --- a/src/win95/ilbm_ext.cpp +++ b/src/win95/ilbm_ext.cpp @@ -1,4 +1,4 @@ -#include "ILBM_ext.hpp" +#include "ilbm_ext.hpp" IFF_IMPLEMENT_DYNCREATE("ILBM","TRAN",IlbmTranChunk) IFF_IMPLEMENT_DYNCREATE("ILBM","ALPH",IlbmAlphChunk) diff --git a/src/win95/ilbm_ext.hpp b/src/win95/ilbm_ext.hpp index 3aefce7..105e078 100644 --- a/src/win95/ilbm_ext.hpp +++ b/src/win95/ilbm_ext.hpp @@ -2,7 +2,7 @@ #define _INCLUDED_ILBM_EXT_HPP_ #include "iff.hpp" -#include "iff_ILBM.hpp" +#include "iff_ilbm.hpp" namespace IFF { diff --git a/src/win95/media.hpp b/src/win95/media.hpp index 73f36b7..3b49356 100644 --- a/src/win95/media.hpp +++ b/src/win95/media.hpp @@ -6,8 +6,8 @@ #include #endif // WIN32 || _WIN32 || WINDOWS || _WINDOWS + #include -#include #include #include diff --git a/src/win95/platform.h b/src/win95/platform.h index 44c245d..06abf3b 100644 --- a/src/win95/platform.h +++ b/src/win95/platform.h @@ -1,10 +1,7 @@ #ifndef PLATFORM_INCLUDED #define PLATFORM_INCLUDED -#include -#include -#include -#include // int64_t +#include "fixer.h" #include "shape.h" // struct imageheader @@ -18,55 +15,15 @@ extern "C" { #endif -#define PACKED __attribute__((packed)) - //#include "fastfile.h" - #define platform_pc Yes #define Saturn No #define Hardware2dTextureClipping No -#ifndef min -#define min(a, b) (((a) < (b)) ? (a) : (b)) -#endif - -#ifndef max -#define max(a, b) (((a) > (b)) ? (a) : (b)) -#endif - -#define TRUE 1 -#define FALSE 0 - -#define stricmp strcasecmp -#define _stricmp strcasecmp - /* Types */ -/* windows junk */ -typedef int GUID; -typedef int DPID; -typedef int HINSTANCE; -typedef int WPARAM; -typedef int LPARAM; - -typedef int BOOL; - -typedef struct RECT -{ - int left; - int top; - int right; - int bottom; -} RECT; - -typedef RECT RECT_AVP; - -typedef int64_t __int64; - -/* Watcom C 64-bit values */ - typedef struct LONGLONGCH { unsigned int lo32; @@ -74,26 +31,15 @@ typedef struct LONGLONGCH { } LONGLONGCH; - -typedef int FILETIME; - -typedef struct SYSTEMTIME -{ -//#warning "SYSTEMTIME format is not correct" - int wHour; - int wMinute; - int wSecond; - int wYear; - int wMonth; - int wDay; -} SYSTEMTIME; - /* Sine and Cosine */ +extern int sine[]; +extern int cosine[]; + #define GetSin(a) sine[a] #define GetCos(a) cosine[a] -- cgit v1.3