Code:
//Link.h/cpp
void setTile(int state, int tile, int dir, int flip);
void LinkClass::setTile(int state, int tile, int dir, int flip){
setlinktile(tile, flip, getExtend(state), state, dir);
}
int getExtend();
int LinkClass::getExtend()
{
return walkspr[dir][spr_extend];
}
//ffasm.cpp
{ "SETLINKTILE", 0, 0, 0, 0}
//ffscript.cpp
case SETLINKTILE:
set_link_tile(false);
break;
void set_link_tile(bool v)
{
int state = SH::read_stack(ri->sp + 3) / 10000;
int tile = SH::read_stack(ri->sp + 2) / 10000;
int dir = SH::read_stack(ri->sp + 1) / 10000;
int flip = SH::read_stack(ri->sp + 0) / 10000;
Link.setTile(vbound(state,1,14),vbound(tile,0,65519),vbound(dir,0,16),vbound(flip,0,16));
}
//ffscript.h
SETLINKTILE, //0x00F1
//Bytecode.cpp
string OSetLinkTile::toString()
{
return "SETLINKTILE";
}
//Bytecode.h
class OSetLinkTile : public Opcode
{
public:
string toString();
Opcode *clone()
{
return new OSetLinkTile();
}
};
//GLobalSymbols.cpp
//void SetLinkTile(link, int,int,int,int)
{
int id = memberids["SetTile"];
int label = lt.functionToLabel(id);
vector<Opcode *> code;
Opcode *first = new OSetLinkTile();
first->setLabel(label);
code.push_back(first);
code.push_back(new OPopRegister(new VarArgument(EXP2)));
code.push_back(new OPopRegister(new VarArgument(EXP2)));
code.push_back(new OPopRegister(new VarArgument(EXP2)));
code.push_back(new OPopRegister(new VarArgument(EXP2)));
//pop pointer, and ignore it
code.push_back(new OPopRegister(new VarArgument(NUL)));
code.push_back(new OPopRegister(new VarArgument(EXP2)));
code.push_back(new OGotoRegister(new VarArgument(EXP2)));
rval[label]=code;
}
{ "SetTile", ScriptParser::TYPE_VOID, FUNCTION, 0, 1, { ScriptParser::TYPE_LINK, ScriptParser::TYPE_FLOAT, ScriptParser::TYPE_FLOAT, ScriptParser::TYPE_FLOAT, ScriptParser::TYPE_FLOAT, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 } },
Does any of that look amiss? The function doesn't seem to do a blasted thing...