All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4Record.cpp File Reference
#include "C4Include.h"
#include "control/C4Record.h"
#include "editor/C4Console.h"
#include "control/C4PlayerInfo.h"
#include "control/C4GameSave.h"
#include "lib/C4Log.h"
#include "player/C4Player.h"
#include "game/C4Game.h"
#include "control/C4GameControl.h"
#include "platform/StdFile.h"
Include dependency graph for C4Record.cpp:

Go to the source code of this file.




void AddDbgRec (C4RecordChunkType eType, const void *pData, int iSize)
const char * GetRecordChunkTypeName (C4RecordChunkType eType)
StdStrBuf GetDbgRecPktData (C4RecordChunkType eType, const StdBuf &RawData)


CStdFile DbgRecFile
int DoNoDebugRec =0

Macro Definition Documentation


Definition at line 31 of file C4Record.cpp.

Function Documentation

void AddDbgRec ( C4RecordChunkType  eType,
const void *  pData,
int  iSize 

Definition at line 36 of file C4Record.cpp.

Referenced by C4Landscape::_SetPix2(), C4Object::AssignRemoval(), C4MassMover::Cease(), C4MCOverlay::CheckMask(), C4MassMoverSet::Create(), C4PXS::Deactivate(), C4LArea::DebugRec(), C4AulExec::DirectExec(), C4Landscape::P::DoScan(), C4Game::ExecObjects(), C4PXS::Execute(), C4Game::Execute(), C4Object::Execute(), C4PlayerControl::ExecuteControlPacket(), C4Landscape::P::ExecuteScan(), C4Landscape::Init(), C4Game::NewObject(), RecordRandom(), C4Shape::Rotate(), C4Object::SetOCF(), and C4Object::UpdateOCF().

37 {
38  ::Control.DbgRec(eType, (const uint8_t *) pData, iSize);
39 }
void DbgRec(C4RecordChunkType eType, const uint8_t *pData=nullptr, size_t iSize=0)
C4GameControl Control
int iSize
Definition: TstC4NetIO.cpp:35

Here is the caller graph for this function:

StdStrBuf GetDbgRecPktData ( C4RecordChunkType  eType,
const StdBuf RawData 

Definition at line 988 of file C4Record.cpp.

References StdStrBuf::AppendFormat(), StdBuf::getData(), StdBuf::getSize(), RCT_AulFunc, and StdStrBuf::Ref().

Referenced by C4Playback::Check().

989 {
990  StdStrBuf r;
991  switch (eType)
992  {
993  case RCT_AulFunc: r.Ref(reinterpret_cast<const char*>(RawData.getData()), RawData.getSize()-1);
994  break;
995  default:
996  for (unsigned int i=0; i<RawData.getSize(); ++i)
997  r.AppendFormat("%02x ", (uint32_t) *getBufPtr<uint8_t>(RawData, i));
998  break;
999  }
1000  return r;
1001 }
const void * getData() const
Definition: StdBuf.h:107
size_t getSize() const
Definition: StdBuf.h:109
void AppendFormat(const char *szFmt,...) GNUC_FORMAT_ATTRIBUTE_O
Definition: StdBuf.cpp:197
void Ref(const char *pnData)
Definition: StdBuf.h:463

Here is the call graph for this function:

Here is the caller graph for this function:

const char* GetRecordChunkTypeName ( C4RecordChunkType  eType)

Definition at line 939 of file C4Record.cpp.

References RCT_Area, RCT_AulFunc, RCT_Block, RCT_Cos, RCT_CrObj, RCT_Ctrl, RCT_CtrlPkt, RCT_Custom, RCT_Definition, RCT_DirectExec, RCT_DsObj, RCT_End, RCT_ExecObj, RCT_ExecPXS, RCT_File, RCT_Frame, RCT_GetPix, RCT_Log, RCT_Ls, RCT_Map, RCT_MatScan, RCT_MatScanDo, RCT_MCT1, RCT_MCT2, RCT_MenuAdd, RCT_MenuAddC, RCT_MMC, RCT_MMD, RCT_ObjCom, RCT_OCF, RCT_PlrCom, RCT_PlrInCom, RCT_Random, RCT_Rn3, RCT_RotVtx1, RCT_RotVtx2, RCT_SetPix, RCT_Sin, and RCT_Undefined.

Referenced by C4Playback::Check().

940 {
941  switch (eType)
942  {
943  case RCT_Ctrl: return "Ctrl"; // control
944  case RCT_CtrlPkt: return "CtrlPkt"; // control packet
945  case RCT_Frame: return "Frame"; // beginning frame
946  case RCT_End: return "End"; // --- the end ---
947  case RCT_Log: return "Log"; // log message
948  case RCT_File: return "File"; // file data
949  // DEBUGREC
950  case RCT_Block: return "Block"; // point in Game::Execute
951  case RCT_SetPix: return "SetPix"; // set landscape pixel
952  case RCT_ExecObj: return "ExecObj"; // exec object
953  case RCT_Random: return "Random"; // Random()-call
954  case RCT_Rn3: return "Rn3"; // Rn3()-call
955  case RCT_MMC: return "MMC"; // create MassMover
956  case RCT_MMD: return "MMD"; // destroy MassMover
957  case RCT_CrObj: return "CrObj"; // create object
958  case RCT_DsObj: return "DsObj"; // remove object
959  case RCT_GetPix: return "GetPix"; // get landscape pixel; let the Gigas flow!
960  case RCT_RotVtx1: return "RotVtx1"; // before shape is rotated
961  case RCT_RotVtx2: return "RotVtx2"; // after shape is rotated
962  case RCT_ExecPXS: return "ExecPXS"; // execute pxs system
963  case RCT_Sin: return "Sin"; // sin by Shape-Rotation
964  case RCT_Cos: return "Cos"; // cos by Shape-Rotation
965  case RCT_Map: return "Map"; // map dump
966  case RCT_Ls: return "Ls"; // complete landscape dump!
967  case RCT_MCT1: return "MCT1"; // MapCreatorS2: before transformation
968  case RCT_MCT2: return "MCT2"; // MapCreatorS2: after transformation
969  case RCT_AulFunc: return "AulFunc"; // script function call
970  case RCT_ObjCom: return "ObjCom"; // object com
971  case RCT_PlrCom: return "PlrCom"; // player com
972  case RCT_PlrInCom: return "PlrInCom"; // player InCom
973  case RCT_MatScan: return "MatScan"; // landscape scan execute
974  case RCT_MatScanDo: return "MatScanDo"; // landscape scan mat change
975  case RCT_Area: return "Area"; // object area change
976  case RCT_MenuAdd: return "MenuAdd"; // add menu item
977  case RCT_MenuAddC: return "MenuAddC"; // add menu item: Following commands
978  case RCT_OCF: return "OCF"; // OCF setting of updating
979  case RCT_DirectExec: return "DirectExec"; // a DirectExec-script
980  case RCT_Definition: return "Definition"; // Definition callback
982  case RCT_Custom: return "Custom"; // varies
984 case RCT_Undefined: default: return "Undefined";
985  };
986 }

Here is the caller graph for this function:

Variable Documentation

CStdFile DbgRecFile

Definition at line 33 of file C4Record.cpp.

int DoNoDebugRec =0

Definition at line 34 of file C4Record.cpp.

Referenced by C4Playback::Check(), and C4GameControl::DbgRec().