Playgif on forefront

Toranks

Active member
On previous versions of Openbor playgif reproduces covering everything, but now it seems that it does so in the background, behind the characters. How can I change it? I can't see "layer" parameter or similar in the Openbor wiki
 
I have thoroughly read the documentation and the forum and I think it is a bug. It is not supposed to work like this, in theory the whole screen goes black except the gif, which covers everything.
 
Hi Toranks. Apparently there is no function or command to adjust the "Z" layer for any scene, be it gif or webm. My dream is to use webm video format to make high resolution backgrounds, but maybe in future updates.

Here is a part of the engine source code that manages gif and webm. Unfortunately I didn't find anything about "Z" adjust:
Code:
void playscene(char *filename)
{
    char *buf;
    size_t size;
    int pos;
    char *command = NULL;
    char videofile[MAX_BUFFER_LEN];
    int x = 0, y = 0, skipone = 0, noskip = 0, i;
    int closing = 0, status;

    ArgList arglist;
    char argbuf[MAX_ARG_LEN + 1] = "";

    // Read file
    if(buffer_pakfile(filename, &buf, &size) != 1)
    {
        return;
    }

    currentScene = filename;

    // Now interpret the contents of buf line by line
    pos = 0;
    while(buf[pos])
    {
        ParseArgs(&arglist, buf + pos, argbuf);
        command = GET_ARG(0);
        if(command[0])
        {
            if(!closing && stricmp(command, "music") == 0)
            {
                music(GET_ARG(1), GET_INT_ARG(2), atol(GET_ARG(3)));
            }
            else if(!closing && stricmp(command, "animation") == 0)
            {
                strcpy(videofile, GET_ARG(1));
                x = GET_INT_ARG(2);
                y = GET_INT_ARG(3);
                skipone = GET_INT_ARG(4);
                noskip = GET_INT_ARG(5);
                status = playgif(videofile, x, y, noskip);
                if(status == -1 && !skipone)
                {
                    closing = 1;
                }
            }
            else if(!closing && stricmp(command, "video") == 0)
            {
#ifdef WEBM
                strcpy(videofile, GET_ARG(1));
                skipone = GET_INT_ARG(2);
                noskip = GET_INT_ARG(3);
                status = playwebm(videofile, noskip);
                if(status == -1 && !skipone)
                {
                    closing = 1;
                }
                else if(status == 0)
                {
                    printf("An error occurred when trying to play the video %s\n", videofile);
                }
#else
                printf("Skipping video %s; WebM playback not supported on this platform\n");
#endif
            }
            else if(stricmp(command, "silence") == 0)
            {
                sound_close_music();
            }
        }
        // Go to next non-blank line
        pos += getNewLineStart(buf + pos);
    }
    if(buf != NULL)
    {
        free(buf);
        buf = NULL;
    }
    currentScene = NULL;
    for(i = 0; i < MAX_PLAYERS; i++)
    {
        player[i].disablekeys = player[i].newkeys = player[i].playkeys = 0;
    }
}
 
Toranks said:
On previous versions of Openbor playgif reproduces me covering everything, but now it seems that it does so in the background, behind the characters. How can I change it? I can't see "layer" parameter or similar in the Openbor wiki

While i was updating the Golden Axe Myth game for the latest engine i noticed that too. This game was using a lot the playgif function to display heroes cards and other things within the gameplay and on older Openbor versions these did cover the whole screen. But on the newest Openbor the playgif function did display this “cards” in the background without covering everything like in you case.
Tho i can’t really say if this is a bug or it actually was supposed to work this way and it just was fixed for it.

And yes, as Kratus said the playgif function does not have any layering/positioning settings.

Anyway, my solution to that was to make an entity with multiple idles for displaying each card as needed with setlayer setting added.
 
magggas did you report this on GitHub?
In the end I decided to leave it like this and temporarily remove a large image that covered most of the gif in the foreground, so for me it has been a minor problem.
But it is annoying not to have such a useful function.
I wonder if with playwebm will happen the same...
 
Although I did not add the playgif or webm feature, I'm fairly certain both were meant to overlay all stage objects. I think the best solution is to see if I can add a layer adjustment so authors can put it anywhere they lake, and default it to overlaying the stage/sprites.

Kratus it is unlikely you will ever be able to do that. If you want "high res" backgrounds, 24bit .png is supported for stage layers and so is script. The script support is clunky but it does work and you could use it to rotate preloaded images for animation. The upcoming engine update greatly improves on the script support so it will be easier to do, but it is already possible right now.

DC
 
Damon Caskey said:
Although I did not add the playgif or webm feature, I'm fairly certain both were meant to overlay all stage objects. I think the best solution is to see if I can add a layer adjustment so authors can put it anywhere they lake, and default it to overlaying the stage/sprites.

Kratus it is unlikely you will ever be able to do that. If you want "high res" backgrounds, 24bit .png is supported for stage layers and so is script. The script support is clunky but it does work and you could use it to rotate preloaded images for animation. The upcoming engine update greatly improves on the script support so it will be easier to do, but it is already possible right now.

DC

Thanks DC, is good to know that. I will make some tests with 24bit .png as "high res" backgrounds, it will help me a lot.
 
Back
Top Bottom