mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 08:48:13 +00:00
TONY: Bugfixes for showing the credits screen.
This commit is contained in:
parent
82361a3ea3
commit
724deb6b84
@ -2615,10 +2615,10 @@ DECLARE_CUSTOM_FUNCTION(DoCredits)(CORO_PARAM, uint32 nMsg, uint32 dwTime, uint3
|
||||
for (_ctx->i = 0; _ctx->i < _ctx->msg->NumPeriods(); _ctx->i++) {
|
||||
_ctx->text[_ctx->i].SetInput(Input);
|
||||
|
||||
// Allineamento
|
||||
// Alignment
|
||||
if ((*_ctx->msg)[_ctx->i][0] == '@') {
|
||||
_ctx->text[_ctx->i].SetAlignType(RMText::HCENTER, RMText::VTOP);
|
||||
_ctx->text[_ctx->i].WriteText(_ctx->msg[_ctx->i][1], 3);
|
||||
_ctx->text[_ctx->i].WriteText(&(*_ctx->msg)[_ctx->i][1], 3);
|
||||
_ctx->text[_ctx->i].SetPosition(RMPoint(414, 70 + _ctx->i * 26)); // 70
|
||||
} else {
|
||||
_ctx->text[_ctx->i].SetAlignType(RMText::HLEFT,RMText::VTOP);
|
||||
|
@ -422,7 +422,7 @@ static int locGetOrderFromNum(uint32 nLoc) {
|
||||
|
||||
static int msgGetOrderFromNum(uint32 nMsg) {
|
||||
int i;
|
||||
LPMPALMSG msg=lpmmMsgs;
|
||||
LPMPALMSG msg = lpmmMsgs;
|
||||
|
||||
for (i = 0; i < nMsgs; i++, msg++)
|
||||
if (msg->wNum == nMsg)
|
||||
@ -542,7 +542,7 @@ static char *DuplicateMessage(uint32 nMsgOrd) {
|
||||
origmsg = (const char *)GlobalLock(lpmmMsgs[nMsgOrd].hText);
|
||||
|
||||
j = 0;
|
||||
while (origmsg[j] != '\0' || origmsg[j+1] != '\0')
|
||||
while (origmsg[j] != '\0' || origmsg[j + 1] != '\0')
|
||||
j++;
|
||||
j += 2;
|
||||
|
||||
|
@ -566,7 +566,7 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
|
||||
\****************************************************************************/
|
||||
|
||||
#define mpalQueryDoDialog(nDialog,nGroup) \
|
||||
mpalQueryHANDLE(MPQ_DO_DIALOG, (uint32)(nDialog),(uint32)(nGroup))
|
||||
mpalQueryDWORD(MPQ_DO_DIALOG, (uint32)(nDialog),(uint32)(nGroup))
|
||||
|
||||
|
||||
/****************************************************************************\
|
||||
|
@ -128,12 +128,32 @@ void RMWindow::WipeEffect(Common::Rect &rcBoundEllipse) {
|
||||
}
|
||||
|
||||
void RMWindow::GetNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse) {
|
||||
Common::Rect bounds = (rcBoundEllipse) ? *rcBoundEllipse : Common::Rect(0, 0, RM_SX, RM_SY);
|
||||
|
||||
// Update a screen section
|
||||
g_system->copyRectToScreen(lpBuf, RM_SX * 2, bounds.left, bounds.top, bounds.width(), bounds.height());
|
||||
if (rcBoundEllipse != NULL) {
|
||||
// Circular wipe effect
|
||||
GetNewFrameWipe(lpBuf, *rcBoundEllipse);
|
||||
} else {
|
||||
// Standard screen copy
|
||||
g_system->copyRectToScreen(lpBuf, RM_SX * 2, 0, 0, RM_SX, RM_SY);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies a section of the game frame in a circle bounded by the specified rectangle
|
||||
*/
|
||||
void RMWindow::GetNewFrameWipe(byte *lpBuf, Common::Rect &rcBoundEllipse) {
|
||||
// Clear the screen
|
||||
g_system->fillScreen(0);
|
||||
|
||||
if (!rcBoundEllipse.isValidRect())
|
||||
return;
|
||||
|
||||
// TODO: Do a proper circular wipe
|
||||
for (int yp = rcBoundEllipse.top; yp < rcBoundEllipse.bottom; ++yp) {
|
||||
const byte *pSrc = lpBuf + (yp * RM_SX * 2) + rcBoundEllipse.left * 2;
|
||||
|
||||
g_system->copyRectToScreen(pSrc, RM_SX * 2, rcBoundEllipse.left, yp, rcBoundEllipse.width(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************\
|
||||
* RMSnapshot Methods
|
||||
|
@ -97,6 +97,7 @@ protected:
|
||||
|
||||
void CreateBWPrecalcTable(void);
|
||||
void WipeEffect(Common::Rect &rcBoundEllipse);
|
||||
void GetNewFrameWipe(byte *lpBuf, Common::Rect &rcBoundEllipse);
|
||||
|
||||
public:
|
||||
RMWindow();
|
||||
|
Loading…
Reference in New Issue
Block a user