More compilation.
Moved windows typedefs to a separate file. Included public domain md5 routines (from dpkg).
This commit is contained in:
parent
6d5a3cec55
commit
f759e35cd8
15 changed files with 414 additions and 93 deletions
|
@ -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<int> list_chunks_in_file (HANDLE &, const char * chunk_id);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "DummyObjectChunk.hpp"
|
||||
#include "dummyobjectchunk.hpp"
|
||||
|
||||
#ifdef cencon
|
||||
#define new my_new
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "malloc.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
|
|
|
@ -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 <windows.h>
|
||||
#else // ! WIN32 && ! _WIN32 && ! WINDOWS && ! _WINDOWS
|
||||
#include <stdio.h>
|
||||
#include <conio.h>
|
||||
#endif // ! WIN32 && ! _WIN32 && ! WINDOWS && ! _WINDOWS
|
||||
|
||||
#include "media.hpp"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ILBM_ext.hpp"
|
||||
#include "ilbm_ext.hpp"
|
||||
|
||||
IFF_IMPLEMENT_DYNCREATE("ILBM","TRAN",IlbmTranChunk)
|
||||
IFF_IMPLEMENT_DYNCREATE("ILBM","ALPH",IlbmAlphChunk)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define _INCLUDED_ILBM_EXT_HPP_
|
||||
|
||||
#include "iff.hpp"
|
||||
#include "iff_ILBM.hpp"
|
||||
#include "iff_ilbm.hpp"
|
||||
|
||||
namespace IFF
|
||||
{
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#include <windows.h>
|
||||
#endif // WIN32 || _WIN32 || WINDOWS || _WINDOWS
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <conio.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
#ifndef PLATFORM_INCLUDED
|
||||
#define PLATFORM_INCLUDED
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h> // 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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue