afont.c now builds
This commit is contained in:
parent
49c2203275
commit
1fcf3c028a
8 changed files with 24 additions and 74 deletions
|
@ -761,7 +761,7 @@ void BLTString(FONT_DESC str_packet)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while(++strptr != end_char);
|
while(++strptr != (unsigned char *)end_char);
|
||||||
|
|
||||||
pos_y += font.fontHeight - 2;
|
pos_y += font.fontHeight - 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ extern void CopyIntQuatToShort(QUAT* q_from,QUAT_SHORT* qs_to);
|
||||||
#define KEYFRAME_VECTOR_SHIFT 4
|
#define KEYFRAME_VECTOR_SHIFT 4
|
||||||
|
|
||||||
//make sure the keyframe structure packs as much as possible
|
//make sure the keyframe structure packs as much as possible
|
||||||
#pragma pack(push,1)
|
|
||||||
typedef struct keyframe_data {
|
typedef struct keyframe_data {
|
||||||
short Offset_x; /*Offset values may need to be scaled*/
|
short Offset_x; /*Offset values may need to be scaled*/
|
||||||
short Offset_y; /*In practice scaling should only be needed for 'placed' hierarchies*/
|
short Offset_y; /*In practice scaling should only be needed for 'placed' hierarchies*/
|
||||||
|
@ -95,8 +95,7 @@ typedef struct keyframe_data {
|
||||||
|
|
||||||
unsigned short Sequence_Length; /* Time between these values and the next ones. */
|
unsigned short Sequence_Length; /* Time between these values and the next ones. */
|
||||||
struct keyframe_data *Next_Frame; /*This is no longer Null for the last frame - look at the last_frame setting instead*/
|
struct keyframe_data *Next_Frame; /*This is no longer Null for the last frame - look at the last_frame setting instead*/
|
||||||
} KEYFRAME_DATA;
|
} PACKED KEYFRAME_DATA;
|
||||||
#pragma pack(pop)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -84,15 +84,14 @@ typedef struct
|
||||||
|
|
||||||
typedef struct pffont
|
typedef struct pffont
|
||||||
{
|
{
|
||||||
LPDIRECTDRAWSURFACE data; /*LPDIRECTDRAWSURFACE, etc - fill out*/
|
// LPDIRECTDRAWSURFACE data; /*LPDIRECTDRAWSURFACE, etc - fill out*/
|
||||||
char filename[100]; /*compile in -filename */
|
char filename[100]; /*compile in -filename */
|
||||||
int fontHeight; /* max height of chars */
|
int fontHeight; /* max height of chars */
|
||||||
int num_chars_in_font; /*number of chars in this font */
|
int num_chars_in_font; /*number of chars in this font */
|
||||||
FONT_TYPE font_type;
|
FONT_TYPE font_type;
|
||||||
FONT_FLAGS flags;
|
FONT_FLAGS flags;
|
||||||
RECT_AVP srcRect[MAXNUM_CHARS_IN_FONT]; /*source rectangles*/
|
RECT_AVP srcRect[MAXNUM_CHARS_IN_FONT]; /*source rectangles*/
|
||||||
|
|
||||||
|
|
||||||
int fttexWidth; /* filled in during loading */
|
int fttexWidth; /* filled in during loading */
|
||||||
int fttexHeight;
|
int fttexHeight;
|
||||||
int fttexBitDepth;
|
int fttexBitDepth;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#ifndef PROTOTYP_INCLUDED
|
#ifndef PROTOTYP_INCLUDED
|
||||||
|
#define PROTOTYP_INCLUDED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
@ -2470,22 +2471,13 @@ void BackFaceCullPointOutcodeFlagging(void);
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if SupportWindows95
|
|
||||||
void InitialiseSystem(HINSTANCE hInstance, int nCmdShow);
|
|
||||||
#else
|
|
||||||
void InitialiseSystem(void);
|
void InitialiseSystem(void);
|
||||||
#endif
|
|
||||||
|
|
||||||
void InitialiseRenderer(void);
|
void InitialiseRenderer(void);
|
||||||
|
|
||||||
void ExitSystem(void);
|
void ExitSystem(void);
|
||||||
|
|
||||||
void InitialVideoMode(void);
|
void InitialVideoMode(void);
|
||||||
|
|
||||||
void ResetFrameCounter(void);
|
void ResetFrameCounter(void);
|
||||||
void FrameCounterHandler(void);
|
void FrameCounterHandler(void);
|
||||||
|
|
||||||
#if SupportWindows95
|
|
||||||
void DirectWriteD3DLine(VECTOR2D* LineStart, VECTOR2D* LineEnd, int LineColour);
|
void DirectWriteD3DLine(VECTOR2D* LineStart, VECTOR2D* LineEnd, int LineColour);
|
||||||
void* LoadImageIntoDirectDrawSurface(char *fname, IMAGEHEADER *iheader,
|
void* LoadImageIntoDirectDrawSurface(char *fname, IMAGEHEADER *iheader,
|
||||||
int ImageLoadMode, BOOL Sysmem);
|
int ImageLoadMode, BOOL Sysmem);
|
||||||
|
@ -2499,19 +2491,6 @@ int GetTextureHandle(IMAGEHEADER *imageHeaderPtr);
|
||||||
|
|
||||||
void* LoadFontIntoDirectDrawSurface(char *fname, IMAGEHEADER *iheader);
|
void* LoadFontIntoDirectDrawSurface(char *fname, IMAGEHEADER *iheader);
|
||||||
void ClearScreen(SCREENDESCRIPTORBLOCK* sdb, int Colour);
|
void ClearScreen(SCREENDESCRIPTORBLOCK* sdb, int Colour);
|
||||||
#ifdef __cplusplus
|
|
||||||
LPDIRECTDRAWSURFACE LoadPPMInD3DMode(char* fname,
|
|
||||||
LPDDSURFACEDESC lpFormat, IMAGEHEADER* iheader,
|
|
||||||
int MemoryType);
|
|
||||||
LPDIRECTDRAWSURFACE LoadPPMIntoDDSurface(LPDIRECTDRAWSURFACE lpDDS,
|
|
||||||
DDSURFACEDESC format, int Height, int Width,
|
|
||||||
IMAGEHEADER* iheader, BOOL Quantise, FILE* fp,
|
|
||||||
int psize, int pcaps, char* fname, int MipNum);
|
|
||||||
LPDIRECTDRAWSURFACE LoadPGMInD3DMode(char* fname,
|
|
||||||
LPDDSURFACEDESC lpFormat, IMAGEHEADER* iheader,
|
|
||||||
int MemoryType);
|
|
||||||
#endif // for __cplusplus
|
|
||||||
#endif // for SupportWindows95
|
|
||||||
|
|
||||||
void InitGame(void);
|
void InitGame(void);
|
||||||
void StartGame(void);
|
void StartGame(void);
|
||||||
|
@ -2986,6 +2965,6 @@ int Approximate3dMagnitude(VECTORCH *v);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define PROTOTYP_INCLUDED
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#ifndef SHAPE_INCLUDED
|
#ifndef SHAPE_INCLUDED
|
||||||
|
#define SHAPE_INCLUDED
|
||||||
|
|
||||||
|
#include "aw.h" // AW_BACKUPTEXTUREHANDLE
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Header File for Shape Data
|
Header File for Shape Data
|
||||||
|
@ -826,17 +828,12 @@ typedef struct imageheader {
|
||||||
|
|
||||||
TEXTURE *ImagePtr; /* Pointer to texture in memory */
|
TEXTURE *ImagePtr; /* Pointer to texture in memory */
|
||||||
|
|
||||||
#if SupportWindows95
|
#if SupportWindows95
|
||||||
|
// LPDIRECTDRAWSURFACE DDSurface;
|
||||||
LPDIRECTDRAWSURFACE DDSurface;
|
// LPDIRECT3DTEXTURE D3DTexture;
|
||||||
|
// D3DTEXTUREHANDLE D3DHandle;
|
||||||
LPDIRECT3DTEXTURE D3DTexture;
|
|
||||||
|
|
||||||
D3DTEXTUREHANDLE D3DHandle;
|
|
||||||
|
|
||||||
AW_BACKUPTEXTUREHANDLE hBackup;
|
AW_BACKUPTEXTUREHANDLE hBackup;
|
||||||
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
int ImageNum; /* # MIP images */
|
int ImageNum; /* # MIP images */
|
||||||
char ImageName[ImageNameSize]; /* Filename */
|
char ImageName[ImageNameSize]; /* Filename */
|
||||||
|
@ -1096,7 +1093,5 @@ typedef enum {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SHAPE_INCLUDED
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -74,31 +74,6 @@ should contain a dummy padding 32-bit value (recommended).
|
||||||
struct vectorch;
|
struct vectorch;
|
||||||
struct matrixch;
|
struct matrixch;
|
||||||
|
|
||||||
/***********************/
|
|
||||||
/* F-U-N-C-T-I-O-N */
|
|
||||||
/* P-R-O-T-O-T-Y-P-E-S */
|
|
||||||
/* F-O-R A-L-L */
|
|
||||||
/* P-U-B-L-I-C */
|
|
||||||
/* F-U-N-C-T-I-O-N-S */
|
|
||||||
/***********************/
|
|
||||||
|
|
||||||
/* overwrites the input vector with the new vector */
|
|
||||||
_asmcall void MMX_VectorTransform(struct vectorch * vector, struct matrixch const * matrix);
|
|
||||||
/* fills a new vector with the result of the input vector transformed by the matrix */
|
|
||||||
_asmcall void MMX_VectorTransformed(struct vectorch * v_result, struct vectorch const * v_parm, struct matrixch const * matrix);
|
|
||||||
/* overwrites the input vector with the new vector, then adds another vector */
|
|
||||||
_asmcall void MMX_VectorTransformAndAdd(struct vectorch * vector, struct matrixch const * matrix, struct vectorch const * v_add);
|
|
||||||
/* fills a new vector with the result of the input vector transformed by the matrix then added to another vector */
|
|
||||||
_asmcall void MMX_VectorTransformedAndAdd(struct vectorch * v_result, struct vectorch const * v_parm, struct matrixch const * matrix, struct vectorch const * v_add);
|
|
||||||
/* compute dot product */
|
|
||||||
_asmcall signed MMX_VectorDot(struct vectorch const * v1, struct vectorch const * v2);
|
|
||||||
/* this one assumes all the input vector elements are in the range [-32768,32767] */
|
|
||||||
_asmcall signed MMX_VectorDot16(struct vectorch const * v1, struct vectorch const * v2);
|
|
||||||
|
|
||||||
/* inline versions */
|
|
||||||
_asminline signed MMXInline_VectorDot(struct vectorch const * v1, struct vectorch const * v2);
|
|
||||||
_asminline signed MMXInline_VectorDot16(struct vectorch const * v1, struct vectorch const * v2);
|
|
||||||
|
|
||||||
/*****************/
|
/*****************/
|
||||||
/* PRIVATE PARTS */
|
/* PRIVATE PARTS */
|
||||||
/*****************/
|
/*****************/
|
||||||
|
@ -209,8 +184,8 @@ extern int use_mmx_math;
|
||||||
|
|
||||||
/* inline functions - no call */
|
/* inline functions - no call */
|
||||||
|
|
||||||
extern __int64 const mmx_sign_mask;
|
extern const __int64 mmx_sign_mask;
|
||||||
extern __int64 const mmx_one_fixed_h;
|
extern const __int64 mmx_one_fixed_h;
|
||||||
|
|
||||||
#ifdef __WATCOMC__
|
#ifdef __WATCOMC__
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef PLATFORM_INCLUDED
|
#ifndef PLATFORM_INCLUDED
|
||||||
#define PLATFORM_INCLUDED
|
#define PLATFORM_INCLUDED
|
||||||
|
|
||||||
|
#include <stdint.h> // int64_t
|
||||||
|
|
||||||
#include "shape.h" // struct imageheader
|
#include "shape.h" // struct imageheader
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -42,6 +44,7 @@ typedef struct RECT
|
||||||
|
|
||||||
typedef RECT RECT_AVP;
|
typedef RECT RECT_AVP;
|
||||||
|
|
||||||
|
typedef int64_t __int64;
|
||||||
|
|
||||||
/* Watcom C 64-bit values */
|
/* Watcom C 64-bit values */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue