#include <Windows.h>#include <Assert.h>#include <Stdio.h>#include <Dos.h>#include "System.h"#include "Span.h"#include "Render.h"#include "SoftDrv.h"#include "Scene.h"#include "3dnowspan.h"#include "x86span565.h"#include "x86span555.h"Go to the source code of this file.
Functions | |
| BOOL | LockDDrawBackBuffer (DRV_Window *cwnd, RECT *wrect) |
| void | ResetSList (void) |
| SList * | NewSList (void) |
| void | FreeSList (SList *s) |
| void | ResetSpans (uint32 Rows) |
Variables | |
| SpanMinMax | SMinMax [MAXSCANLINES] |
| SList | ScanHash [MAXSPANS] |
| int32 | CurrentSList |
| int32 | NumSpanPixels [MAXSCANLINES] |
| CPUInfo | ProcessorInfo |
| BOOL | bBackLocked |
| __int64 | WrapMask |
| __int64 | QFixedScale16 |
| __int64 | GLMapMulUV |
| __int64 | UVL16 |
| __int64 | UVAdjust |
| __int64 | UVAdjust2 |
| __int64 | UVDivZ16StepX |
| __int64 | ARL |
| __int64 | GBL |
| __int64 | UVDivZOrigin |
| __int64 | UVR |
| __int64 | QFixedScale |
| __int64 | ZIR |
| __int64 | UVDivZStepX |
| __int64 | UVDivZStepY |
| uint8 * | TexPal |
|
|
Definition at line 82 of file span.c.
00083 {
00084 assert(s != NULL);
00085 s->Used = 0;
00086 }
|
|
||||||||||||
|
Definition at line 206 of file dmodes.c. References bActive, bBackLocked, tagRECT::bottom, DRV_Window::Buffer, ErrorPrintf(), FALSE, tagRECT::left, lpDDSBack, MyErrorToString(), NULL, DRV_Window::PixelPitch, RestoreAll(), tagRECT::right, tagRECT::top, TRUE, and U8. Referenced by BeginScene().
00207 {
00208 HRESULT ddrval;
00209 DDSURFACEDESC2 ddsd;
00210
00211 if(!bActive)
00212 return TRUE;
00213
00214 memset(&ddsd, 0, sizeof(DDSCAPS2));
00215 ddsd.dwSize =sizeof(ddsd);
00216 ddsd.dwFlags=DDSD_HEIGHT | DDSD_WIDTH;
00217
00218 lpDDSBack->lpVtbl->GetSurfaceDesc(lpDDSBack, &ddsd);
00219 if(((int)ddsd.dwWidth < wrect->right) || ((int)ddsd.dwHeight < wrect->bottom))
00220 {
00221 ErrorPrintf("ERROR: World render rect passed by the engine is larger than the drawing surface.\n");
00222 ErrorPrintf("WorldRect: %d, %d, %d, %d\n", wrect->left, wrect->top, wrect->right, wrect->bottom);
00223 ErrorPrintf("Surface: %d, %d\n", ddsd.dwWidth, ddsd.dwHeight);
00224 return FALSE;
00225 }
00226
00227 while(1)
00228 {
00229 ddrval =lpDDSBack->lpVtbl->Lock(lpDDSBack, wrect, &ddsd, DDLOCK_SURFACEMEMORYPTR, NULL);
00230 if(ddrval==DD_OK)
00231 {
00232 break;
00233 }
00234
00235 if(ddrval==DDERR_SURFACELOST)
00236 {
00237 ddrval =RestoreAll();
00238 if(ddrval!=DD_OK )
00239 {
00240 ErrorPrintf("Error During Lock() in LockDDrawBackBuffer()...\n");
00241 ErrorPrintf("DirectDraw Surfaces were lost and could not be restored : %s\n", MyErrorToString(ddrval));
00242 return FALSE;
00243 }
00244 }
00245 else if(ddrval!=DDERR_WASSTILLDRAWING)
00246 {
00247 ErrorPrintf("Error During Lock() in LockDDrawBackBuffer() : %s\n", MyErrorToString(ddrval));
00248 return FALSE;
00249 }
00250 SleepEx(5, FALSE);
00251 }
00252 cwnd->Buffer =(U8 *)ddsd.lpSurface;
00253 cwnd->PixelPitch=ddsd.lPitch;
00254 bBackLocked =TRUE;
00255 return TRUE;
00256 }
|
|
|
Definition at line 67 of file span.c. References CurrentSList, MAXSPANS, NULL, and ScanHash.
00068 {
00069
00070 CurrentSList++;
00071
00072 assert(CurrentSList < MAXSPANS);
00073
00074 return &ScanHash[CurrentSList-1];
00075
00076 return NULL;
00077 }
|
|
|
Definition at line 59 of file span.c. References CurrentSList.
00060 {
00061 CurrentSList = 0;
00062 }
|
|
|
Definition at line 91 of file span.c.
00092 {
00093 uint32 i;
00094
00095 for (i=0; i<Rows; i++)
00096 {
00097 SMinMax[i].First = NULL;
00098 NumSpanPixels[i] = 0;
00099 }
00100
00101 ResetSList();
00102 }
|
|
|
|
|
|
Definition at line 42 of file span.c. Referenced by LockDDrawBackBuffer(), and UnlockDDrawBackBuffer(). |
|
|
|
|
|
Definition at line 47 of file span.c. Referenced by RenderMiscTexturePoly(). |
|
|
Definition at line 45 of file span.c. Referenced by CalcGradients(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 51 of file span.c. Referenced by RenderMiscTexturePoly(), and RenderWorldPoly(). |
|
|
Definition at line 46 of file span.c. Referenced by CalcGradients(). |
|
|
Definition at line 46 of file span.c. Referenced by CalcGradients(). |
|
|
Definition at line 47 of file span.c. Referenced by CalcGradients(). |
|
|
Definition at line 48 of file span.c. Referenced by CalcGradients(). |
|
|
Definition at line 50 of file span.c. Referenced by CalcGradients(). |
|
|
Definition at line 50 of file span.c. Referenced by CalcGradients(). |
|
|
|
|
|
|
|
|
Definition at line 44 of file span.c. Referenced by CalcGradients(), and RenderMiscTexturePoly(). |
|
|
|
1.3.2