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
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