Skip to content

Add DynText Plugin#2369

Merged
2 commits merged into
EasyRPG:masterfrom
Ghabry:dyntext
Sep 19, 2023
Merged

Add DynText Plugin#2369
2 commits merged into
EasyRPG:masterfrom
Ghabry:dyntext

Conversation

@Ghabry

@Ghabry Ghabry commented Oct 1, 2020

Copy link
Copy Markdown
Member

This is mostly for discussion right now. I don't want this to be merged yet there are still bugs. This code is very old and didn't properly rebase.

https://www.multimediaxis.de/threads/135210-DynRPG-Plugin-Text-Plugin

Download with sample game: https://rpgmaker.net/engines/rt2k3/utilities/12/

[please wait for my review comments]

Comment thread src/dynrpg.cpp Outdated
Comment thread src/dynrpg_textplugin.cpp Outdated
} else if (ch == 'V' || ch == 'v') {
return PendingMessage::DefaultCommandInserter('v', iter, end, escape_char);
} else if (ch == 'I' || ch == 'i') {
auto parse_ret = Game_Message::ParseParamImpl('I', 'i', *iter, end, escape_char, true);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fmatthew5876
Would be nice to have ParseParamImpl exported. This provides a very simple way to extract values. But maybe use a different name (no Impl?).

Comment thread src/dynrpg_textplugin.cpp
return true;

PendingMessage pm;
pm.PushLine(id, DynRpgText::CommandCodeInserter);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending Message with a custom Command code parser :)

Comment thread src/dynrpg_textplugin.cpp Outdated
Comment thread src/dynrpg_textplugin.cpp
graphics.clear();
}

void DynRpg::TextPlugin::Load(const std::vector<uint8_t>& in_buffer) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXME: Load is broken

Comment thread src/game_message.cpp Outdated
return { iter, value };
}

Game_Message::ParseParamStringResult Game_Message::ParseStringParamImpl(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore ParseStringParam for now. This is just like ParseParam but it extracts a string, not a number. I need this for \x of the TextPlugin (the stuff in x is interpreted as a text identifier and inserted)
(needs testing)

Comment thread src/pending_message.cpp Outdated

start_copy = iter;
}
output.append(cmd_fn(ch, &iter, end, escape_char));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of hardcoding n and v a callback function is used. This allows easy extending with new command codes

Comment thread src/scene_map.cpp Outdated
Comment thread src/sprite_picture.cpp Outdated
@Ghabry Ghabry force-pushed the dyntext branch 2 times, most recently from 741d8a8 to 337ac23 Compare October 2, 2020 13:32
@Ghabry

Ghabry commented Oct 2, 2020

Copy link
Copy Markdown
Member Author

PendingMessage has no unit tests? Because this breaks \C[1] without being noticed.

@Ghabry Ghabry added this to the 0.7.1 milestone Sep 9, 2021
@Ghabry Ghabry closed this Feb 22, 2022
@Ghabry Ghabry deleted the dyntext branch February 22, 2022 13:40
@Ghabry Ghabry restored the dyntext branch February 22, 2022 16:30
@Ghabry Ghabry reopened this Feb 22, 2022
@Ghabry Ghabry modified the milestones: 0.7.1, 0.7.2 May 29, 2022
@ghost ghost added the Awaiting Rebase Pull requests with conflicting files due to former merge label Aug 23, 2022
@Ghabry Ghabry modified the milestones: 0.8.2, 0.8.1 Sep 14, 2023
@Ghabry Ghabry removed the Awaiting Rebase Pull requests with conflicting files due to former merge label Sep 14, 2023
@Ghabry Ghabry marked this pull request as ready for review September 14, 2023 18:55
@ghost ghost merged commit 4da3bbb into EasyRPG:master Sep 19, 2023
@Ghabry Ghabry deleted the dyntext branch September 2, 2024 18:52
sevenc-nanashi pushed a commit to sevenc-nanashi/easyrpg-player that referenced this pull request May 31, 2026
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant