Code cleanup
This commit is contained in:
@@ -83,7 +83,6 @@ LPDIRECTINPUTDEVICE8 KeyboardInput = NULL;
|
|||||||
LPDIRECTINPUTDEVICE8 JoystickInput[4];
|
LPDIRECTINPUTDEVICE8 JoystickInput[4];
|
||||||
DIJOYSTATE js[4];
|
DIJOYSTATE js[4];
|
||||||
|
|
||||||
|
|
||||||
DWORD X1Disable[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
DWORD X1Disable[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||||
DWORD X2Disable[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
DWORD X2Disable[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||||
DWORD Y1Disable[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
DWORD Y1Disable[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||||
@@ -262,7 +261,7 @@ BOOL InputRead(void)
|
|||||||
MouseMoveX=0;
|
MouseMoveX=0;
|
||||||
MouseMoveY=0;
|
MouseMoveY=0;
|
||||||
if(MouseInput&&InputEn==1)
|
if(MouseInput&&InputEn==1)
|
||||||
{
|
{
|
||||||
DIMOUSESTATE dims;
|
DIMOUSESTATE dims;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
aquireagain:;
|
aquireagain:;
|
||||||
@@ -310,18 +309,16 @@ aquireagain:;
|
|||||||
}
|
}
|
||||||
|
|
||||||
MouseButton=(dims.rgbButtons[0]>>7)|(dims.rgbButtons[1]>>6)|(dims.rgbButtons[2]>>5)|(dims.rgbButtons[3]>>4);
|
MouseButton=(dims.rgbButtons[0]>>7)|(dims.rgbButtons[1]>>6)|(dims.rgbButtons[2]>>5)|(dims.rgbButtons[3]>>4);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
else
|
}
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BYTE PrevStereoSound;
|
BYTE PrevStereoSound;
|
||||||
DWORD PrevSoundQuality;
|
DWORD PrevSoundQuality;
|
||||||
|
|
||||||
@@ -1594,9 +1591,9 @@ void initwinvideo(void)
|
|||||||
TestJoy();
|
TestJoy();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Moving) return;
|
if(Moving == 1) return;
|
||||||
|
|
||||||
if(!FullScreen || newmode==1)
|
if(FullScreen == 0 || newmode == 1)
|
||||||
{
|
{
|
||||||
if(InitDirectDraw() != TRUE)
|
if(InitDirectDraw() != TRUE)
|
||||||
{
|
{
|
||||||
@@ -1639,8 +1636,8 @@ void CheckTimers(void)
|
|||||||
|
|
||||||
if(T60HZEnabled)
|
if(T60HZEnabled)
|
||||||
{
|
{
|
||||||
if (AltTimer == 0) QueryPerformanceCounter((LARGE_INTEGER*)&end);
|
if (AltTimer == 0) QueryPerformanceCounter((LARGE_INTEGER*)&end);
|
||||||
else end = timeGetTime();
|
else end = timeGetTime();
|
||||||
|
|
||||||
while ((end - start) >= update_ticks_pc)
|
while ((end - start) >= update_ticks_pc)
|
||||||
{
|
{
|
||||||
@@ -1655,8 +1652,8 @@ void CheckTimers(void)
|
|||||||
|
|
||||||
if(T36HZEnabled)
|
if(T36HZEnabled)
|
||||||
{
|
{
|
||||||
if (AltTimer == 0) QueryPerformanceCounter((LARGE_INTEGER*)&end);
|
if (AltTimer == 0) QueryPerformanceCounter((LARGE_INTEGER*)&end);
|
||||||
else end = timeGetTime();
|
else end = timeGetTime();
|
||||||
|
|
||||||
while ((end - start) >= update_ticks_pc)
|
while ((end - start) >= update_ticks_pc)
|
||||||
{
|
{
|
||||||
@@ -1691,7 +1688,7 @@ void UpdateVFrame(void)
|
|||||||
WinUpdateDevices();
|
WinUpdateDevices();
|
||||||
CheckTimers();
|
CheckTimers();
|
||||||
|
|
||||||
if (!SoundEnabled) return;
|
if (SoundEnabled == 0) return;
|
||||||
|
|
||||||
lpSoundBuffer->GetCurrentPosition(&CurrentPos,&WritePos);
|
lpSoundBuffer->GetCurrentPosition(&CurrentPos,&WritePos);
|
||||||
|
|
||||||
@@ -1852,6 +1849,7 @@ void drawscreenwin(void)
|
|||||||
ScreenPtr+=16*2+32*2+256*2;
|
ScreenPtr+=16*2+32*2+256*2;
|
||||||
SurfBufD=(DWORD) &SurfBuf[0];
|
SurfBufD=(DWORD) &SurfBuf[0];
|
||||||
SURFDW=(DWORD *) &SurfBuf[0];
|
SURFDW=(DWORD *) &SurfBuf[0];
|
||||||
|
|
||||||
if(SurfaceX==256&&SurfaceY==224)
|
if(SurfaceX==256&&SurfaceY==224)
|
||||||
{
|
{
|
||||||
switch(BitDepth)
|
switch(BitDepth)
|
||||||
|
|||||||
Reference in New Issue
Block a user