Skip to content

Commit 9313be6

Browse files
committed
- fix MP player 1 view not drawn on PSX
1 parent 79aec53 commit 9313be6

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

src_rebuild/Game/C/system.c

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,6 @@ void DisableDisplay(void)
627627
SetDispMask(0);
628628
}
629629

630-
int DoNotSwap = 0;
631630
DB* MPlast[2];
632631
DB* MPcurrent[2];
633632

@@ -643,13 +642,7 @@ void SwapDrawBuffers(void)
643642
{
644643
DrawSync(0);
645644

646-
if (DoNotSwap == 0)
647-
{
648-
PutDispEnv(&current->disp);
649-
}
650-
651-
DoNotSwap = 0;
652-
645+
PutDispEnv(&current->disp);
653646
PutDrawEnv(&current->draw);
654647
DrawOTag((u_long*)(current->ot + OTSIZE-1));
655648

@@ -664,7 +657,8 @@ void SwapDrawBuffers(void)
664657
last = &MPBuff[0][0];
665658
}
666659

667-
ClearCurrentDrawBuffers();
660+
ClearOTagR((u_long*)current->ot, OTSIZE);
661+
current->primptr = current->primtab;
668662
}
669663

670664
// [D] [T]
@@ -680,17 +674,17 @@ void SwapDrawBuffers2(int player)
680674
}
681675

682676
PutDrawEnv(&current->draw);
683-
DrawOTag((u_long*)(current->ot + OTSIZE - 1));
677+
DrawOTag((u_long*)(current->ot + OTSIZE-1));
684678

685679
if (player == 1)
686680
{
687681
toggle = FrameCnt & 1;
688682

689683
// [A] i guess it should work as intended
690-
MPcurrent[0] = &MPBuff[0][-toggle + 1];
684+
MPcurrent[0] = &MPBuff[0][1-toggle];
691685
MPlast[0] = &MPBuff[0][toggle];
692686

693-
MPcurrent[1] = &MPBuff[1][-toggle + 1];
687+
MPcurrent[1] = &MPBuff[1][1-toggle];
694688
MPlast[1] = &MPBuff[1][toggle];
695689
}
696690

@@ -734,6 +728,8 @@ void SetupDrawBuffers(void)
734728
MPBuff[0][1].disp.screen.h = SCREEN_H;
735729
MPBuff[0][0].disp.screen.x = draw_mode.framex;
736730
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;
737733

738734
if (NoPlayerControl == 0)
739735
SetupDrawBufferData(NumPlayers);
@@ -812,9 +808,9 @@ void SetupDrawBufferData(int num_players)
812808
toggle ^= 1;
813809
InitaliseDrawEnv(MPBuff[j], x[j], y[j], 320, height);
814810

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;
818814
}
819815
}
820816

@@ -849,6 +845,7 @@ void InitaliseDrawEnv(DB* pBuff, int x, int y, int w, int h)
849845
pBuff[1].draw.dfe = 1;
850846

851847
#if USE_PGXP
848+
// extend clip rectangles for widscreen
852849
if(NumPlayers == 2)
853850
{
854851
pBuff[0].draw.clip.x -= 256;

0 commit comments

Comments
 (0)