DEADSOFTWARE

Added Watt32 support
[d2df-sdl.git] / src / game / g_main.pas
index c789caf7785c74a09a79e9e691f62b6277898551..4e38444dcb9c78e5ce6a3e0c0e04ab14ba9923f5 100644 (file)
@@ -38,6 +38,9 @@ implementation
 
 uses
 {$INCLUDE ../nogl/noGLuses.inc}
+{$IF DEFINED(GO32V2) AND NOT DEFINED(USE_ENETWRAP)}
+  Watt32,
+{$ENDIF}
 {$IFDEF ENABLE_HOLMES}
   g_holmes, fui_wadread, fui_style, fui_gfx_gl,
 {$ENDIF}
@@ -80,6 +83,24 @@ begin
     TMsgType.Notify
   );
 
+{$IF DEFINED(GO32V2) AND NOT DEFINED(USE_ENETWRAP)}
+  sdlflags := sock_init;
+  {$IFDEF USE_SDL2ALLEGRO}
+    hires_timer(0);
+    init_userSuppliedTimerTick;
+  {$ENDIF}
+  e_WriteLog('Wattcp Init: (' + IntToStr(sdlflags) + ') ' + sock_init_err, TMsgType.Notify);
+  e_WriteLog('Wattcp Version: ' + wattcpVersion, TMsgType.Notify);
+  e_WriteLog('Wattcp Capabilities: ' + wattcpCapabilities, TMsgType.Notify);
+  e_WriteLog('Wattcp IP: ' +
+    IntToStr(my_ip_addr div 16777216 mod 256) + '.' +
+    IntToStr(my_ip_addr div 65536 mod 256) + '.' +
+    IntToStr(my_ip_addr div 256 mod 256) + '.' +
+    IntToStr(my_ip_addr mod 256),
+    TMsgType.Notify
+ );
+{$ENDIF}
+
 {$IFDEF HEADLESS}
   conbufDumpToStdOut := true;
 {$ENDIF}