@@ -627,7 +627,6 @@ void DisableDisplay(void)
627
627
SetDispMask (0 );
628
628
}
629
629
630
- int DoNotSwap = 0 ;
631
630
DB * MPlast [2 ];
632
631
DB * MPcurrent [2 ];
633
632
@@ -643,13 +642,7 @@ void SwapDrawBuffers(void)
643
642
{
644
643
DrawSync (0 );
645
644
646
- if (DoNotSwap == 0 )
647
- {
648
- PutDispEnv (& current -> disp );
649
- }
650
-
651
- DoNotSwap = 0 ;
652
-
645
+ PutDispEnv (& current -> disp );
653
646
PutDrawEnv (& current -> draw );
654
647
DrawOTag ((u_long * )(current -> ot + OTSIZE - 1 ));
655
648
@@ -664,7 +657,8 @@ void SwapDrawBuffers(void)
664
657
last = & MPBuff [0 ][0 ];
665
658
}
666
659
667
- ClearCurrentDrawBuffers ();
660
+ ClearOTagR ((u_long * )current -> ot , OTSIZE );
661
+ current -> primptr = current -> primtab ;
668
662
}
669
663
670
664
// [D] [T]
@@ -680,17 +674,17 @@ void SwapDrawBuffers2(int player)
680
674
}
681
675
682
676
PutDrawEnv (& current -> draw );
683
- DrawOTag ((u_long * )(current -> ot + OTSIZE - 1 ));
677
+ DrawOTag ((u_long * )(current -> ot + OTSIZE - 1 ));
684
678
685
679
if (player == 1 )
686
680
{
687
681
toggle = FrameCnt & 1 ;
688
682
689
683
// [A] i guess it should work as intended
690
- MPcurrent [0 ] = & MPBuff [0 ][- toggle + 1 ];
684
+ MPcurrent [0 ] = & MPBuff [0 ][1 - toggle ];
691
685
MPlast [0 ] = & MPBuff [0 ][toggle ];
692
686
693
- MPcurrent [1 ] = & MPBuff [1 ][- toggle + 1 ];
687
+ MPcurrent [1 ] = & MPBuff [1 ][1 - toggle ];
694
688
MPlast [1 ] = & MPBuff [1 ][toggle ];
695
689
}
696
690
@@ -734,6 +728,8 @@ void SetupDrawBuffers(void)
734
728
MPBuff [0 ][1 ].disp .screen .h = SCREEN_H ;
735
729
MPBuff [0 ][0 ].disp .screen .x = draw_mode .framex ;
736
730
MPBuff [0 ][1 ].disp .screen .x = draw_mode .framex ;
731
+ MPBuff [0 ][0 ].disp .screen .y = draw_mode .framey ;
732
+ MPBuff [0 ][1 ].disp .screen .y = draw_mode .framey ;
737
733
738
734
if (NoPlayerControl == 0 )
739
735
SetupDrawBufferData (NumPlayers );
@@ -812,9 +808,9 @@ void SetupDrawBufferData(int num_players)
812
808
toggle ^= 1 ;
813
809
InitaliseDrawEnv (MPBuff [j ], x [j ], y [j ], 320 , height );
814
810
815
- MPBuff [i ][ j ].primtab = (char * )primpt ;
816
- MPBuff [i ][ j ].primptr = (char * )primpt ;
817
- MPBuff [i ][ j ].ot = (OTTYPE * )otpt ;
811
+ MPBuff [j ][ i ].primtab = (char * )primpt ;
812
+ MPBuff [j ][ i ].primptr = (char * )primpt ;
813
+ MPBuff [j ][ i ].ot = (OTTYPE * )otpt ;
818
814
}
819
815
}
820
816
@@ -849,6 +845,7 @@ void InitaliseDrawEnv(DB* pBuff, int x, int y, int w, int h)
849
845
pBuff [1 ].draw .dfe = 1 ;
850
846
851
847
#if USE_PGXP
848
+ // extend clip rectangles for widscreen
852
849
if (NumPlayers == 2 )
853
850
{
854
851
pBuff [0 ].draw .clip .x -= 256 ;
0 commit comments