DEADSOFTWARE

added license info
[d2df-sdl.git] / src / game / g_menu.pas
index 8b3dc3163d65a40d806a81aacabf4d4a66f34108..16c2d0123a59fa48fcf595691908552b4a368d10 100644 (file)
@@ -1,3 +1,18 @@
+(* Copyright (C)  DooM 2D:Forever Developers
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *)
 {$MODE DELPHI}
 unit g_menu;
 
@@ -726,7 +741,7 @@ begin
 
     if a.pic <> '' then
     begin
-      g_ProcessResourceStr(a.pic, @fn, nil, nil);
+      fn := g_ExtractWadName(a.pic);
       if fn = '' then
         TGUIImage(win.GetControl('mpWADImage')).SetImage(wad+a.pic)
       else
@@ -784,7 +799,7 @@ begin
 
   wad := TWADFile.Create;
   if wad.ReadFile(GameWAD) then
-    wad.GetResource('FONTS', cfgres, cfgdata, cfglen);
+    wad.GetResource('FONTS/'+cfgres, cfgdata, cfglen);
   wad.Free();
 
   if cfglen <> 0 then
@@ -823,8 +838,8 @@ begin
   wad := TWADFile.Create;
   if wad.ReadFile(GameWAD) then
   begin
-    wad.GetResource('FONTS', txtres, cfgdata, cfglen);
-    wad.GetResource('FONTS', fntres, fntdata, fntlen);
+    wad.GetResource('FONTS/'+txtres, cfgdata, cfglen);
+    wad.GetResource('FONTS/'+fntres, fntdata, fntlen);
   end;
   wad.Free();