/* Various Drawing Functions */ internal void DrawScreen(SurfaceControl surfaceControl, Tableau tableau) { surf.Fill(Color.Green); DrawCards(tableau); if (GameOver == -1) { Font = font.Render("You Lose !", Color.Red); FontShadow = font.Render("You Lose !", Color.DarkRed); surf.Blit(FontShadow, new Point((surf.Width - Font.Width) / 2 + 2, (surf.Height - Font.Height) / 2 + 2)); surf.Blit(Font, new Point((surf.Width - Font.Width) / 2, (surf.Height - Font.Height) / 2)); } else if (GameOver == 1) { Font = font.Render("You Win !", Color.Red); FontShadow = font.Render("You Win !", Color.DarkRed); surf.Blit(FontShadow, new Point((surf.Width - Font.Width) / 2 + 2, (surf.Height - Font.Height) / 2 + 2)); surf.Blit(Font, new Point((surf.Width - Font.Width) / 2, (surf.Height - Font.Height) / 2)); } if (tableau.FireworksLeft >= 0) { particles.Update(); particles.Render(surf); } surfaceControl.Blit(surf); }
public void DrawAll() { Point curp = new Point(); Color ColorToUse; if (!Utility.IsBitSet(MyCore.MyMemory.GameBoyRAM[0xFF40], 7)) //LCD Disabled { InternalSurface.Fill(Color.White); } else { //Draw background if applicable if (Utility.IsBitSet(MyCore.MyMemory.GameBoyRAM[0xFF40], 0)) //BG Display { for (int x = 0; x < 160; x++) { for (int y = 0; y < 144; y++) { curp.X = x; curp.Y = y; //InternalSurface } } } else { InternalSurface.Fill(Color.White); } } InternalSurface.Update(); OutputControl.Blit(InternalSurface); OutputControl.Update(); }
/* Drawing Methods */ internal void DrawScreen(Board board, SurfaceControl surfaceControl) { surf.Fill(Color.Black); DrawGrid(board); surfaceControl.Blit(surf); }
/* Various Drawing Functions */ internal void DrawScreen(SurfaceControl surfaceControl, PlayState playState, Hand userHand, AI[] computerPlayers, int[] clicked, bool passing, bool playing, bool showAll) { surf.Fill(Color.Green); name1 = buttonFont.Render(playState.UserName, Color.White); name2 = buttonFont.Render(computerPlayers[0].Name, Color.White); name3 = buttonFont.Render(computerPlayers[1].Name, Color.White); name4 = buttonFont.Render(computerPlayers[2].Name, Color.White); if (playing || passing || showAll) { surf.Blit(name1, new Point(247 - name1.Width, 582 - name1.Height)); surf.Blit(name2, new Point(15, 114 - name2.Height)); surf.Blit(name3, new Point(532, 18)); surf.Blit(name4, new Point(782 - name4.Width, 476)); } int temp = 0; for (int i = 0; i < 3; i++) { if (clicked[i] >= 0) { temp++; } } passCount = temp; if (passCount == 3 && passing && !playing) { if (playState.PassingMode == 0) { surf.Blit(passButton, new Point(400, 400)); passButtonFont = buttonFont.Render("Pass Left", Color.Black); surf.Blit(passButtonFont, new Point(411, 408)); } if (playState.PassingMode == 1) { surf.Blit(passButton, new Point(400, 400)); passButtonFont = buttonFont.Render("Pass Across", Color.Black); surf.Blit(passButtonFont, new Point(403, 408)); } if (playState.PassingMode == 2) { surf.Blit(passButton, new Point(400, 400)); passButtonFont = buttonFont.Render("Pass Right", Color.Black); surf.Blit(passButtonFont, new Point(409, 408)); } } else if (passing && !playing) { if (playState.PassingMode == 0) { surf.Blit(passButton, new Point(400, 400)); passButtonFont = buttonFont.Render("Pass Left", Color.Gray); surf.Blit(passButtonFont, new Point(411, 408)); } if (playState.PassingMode == 1) { surf.Blit(passButton, new Point(400, 400)); passButtonFont = buttonFont.Render("Pass Across", Color.Gray); surf.Blit(passButtonFont, new Point(403, 408)); } if (playState.PassingMode == 2) { surf.Blit(passButton, new Point(400, 400)); passButtonFont = buttonFont.Render("Pass Right", Color.Gray); surf.Blit(passButtonFont, new Point(409, 408)); } } int x = 250, y = 462; for (int j = 0; j < userHand.Cards.Count; j++) { if ((clicked[0] == j || clicked[1] == j || clicked[2] == j) && passing) { DrawCardFaceUp(userHand.Cards[j], x, y, true); } else { if (playState.Clicked == j) { DrawInverted(userHand.Cards[j], x, y); } else { DrawCardFaceUp(userHand.Cards[j], x, y, false); } } x += 20; } if (!showAll) { x = 15; y = 120; for (int j = computerPlayers[0].AIHand.Cards.Count - 1; j >= 0; j--) { DrawCardFaceDown(x, y, 1, passing, playState.CardsPassingContains(0, j)); y += 20; } x = 450; y = 15; for (int j = computerPlayers[1].AIHand.Cards.Count - 1; j >= 0; j--) { DrawCardFaceDown(x, y, 2, passing, playState.CardsPassingContains(1, j)); x -= 20; } x = 706; y = 350; for (int j = computerPlayers[2].AIHand.Cards.Count - 1; j >= 0; j--) { DrawCardFaceDown(x, y, 3, passing, playState.CardsPassingContains(2, j)); y -= 20; } } else { x = 15; y = 120; for (int j = 0; j < computerPlayers[0].AIHand.Cards.Count; j++) { DrawCardFaceUp(computerPlayers[0].AIHand.Cards[j], x, y, false); y += 20; } x = 450; y = 15; for (int j = 0; j < computerPlayers[1].AIHand.Cards.Count; j++) { DrawCardFaceUp(computerPlayers[1].AIHand.Cards[j], x, y, false); x -= 20; } x = 706; y = 350; for (int j = 0; j < computerPlayers[2].AIHand.Cards.Count; j++) { DrawCardFaceUp(computerPlayers[2].AIHand.Cards[j], x, y, false); y -= 20; } } if (playState.Trick.Count != 0) { DrawTricks(playState); } surfaceControl.Blit(surf); }