expired6978

Untitled

Jul 27th, 2012
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. class SKSEScaleform_GetForm : public GFxFunctionHandler
  2. {
  3. public:
  4.     virtual void    Invoke(Args* args)
  5.     {
  6.         ASSERT(args->numArgs >= 1);
  7.  
  8.         double formid = args->args[0].GetNumber();
  9.  
  10. #if _DEBUG
  11.         _MESSAGE("scaleform: GetForm (%X)", formid);
  12. #endif
  13.         args->result->SetNull();
  14.  
  15.         TESForm* form = LookupFormByID((UInt32)formid);
  16.         if(form)
  17.         {
  18.             args->movie->CreateObject(args->result);
  19.  
  20.             RegisterNumber(args->result, "formType", (double)form->GetFormType());
  21.             RegisterNumber(args->result, "formId", (double)form->formID);
  22.  
  23. #if _DEBUG
  24.             _MESSAGE("Result: (%X) type (%d)", args->result, args->result->GetType());
  25. #endif
  26.         }
  27.     }
  28. };
Advertisement
Add Comment
Please, Sign In to add comment