move detect_cutscene into main.c since it's used by all renderers
This commit is contained in:
parent
b9eda0f6af
commit
67f7f2bfe6
3 changed files with 30 additions and 31 deletions
|
@ -23,36 +23,6 @@
|
|||
|
||||
BOOL ShowDriverWarning;
|
||||
|
||||
static unsigned char getPixel(int x, int y)
|
||||
{
|
||||
return ((unsigned char *)ddraw->primary->surface)[y*ddraw->primary->lPitch + x*ddraw->primary->lXPitch];
|
||||
}
|
||||
|
||||
int* InMovie = (int*)0x00665F58;
|
||||
int* IsVQA640 = (int*)0x0065D7BC;
|
||||
BYTE* ShouldStretch = (BYTE*)0x00607D78;
|
||||
|
||||
BOOL detect_cutscene()
|
||||
{
|
||||
if(ddraw->width <= CUTSCENE_WIDTH || ddraw->height <= CUTSCENE_HEIGHT)
|
||||
return FALSE;
|
||||
|
||||
if (ddraw->isredalert)
|
||||
{
|
||||
if ((*InMovie && !*IsVQA640) || *ShouldStretch)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
else if (ddraw->iscnc1)
|
||||
{
|
||||
return getPixel(CUTSCENE_WIDTH + 1, 0) == 0 || getPixel(CUTSCENE_WIDTH + 5, 1) == 0 ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD WINAPI render_soft_main(void)
|
||||
{
|
||||
DWORD warningEndTick = timeGetTime() + (15 * 1000);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue