L L4D2node

CChoreoScene::ParseFromBuffer

0x00bb7a40 · 661 bytes · __thiscall

_ZN12CChoreoScene15ParseFromBufferEPKcP20ISceneTokenProcessor

Decompiled

undefined (3 params)

/* CChoreoScene::ParseFromBuffer(char const*, ISceneTokenProcessor*) */

undefined4 __thiscall
CChoreoScene::ParseFromBuffer(CChoreoScene *this,char *param_1,ISceneTokenProcessor *param_2)

{
  undefined4 *puVar1;
  code *pcVar2;
  char cVar3;
  char *pcVar4;
  int iVar5;
  undefined4 uVar6;
  float fVar7;
  CChoreoScene *this_00;
  
  V_strncpy((char *)(this + 0x188),param_1,0x80);
  *(ISceneTokenProcessor **)(this + 0xa4) = param_2;
  do {
    cVar3 = (**(code **)(*(int *)param_2 + 4))(param_2,1);
    if (cVar3 == '\0') {
LAB_00bb7bb0:
      ReconcileTags(this);
      ReconcileGestureTimes(this);
      ReconcileCloseCaption(this);
      this_00 = this;
      InternalDetermineEventTypes(this);
      if (s_bEditingDisabled != '\0') {
        fVar7 = *(float *)(this + 0x214);
        if (fVar7 == 0.0) {
          FindStopTime(this_00);
        }
        *(float *)(this + 0x214) = fVar7;
      }
      return 1;
    }
    pcVar4 = (char *)(**(code **)**(undefined4 **)(this + 0xa4))(*(undefined4 **)(this + 0xa4));
    if (*pcVar4 == '\0') goto LAB_00bb7bb0;
    pcVar4 = (char *)(**(code **)**(undefined4 **)(this + 0xa4))(*(undefined4 **)(this + 0xa4));
    iVar5 = _V_stricmp(pcVar4,"event");
    if (iVar5 == 0) {
      ParseEvent(this,(CChoreoActor *)0x0,(CChoreoChannel *)0x0);
    }
    else {
      pcVar4 = (char *)(**(code **)**(undefined4 **)(this + 0xa4))(*(undefined4 **)(this + 0xa4));
      iVar5 = _V_stricmp(pcVar4,"actor");
      if (iVar5 == 0) {
        ParseActor(this);
      }
      else {
        pcVar4 = (char *)(**(code **)**(undefined4 **)(this + 0xa4))(*(undefined4 **)(this + 0xa4));
        iVar5 = _V_stricmp(pcVar4,"mapname");
        if (iVar5 == 0) {
          ParseMapname(this);
        }
        else {
          pcVar4 = (char *)(**(code **)**(undefined4 **)(this + 0xa4))
                                     (*(undefined4 **)(this + 0xa4));
          iVar5 = _V_stricmp(pcVar4,"fps");
          if (iVar5 == 0) {
            ParseFPS(this);
          }
          else {
            pcVar4 = (char *)(**(code **)**(undefined4 **)(this + 0xa4))
                                       (*(undefined4 **)(this + 0xa4));
            iVar5 = _V_stricmp(pcVar4,"snap");
            if (iVar5 == 0) {
              ParseSnap(this);
            }
            else {
              pcVar4 = (char *)(**(code **)**(undefined4 **)(this + 0xa4))
                                         (*(undefined4 **)(this + 0xa4));
              iVar5 = _V_stricmp(pcVar4,"ignorePhonemes");
              if (iVar5 == 0) {
                ParseIgnorePhonemes(this);
              }
              else {
                pcVar4 = (char *)(**(code **)**(undefined4 **)(this + 0xa4))
                                           (*(undefined4 **)(this + 0xa4));
                iVar5 = _V_stricmp(pcVar4,"scene_ramp");
                if (iVar5 == 0) {
                  CCurveData::Parse((CCurveData *)(this + 300),
                                    *(ISceneTokenProcessor **)(this + 0xa4),
                                    (ICurveDataAccessor *)this);
                }
                else {
                  pcVar4 = (char *)(**(code **)**(undefined4 **)(this + 0xa4))
                                             (*(undefined4 **)(this + 0xa4));
                  iVar5 = _V_stricmp(pcVar4,"scalesettings");
                  if (iVar5 != 0) {
                    puVar1 = (undefined4 *)**(int **)(this + 0xa4);
                    pcVar2 = (code *)puVar1[3];
                    uVar6 = (*(code *)*puVar1)(*(int **)(this + 0xa4));
                    (*pcVar2)(*(undefined4 *)(this + 0xa4),"%s: unexpected token %s\n",this + 0x188,
                              uVar6);
                    goto LAB_00bb7bb0;
                  }
                  ParseScaleSettings(*(ISceneTokenProcessor **)(this + 0xa4),this);
                }
              }
            }
          }
        }
      }
    }
    param_2 = *(ISceneTokenProcessor **)(this + 0xa4);
  } while( true );
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)