diff --git a/PerlRPG/Script.pm b/PerlRPG/Script.pm index 19c0ce4..79e0f09 100644 --- a/PerlRPG/Script.pm +++ b/PerlRPG/Script.pm @@ -131,7 +131,6 @@ sub RunScriptLine { # Copy to refer to my $oline = $line; - # Remove comments $line=~s/#.+$//; # Remove comments $line=~s/^\s+//; # Remove leading whitespace $line=~s/\s+$//; # Remove trailing whitespace @@ -141,7 +140,14 @@ sub RunScriptLine { return 0; } - my($cmd, @opts)=split(/\s+/, $line); + my @opts; + { + my $sline = $line; + $sline=~s/\\ /\x01/g; + (@opts)=split(/\s+/, $sline); + map { s/\x01/ /g } (@opts); + } + my $cmd = shift(@opts); LogData(DEBUG, "$file:$linenum $cmd(" . join(',',@opts) . ")"); if(exists $script_commands{$cmd}) { $script_commands{$cmd}{'sub'}->(@opts); diff --git a/Resources/script.gs b/Resources/script.gs index ba801b0..2af0843 100644 --- a/Resources/script.gs +++ b/Resources/script.gs @@ -9,7 +9,8 @@ __init__: Show aka3 spritesheet.png 200 0 3 max_loops=10 AddSayer h "Hermione" aka01.png 200 200 200 255 - AddSayer h2 "Topless_Hermione" aka05.png 255 0 0 255 + AddSayer h2 "Topless\ Hermione" aka05.png 255 0 0 255 + AddSayer h3 "Stripping\ Hermione" spritesheet.png 255 0 0 255 Jump donothing @@ -18,8 +19,8 @@ donothing: LoopCount=LoopCount+1 h "Loop number [LoopCount]" TestVar=lc("Foo").uc(lc("Foo")) - h "TestVar [TestVar]" + h2 "TestVar [TestVar]" TestVar = uc("[TestVar]") - h "TestVar2 [TestVar]" + h3 "TestVar2 [TestVar]" ExitGame Jump donothing