mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-03 17:37:18 +00:00
Make PositionCell take additional junk arguments
This commit is contained in:
parent
dfb6bdf77e
commit
31aa19574b
@ -553,7 +553,7 @@ namespace Compiler
|
||||
extensions.registerFunction("getpos",'f',"c",opcodeGetPos,opcodeGetPosExplicit);
|
||||
extensions.registerFunction("getstartingpos",'f',"c",opcodeGetStartingPos,opcodeGetStartingPosExplicit);
|
||||
extensions.registerInstruction("position","ffffz",opcodePosition,opcodePositionExplicit);
|
||||
extensions.registerInstruction("positioncell","ffffcX",opcodePositionCell,opcodePositionCellExplicit);
|
||||
extensions.registerInstruction("positioncell","ffffczz",opcodePositionCell,opcodePositionCellExplicit);
|
||||
extensions.registerInstruction("placeitemcell","ccffffX",opcodePlaceItemCell);
|
||||
extensions.registerInstruction("placeitem","cffffX",opcodePlaceItem);
|
||||
extensions.registerInstruction("placeatpc","clflX",opcodePlaceAtPc);
|
||||
|
@ -86,6 +86,12 @@ namespace Compiler
|
||||
return Parser::parseSpecial (code, loc, scanner);
|
||||
}
|
||||
|
||||
bool StringParser::parseInt (int value, const TokenLoc& loc, Scanner& scanner)
|
||||
{
|
||||
reportWarning("Treating integer argument as a string", loc);
|
||||
return parseName(loc.mLiteral, loc, scanner);
|
||||
}
|
||||
|
||||
void StringParser::append (std::vector<Interpreter::Type_Code>& code)
|
||||
{
|
||||
std::copy (mCode.begin(), mCode.end(), std::back_inserter (code));
|
||||
|
@ -43,6 +43,10 @@ namespace Compiler
|
||||
///< Handle a special character token.
|
||||
/// \return fetch another token?
|
||||
|
||||
bool parseInt (int value, const TokenLoc& loc, Scanner& scanner) override;
|
||||
///< Handle an int token.
|
||||
/// \return fetch another token?
|
||||
|
||||
void append (std::vector<Interpreter::Type_Code>& code);
|
||||
///< Append code for parsed string.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user