aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-12 09:51:33 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-12 09:51:33 +0000
commitabf47ddd1fe77287136535e2d05ada48b99b8e1f (patch)
treec7bb68f38c381d1f84dd542de882cca079b9b4b2 /src
parentb8e1a9b524f0922329c5307b0396f78a3dc2b44f (diff)
downloadusdx-abf47ddd1fe77287136535e2d05ada48b99b8e1f.tar.gz
usdx-abf47ddd1fe77287136535e2d05ada48b99b8e1f.tar.xz
usdx-abf47ddd1fe77287136535e2d05ada48b99b8e1f.zip
- Windows resources (.rc) reduced to the icon
- Texture resource names are now directly written to resources.inc - Fonts are no resources anymore. They are moved to game/fonts and can be changed to support multiple charsets (until the TTF part is finished). Fonts are registered in fonts/fonts.in git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1367 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in27
-rw-r--r--src/base/TextGL.pas93
-rw-r--r--src/base/UCommon.pas101
-rw-r--r--src/base/UMain.pas4
-rw-r--r--src/macosx/MacResources.pas126
-rw-r--r--src/rccompile-delphi.bat1
-rw-r--r--src/rccompile-fpc.bat3
-rw-r--r--src/resource.inc27
-rw-r--r--src/ultrastardx.dpr2
-rw-r--r--src/ultrastardx.rc38
10 files changed, 133 insertions, 289 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 33bf8fba..3d4b6def 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -52,17 +52,6 @@ USDX_LIB_DIR := $(USDX_SRC_DIR)/lib
INSTALL_DATADIR := $(datadir)/$(USDX_PACKAGE_NAME)
#################################################
-# RC -> resource.inc
-#################################################
-
-# RC resource extraction config
-RESEXTRACTOR_DIR := $(USDX_TOOLS_DIR)/ResourceExtractor
-RESEXTRACTOR_BIN := $(RESEXTRACTOR_DIR)/ResourceExtractor$(EXEEXT)
-RESOURCE_DIR := $(USDX_GAME_DIR)/resources
-RESOURCE_FILE := $(srcdir)/resource.inc
-RC_FILE := $(srcdir)/ultrastardx.rc
-
-#################################################
# FPC config
#################################################
@@ -230,7 +219,7 @@ create-pathinfo:
echo "INSTALL_DATADIR = '$(INSTALL_DATADIR)';" > paths.inc
# check if any src-file changed and rebuild
-$(USDX_BIN): $(RESOURCE_FILE) $(USDX_PROJ) $(STATIC_LIBS) $(SRC_FILES)
+$(USDX_BIN): $(USDX_PROJ) $(STATIC_LIBS) $(SRC_FILES)
@echo "==================================="
@echo "Changed files:"
@echo "$?"
@@ -247,25 +236,13 @@ $(USDX_BIN): $(RESOURCE_FILE) $(USDX_PROJ) $(STATIC_LIBS) $(SRC_FILES)
$(PPC) $(strip $(PFLAGS_ALL)) -o$@ $(USDX_PROJ)
#################################################
-# Resource-file
-#################################################
-
-$(RESOURCE_FILE): $(RC_FILE)
- $(RESEXTRACTOR_BIN) $(RC_FILE) $(RESOURCE_DIR) $(RESOURCE_FILE)
-
-
-#################################################
# clean-up
#################################################
.PHONY: clean
-clean: clean_obj clean_res
+clean: clean_obj
$(RM) paths.inc
-.PHONY: clean_res
-clean_res:
- $(RM) "$(RESOURCE_FILE)"
-
.PHONY: clean_obj
clean_obj: clean_bin
$(RM_REC) "$(PCUNIT_DIR)"
diff --git a/src/base/TextGL.pas b/src/base/TextGL.pas
index f7b3ac95..f02a261c 100644
--- a/src/base/TextGL.pas
+++ b/src/base/TextGL.pas
@@ -12,7 +12,6 @@ uses
gl,
SDL,
UTexture,
- Classes,
// SDL_ttf,
ULog;
@@ -73,81 +72,101 @@ uses
UMain,
UCommon,
SysUtils,
+ IniFiles,
+ Classes,
UGraphic;
var
// Colours for the reflection
TempColor: array[0..3] of GLfloat;
-procedure LoadBitmapFontInfo(aID : integer; const aType, aResourceName: string);
+{**
+ * Load font info.
+ * FontFile is the name of the image (.png) not the data (.dat) file
+ *}
+procedure LoadFontInfo(FontID: integer; const FontFile: string);
var
- stream: TStream;
+ Stream: TFileStream;
+ DatFile: string;
begin
- stream := GetResourceStream(aResourceName, aType);
- if (not assigned(stream)) then
- begin
- Log.LogError('Unknown font['+ inttostr(aID) +': '+aType+']', 'loadfont');
- Exit;
- end;
+ DatFile := ChangeFileExt(FontFile, '.dat');
+ FillChar(Fonts[FontID].Width[0], Length(Fonts[FontID].Width), 0);
+
+ Stream := nil;
try
- stream.Read(Fonts[ aID ].Width, 256);
+ Stream := TFileStream.Create(DatFile, fmOpenRead);
+ Stream.Read(Fonts[FontID].Width, 256);
except
- Log.LogError('Error while reading font['+ inttostr(aID) +': '+aType+']', 'loadfont');
+ Log.LogError('Error while reading font['+ inttostr(FontID) +']', 'LoadFontInfo');
end;
- stream.Free;
+ Stream.Free;
end;
// Builds bitmap fonts
procedure BuildFont;
var
Count: integer;
+ FontIni: TMemIniFile;
+ FontFile: string; // filename of the image (with .png/... ending)
begin
ActFont := 0;
- SetLength(Fonts, 5);
- Fonts[0].Tex := Texture.LoadTexture(true, 'Font', TEXTURE_TYPE_TRANSPARENT, 0);
+ SetLength(Fonts, 4);
+ FontIni := TMemIniFile.Create(FontPath + 'fonts.ini');
+
+ // Normal
+
+ FontFile := FontPath + FontIni.ReadString('Normal', 'File', '');
+
+ Fonts[0].Tex := Texture.LoadTexture(true, FontFile, TEXTURE_TYPE_TRANSPARENT, 0);
Fonts[0].Tex.H := 30;
Fonts[0].AspectW := 0.9;
Fonts[0].Outline := 0;
- Fonts[1].Tex := Texture.LoadTexture(true, 'FontB', TEXTURE_TYPE_TRANSPARENT, 0);
+ LoadFontInfo(0, FontFile);
+
+ // Bold
+
+ FontFile := FontPath + FontIni.ReadString('Bold', 'File', '');
+
+ Fonts[1].Tex := Texture.LoadTexture(true, FontFile, TEXTURE_TYPE_TRANSPARENT, 0);
Fonts[1].Tex.H := 30;
Fonts[1].AspectW := 1;
Fonts[1].Outline := 0;
- Fonts[2].Tex := Texture.LoadTexture(true, 'FontO', TEXTURE_TYPE_TRANSPARENT, 0);
+ LoadFontInfo(1, FontFile);
+ for Count := 0 to 255 do
+ Fonts[1].Width[Count] := Fonts[1].Width[Count] div 2;
+
+ // Outline1
+
+ FontFile := FontPath + FontIni.ReadString('Outline1', 'File', '');
+
+ Fonts[2].Tex := Texture.LoadTexture(true, FontFile, TEXTURE_TYPE_TRANSPARENT, 0);
Fonts[2].Tex.H := 30;
Fonts[2].AspectW := 0.95;
Fonts[2].Outline := 5;
- Fonts[3].Tex := Texture.LoadTexture(true, 'FontO2', TEXTURE_TYPE_TRANSPARENT, 0);
- Fonts[3].Tex.H := 30;
- Fonts[3].AspectW := 0.95;
- Fonts[3].Outline := 4;
+ LoadFontInfo(2, FontFile);
+ for Count := 0 to 255 do
+ Fonts[2].Width[Count] := Fonts[2].Width[Count] div 2 + 2;
-{ Fonts[4].Tex := Texture.LoadTexture('FontO', TEXTURE_TYPE_TRANSPARENT, 0); // for score screen
- Fonts[4].Tex.H := 30;
- Fonts[4].AspectW := 0.95;
- Fonts[4].Done := -1;
- Fonts[4].Outline := 5;}
+ // Outline2
- // load font info
- LoadBitmapFontInfo( 0, 'FNT', 'Font');
- LoadBitmapFontInfo( 1, 'FNT', 'FontB');
- LoadBitmapFontInfo( 2, 'FNT', 'FontO');
- LoadBitmapFontInfo( 3, 'FNT', 'FontO2');
+ FontFile := FontPath + FontIni.ReadString('Outline2', 'File', '');
- for Count := 0 to 255 do
- Fonts[1].Width[Count] := Fonts[1].Width[Count] div 2;
-
- for Count := 0 to 255 do
- Fonts[2].Width[Count] := Fonts[2].Width[Count] div 2 + 2;
+ Fonts[3].Tex := Texture.LoadTexture(true, FontFile, TEXTURE_TYPE_TRANSPARENT, 0);
+ Fonts[3].Tex.H := 30;
+ Fonts[3].AspectW := 0.95;
+ Fonts[3].Outline := 4;
+ LoadFontInfo(3, FontFile);
for Count := 0 to 255 do
Fonts[3].Width[Count] := Fonts[3].Width[Count] + 1;
-{ for Count := 0 to 255 do
- Fonts[4].Width[Count] := Fonts[4].Width[Count] div 2 + 2;}
+
+ // close ini-file
+ FontIni.Free;
// enable blending by default
for Count := 0 to High(Fonts) do
diff --git a/src/base/UCommon.pas b/src/base/UCommon.pas
index 38a68d84..3f41dae6 100644
--- a/src/base/UCommon.pas
+++ b/src/base/UCommon.pas
@@ -306,87 +306,74 @@ begin
end;
-{$IFDEF Unix}
- // include resource-file info (stored in the constant array "resources")
- {$I ../resource.inc}
-{$ENDIF}
+// include resource-file info (stored in the constant array "resources")
+{$I ../resource.inc}
function GetResourceStream(const aName, aType: string): TStream;
-{$IFDEF Unix}
var
ResIndex: integer;
Filename: string;
-{$ENDIF}
begin
Result := nil;
- {$IFDEF Unix}
for ResIndex := 0 to High(resources) do
begin
- if (resources[ResIndex][0] = aName ) and
- (resources[ResIndex][1] = aType ) then
+ if (Resources[ResIndex][0] = aName ) then
begin
try
- Filename := ResourcesPath + resources[ResIndex][2];
+ Filename := ResourcesPath + Resources[ResIndex][1];
Result := TFileStream.Create(Filename, fmOpenRead);
except
- Log.LogError('Failed to open: "'+ resources[ResIndex][2] +'"', 'GetResourceStream');
+ Log.LogError('Failed to open: "'+ resources[ResIndex][1] +'"', 'GetResourceStream');
end;
- exit;
+ Exit;
end;
end;
- {$ELSE}
- try
- Result := TResourceStream.Create(HInstance, aName , PChar(aType));
- except
- Log.LogError('Invalid resource: "'+ aType + ':' + aName +'"', 'GetResourceStream');
- end;
- {$ENDIF}
end;
// +++++++++++++++++++++ helpers for RWOpsFromStream() +++++++++++++++
- function SdlStreamSeek( context : PSDL_RWops; offset : Integer; whence : Integer ) : integer; cdecl;
- var
- stream : TStream;
- origin : Word;
- begin
- stream := TStream( context.unknown );
- if ( stream = nil ) then
- raise EInvalidContainer.Create( 'SDLStreamSeek on nil' );
- case whence of
- 0 : origin := soFromBeginning; // Offset is from the beginning of the resource. Seek moves to the position Offset. Offset must be >= 0.
- 1 : origin := soFromCurrent; // Offset is from the current position in the resource. Seek moves to Position + Offset.
- 2 : origin := soFromEnd;
- else
- origin := soFromBeginning; // just in case
- end;
- Result := stream.Seek( offset, origin );
+function SdlStreamSeek( context : PSDL_RWops; offset : Integer; whence : Integer ) : integer; cdecl;
+var
+ stream : TStream;
+ origin : Word;
+begin
+ stream := TStream( context.unknown );
+ if ( stream = nil ) then
+ raise EInvalidContainer.Create( 'SDLStreamSeek on nil' );
+ case whence of
+ 0 : origin := soFromBeginning; // Offset is from the beginning of the resource. Seek moves to the position Offset. Offset must be >= 0.
+ 1 : origin := soFromCurrent; // Offset is from the current position in the resource. Seek moves to Position + Offset.
+ 2 : origin := soFromEnd;
+ else
+ origin := soFromBeginning; // just in case
end;
+ Result := stream.Seek( offset, origin );
+end;
- function SdlStreamRead( context : PSDL_RWops; Ptr : Pointer; size : Integer; maxnum: Integer ) : Integer; cdecl;
- var
- stream : TStream;
- begin
- stream := TStream( context.unknown );
- if ( stream = nil ) then
- raise EInvalidContainer.Create( 'SDLStreamRead on nil' );
- try
- Result := stream.read( Ptr^, Size * maxnum ) div size;
- except
- Result := -1;
- end;
+function SdlStreamRead( context : PSDL_RWops; Ptr : Pointer; size : Integer; maxnum: Integer ) : Integer; cdecl;
+var
+ stream : TStream;
+begin
+ stream := TStream( context.unknown );
+ if ( stream = nil ) then
+ raise EInvalidContainer.Create( 'SDLStreamRead on nil' );
+ try
+ Result := stream.read( Ptr^, Size * maxnum ) div size;
+ except
+ Result := -1;
end;
+end;
- function SDLStreamClose( context : PSDL_RWops ) : Integer; cdecl;
- var
- stream : TStream;
- begin
- stream := TStream( context.unknown );
- if ( stream = nil ) then
- raise EInvalidContainer.Create( 'SDLStreamClose on nil' );
- stream.Free;
- Result := 1;
- end;
+function SDLStreamClose( context : PSDL_RWops ) : Integer; cdecl;
+var
+ stream : TStream;
+begin
+ stream := TStream( context.unknown );
+ if ( stream = nil ) then
+ raise EInvalidContainer.Create( 'SDLStreamClose on nil' );
+ stream.Free;
+ Result := 1;
+end;
// -----------------------------------------------
(*
diff --git a/src/base/UMain.pas b/src/base/UMain.pas
index f9f56c3e..7d9886b6 100644
--- a/src/base/UMain.pas
+++ b/src/base/UMain.pas
@@ -77,6 +77,7 @@ var
LanguagesPath: string;
PluginPath: string;
VisualsPath: string;
+ FontPath: string;
ResourcesPath: string;
PlayListPath: string;
@@ -100,7 +101,7 @@ function FindPath(out PathResult: string; const RequestedPath: string; NeedsWrit
procedure InitializePaths;
procedure AddSongPath(const Path: string);
-Procedure Main;
+procedure Main;
procedure MainLoop;
procedure CheckEvents;
procedure Sing(Screen: TScreenSing);
@@ -1091,6 +1092,7 @@ begin
FindPath(LanguagesPath, Platform.GetGameSharedPath + 'languages', false);
FindPath(PluginPath, Platform.GetGameSharedPath + 'plugins', false);
FindPath(VisualsPath, Platform.GetGameSharedPath + 'visuals', false);
+ FindPath(FontPath, Platform.GetGameSharedPath + 'fonts', false);
FindPath(ResourcesPath, Platform.GetGameSharedPath + 'resources', false);
// Playlists are not shared as we need one directory to write too
diff --git a/src/macosx/MacResources.pas b/src/macosx/MacResources.pas
deleted file mode 100644
index fa67ad23..00000000
--- a/src/macosx/MacResources.pas
+++ /dev/null
@@ -1,126 +0,0 @@
-unit MacResources;
-
-{$I switches.inc}
-
-interface
-
-uses
- Classes, Windows, SysUtils;
-
-type
-
- TResourceStream = class(TFileStream)
- private
- public
- constructor Create(Instance: THandle; const ResName: String; ResType: PChar);
- end;
-
-function FindResource(hInstance: THandle; pcIdentifier: PChar; pcResType: PChar): THandle;
-
-implementation
-
-function FindResource(hInstance : THandle; pcIdentifier: PChar; pcResType: PChar): THandle;
-begin
- Result := 1;
-end;
-
-function GetResourcesPath : String;
-var
- i, j: Integer;
-begin
- Result := ExtractFilePath(ParamStr(0));
- for j := 0 to 2 do
- begin
- i := Length(Result);
- repeat
- Delete(Result, i, 1);
- i := Length(Result);
- until (i = 0) or (Result[i] = '/');
- end;
-end;
-
-{ TResourceStream }
-
-constructor TResourceStream.Create(Instance: THandle; const ResName: String; ResType: PChar);
-var
- sResNameLower: String;
- sFileName: String;
-begin
- sResNameLower := LowerCase(String(ResName));
-
- if ResType = 'TEX' then
- begin
- if sResNameLower = 'font' then
- sFileName := GetResourcesPath + 'Fonts/Normal/eurostar_regular.png'
- else if sResNameLower = 'fontb' then
- sFileName := GetResourcesPath + 'Fonts/Bold/eurostar_regular_bold.png'
- else if sResNameLower = 'fonto' then
- sFileName := GetResourcesPath + 'Fonts/Outline 1/Outline 1.png'
- else if sResNameLower = 'fonto2' then
- sFileName := GetResourcesPath + 'Fonts/Outline 2/Outline 2.png'
- else if sResNameLower = 'crdts_bg' then
- sFileName := GetResourcesPath + 'Graphics/credits_v5_bg.png'
- else if sResNameLower = 'crdts_ovl' then
- sFileName := GetResourcesPath + 'Graphics/credits_v5_overlay.png'
- else if sResNameLower = 'crdts_blindguard' then
- sFileName := GetResourcesPath + 'Graphics/names_blindguard.png'
- else if sResNameLower = 'crdts_blindy' then
- sFileName := GetResourcesPath + 'Graphics/names_blindy.png'
- else if sResNameLower = 'crdts_canni' then
- sFileName := GetResourcesPath + 'Graphics/names_canni.png'
- else if sResNameLower = 'crdts_commandio' then
- sFileName := GetResourcesPath + 'Graphics/names_commandio.png'
- else if sResNameLower = 'crdts_lazyjoker' then
- sFileName := GetResourcesPath + 'Graphics/names_lazyjoker.png'
- else if sResNameLower = 'crdts_mog' then
- sFileName := GetResourcesPath + 'Graphics/names_mog.png'
- else if sResNameLower = 'crdts_mota' then
- sFileName := GetResourcesPath + 'Graphics/names_mota.png'
- else if sResNameLower = 'crdts_skillmaster' then
- sFileName := GetResourcesPath + 'Graphics/names_skillmaster.png'
- else if sResNameLower = 'crdts_whiteshark' then
- sFileName := GetResourcesPath + 'Graphics/names_whiteshark.png'
- else if sResNameLower = 'intro_l01' then
- sFileName := GetResourcesPath + 'Graphics/intro-l-01.png'
- else if sResNameLower = 'intro_l02' then
- sFileName := GetResourcesPath + 'Graphics/intro-l-02.png'
- else if sResNameLower = 'intro_l03' then
- sFileName := GetResourcesPath + 'Graphics/intro-l-03.png'
- else if sResNameLower = 'intro_l04' then
- sFileName := GetResourcesPath + 'Graphics/intro-l-04.png'
- else if sResNameLower = 'intro_l05' then
- sFileName := GetResourcesPath + 'Graphics/intro-l-05.png'
- else if sResNameLower = 'intro_l06' then
- sFileName := GetResourcesPath + 'Graphics/intro-l-06.png'
- else if sResNameLower = 'intro_l07' then
- sFileName := GetResourcesPath + 'Graphics/intro-l-07.png'
- else if sResNameLower = 'intro_l08' then
- sFileName := GetResourcesPath + 'Graphics/intro-l-08.png'
- else if sResNameLower = 'intro_l09' then
- sFileName := GetResourcesPath + 'Graphics/intro-l-09.png'
- else if sResNameLower = 'outro_bg' then
- sFileName := GetResourcesPath + 'Graphics/outro-bg.png'
- else if sResNameLower = 'outro_esc' then
- sFileName := GetResourcesPath + 'Graphics/outro-esc.png'
- else if sResNameLower = 'outro_exd' then
- sFileName := GetResourcesPath + 'Graphics/outro-exit-dark.png';
- end
- else if ResType = 'FNT' then
- begin
- if sResNameLower = 'font' then
- sFileName := GetResourcesPath + 'Fonts/Normal/eurostar_regular.dat'
- else if sResNameLower = 'fontb' then
- sFileName := GetResourcesPath + 'Fonts/Bold/eurostar_regular_bold.dat'
- else if sResNameLower = 'fonto' then
- sFileName := GetResourcesPath + 'Fonts/Outline 1/Outline 1.dat'
- else if sResNameLower = 'fonto2' then
- sFileName := GetResourcesPath + 'Fonts/Outline 2/Outline 2.dat';
- end;
-
- if FileExists(sFileName) then
- inherited Create(sFileName, fmOpenReadWrite)
- else
- raise Exception.Create('MacResources.TResourceStream.Create: File "' + sFileName + '" not found.');
-end;
-
-end.
diff --git a/src/rccompile-delphi.bat b/src/rccompile-delphi.bat
deleted file mode 100644
index cd69530a..00000000
--- a/src/rccompile-delphi.bat
+++ /dev/null
@@ -1 +0,0 @@
-BRC32 -r -foultrastardx.res ultrastardx.rc
diff --git a/src/rccompile-fpc.bat b/src/rccompile-fpc.bat
deleted file mode 100644
index d7823d4a..00000000
--- a/src/rccompile-fpc.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@set PATH=C:\Programme\lazarus\fpc\2.2.0\bin\i386-win32\;%PATH%
-windres.exe -i ultrastardx.rc -o ultrastardx.res
-
diff --git a/src/resource.inc b/src/resource.inc
new file mode 100644
index 00000000..ca67474d
--- /dev/null
+++ b/src/resource.inc
@@ -0,0 +1,27 @@
+const
+ Resources: array[0..23, 0..1] of string = (
+ ('WINDOWICON', 'icons/ultrastardx-icon.png'),
+ ('CRDTS_BG', 'credits/credits_v5_bg.png'),
+ ('CRDTS_OVL', 'credits/credits_v5_overlay.png'),
+ ('CRDTS_blindguard', 'credits/names_blindguard.png'),
+ ('CRDTS_blindy', 'credits/names_blindy.png'),
+ ('CRDTS_canni', 'credits/names_canni.png'),
+ ('CRDTS_commandio', 'credits/names_commandio.png'),
+ ('CRDTS_lazyjoker', 'credits/names_lazyjoker.png'),
+ ('CRDTS_mog', 'credits/names_mog.png'),
+ ('CRDTS_mota', 'credits/names_mota.png'),
+ ('CRDTS_skillmaster', 'credits/names_skillmaster.png'),
+ ('CRDTS_whiteshark', 'credits/names_whiteshark.png'),
+ ('INTRO_L01', 'credits/intro-l-01.png'),
+ ('INTRO_L02', 'credits/intro-l-02.png'),
+ ('INTRO_L03', 'credits/intro-l-03.png'),
+ ('INTRO_L04', 'credits/intro-l-04.png'),
+ ('INTRO_L05', 'credits/intro-l-05.png'),
+ ('INTRO_L06', 'credits/intro-l-06.png'),
+ ('INTRO_L07', 'credits/intro-l-07.png'),
+ ('INTRO_L08', 'credits/intro-l-08.png'),
+ ('INTRO_L09', 'credits/intro-l-09.png'),
+ ('OUTRO_BG', 'credits/outro-bg.png'),
+ ('OUTRO_ESC', 'credits/outro-esc.png'),
+ ('OUTRO_EXD', 'credits/outro-exit-dark.png')
+ );
diff --git a/src/ultrastardx.dpr b/src/ultrastardx.dpr
index 6717e19c..80d92cad 100644
--- a/src/ultrastardx.dpr
+++ b/src/ultrastardx.dpr
@@ -1,7 +1,7 @@
program ultrastardx;
{$IFDEF MSWINDOWS}
- {$R 'ultrastardx.res' 'ultrastardx.rc'}
+ {$R '..\icons\ultrastardx-icon.res' '..\icons\ultrastardx-icon.rc'}
{$ENDIF}
{$IFDEF FPC}
diff --git a/src/ultrastardx.rc b/src/ultrastardx.rc
deleted file mode 100644
index a8c1aabd..00000000
--- a/src/ultrastardx.rc
+++ /dev/null
@@ -1,38 +0,0 @@
-Font TEX "../game/resources/fonts/Normal/eurostar_regular.png"
-Font FNT "../game/resources/fonts/Normal/eurostar_regular.dat"
-
-FontB TEX "../game/resources/fonts/Bold/eurostar_regular_bold.png"
-FontB FNT "../game/resources/fonts/Bold/eurostar_regular_bold.dat"
-
-FontO TEX "../game/resources/fonts/Outline 1/Outline 1.png"
-FontO FNT "../game/resources/fonts/Outline 1/Outline 1.dat"
-
-FontO2 TEX "../game/resources/fonts/Outline 2/Outline 2.png"
-FontO2 FNT "../game/resources/fonts/Outline 2/Outline 2.dat"
-
-MAINICON ICON "../icons/ultrastardx.ico"
-WINDOWICON TEX "../game/resources/icons/ultrastardx-icon.png"
-
-CRDTS_BG TEX "../game/resources/credits/credits_v5_bg.png"
-CRDTS_OVL TEX "../game/resources/credits/credits_v5_overlay.png"
-CRDTS_blindguard TEX "../game/resources/credits/names_blindguard.png"
-CRDTS_blindy TEX "../game/resources/credits/names_blindy.png"
-CRDTS_canni TEX "../game/resources/credits/names_canni.png"
-CRDTS_commandio TEX "../game/resources/credits/names_commandio.png"
-CRDTS_lazyjoker TEX "../game/resources/credits/names_lazyjoker.png"
-CRDTS_mog TEX "../game/resources/credits/names_mog.png"
-CRDTS_mota TEX "../game/resources/credits/names_mota.png"
-CRDTS_skillmaster TEX "../game/resources/credits/names_skillmaster.png"
-CRDTS_whiteshark TEX "../game/resources/credits/names_whiteshark.png"
-INTRO_L01 TEX "../game/resources/credits/intro-l-01.png"
-INTRO_L02 TEX "../game/resources/credits/intro-l-02.png"
-INTRO_L03 TEX "../game/resources/credits/intro-l-03.png"
-INTRO_L04 TEX "../game/resources/credits/intro-l-04.png"
-INTRO_L05 TEX "../game/resources/credits/intro-l-05.png"
-INTRO_L06 TEX "../game/resources/credits/intro-l-06.png"
-INTRO_L07 TEX "../game/resources/credits/intro-l-07.png"
-INTRO_L08 TEX "../game/resources/credits/intro-l-08.png"
-INTRO_L09 TEX "../game/resources/credits/intro-l-09.png"
-OUTRO_BG TEX "../game/resources/credits/outro-bg.png"
-OUTRO_ESC TEX "../game/resources/credits/outro-esc.png"
-OUTRO_EXD TEX "../game/resources/credits/outro-exit-dark.png"