Merge pull request #36 from Jaizu/followers-expanded-id

Fix virtual object events
This commit is contained in:
Ariel A 2024-05-21 19:17:25 -07:00 committed by GitHub
commit c0ca88d45a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -1347,7 +1347,7 @@
@ The specified id can be used to refer to the sprite again later with turnvobject.
.macro createvobject graphicsId:req, id:req, x:req, y:req, elevation=3, direction=DIR_SOUTH
.byte 0xaa
.byte \graphicsId
.2byte \graphicsId
.byte \id
.2byte \x
.2byte \y

View File

@ -1210,10 +1210,10 @@ bool8 ScrCmd_setobjectmovementtype(struct ScriptContext *ctx)
bool8 ScrCmd_createvobject(struct ScriptContext *ctx)
{
u16 graphicsId = ScriptReadByte(ctx); // Support u16 in createvobject
u16 graphicsId = ScriptReadHalfword(ctx); // Support u16 in createvobject
u8 virtualObjId = ScriptReadByte(ctx);
u16 x = VarGet(ScriptReadHalfword(ctx));
u32 y = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx));
u8 elevation = ScriptReadByte(ctx);
u8 direction = ScriptReadByte(ctx);