MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / WriteRNGCalls

Method WriteRNGCalls

src/Misc/SyncLogging.cpp:146–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void SyncLogger::WriteRNGCalls(FILE* const pLogFile, int frameDigits)
147{
148 fprintf(pLogFile, "RNG Calls:\n");
149
150 for (size_t i = 0; i < SyncLogger::RNGCalls.Size(); i++)
151 {
152 auto const& rngCall = SyncLogger::RNGCalls.Get();
153
154 if (!rngCall.Initialized)
155 continue;
156
157 if (rngCall.Type == 1)
158 {
159 fprintf(pLogFile, "#%05d: Single | Caller: %08x | Frame: %*d | Index1: %3d | Index2: %3d\n",
160 i, rngCall.Caller, frameDigits, rngCall.Frame, rngCall.Index1, rngCall.Index2);
161 }
162 else if (rngCall.Type == 2)
163 {
164 fprintf(pLogFile, "#%05d: Ranged | Caller: %08x | Frame: %*d | Index1: %3d | Index2: %3d | Min: %d | Max: %d\n",
165 i, rngCall.Caller, frameDigits, rngCall.Frame, rngCall.Index1, rngCall.Index2, rngCall.Min, rngCall.Max);
166 }
167 }
168
169 fprintf(pLogFile, "\n");
170}
171
172void SyncLogger::WriteFacingChanges(FILE* const pLogFile, int frameDigits)
173{

Callers

nothing calls this directly

Calls 2

SizeMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected