- implement SwapDrawBuffers

This commit is contained in:
Ilya Shurumov 2020-04-12 01:21:06 +06:00
parent 87cfbffc82
commit d7ba985945
2 changed files with 20 additions and 15 deletions

View File

@ -1,6 +1,8 @@
#ifndef DRAW_H #ifndef DRAW_H
#define DRAW_H #define DRAW_H
extern MATRIX aspect;
extern int units_across_halved; extern int units_across_halved;
extern int units_down_halved; extern int units_down_halved;

View File

@ -13,6 +13,8 @@
#include "GLAUNCH.H" #include "GLAUNCH.H"
#include "MAIN.H" #include "MAIN.H"
#include "PAD.H" #include "PAD.H"
#include "DRAW.H"
#include <string.h> #include <string.h>
@ -1749,31 +1751,34 @@ void DisableDisplay(void)
/* WARNING: Unknown calling convention yet parameter storage is locked */ /* WARNING: Unknown calling convention yet parameter storage is locked */
int DoNotSwap = 0;
// [D]
void SwapDrawBuffers(void) void SwapDrawBuffers(void)
{ {
UNIMPLEMENTED();
/*
DrawSync(0); DrawSync(0);
if (DoNotSwap == 0) { if (DoNotSwap == 0) {
PutDispEnv(&current->disp); PutDispEnv(&current->disp);
PutDrawEnv(&current->draw); PutDrawEnv(&current->draw);
} }
DoNotSwap = 0; DoNotSwap = 0;
PutDrawEnv(&current->draw); PutDrawEnv(&current->draw);
DrawOTag(current->ot + 0x107f); DrawOTag((u_long*)current->ot + 0x107f);
if ((FrameCnt & 1U) == 0) {
current = &DB_000e0938; if ((FrameCnt & 1U) == 0)
last = &MPBuff; {
current = &MPBuff[0][1];
last = &MPBuff[0][0];
} }
else { else
current = &MPBuff; {
last = &DB_000e0938; current = &MPBuff[0][0];
last = &MPBuff[0][1];
} }
ClearOTagR(current->ot, (int)&DAT_00001080); ClearOTagR((u_long*)current->ot, 0x1080);
current->primptr = current->primtab; current->primptr = current->primtab;
return;
*/
} }
@ -1989,8 +1994,6 @@ void SetupDrawBuffers(void)
/* end block 3 */ /* end block 3 */
// End Line: 2935 // End Line: 2935
MATRIX aspect;
// [D] // [D]
void SetupDrawBufferData(int num_players) void SetupDrawBufferData(int num_players)
{ {