💄 Add new level transitions
This commit is contained in:
parent
a69a76941e
commit
8a732a2005
2 changed files with 19 additions and 3 deletions
|
|
@ -4,6 +4,7 @@
|
|||
* Implementation of load screens.
|
||||
*/
|
||||
#include "all.h"
|
||||
#include "../SourceX/DiabloUI/art.h"
|
||||
|
||||
DEVILUTION_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -16,9 +17,12 @@ const BYTE BarColor[3] = { 138, 43, 254 };
|
|||
/** The screen position of the top left corner of the progress bar. */
|
||||
const int BarPos[3][2] = { { 53, 37 }, { 53, 421 }, { 53, 37 } };
|
||||
|
||||
Art ArtCutseenWidescreen;
|
||||
|
||||
static void FreeInterface()
|
||||
{
|
||||
MemFreeDbg(sgpBackCel);
|
||||
ArtCutseenWidescreen.Unload();
|
||||
}
|
||||
|
||||
static Cutseens PickCutscene(interface_mode uMsg)
|
||||
|
|
@ -123,11 +127,13 @@ static void InitCutscene(interface_mode uMsg)
|
|||
progress_id = 1;
|
||||
break;
|
||||
case CutPortal:
|
||||
LoadArt("Gendata\\Cutportlw.pcx", &ArtCutseenWidescreen);
|
||||
celPath = "Gendata\\Cutportl.cel";
|
||||
palPath = "Gendata\\Cutportl.pal";
|
||||
progress_id = 1;
|
||||
break;
|
||||
case CutPortalRed:
|
||||
LoadArt("Gendata\\Cutportrw.pcx", &ArtCutseenWidescreen);
|
||||
celPath = "Gendata\\Cutportr.cel";
|
||||
palPath = "Gendata\\Cutportr.pal";
|
||||
progress_id = 1;
|
||||
|
|
@ -156,13 +162,23 @@ static void DrawProgress(CelOutputBuffer out, int x, int y, int progress_id)
|
|||
|
||||
static void DrawCutscene()
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
lock_buf(1);
|
||||
CelOutputBuffer out = GlobalBackBuffer();
|
||||
if (ArtCutseenWidescreen.surface != NULL) {
|
||||
if (SDLC_SetSurfaceColors(ArtCutseenWidescreen.surface, out.surface->format->palette) <= -1)
|
||||
ErrSdl();
|
||||
SDL_Rect dst_rect = {
|
||||
BUFFER_BORDER_LEFT + PANEL_X - (ArtCutseenWidescreen.w() - PANEL_WIDTH) / 2,
|
||||
BUFFER_BORDER_TOP + UI_OFFSET_Y,
|
||||
ArtCutseenWidescreen.w(),
|
||||
ArtCutseenWidescreen.h()
|
||||
};
|
||||
if (SDL_BlitSurface(ArtCutseenWidescreen.surface, NULL, out.surface, &dst_rect) < 0)
|
||||
ErrSdl();
|
||||
}
|
||||
CelDrawTo(out, PANEL_X, 480 - 1 + UI_OFFSET_Y, sgpBackCel, 1, 640);
|
||||
|
||||
for (i = 0; i < sgdwProgress; i++) {
|
||||
for (auto i = 0; i < sgdwProgress; i++) {
|
||||
DrawProgress(
|
||||
out,
|
||||
BarPos[progress_id][0] + i + PANEL_X,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue