Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Scavenger on Mon 16/11/2015 19:32:54

Title: [C++] How do I check if a viewframe is flipped from the plugin API? [SOLVED]
Post by: Scavenger on Mon 16/11/2015 19:32:54
The ViewFrame struct doesn't seem to have the flipped property, and there doesn't seem to be any indication that I could get at it from the API. Would it be possible to use GetGameParameter with GP_ISFRAMEFLIPPED through GetScriptFunctionAddress, even though the function is obsolete? (I'll admit I don't know how to use GetScriptFunctionAddress at all :() I really need to know whether a frame in a view is flipped or not or the effect I'm programming is completely useless.

EDIT: I did it:

Code (C++) Select

int (*sfGetGameParameter)(int,int,int,int);
sfGetGameParameter = ((int(*)(int,int,int,int)) engine->GetScriptFunctionAddress("GetGameParameter"));
int flipped = sfGetGameParameter(13,currchar->view+1,currchar->loop,currchar->frame);