OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4Record.cpp File Reference
Include dependency graph for C4Record.cpp:

Go to the source code of this file.

Macros

#define IMMEDIATEREC
 

Functions

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

Variables

CStdFile DbgRecFile
 
int DoNoDebugRec =0
 

Macro Definition Documentation

#define IMMEDIATEREC

Definition at line 27 of file C4Record.cpp.

Function Documentation

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

Definition at line 32 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().

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

Here is the caller graph for this function:

StdStrBuf GetDbgRecPktData ( C4RecordChunkType  eType,
const StdBuf RawData 
)

Definition at line 977 of file C4Record.cpp.

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

Referenced by C4Playback::Check().

978 {
979  StdStrBuf r;
980  switch (eType)
981  {
982  case RCT_AulFunc: r.Ref(reinterpret_cast<const char*>(RawData.getData()), RawData.getSize()-1);
983  break;
984  default:
985  for (unsigned int i=0; i<RawData.getSize(); ++i)
986  r.AppendFormat("%02x ", (uint32_t) *getBufPtr<uint8_t>(RawData, i));
987  break;
988  }
989  return r;
990 }
const void * getData() const
Definition: StdBuf.h:99
size_t getSize() const
Definition: StdBuf.h:101
void AppendFormat(const char *szFmt,...) GNUC_FORMAT_ATTRIBUTE_O
Definition: StdBuf.cpp:190
void Ref(const char *pnData)
Definition: StdBuf.h:455

Here is the call graph for this function:

Here is the caller graph for this function:

const char* GetRecordChunkTypeName ( C4RecordChunkType  eType)

Definition at line 928 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().

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

Here is the caller graph for this function:

Variable Documentation

CStdFile DbgRecFile

Definition at line 29 of file C4Record.cpp.

int DoNoDebugRec =0

Definition at line 30 of file C4Record.cpp.

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