ref: e67c1e3640260d7797909e8b724b4b5eceb9739e
parent: 84faec1bd1375448c514f4b7201b889447a26ef4
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Aug 27 19:59:57 EDT 2019
Migrated to the native Windows resource file system
--- a/msvc2003/CSE2.rc
+++ b/msvc2003/CSE2.rc
@@ -58,6 +58,85 @@
END
END
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+CREDIT01 BITMAP "..\\assets\\resources\\BITMAP\\Credit01.bmp"
+CREDIT02 BITMAP "..\\assets\\resources\\BITMAP\\Credit02.bmp"
+CREDIT03 BITMAP "..\\assets\\resources\\BITMAP\\Credit03.bmp"
+CREDIT04 BITMAP "..\\assets\\resources\\BITMAP\\Credit04.bmp"
+CREDIT05 BITMAP "..\\assets\\resources\\BITMAP\\Credit05.bmp"
+CREDIT06 BITMAP "..\\assets\\resources\\BITMAP\\Credit06.bmp"
+CREDIT07 BITMAP "..\\assets\\resources\\BITMAP\\Credit07.bmp"
+CREDIT08 BITMAP "..\\assets\\resources\\BITMAP\\Credit08.bmp"
+CREDIT09 BITMAP "..\\assets\\resources\\BITMAP\\Credit09.bmp"
+CREDIT10 BITMAP "..\\assets\\resources\\BITMAP\\Credit10.bmp"
+CREDIT11 BITMAP "..\\assets\\resources\\BITMAP\\Credit11.bmp"
+CREDIT12 BITMAP "..\\assets\\resources\\BITMAP\\Credit12.bmp"
+CREDIT14 BITMAP "..\\assets\\resources\\BITMAP\\Credit14.bmp"
+CREDIT15 BITMAP "..\\assets\\resources\\BITMAP\\Credit15.bmp"
+CREDIT16 BITMAP "..\\assets\\resources\\BITMAP\\Credit16.bmp"
+CREDIT17 BITMAP "..\\assets\\resources\\BITMAP\\Credit17.bmp"
+CREDIT18 BITMAP "..\\assets\\resources\\BITMAP\\Credit18.bmp"
+PIXEL BITMAP "..\\assets\\resources\\BITMAP\\pixel.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// ORG
+//
+
+ACCESS ORG "..\\assets\\resources\\ORG\\Access.org"
+ANZEN ORG "..\\assets\\resources\\ORG\\Anzen.org"
+BALCONY ORG "..\\assets\\resources\\ORG\\Balcony.org"
+BALLOS ORG "..\\assets\\resources\\ORG\\Ballos.org"
+BDOWN ORG "..\\assets\\resources\\ORG\\BreakDown.org"
+CEMETERY ORG "..\\assets\\resources\\ORG\\Cemetery.org"
+CURLY ORG "..\\assets\\resources\\ORG\\Curly.org"
+DR ORG "..\\assets\\resources\\ORG\\Dr.org"
+ENDING ORG "..\\assets\\resources\\ORG\\Ending.org"
+ESCAPE ORG "..\\assets\\resources\\ORG\\Escape.org"
+FANFALE1 ORG "..\\assets\\resources\\ORG\\Fanfale1.org"
+FANFALE2 ORG "..\\assets\\resources\\ORG\\Fanfale2.org"
+FANFALE3 ORG "..\\assets\\resources\\ORG\\Fanfale3.org"
+FIREEYE ORG "..\\assets\\resources\\ORG\\FireEye.org"
+GAMEOVER ORG "..\\assets\\resources\\ORG\\Gameover.org"
+GINSUKE ORG "..\\assets\\resources\\ORG\\Ginsuke.org"
+GRAND ORG "..\\assets\\resources\\ORG\\Grand.org"
+GRAVITY ORG "..\\assets\\resources\\ORG\\Gravity.org"
+HELL ORG "..\\assets\\resources\\ORG\\Hell.org"
+IRONH ORG "..\\assets\\resources\\ORG\\ironH.org"
+JENKA ORG "..\\assets\\resources\\ORG\\Jenka.org"
+JENKA2 ORG "..\\assets\\resources\\ORG\\Jenka2.org"
+KODOU ORG "..\\assets\\resources\\ORG\\Kodou.org"
+LASTBTL ORG "..\\assets\\resources\\ORG\\LastBtl.org"
+LASTBT3 ORG "..\\assets\\resources\\ORG\\LastBtl3.org"
+LASTCAVE ORG "..\\assets\\resources\\ORG\\LastCave.org"
+MARINE ORG "..\\assets\\resources\\ORG\\Marine.org"
+MAZE ORG "..\\assets\\resources\\ORG\\Maze.org"
+MDOWN2 ORG "..\\assets\\resources\\ORG\\MDown2.org"
+OSIDE ORG "..\\assets\\resources\\ORG\\Oside.org"
+MURA ORG "..\\assets\\resources\\ORG\\Mura.org"
+PLANT ORG "..\\assets\\resources\\ORG\\Plant.org"
+QUIET ORG "..\\assets\\resources\\ORG\\quiet.org"
+REQUIEM ORG "..\\assets\\resources\\ORG\\Requiem.org"
+TOROKO ORG "..\\assets\\resources\\ORG\\Toroko.org"
+VIVI ORG "..\\assets\\resources\\ORG\\Vivi.org"
+WANPAK2 ORG "..\\assets\\resources\\ORG\\Wanpak2.org"
+WANPAKU ORG "..\\assets\\resources\\ORG\\Wanpaku.org"
+WEED ORG "..\\assets\\resources\\ORG\\Weed.org"
+WHITE ORG "..\\assets\\resources\\ORG\\White.org"
+XXXX ORG "..\\assets\\resources\\ORG\\XXXX.org"
+ZONBIE ORG "..\\assets\\resources\\ORG\\Zonbie.org"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// WAVE
+//
+
+WAVE100 WAVE "..\\assets\\resources\\WAVE\\Wave.dat"
#endif // Japanese resources
/////////////////////////////////////////////////////////////////////////////
--- a/msvc2003/CSE2.vcproj
+++ b/msvc2003/CSE2.vcproj
@@ -422,9 +422,6 @@
RelativePath="..\src\Profile.cpp">
</File>
<File
- RelativePath="..\src\Resource.cpp">
- </File>
- <File
RelativePath="..\src\Backends\Rendering\SDLTexture.cpp">
</File>
<File
@@ -598,9 +595,6 @@
RelativePath="..\src\Backends\Rendering.h">
</File>
<File
- RelativePath="..\src\Resource.h">
- </File>
- <File
RelativePath=".\resource1.h">
</File>
<File
@@ -642,7 +636,211 @@
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
<File
+ RelativePath="..\assets\resources\Org\Access.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Anzen.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Balcony.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Ballos.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\BreakDown.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Cemetery.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit01.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit02.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit03.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit04.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit05.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit06.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit07.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit08.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit09.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit10.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit11.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit12.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit14.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit15.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit16.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit17.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\Credit18.bmp">
+ </File>
+ <File
RelativePath=".\CSE2.rc">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1041"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1041"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Japanese)|Win32">
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1041"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug (Japanese)|Win32">
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1041"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Curly.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Dr.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Ending.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Escape.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Fanfale1.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Fanfale2.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Fanfale3.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\FireEye.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Gameover.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Ginsuke.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Grand.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Gravity.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Hell.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\ironH.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Jenka.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Jenka2.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Kodou.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\LastBtl.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\LastBtl3.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\LastCave.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Marine.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Maze.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\MDown2.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Mura.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Oside.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Bitmap\pixel.bmp">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Plant.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\quiet.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Requiem.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Toroko.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Vivi.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Wanpak2.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Wanpaku.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Weed.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\White.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\XXXX.org">
+ </File>
+ <File
+ RelativePath="..\assets\resources\Org\Zonbie.org">
</File>
</Filter>
</Files>
--- a/msvc2003/resource1.h
+++ b/msvc2003/resource1.h
@@ -7,7 +7,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_RESOURCE_VALUE 169
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
--- a/src/Draw.cpp
+++ b/src/Draw.cpp
@@ -13,7 +13,6 @@
#include "CommonDefines.h"
#include "Font.h"
-#include "Resource.h"
#include "Tags.h"
#include "Backends/Rendering.h"
@@ -379,13 +378,32 @@
static BOOL LoadBitmap_Resource(const char *res, SurfaceID surf_no, BOOL create_surface)
{
- size_t size;
- const unsigned char *data = FindResource(res, "BITMAP", &size);
+ HRSRC hrscr = FindResourceA(NULL, res, RT_BITMAP);
- if (data)
- if (LoadBitmap(data, size, surf_no, create_surface, res, SURFACE_SOURCE_RESOURCE))
- return TRUE;
+ if (hrscr == NULL)
+ return FALSE;
+ size_t size = SizeofResource(NULL, hrscr);
+ const unsigned char *data = (unsigned char*)LockResource(LoadResource(NULL, hrscr));
+
+ // The bitmap we get from LockResource is incomplete, so we need to restore its missing header here
+ unsigned char *bmp_buffer = (unsigned char*)malloc(size + 0xE);
+
+ if (bmp_buffer == NULL)
+ return FALSE;
+
+ const unsigned char bmp_header[0xE] = {0x42, 0x4D, 0x76, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00};
+
+ memcpy(bmp_buffer, bmp_header, 0xE);
+ memcpy(bmp_buffer + 0xE, data, size);
+
+ if (LoadBitmap(bmp_buffer, size + 0xE, surf_no, create_surface, res, SURFACE_SOURCE_RESOURCE))
+ {
+ free(bmp_buffer);
+ return TRUE;
+ }
+
+ free(bmp_buffer);
printf("Failed to open resource %s\n", res);
return FALSE;
}
@@ -644,11 +662,11 @@
#endif
#endif
// Fall back on the built-in font
- (void)font_name;
+/* (void)font_name;
const unsigned char *res_data = FindResource("DEFAULT_FONT", "FONT", &data_size);
if (res_data != NULL)
- gFont = LoadFontFromData(res_data, data_size, fontWidth, fontHeight);
+ gFont = LoadFontFromData(res_data, data_size, fontWidth, fontHeight);*/
}
void PutText(int x, int y, const char *text, unsigned long color)
--- a/src/Main.cpp
+++ b/src/Main.cpp
@@ -18,7 +18,6 @@
#include "MyChar.h"
#include "Organya.h"
#include "Profile.h"
-#include "Resource.h"
#include "Sound.h"
#include "Triangle.h"
@@ -106,8 +105,8 @@
#ifdef WINDOWS
// Set the window icons. See res/ICON/ICON.rc.
- SDL_SetHint(SDL_HINT_WINDOWS_INTRESOURCE_ICON, "101");
- SDL_SetHint(SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL, "102");
+// SDL_SetHint(SDL_HINT_WINDOWS_INTRESOURCE_ICON, "101");
+// SDL_SetHint(SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL, "102");
#endif
// Initialize SDL
@@ -212,7 +211,7 @@
RECT unused_rect = {0, 0, WINDOW_WIDTH, WINDOW_HEIGHT};
- // Load cursor
+/* // Load cursor
size_t size;
const unsigned char *data = FindResource("CURSOR_NORMAL", "CURSOR", &size);
@@ -236,7 +235,7 @@
{
printf("Failed to load cursor\n");
}
-
+*/
// Get window dimensions and colour depth
int windowWidth;
int windowHeight;
@@ -315,7 +314,7 @@
bFps = TRUE;
#ifndef WINDOWS
- // Load icon
+/* // Load icon
size_t size;
const unsigned char *data = FindResource("ICON_MINI", "ICON", &size);
@@ -334,7 +333,7 @@
else
{
printf("Failed to load icon\n");
- }
+ }*/
#endif
// Set rects
--- a/src/Organya.cpp
+++ b/src/Organya.cpp
@@ -14,7 +14,6 @@
#include "WindowsWrapper.h"
-#include "Resource.h"
#include "Sound.h"
#define PANDUMMY 0xFF
@@ -267,11 +266,13 @@
BOOL InitWaveData100()
{
- const unsigned char *data = FindResource("WAVE100", "WAVE", NULL);
+ HRSRC hrscr = FindResourceA(NULL, "WAVE100", "WAVE");
- if (data == NULL)
+ if (hrscr == NULL)
return FALSE;
+ const unsigned char *data = (unsigned char*)LockResource(LoadResource(NULL, hrscr));
+
memcpy(wave_data, data, 100 * 0x100);
return TRUE;
@@ -432,7 +433,12 @@
memset(now_leng, 0, sizeof(now_leng));
// Open file
- const unsigned char *p = FindResource(name, "ORG", NULL);
+ HRSRC hrscr = FindResourceA(NULL, name, "ORG");
+
+ if (hrscr == NULL)
+ return;
+
+ const unsigned char *p = (unsigned char*)LockResource(LoadResource(NULL, hrscr));
// Version Check
unsigned char ver = 0;
--- a/src/Resource.cpp
+++ /dev/null
@@ -1,194 +1,0 @@
-#include "Resource.h"
-
-#include <stddef.h>
-#include <string.h>
-
-#include "Resource/ORG/Access.org.h"
-#include "Resource/ORG/Anzen.org.h"
-#include "Resource/ORG/Balcony.org.h"
-#include "Resource/ORG/Ballos.org.h"
-#include "Resource/ORG/BreakDown.org.h"
-#include "Resource/ORG/Cemetery.org.h"
-#include "Resource/ORG/Curly.org.h"
-#include "Resource/ORG/Dr.org.h"
-#include "Resource/ORG/Ending.org.h"
-#include "Resource/ORG/Escape.org.h"
-#include "Resource/ORG/Fanfale1.org.h"
-#include "Resource/ORG/Fanfale2.org.h"
-#include "Resource/ORG/Fanfale3.org.h"
-#include "Resource/ORG/FireEye.org.h"
-#include "Resource/ORG/Gameover.org.h"
-#include "Resource/ORG/Ginsuke.org.h"
-#include "Resource/ORG/Grand.org.h"
-#include "Resource/ORG/Gravity.org.h"
-#include "Resource/ORG/Hell.org.h"
-#include "Resource/ORG/ironH.org.h"
-#include "Resource/ORG/Jenka.org.h"
-#include "Resource/ORG/Jenka2.org.h"
-#include "Resource/ORG/Kodou.org.h"
-#include "Resource/ORG/LastBtl3.org.h"
-#include "Resource/ORG/LastBtl.org.h"
-#include "Resource/ORG/LastCave.org.h"
-#include "Resource/ORG/Marine.org.h"
-#include "Resource/ORG/Maze.org.h"
-#include "Resource/ORG/MDown2.org.h"
-#include "Resource/ORG/Mura.org.h"
-#include "Resource/ORG/Oside.org.h"
-#include "Resource/ORG/Plant.org.h"
-#include "Resource/ORG/quiet.org.h"
-#include "Resource/ORG/Requiem.org.h"
-#include "Resource/ORG/Toroko.org.h"
-#include "Resource/ORG/Vivi.org.h"
-#include "Resource/ORG/Wanpak2.org.h"
-#include "Resource/ORG/Wanpaku.org.h"
-#include "Resource/ORG/Weed.org.h"
-#include "Resource/ORG/White.org.h"
-#include "Resource/ORG/XXXX.org.h"
-#include "Resource/ORG/Zonbie.org.h"
-#include "Resource/WAVE/Wave.dat.h"
-#include "Resource/BITMAP/Credit01.bmp.h"
-#include "Resource/BITMAP/Credit02.bmp.h"
-#include "Resource/BITMAP/Credit03.bmp.h"
-#include "Resource/BITMAP/Credit04.bmp.h"
-#include "Resource/BITMAP/Credit05.bmp.h"
-#include "Resource/BITMAP/Credit06.bmp.h"
-#include "Resource/BITMAP/Credit07.bmp.h"
-#include "Resource/BITMAP/Credit08.bmp.h"
-#include "Resource/BITMAP/Credit09.bmp.h"
-#include "Resource/BITMAP/Credit10.bmp.h"
-#include "Resource/BITMAP/Credit11.bmp.h"
-#include "Resource/BITMAP/Credit12.bmp.h"
-#include "Resource/BITMAP/Credit14.bmp.h"
-#include "Resource/BITMAP/Credit15.bmp.h"
-#include "Resource/BITMAP/Credit16.bmp.h"
-#include "Resource/BITMAP/Credit17.bmp.h"
-#include "Resource/BITMAP/Credit18.bmp.h"
-#ifdef JAPANESE
-#include "Resource/BITMAP/pixel_jp.bmp.h"
-#else
-#include "Resource/BITMAP/pixel.bmp.h"
-#endif
-#ifndef WINDOWS
-#include "Resource/ICON/ICON_MINI.bmp.h"
-#endif
-#include "Resource/CURSOR/CURSOR_IKA.bmp.h"
-#include "Resource/CURSOR/CURSOR_NORMAL.bmp.h"
-
-#ifdef JAPANESE
-#include "Resource/FONT/msgothic.ttc.h"
-#else
-#ifndef WINDOWS
-#include "Resource/FONT/cour.ttf.h"
-#endif
-#endif
-
-static const struct
-{
- const char *type;
- const char *name;
- const unsigned char *data;
- size_t size;
-} resources[] = {
- {"ORG", "ACCESS", rAccess, sizeof(rAccess)},
- {"ORG", "ANZEN", rAnzen, sizeof(rAnzen)},
- {"ORG", "BALCONY", rBalcony, sizeof(rBalcony)},
- {"ORG", "BALLOS", rBallos, sizeof(rBallos)},
- {"ORG", "BDOWN", rBreakDown, sizeof(rBreakDown)},
- {"ORG", "CEMETERY", rCemetery, sizeof(rCemetery)},
-#ifdef NONPORTABLE
- {"ORG", "Curly", rCurly, sizeof(rCurly)},
-#else
- {"ORG", "CURLY", rCurly, sizeof(rCurly)},
-#endif
- {"ORG", "DR", rDr, sizeof(rDr)},
- {"ORG", "ENDING", rEnding, sizeof(rEnding)},
- {"ORG", "ESCAPE", rEscape, sizeof(rEscape)},
- {"ORG", "FANFALE1", rFanfale1, sizeof(rFanfale1)},
- {"ORG", "FANFALE2", rFanfale2, sizeof(rFanfale2)},
- {"ORG", "FANFALE3", rFanfale3, sizeof(rFanfale3)},
- {"ORG", "FIREEYE", rFireEye, sizeof(rFireEye)},
- {"ORG", "GAMEOVER", rGameover, sizeof(rGameover)},
- {"ORG", "GINSUKE", rGinsuke, sizeof(rGinsuke)},
- {"ORG", "GRAND", rGrand, sizeof(rGrand)},
- {"ORG", "GRAVITY", rGravity, sizeof(rGravity)},
- {"ORG", "HELL", rHell, sizeof(rHell)},
- {"ORG", "IRONH", rironH, sizeof(rironH)},
- {"ORG", "JENKA", rJenka, sizeof(rJenka)},
- {"ORG", "JENKA2", rJenka2, sizeof(rJenka2)},
- {"ORG", "KODOU", rKodou, sizeof(rKodou)},
- {"ORG", "LASTBT3", rLastBtl3, sizeof(rLastBtl3)},
- {"ORG", "LASTBTL", rLastBtl, sizeof(rLastBtl)},
- {"ORG", "LASTCAVE", rLastCave, sizeof(rLastCave)},
- {"ORG", "MARINE", rMarine, sizeof(rMarine)},
- {"ORG", "MAZE", rMaze, sizeof(rMaze)},
- {"ORG", "MDOWN2", rMDown2, sizeof(rMDown2)},
- {"ORG", "MURA", rMura, sizeof(rMura)},
- {"ORG", "OSIDE", rOside, sizeof(rOside)},
- {"ORG", "PLANT", rPlant, sizeof(rPlant)},
- {"ORG", "QUIET", rquiet, sizeof(rquiet)},
- {"ORG", "REQUIEM", rRequiem, sizeof(rRequiem)},
- {"ORG", "TOROKO", rToroko, sizeof(rToroko)},
- {"ORG", "VIVI", rVivi, sizeof(rVivi)},
- {"ORG", "WANPAK2", rWanpak2, sizeof(rWanpak2)},
- {"ORG", "WANPAKU", rWanpaku, sizeof(rWanpaku)},
- {"ORG", "WEED", rWeed, sizeof(rWeed)},
- {"ORG", "WHITE", rWhite, sizeof(rWhite)},
- {"ORG", "XXXX", rXXXX, sizeof(rXXXX)},
- {"ORG", "ZONBIE", rZonbie, sizeof(rZonbie)},
-
- {"WAVE", "WAVE100", rWave, sizeof(rWave)},
-
- {"BITMAP", "CREDIT01", rCredit01, sizeof(rCredit01)},
- {"BITMAP", "CREDIT02", rCredit02, sizeof(rCredit02)},
- {"BITMAP", "CREDIT03", rCredit03, sizeof(rCredit03)},
- {"BITMAP", "CREDIT04", rCredit04, sizeof(rCredit04)},
- {"BITMAP", "CREDIT05", rCredit05, sizeof(rCredit05)},
- {"BITMAP", "CREDIT06", rCredit06, sizeof(rCredit06)},
- {"BITMAP", "CREDIT07", rCredit07, sizeof(rCredit07)},
- {"BITMAP", "CREDIT08", rCredit08, sizeof(rCredit08)},
- {"BITMAP", "CREDIT09", rCredit09, sizeof(rCredit09)},
- {"BITMAP", "CREDIT10", rCredit10, sizeof(rCredit10)},
- {"BITMAP", "CREDIT11", rCredit11, sizeof(rCredit11)},
- {"BITMAP", "CREDIT12", rCredit12, sizeof(rCredit12)},
- {"BITMAP", "CREDIT14", rCredit14, sizeof(rCredit14)},
- {"BITMAP", "CREDIT15", rCredit15, sizeof(rCredit15)},
- {"BITMAP", "CREDIT16", rCredit16, sizeof(rCredit16)},
- {"BITMAP", "CREDIT17", rCredit17, sizeof(rCredit17)},
- {"BITMAP", "CREDIT18", rCredit18, sizeof(rCredit18)},
-#ifdef JAPANESE
- {"BITMAP", "PIXEL", rpixel_jp, sizeof(rpixel_jp)},
-#else
- {"BITMAP", "PIXEL", rpixel, sizeof(rpixel)},
-#endif
-
-#ifndef WINDOWS
- {"ICON", "ICON_MINI", rICON_MINI, sizeof(rICON_MINI)},
-#endif
-
- {"CURSOR", "CURSOR_NORMAL", rCURSOR_NORMAL, sizeof(rCURSOR_NORMAL)},
- {"CURSOR", "CURSOR_IKA", rCURSOR_IKA, sizeof(rCURSOR_IKA)},
-
-#ifdef JAPANESE
- {"FONT", "DEFAULT_FONT", rmsgothic, sizeof(rmsgothic)},
-#else
-#ifndef WINDOWS
- {"FONT", "DEFAULT_FONT", rcour, sizeof(rcour)},
-#endif
-#endif
-};
-
-const unsigned char* FindResource(const char *name, const char *type, size_t *size)
-{
- for (unsigned int i = 0; i < sizeof(resources) / sizeof(resources[0]); ++i)
- {
- if (!strcmp(name, resources[i].name) && !strcmp(type, resources[i].type))
- {
- if (size)
- *size = resources[i].size;
-
- return resources[i].data;
- }
- }
-
- return NULL;
-}
--- a/src/Resource.h
+++ /dev/null
@@ -1,5 +1,0 @@
-#pragma once
-
-#include <stddef.h>
-
-const unsigned char* FindResource(const char *name, const char *type, size_t *size);