DEADSOFTWARE

added Vampyre Imaging Library; now textures can be in various formats, including...
[d2df-sdl.git] / src / game / g_menu.pas
index 46d6dad134bf6b4010b3e9974797dca04253adf0..8b3dc3163d65a40d806a81aacabf4d4a66f34108 100644 (file)
@@ -1,3 +1,4 @@
+{$MODE DELPHI}
 unit g_menu;
 
 interface
@@ -29,7 +30,7 @@ uses
   g_gui, g_textures, e_graphics, g_main, g_window, g_game, g_map,
   g_basic, g_console, g_sound, g_gfx, g_player, g_options,
   e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
-  MAPSTRUCT, WADEDITOR, Math, WADSTRUCT, g_saveload,
+  MAPSTRUCT, wadreader, Math, g_saveload,
   e_textures, GL, GLExt, g_language,
   g_net, g_netmsg, g_netmaster, g_items, e_input;
 
@@ -774,14 +775,14 @@ var
   cwdt, chgt: Byte;
   spc: ShortInt;
   ID: DWORD;
-  wad: TWADEditor_1;
+  wad: TWADFile;
   cfgdata: Pointer;
   cfglen: Integer;
   config: TConfig;
 begin
   cfglen := 0;
 
-  wad := TWADEditor_1.Create;
+  wad := TWADFile.Create;
   if wad.ReadFile(GameWAD) then
     wad.GetResource('FONTS', cfgres, cfgdata, cfglen);
   wad.Free();
@@ -809,7 +810,7 @@ var
   cwdt, chgt: Byte;
   spc: ShortInt;
   CharID: DWORD;
-  wad: TWADEditor_1;
+  wad: TWADFile;
   cfgdata, fntdata: Pointer;
   cfglen, fntlen: Integer;
   config: TConfig;
@@ -819,7 +820,7 @@ begin
   cfglen := 0;
   fntlen := 0;
 
-  wad := TWADEditor_1.Create;
+  wad := TWADFile.Create;
   if wad.ReadFile(GameWAD) then
   begin
     wad.GetResource('FONTS', txtres, cfgdata, cfglen);
@@ -841,7 +842,7 @@ begin
       chrwidth := config.ReadInt(IntToStr(a), 'Width', 0);
       if chrwidth = 0 then Continue;
 
-      if e_CreateTextureMemEx(fntdata, CharID, cwdt*(a mod 16), chgt*(a div 16),
+      if e_CreateTextureMemEx(fntdata, fntlen, CharID, cwdt*(a mod 16), chgt*(a div 16),
                               cwdt, chgt) then
         e_CharFont_AddChar(FontID, CharID, Chr(a), chrwidth);
     end;