=============== InitializeDLL() ===============
| 1415 | // InitializeDLL() |
| 1416 | // =============== |
| 1417 | char STDCALL InitializeDLL(tOSIRISModuleInit *func_list) { |
| 1418 | osicommon_Initialize((tOSIRISModuleInit *)func_list); |
| 1419 | if (func_list->game_checksum != CHECKSUM) { |
| 1420 | mprintf(0, "Game-Checksum FAIL!!! (%ul!=%ul)\n", func_list->game_checksum, CHECKSUM); |
| 1421 | mprintf(0, "RECOMPILE YOUR SCRIPTS!!!\n"); |
| 1422 | return 0; |
| 1423 | } |
| 1424 | |
| 1425 | ClearGlobalActionCtrs(); |
| 1426 | dfInit(); |
| 1427 | InitMessageList(); |
| 1428 | |
| 1429 | // Build the filename of the message file |
| 1430 | char filename[_MAX_PATH + 32]; |
| 1431 | char english_filename[(_MAX_PATH + 32) * 2]; |
| 1432 | int lang_type; |
| 1433 | if (func_list->script_identifier != NULL) { |
| 1434 | _splitpath(func_list->script_identifier, NULL, NULL, filename, NULL); |
| 1435 | snprintf(english_filename, sizeof(english_filename), "%s.msg", filename); |
| 1436 | lang_type = Game_GetLanguage(); |
| 1437 | if (lang_type == LANGUAGE_FRENCH) |
| 1438 | strcat(filename, "_FRN"); |
| 1439 | else if (lang_type == LANGUAGE_GERMAN) |
| 1440 | strcat(filename, "_GER"); |
| 1441 | else if (lang_type == LANGUAGE_ITALIAN) |
| 1442 | strcat(filename, "_ITN"); |
| 1443 | else if (lang_type == LANGUAGE_SPANISH) |
| 1444 | strcat(filename, "_SPN"); |
| 1445 | else if (lang_type == LANGUAGE_POLISH) |
| 1446 | strcat(filename, "_POL"); |
| 1447 | strcat(filename, ".msg"); |
| 1448 | } else { |
| 1449 | strcpy(filename, "Merc5.msg"); |
| 1450 | lang_type = LANGUAGE_ENGLISH; |
| 1451 | } |
| 1452 | if (!ReadMessageFile(filename)) { |
| 1453 | if (lang_type == LANGUAGE_ENGLISH) { |
| 1454 | mprintf(0, "ERROR: Could not load message file - %s\n", filename); |
| 1455 | } else if (!ReadMessageFile(english_filename)) { |
| 1456 | mprintf(0, "ERROR: Could not load message file - %s\n", english_filename); |
| 1457 | } |
| 1458 | } |
| 1459 | |
| 1460 | int j; |
| 1461 | |
| 1462 | // Do Door Index lookups |
| 1463 | for (j = 0; j < NUM_DOOR_NAMES; j++) |
| 1464 | Door_handles[j] = Scrpt_FindDoorName(Door_names[j]); |
| 1465 | |
| 1466 | // Do Object Index lookups |
| 1467 | for (j = 0; j < NUM_OBJECT_NAMES; j++) |
| 1468 | Object_handles[j] = Scrpt_FindObjectName(Object_names[j]); |
| 1469 | |
| 1470 | // Do Room Index lookups |
| 1471 | for (j = 0; j < NUM_ROOM_NAMES; j++) |
| 1472 | Room_indexes[j] = Scrpt_FindRoomName(Room_names[j]); |
| 1473 | |
| 1474 | // Do Trigger Index lookups |
nothing calls this directly
no test coverage detected