MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Scenario_Load_Chunk

Function Scenario_Load_Chunk

src/scenario.c:504–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504static void Scenario_Load_Chunk(const char *category, void (*ptr)(const char *key, char *settings))
505{
506 char *buffer = g_readBuffer;
507
508 Ini_GetString(category, NULL, NULL, g_readBuffer, g_readBufferSize, s_scenarioBuffer);
509 while (true) {
510 char buf[127];
511
512 if (*buffer == '\0') break;
513
514 Ini_GetString(category, buffer, NULL, buf, 127, s_scenarioBuffer);
515
516 (*ptr)(buffer, buf);
517 buffer += strlen(buffer) + 1;
518 }
519}
520
521bool Scenario_Load(uint16 scenarioID, uint8 houseID)
522{

Callers 1

Scenario_LoadFunction · 0.85

Calls 1

Ini_GetStringFunction · 0.85

Tested by

no test coverage detected