mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 21:09:41 +00:00
Make PositionCell take additional junk arguments
This commit is contained in:
parent
dfb6bdf77e
commit
31aa19574b
3 changed files with 11 additions and 1 deletions
|
@ -553,7 +553,7 @@ namespace Compiler
|
||||||
extensions.registerFunction("getpos",'f',"c",opcodeGetPos,opcodeGetPosExplicit);
|
extensions.registerFunction("getpos",'f',"c",opcodeGetPos,opcodeGetPosExplicit);
|
||||||
extensions.registerFunction("getstartingpos",'f',"c",opcodeGetStartingPos,opcodeGetStartingPosExplicit);
|
extensions.registerFunction("getstartingpos",'f',"c",opcodeGetStartingPos,opcodeGetStartingPosExplicit);
|
||||||
extensions.registerInstruction("position","ffffz",opcodePosition,opcodePositionExplicit);
|
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("placeitemcell","ccffffX",opcodePlaceItemCell);
|
||||||
extensions.registerInstruction("placeitem","cffffX",opcodePlaceItem);
|
extensions.registerInstruction("placeitem","cffffX",opcodePlaceItem);
|
||||||
extensions.registerInstruction("placeatpc","clflX",opcodePlaceAtPc);
|
extensions.registerInstruction("placeatpc","clflX",opcodePlaceAtPc);
|
||||||
|
|
|
@ -86,6 +86,12 @@ namespace Compiler
|
||||||
return Parser::parseSpecial (code, loc, scanner);
|
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)
|
void StringParser::append (std::vector<Interpreter::Type_Code>& code)
|
||||||
{
|
{
|
||||||
std::copy (mCode.begin(), mCode.end(), std::back_inserter (code));
|
std::copy (mCode.begin(), mCode.end(), std::back_inserter (code));
|
||||||
|
|
|
@ -43,6 +43,10 @@ namespace Compiler
|
||||||
///< Handle a special character token.
|
///< Handle a special character token.
|
||||||
/// \return fetch another 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);
|
void append (std::vector<Interpreter::Type_Code>& code);
|
||||||
///< Append code for parsed string.
|
///< Append code for parsed string.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue