-
Notifications
You must be signed in to change notification settings - Fork 22
Description
There are a series of issues related to pictures in current version of muma rope.
Mimigris suggested that they were related to the YNOP code being based on 2k picture commands, without supporting 2k3 variations of it.
The Muma Rope devs are patching workarounds to those issues , but those same issues could limit the amount of games supported by ynop.
here they are in detail:
1 - Show Picture - The game doesn't interpret frames from sprite sheets properly in multiplayer:

Spritesheet animations are not correctly detected. To support them, a bunch of com.paramenters should be parsed to the server, then executed by each client that shares a pic:

2 - Show Picture - The game ignores map layers

The multiplayer should also parse the maps layers of each picture, or else everything is going to be on the top.
Here's the correct parameter

I guess, it will be hard to predict every parameter that should be shared, for that reason, I suggest parsing through GMI() the entire com variable. since it contains every parameter from a command:

The com variables even knows what type of event it should be, through com.code.
Knowing that, I suggest to change how GMI() work, to receive and transmit the entire com.
with that com variable, it should be possible to transform its needed com.parameters[n](like picture ID for YNO). then execute those modified commands trhough something like:
//com being the argument inside every command function (show picture, erase event, play SFX, etc)
std::vector<lcf::rpg::EventCommand> cmdList; //create an empty list of commands
cmdList.push_back(com); // send an entire command to that list
Push(cmdList, 0, false); // execute the command from the listanother problem:
3 - Erase Picture - Batch Erase picture isn't working:

Erase picture commands should support a batch that erases multiple pictures at once.
I guess this issue is related to how the GMI() function erases pictures. It simples does not cycle the entire list of pictures:
// problematic code from game_interpreter.cpp -> commandErasePicture()
for (int i = pic_id; i <= pic_id_max; ++i) {
if (i <= 0) {
Output::Error("ErasePicture: Requested invalid picture id ({})", i);
}
Main_Data::game_pictures->Erase(i);
GMI().PictureErased(pic_id); //this should be i, not pic_id
}- Fix multiplayer picture sprite sheet frame sync
- Fix multiplayer map layer parsing
- Fix picture batch-erase #42