Skip to content

Commit 300e90b

Browse files
committed
- '-bg2tim' supports MCBACK.TIM (16 bit image)
1 parent c586356 commit 300e90b

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

DriverImageTool/image_tool.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,17 @@ void ConvertBackgroundRaw(const char* filename, const char* extraFilename)
209209

210210
// convert background image and store
211211
{
212-
ubyte timData[64*6 * 512];
212+
String str = String::fromCString(filename).toLowerCase();
213213

214+
// MCBACK.RAW case
215+
if (str.find("mcback"))
216+
{
217+
SaveTIM_16bit(varargs("%s.TIM", filename),
218+
bgData, 512 * 256 * 2, 0, 0, 512, 256);// , bgData, 1);
219+
return;
220+
}
221+
222+
ubyte timData[64 * 6 * 512];
214223
int rect_w = 64;
215224
int rect_h = 256;
216225

@@ -234,7 +243,6 @@ void ConvertBackgroundRaw(const char* filename, const char* extraFilename)
234243
SaveTIM_4bit(varargs("%s.TIM", filename),
235244
timData, 64 * 6 * 512, 0, 0, 384*2, 512, imageClut, 1);
236245

237-
// String str = String::fromCString(filename).toLowerCase();
238246

239247
// check if it's GFX.RAW
240248
// if(str.find("gfx"))

0 commit comments

Comments
 (0)