Ya se dibuja correctamente el gif en la pantalla
This commit is contained in:
@@ -1703,6 +1703,7 @@ bool Director::setFileList()
|
||||
asset->add(prefix + "/data/title/loading_screen_color.png", t_bitmap);
|
||||
asset->add(prefix + "/data/title/loading_screen_bn_zxarne.png", t_bitmap);
|
||||
asset->add(prefix + "/data/title/loading_screen_color_zxarne.png", t_bitmap);
|
||||
asset->add(prefix + "/data/title/loading_screen_color.gif", t_bitmap);
|
||||
|
||||
// Ending
|
||||
asset->add(prefix + "/data/ending/ending1.png", t_bitmap);
|
||||
|
||||
@@ -40,9 +40,9 @@ Title::Title(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *
|
||||
SDL_SetTextureBlendMode(bgTexture, SDL_BLENDMODE_BLEND);
|
||||
|
||||
// Carga la surface con los gráficos de la pantalla de carga
|
||||
pInit(renderer, 256, 192);
|
||||
loading_screen = pLoadSurface("data/title/loading_screen_color.gif");
|
||||
pLoadPal("data/title/loading_screen_color.gif");
|
||||
pInit(renderer, 256, 128);
|
||||
loading_screen = pLoadSurface(asset->get("loading_screen_color.gif").c_str());
|
||||
pLoadPal(asset->get("loading_screen_color.gif").c_str());
|
||||
pSetSource(loading_screen);
|
||||
|
||||
// Inicializa variables
|
||||
@@ -281,7 +281,7 @@ void Title::update()
|
||||
switch (state)
|
||||
{
|
||||
case show_loading_screen:
|
||||
if (counter == 500)
|
||||
if (counter == 2000)
|
||||
{
|
||||
counter = 0;
|
||||
state = show_menu;
|
||||
@@ -326,7 +326,8 @@ void Title::render()
|
||||
SDL_RenderCopy(renderer, bgTexture, nullptr, nullptr);
|
||||
|
||||
// Dibuja la pantalla de carga
|
||||
pBlit(0, 0, 0, 0, 256, 192);
|
||||
pCls(4);
|
||||
pBlit(0, 0, 0, 0, 256, 128);
|
||||
pFlip(renderer);
|
||||
break;
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ static jSurface jScreen;
|
||||
static jSurface jDestSurf;
|
||||
static jSurface jSourceSurf = NULL;
|
||||
static Uint32 paleta[256];
|
||||
static int jWidth = 320;
|
||||
static int jHeight = 240;
|
||||
static int transparentColor = 0;
|
||||
static int jWidth = 256;
|
||||
static int jHeight = 128;
|
||||
static int transparentColor = 255;
|
||||
|
||||
void pInit(SDL_Renderer *renderer, int w, int h)
|
||||
{
|
||||
@@ -140,8 +140,8 @@ void pFlip(SDL_Renderer *renderer)
|
||||
for (int i = 0; i < jWidth * jHeight; ++i)
|
||||
pixels[i] = paleta[jScreen->data[i]];
|
||||
SDL_UnlockTexture(jTex);
|
||||
SDL_RenderCopy(renderer, jTex, NULL, NULL);
|
||||
//SDL_RenderPresent(jRen);
|
||||
SDL_Rect rect = {0,64,256,128};
|
||||
SDL_RenderCopy(renderer, jTex, NULL, &rect);
|
||||
}
|
||||
|
||||
void pPutPixel(int x, int y, Uint8 color)
|
||||
|
||||
Reference in New Issue
Block a user