Moved inline assembly to a separate file for debugging.

Implemented GetTickCount/timeGetTime.

Added basic SDL/OpenGL support.

Draws something with no optimizations, but draws nothing with -O2. (What is
drawn looks like garbage.)
This commit is contained in:
Steven Fuller 2001-08-08 06:14:20 +00:00 committed by Patryk Obara
parent 665f33b0f9
commit 9e5b7f430d
10 changed files with 947 additions and 65 deletions

View file

@ -18,20 +18,11 @@
#include "d3d_hud.h"
extern IMAGEHEADER ImageHeaderArray[];
/* winmain.c */
BOOL KeepMainRifFile = FALSE;
int HWAccel = 1;
/* win_func.cpp */
void CheckForWindowsMessages()
{
fprintf(stderr, "CheckForWindowsMessages()\n");
}
/* krender.c -- thought this file was unused */
void KDraw_Item_2dTexturePolygon(int *itemptr)
{
@ -476,16 +467,6 @@ BOOL UnlockExecuteBufferAndPrepareForUse()
return FALSE;
}
void ThisFramesRenderingHasBegun()
{
fprintf(stderr, "ThisFramesRenderingHasBegun()\n");
}
void ThisFramesRenderingHasFinished()
{
fprintf(stderr, "ThisFramesRenderingHasFinished()\n");
}
void SecondFlushD3DZBuffer()
{
fprintf(stderr, "SecondFlushD3DZBuffer()\n");
@ -535,26 +516,6 @@ BOOL EndD3DScene()
return FALSE;
}
static void *CurrTextureHandle;
void D3D_ZBufferedGouraudTexturedPolygon_Output(POLYHEADER *inputPolyPtr, RENDERVERTEX *renderVerticesPtr)
{
int texoffset;
void *TextureHandle;
texoffset = inputPolyPtr->PolyColour & ClrTxDefn;
if (texoffset) {
TextureHandle = (void *)ImageHeaderArray[texoffset].D3DHandle;
} else {
TextureHandle = CurrTextureHandle;
}
fprintf(stderr, "D3D_ZBufferedGouraudTexturedPolygon_Output(%p, %p)\n", inputPolyPtr, renderVerticesPtr);
fprintf(stderr, "\tRenderPolygon.NumberOfVertices = %d\n", RenderPolygon.NumberOfVertices);
fprintf(stderr, "\ttexoffset = %d (ptr = %p)\n", texoffset, texoffset ? (void *)ImageHeaderArray[texoffset].D3DHandle : CurrTextureHandle);
CurrTextureHandle = TextureHandle;
}
void D3D_ZBufferedGouraudPolygon_Output(POLYHEADER *inputPolyPtr,RENDERVERTEX *renderVerticesPtr)
{
fprintf(stderr, "D3D_ZBufferedGouraudPolygon_Output(%p, %p)\n", inputPolyPtr, renderVerticesPtr);