-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
telephone call not displaying the other persons room #17
Comments
in SDL_UpperBlit (SDL_surface.c) Destination rect x is 800, but destination clip is only 640 wide. But, even fixing that doesn't fix it. |
Found it. SDL_SaveBMP(qRoom.RoomBm.pBitmap->GetSurface(), "P:\\oroom.bmp");
SDL_SaveBMP(RoomBm.pBitmap->GetSurface(), "P:\\preblit.bmp");
RoomBm.BlitFrom (qRoom.RoomBm, &SrcRect, Dest);
SDL_SaveBMP(RoomBm.pBitmap->GetSurface(), "P:\\postblit.bmp"); If you dump the rooms. The other room thats blitted in is just black texture. It hasn't been rendered |
Think is, GameFrame::Invalidate renders only location windows of the players. I just did if (Sim.Players.Players[c].DialogWin)
Sim.Players.Players[c].DialogWin->OnPaint(true);
w = Sim.Players.Players[c].LocationWin; in GameFrame::Invalidate, so we paint the dialog room before we render the players room |
Can also call qRoom.OnPaint(true) from within CStdRaum::PostPaint, so we render it just before we want to blit it in. But that doesn't make a difference, character is still missing and the blit artifacts at the bottom. Ah because it calls CStdRaum::OnPaint, instead of the overrridden CAufsicht::OnPaint() So just |
Had to turn color key off in CStdRaum::PostPaint() CStdRaum &qRoom=*(CStdRaum*)qPlayer.DialogWin;
SDL_SetColorKey(qRoom.RoomBm.pBitmap->GetSurface(), false, 0);
qRoom.OnPaint();
CRect SrcRect (qRoom.HandyOffset, 0, qRoom.HandyOffset+340, 440);
XY Dest (qRoom.TempScreenScroll, 0); It seems like a very hacky solution though. |
Ah I guess CWnd from MFC automatically always paints itself. https://docs.microsoft.com/en-us/cpp/mfc/reference/cwnd-class?view=msvc-170#onpaint Yes every room called in its constructor
That would paint the room once immediately after its constructed. |
When calling someone, the other room is usually displayed. This is no longer the case in the new SDL build
How it's supposed to look like:
The text was updated successfully, but these errors were encountered: