diff --git a/datafiles/testcase_parsers.yarn b/datafiles/testcase_parsers.yarn index d7826489..ac04bb65 100644 --- a/datafiles/testcase_parsers.yarn +++ b/datafiles/testcase_parsers.yarn @@ -4,7 +4,7 @@ __PrivCrochet_position: -80,0 __PrivCrochet_tags: title: Start --- -Chatterbox[0]: I have been parsed. My identity, my values, my thoughts... they've all been misinterpreted. -Chatterbox[1]: Nobody can truly understand how this feels. -Chatterbox [2] : No one realizes how much space there really is between you and me. +Chatterbox: This is some text with a name. +Chatterbox[1]: This is more text with a name and metadata. + Chatterbox [2] : This is even more text with a name, metadata, and invisible whitespace! === diff --git a/options/operagx/options_operagx.yy b/options/operagx/options_operagx.yy index 2cf254e1..ae8138d3 100644 --- a/options/operagx/options_operagx.yy +++ b/options/operagx/options_operagx.yy @@ -1,7 +1,7 @@ { "option_operagx_version": "1.0.0.0", "option_operagx_next_version": "1.0.0.0", - "option_operagx_game_name": "${project_name}", + "option_operagx_game_name": "chatterbox", "option_operagx_interpolate_pixels": true, "option_operagx_scale": 0, "option_operagx_texture_page": "2048x2048", diff --git a/scripts/ChatterboxGetSpeaker/ChatterboxGetSpeaker.gml b/scripts/ChatterboxGetSpeaker/ChatterboxGetSpeaker.gml index 21b2f0ce..ea0ff037 100644 --- a/scripts/ChatterboxGetSpeaker/ChatterboxGetSpeaker.gml +++ b/scripts/ChatterboxGetSpeaker/ChatterboxGetSpeaker.gml @@ -9,7 +9,7 @@ function ChatterboxGetSpeaker(_chatterbox, _index) if (_str != undefined) { var _colon = string_pos(":", _str); - if (!_colon) + if (_colon == 0) { show_debug_message("Chatterbox: No speaker found.") return ""; } @@ -18,7 +18,7 @@ function ChatterboxGetSpeaker(_chatterbox, _index) var _c2 = CHATTERBOX_SPEAKERDATA_TAG_CLOSE; var _char_l = string_pos(_c1, _str); var _char_r = string_pos(_c2, _str); - if (_char_l and _char_r < _colon) //If there are tags before the colon + if (_char_l > 0 and _char_r < _colon) //If there are tags before the colon { _name = string_delete(_name, _char_l, _colon-_char_l+1); //Remove everything between the L bracket and the colon } diff --git a/scripts/ChatterboxGetSpeakerData/ChatterboxGetSpeakerData.gml b/scripts/ChatterboxGetSpeakerData/ChatterboxGetSpeakerData.gml index ae886039..f5b5368b 100644 --- a/scripts/ChatterboxGetSpeakerData/ChatterboxGetSpeakerData.gml +++ b/scripts/ChatterboxGetSpeakerData/ChatterboxGetSpeakerData.gml @@ -15,7 +15,7 @@ function ChatterboxGetSpeakerData(_chatterbox, _index, _default = undefined) var _c2 = CHATTERBOX_SPEAKERDATA_TAG_CLOSE; var _char_l = string_pos(_c1, _str); var _char_r = string_pos(_c2, _str); - if (_char_l and _char_r < _colon) + if (_char_l > 0 and _char_r < _colon) { var _data = string_copy(_str, _char_l+1, _char_r-_char_l-1); return _data; diff --git a/scripts/ChatterboxGetSpeech/ChatterboxGetSpeech.gml b/scripts/ChatterboxGetSpeech/ChatterboxGetSpeech.gml index 7a97a2bb..2670629a 100644 --- a/scripts/ChatterboxGetSpeech/ChatterboxGetSpeech.gml +++ b/scripts/ChatterboxGetSpeech/ChatterboxGetSpeech.gml @@ -11,14 +11,14 @@ function ChatterboxGetSpeech(_chatterbox, _index) { var _colon = string_pos(":", _str); var _space = 0; - if (_colon != 0) //If there *is* a colon + if (_colon > 0) //If there is a colon { _speech = string_delete(_str, 1, _colon); //Remove the colon and all behind it, - } - if (string_pos(" ", _speech) == 1) //If there's as the first character - { - for (var i = 0; string_char_at(_speech, i) == " "; ++i) { - _space++; + if (string_pos(" ", _speech) == 1) //If there is still whitespace remaining, remove it + { + for (var i = 0; string_char_at(_speech, i) == " "; ++i) { + _space++; + } } } _str = string_copy(_speech, _space, string_length(_speech));