Find and create an instance of the game subsystem
(GameImportsImpl gameImports)
| 1103 | * Find and create an instance of the game subsystem |
| 1104 | */ |
| 1105 | private static GameExports createGameModInstance(GameImportsImpl gameImports) { |
| 1106 | // todo: introduce proper Dependency Injection |
| 1107 | try { |
| 1108 | Class<?> game = Class.forName("jake2.game.GameExportsImpl"); |
| 1109 | Constructor<?> constructor = game.getConstructor(GameImports.class); |
| 1110 | return (GameExports) constructor.newInstance(gameImports); |
| 1111 | } catch (Exception e) { |
| 1112 | e.printStackTrace(); |
| 1113 | Com.Error(ERR_FATAL, "Could not initialise game subsystem due to : " + e.getMessage() + "\n"); |
| 1114 | return null; |
| 1115 | } |
| 1116 | } |
| 1117 | |
| 1118 | void SV_Loadgame_f(List<String> args) { |
| 1119 |
no test coverage detected