Add support for OpenMW .omwaddon and .omwgame plugins

This commit is contained in:
Oliver Hamlet
2025-01-29 18:38:24 +00:00
parent 2852491143
commit 9e2aa0cf9c
6 changed files with 126 additions and 1 deletions
+4
View File
@@ -76,3 +76,7 @@ pub static LCI_GAME_FALLOUT_4_VR: c_int = 7;
/// Game code for Starfield.
#[no_mangle]
pub static LCI_GAME_STARFIELD: c_int = 9;
/// Game code for OpenMW.
#[no_mangle]
pub static LCI_GAME_OPENMW: c_int = 10;
+1
View File
@@ -33,6 +33,7 @@ fn map_error(err: &Error) -> c_int {
pub fn map_game_type(game_type: c_int) -> Result<GameType, c_int> {
match game_type {
x if x == LCI_GAME_OPENMW => Ok(GameType::OpenMW),
x if x == LCI_GAME_MORROWIND => Ok(GameType::Morrowind),
x if x == LCI_GAME_OBLIVION => Ok(GameType::Oblivion),
x if x == LCI_GAME_SKYRIM => Ok(GameType::Skyrim),
+1
View File
@@ -22,6 +22,7 @@ void test_game_id_values() {
assert(LCI_GAME_FALLOUT_4 == 6);
assert(LCI_GAME_FALLOUT_4_VR == 7);
assert(LCI_GAME_STARFIELD == 9);
assert(LCI_GAME_OPENMW == 10);
}
void test_lci_condition_parse() {