Add op_party_member_list
This commit is contained in:
parent
a764634457
commit
f01a3e3fbc
|
@ -24,6 +24,11 @@ public:
|
||||||
opcode = VALUE_TYPE_INT;
|
opcode = VALUE_TYPE_INT;
|
||||||
integerValue = value;
|
integerValue = value;
|
||||||
}
|
}
|
||||||
|
SFallScriptValue(Object* value)
|
||||||
|
{
|
||||||
|
opcode = VALUE_TYPE_PTR;
|
||||||
|
pointerValue = value;
|
||||||
|
}
|
||||||
SFallScriptValue(ProgramValue& value)
|
SFallScriptValue(ProgramValue& value)
|
||||||
{
|
{
|
||||||
// Assuming that pointer is the biggest in size
|
// Assuming that pointer is the biggest in size
|
||||||
|
|
|
@ -340,7 +340,12 @@ static void opLenArray(Program* program)
|
||||||
static void opPartyMemberList(Program* program)
|
static void opPartyMemberList(Program* program)
|
||||||
{
|
{
|
||||||
auto includeHidden = programStackPopInteger(program);
|
auto includeHidden = programStackPopInteger(program);
|
||||||
|
auto objects = get_all_party_members_objects(includeHidden);
|
||||||
|
auto array_id = CreateTempArray(objects.size(), ARRAYFLAG_RESERVED);
|
||||||
|
auto arr = get_array_by_id(array_id);
|
||||||
|
for (int i = 0; i < arr->size(); i++) {
|
||||||
|
arr->data[i] = SFallScriptValue { objects[i] };
|
||||||
|
}
|
||||||
programStackPushInteger(program, 100);
|
programStackPushInteger(program, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue