MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / InitializeDLL

Function InitializeDLL

scripts/Paranoia.cpp:323–370  ·  view source on GitHub ↗

=============== InitializeDLL() ===============

Source from the content-addressed store, hash-verified

321// InitializeDLL()
322// ===============
323char STDCALL InitializeDLL(tOSIRISModuleInit *func_list) {
324 osicommon_Initialize((tOSIRISModuleInit *)func_list);
325 if (func_list->game_checksum != CHECKSUM) {
326 mprintf(0, "Game-Checksum FAIL!!! (%ul!=%ul)\n", func_list->game_checksum, CHECKSUM);
327 mprintf(0, "RECOMPILE YOUR SCRIPTS!!!\n");
328 return 0;
329 }
330
331 ClearGlobalActionCtrs();
332 dfInit();
333 InitMessageList();
334 ReadMessageFile("paranoia.msg");
335
336 int j;
337
338 // Do Door Index lookups
339 for (j = 0; j < NUM_DOOR_NAMES; j++)
340 Door_handles[j] = Scrpt_FindDoorName(Door_names[j]);
341
342 // Do Object Index lookups
343 for (j = 0; j < NUM_OBJECT_NAMES; j++)
344 Object_handles[j] = Scrpt_FindObjectName(Object_names[j]);
345
346 // Do Room Index lookups
347 for (j = 0; j < NUM_ROOM_NAMES; j++)
348 Room_indexes[j] = Scrpt_FindRoomName(Room_names[j]);
349
350 // Do Trigger Index lookups
351 for (j = 0; j < NUM_TRIGGER_NAMES; j++) {
352 Trigger_indexes[j] = Scrpt_FindTriggerName(Trigger_names[j]);
353 Trigger_faces[j] = Scrpt_GetTriggerFace(Trigger_indexes[j]);
354 Trigger_rooms[j] = Scrpt_GetTriggerRoom(Trigger_indexes[j]);
355 }
356
357 // Do Sound Index lookups
358 for (j = 0; j < NUM_SOUND_NAMES; j++)
359 Sound_indexes[j] = Scrpt_FindSoundName(Sound_names[j]);
360
361 // Do Texture Index lookups
362 for (j = 0; j < NUM_TEXTURE_NAMES; j++)
363 Texture_indexes[j] = Scrpt_FindTextureName(Texture_names[j]);
364
365 // Do Message Name lookups
366 for (j = 0; j < NUM_MESSAGE_NAMES; j++)
367 Message_strings[j] = GetMessage(Message_names[j]);
368
369 return 1;
370}
371
372// =============
373// ShutdownDLL()

Callers

nothing calls this directly

Calls 6

dfInitFunction · 0.85
osicommon_InitializeFunction · 0.70
ClearGlobalActionCtrsFunction · 0.70
InitMessageListFunction · 0.70
ReadMessageFileFunction · 0.70
GetMessageFunction · 0.70

Tested by

no test coverage detected