OpenClonk
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

◆ IMMEDIATEREC

#define IMMEDIATEREC

Definition at line 27 of file C4Record.cpp.

Function Documentation

◆ AddDbgRec()

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

Definition at line 32 of file C4Record.cpp.

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

References Control, C4GameControl::DbgRec(), and iSize.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDbgRecPktData()

StdStrBuf GetDbgRecPktData ( C4RecordChunkType  eType,
const StdBuf RawData 
)

Definition at line 977 of file C4Record.cpp.

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 }
@ RCT_AulFunc
Definition: C4Record.h:74
size_t getSize() const
Definition: StdBuf.h:101
const void * getData() const
Definition: StdBuf.h:99
void AppendFormat(const char *szFmt,...) GNUC_FORMAT_ATTRIBUTE_O
Definition: StdBuf.cpp:190
void Ref(const char *pnData)
Definition: StdBuf.h:455

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

Referenced by C4Playback::Check().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRecordChunkTypeName()

const char* GetRecordChunkTypeName ( C4RecordChunkType  eType)

Definition at line 928 of file C4Record.cpp.

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 }
@ RCT_Area
Definition: C4Record.h:80
@ RCT_DsObj
Definition: C4Record.h:63
@ RCT_MCT2
Definition: C4Record.h:73
@ RCT_PlrCom
Definition: C4Record.h:76
@ RCT_Rn3
Definition: C4Record.h:59
@ RCT_Ctrl
Definition: C4Record.h:46
@ RCT_MenuAdd
Definition: C4Record.h:81
@ RCT_End
Definition: C4Record.h:49
@ RCT_Block
Definition: C4Record.h:55
@ RCT_ObjCom
Definition: C4Record.h:75
@ RCT_SetPix
Definition: C4Record.h:56
@ RCT_ExecPXS
Definition: C4Record.h:67
@ RCT_GetPix
Definition: C4Record.h:64
@ RCT_Undefined
Definition: C4Record.h:90
@ RCT_MenuAddC
Definition: C4Record.h:82
@ RCT_DirectExec
Definition: C4Record.h:84
@ RCT_RotVtx2
Definition: C4Record.h:66
@ RCT_PlrInCom
Definition: C4Record.h:77
@ RCT_Map
Definition: C4Record.h:70
@ RCT_Cos
Definition: C4Record.h:69
@ RCT_Custom
Definition: C4Record.h:88
@ RCT_MatScan
Definition: C4Record.h:78
@ RCT_MCT1
Definition: C4Record.h:72
@ RCT_RotVtx1
Definition: C4Record.h:65
@ RCT_ExecObj
Definition: C4Record.h:57
@ RCT_MatScanDo
Definition: C4Record.h:79
@ RCT_Log
Definition: C4Record.h:50
@ RCT_MMD
Definition: C4Record.h:61
@ RCT_OCF
Definition: C4Record.h:83
@ RCT_Sin
Definition: C4Record.h:68
@ RCT_Ls
Definition: C4Record.h:71
@ RCT_Frame
Definition: C4Record.h:48
@ RCT_MMC
Definition: C4Record.h:60
@ RCT_Random
Definition: C4Record.h:58
@ RCT_CtrlPkt
Definition: C4Record.h:47
@ RCT_CrObj
Definition: C4Record.h:62
@ RCT_Definition
Definition: C4Record.h:85
@ RCT_File
Definition: C4Record.h:52

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().

Here is the caller graph for this function:

Variable Documentation

◆ DbgRecFile

CStdFile DbgRecFile

Definition at line 29 of file C4Record.cpp.

Referenced by C4Playback::Check(), C4Playback::Clear(), and C4Playback::Open().

◆ DoNoDebugRec

int DoNoDebugRec =0

Definition at line 30 of file C4Record.cpp.

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