Add DynText Plugin#2369
Conversation
| } 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); |
There was a problem hiding this comment.
@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?).
| return true; | ||
|
|
||
| PendingMessage pm; | ||
| pm.PushLine(id, DynRpgText::CommandCodeInserter); |
There was a problem hiding this comment.
Pending Message with a custom Command code parser :)
| graphics.clear(); | ||
| } | ||
|
|
||
| void DynRpg::TextPlugin::Load(const std::vector<uint8_t>& in_buffer) { |
| return { iter, value }; | ||
| } | ||
|
|
||
| Game_Message::ParseParamStringResult Game_Message::ParseStringParamImpl( |
There was a problem hiding this comment.
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)
|
|
||
| start_copy = iter; | ||
| } | ||
| output.append(cmd_fn(ch, &iter, end, escape_char)); |
There was a problem hiding this comment.
Instead of hardcoding n and v a callback function is used. This allows easy extending with new command codes
741d8a8 to
337ac23
Compare
|
PendingMessage has no unit tests? Because this breaks \C[1] without being noticed. |
Add DynText Plugin
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]