[Scummvm-git-logs] scummvm master -> e07a2113fff17df5e933c80eec586eb2fef34707

dreammaster noreply at scummvm.org
Thu Jun 5 00:50:57 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
e07a2113ff ULTIMA1: Embed the logo and flags bitmaps in the executable


Commit: e07a2113fff17df5e933c80eec586eb2fef34707
    https://github.com/scummvm/scummvm/commit/e07a2113fff17df5e933c80eec586eb2fef34707
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2025-06-04T17:50:54-07:00

Commit Message:
ULTIMA1: Embed the logo and flags bitmaps in the executable

Changed paths:
  A engines/ultima/ultima1/u1gfx/flags.xbm
  A engines/ultima/ultima1/u1gfx/logo.xbm
  R devtools/create_ultima/files/ultima1/flags.bmp
  R devtools/create_ultima/files/ultima1/logo.bmp
  R devtools/create_ultima/files/ultima1/version.txt
  R devtools/create_ultima/ultima1_resources.cpp
  R devtools/create_ultima/ultima1_resources.h
    devtools/create_ultima/create_ultima.cpp
    devtools/create_ultima/file.cpp
    devtools/create_ultima/file.h
    devtools/create_ultima/module.mk
    engines/ultima/shared/early/ultima_early.cpp
    engines/ultima/shared/early/ultima_early.h
    engines/ultima/ultima1/u1gfx/view_title.cpp


diff --git a/devtools/create_ultima/create_ultima.cpp b/devtools/create_ultima/create_ultima.cpp
index 96f72f5df6c..69197b4ae0c 100644
--- a/devtools/create_ultima/create_ultima.cpp
+++ b/devtools/create_ultima/create_ultima.cpp
@@ -25,7 +25,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "ultima1_resources.h"
 #include "ultima4_resources.h"
 
 #define VERSION_NUMBER 1
@@ -36,7 +35,6 @@ void error(const char *s) {
 }
 
 int main(int argc, char *argv[]) {
-	extractUltima1Resources();
 	extractUltima4Resources();
 
 	return 0;
diff --git a/devtools/create_ultima/file.cpp b/devtools/create_ultima/file.cpp
index fa0e8b46536..2da94d12061 100644
--- a/devtools/create_ultima/file.cpp
+++ b/devtools/create_ultima/file.cpp
@@ -32,53 +32,3 @@ uint32 File::computeMD5() {
 	seek(0);
 	return total;
 }
-
-
-void Surface::setPaletteEntry(byte index, byte r, byte g, byte b) {
-	byte *pal = _palette + index * 3;
-	pal[0] = r;
-	pal[1] = g;
-	pal[2] = b;
-}
-
-void Surface::saveToFile(const char *filename) {
-	WriteFile f(filename);
-	f.writeByte('B');
-	f.writeByte('M');
-	f.writeLong(0x436 + _w * _h + 2);	// File size
-	f.writeWord(0);			// Custom 1
-	f.writeWord(0);			// Custom 2
-	f.writeLong(0x436);		// Pixels offset
-
-	int pitch = _w;
-	if (pitch % 4)
-		pitch += 4 - (pitch % 4);
-
-	f.writeLong(40);		// Info size
-	f.writeLong(_w);		// Width
-	f.writeLong(_h);		// Height
-	f.writeWord(1);			// # Planes
-	f.writeWord(8);			// Bits per pixel
-	f.writeLong(0);			// Compression
-	f.writeLong(pitch * _h);	// Image size
-	f.writeLong(3790);		// Pixels per meter X
-	f.writeLong(3800);		// Pixels per meter Y
-	f.writeLong(0);			// color count
-	f.writeLong(0);			// important colors
-
-	// Palette
-	byte *pal = _palette;
-	for (int idx = 0; idx < 256; ++idx, pal += 3) {
-		f.write(pal, 3);
-		f.writeByte(0);
-	}
-
-	// Write out each line from the bottom up
-	for (int y = _h - 1; y >= 0; --y) {
-		byte *lineP = getBasePtr(0, y);
-		f.write(lineP, _w);
-
-		if (_w % 4)
-			f.writeRepeating(0, 4 - (_w % 4));
-	}
-}
diff --git a/devtools/create_ultima/file.h b/devtools/create_ultima/file.h
index 13fbbbeed63..248339a0b4b 100644
--- a/devtools/create_ultima/file.h
+++ b/devtools/create_ultima/file.h
@@ -126,47 +126,4 @@ public:
 	}
 };
 
-/**
- * Simple surface structure
- */
-struct Surface {
-	int _w;
-	int _h;
-	byte *_pixels;
-	byte _palette[768];
-
-	Surface(int w, int h) : _w(w), _h(h) {
-		_pixels = new byte[w * h];
-		memset(_pixels, 0xff, w * h);
-
-		// Set a default palette
-		for (int idx = 0; idx < 256; ++idx) {
-			memset(_palette + idx * 3, idx, 3);
-		}
-
-	}
-
-	~Surface() {
-		delete[] _pixels;
-	}
-
-	Surface &operator=(const Surface &src) {
-		assert(src._w == _w && src._h == _h);
-		memcpy(_pixels, src._pixels, _w * _h);
-		return *this;
-	}
-
-	byte *getBasePtr(int x, int y) {
-		assert(y < _h);
-		return _pixels + (y * _w) + x;
-	}
-
-	void setPaletteEntry(byte index, byte r, byte g, byte b);
-
-	/**
-	 * Save to a BMP file
-	 */
-	void saveToFile(const char *filename);
-};
-
 #endif
diff --git a/devtools/create_ultima/files/ultima1/flags.bmp b/devtools/create_ultima/files/ultima1/flags.bmp
deleted file mode 100644
index 61f6408aa5d..00000000000
Binary files a/devtools/create_ultima/files/ultima1/flags.bmp and /dev/null differ
diff --git a/devtools/create_ultima/files/ultima1/logo.bmp b/devtools/create_ultima/files/ultima1/logo.bmp
deleted file mode 100644
index 0000e4f06ea..00000000000
Binary files a/devtools/create_ultima/files/ultima1/logo.bmp and /dev/null differ
diff --git a/devtools/create_ultima/files/ultima1/version.txt b/devtools/create_ultima/files/ultima1/version.txt
deleted file mode 100644
index d3827e75a5c..00000000000
--- a/devtools/create_ultima/files/ultima1/version.txt
+++ /dev/null
@@ -1 +0,0 @@
-1.0
diff --git a/devtools/create_ultima/module.mk b/devtools/create_ultima/module.mk
index 6137d6d565a..4ef4ecf2dd2 100644
--- a/devtools/create_ultima/module.mk
+++ b/devtools/create_ultima/module.mk
@@ -3,7 +3,6 @@ MODULE := devtools/create_ultima
 MODULE_OBJS := \
 	create_ultima.o \
 	file.o \
-	ultima1_resources.o \
 	ultima4_resources.o
 
 # Set the name of the executable
diff --git a/devtools/create_ultima/ultima1_resources.cpp b/devtools/create_ultima/ultima1_resources.cpp
deleted file mode 100644
index 7db475c1139..00000000000
--- a/devtools/create_ultima/ultima1_resources.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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/>.
- *
- */
-
-#include "create_ultima.h"
-#include "file.h"
-
-#define FILE_BUFFER_SIZE 1024
-
-typedef unsigned int uint32;
-
-#define DATA_SEGMENT_OFFSET 0x40D0
-#define LOGO_HEIGHT 64
-#define LOGO_WIDTH1 199
-#define LOGO_WIDTH2 76
-#define LOGO_TABLE1 0x3262
-#define LOGO_TABLE2 0x4320
-#define FLAG_WIDTH 8
-#define FLAG_HEIGHT 8
-#define NUM_FLAGS 3
-
-// Creates the logo.bmp file
-void createLogo(File &in) {
-	int offsets[LOGO_HEIGHT][2];
-	char buffer[LOGO_WIDTH1 + LOGO_WIDTH2 + 1];
-
-	// Load in the tables
-	in.seek(DATA_SEGMENT_OFFSET + LOGO_TABLE1);
-	for (int y = 0; y < LOGO_HEIGHT; ++y)
-		offsets[y][0] = in.readWord();
-	in.seek(DATA_SEGMENT_OFFSET + LOGO_TABLE2);
-	for (int y = 0; y < LOGO_HEIGHT; ++y)
-		offsets[y][1] = in.readWord();
-
-	// Set up a surface
-	Surface out(LOGO_WIDTH1 + LOGO_WIDTH2, LOGO_HEIGHT);
-	out.setPaletteEntry(0, 0, 0, 0);
-	out.setPaletteEntry(1, 0xff, 0xff, 0xff);
-
-	// Convert the lines
-	for (int y = 0; y < LOGO_HEIGHT; ++y) {
-		in.seek(DATA_SEGMENT_OFFSET + offsets[y][0]);
-		in.read(buffer, LOGO_WIDTH1 + 1);
-		assert(buffer[LOGO_WIDTH1] == '\0');
-
-		in.seek(DATA_SEGMENT_OFFSET + offsets[y][1]);
-		in.read(buffer + LOGO_WIDTH1, LOGO_WIDTH2 + 1);
-		assert(buffer[LOGO_WIDTH1 + LOGO_WIDTH2] == '\0');
-
-		byte *line = out.getBasePtr(0, y);
-		for (int x = 0; x < (LOGO_WIDTH1 + LOGO_WIDTH2); ++x, ++line)
-			*line = buffer[x] == '*' ? 1 : 0;
-	}
-
-	out.saveToFile("logo.bmp");
-}
-
-// Creates the flags.bmp file
-void createFlags(File &in) {
-	Surface out(FLAG_WIDTH * NUM_FLAGS, FLAG_HEIGHT);
-	out.setPaletteEntry(10, 0, 0, 0);
-	out.setPaletteEntry(11, 0xff, 0xff, 0xff);
-
-	in.seek(DATA_SEGMENT_OFFSET + 0x124);
-
-	for (int flagNum = 0; flagNum < NUM_FLAGS; ++flagNum) {
-		for (int yp = 0; yp < FLAG_HEIGHT; ++yp) {
-			byte *line = out.getBasePtr(flagNum * FLAG_WIDTH, yp);
-			for (int xp = 0; xp < FLAG_WIDTH; ++xp)
-				*line++ = in.readByte() ? 10 : 11;
-		}
-	}
-
-	out.saveToFile("flags.bmp");
-}
-
-void extractUltima1Resources() {
-	// Open up ultima1.exe for logo
-	File u1("ultima.exe");
-	if (u1.computeMD5() != 64620)
-		error("Unknown version of Ultima 1 ultima.exe");
-
-	// Extract the Origin logo and flag animation data
-	createLogo(u1);
-	createFlags(u1);
-}
diff --git a/devtools/create_ultima/ultima1_resources.h b/devtools/create_ultima/ultima1_resources.h
deleted file mode 100644
index 89cf372ce39..00000000000
--- a/devtools/create_ultima/ultima1_resources.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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/>.
- *
- */
-
-#ifndef ULTIMA1_RESOURCES_H
-#define ULTIMA1_RESOURCES_H
-
-extern void extractUltima1Resources();
-
-#endif
diff --git a/engines/ultima/shared/early/ultima_early.cpp b/engines/ultima/shared/early/ultima_early.cpp
index 8513c664149..f75709911d7 100644
--- a/engines/ultima/shared/early/ultima_early.cpp
+++ b/engines/ultima/shared/early/ultima_early.cpp
@@ -151,12 +151,5 @@ bool UltimaEarlyEngine::canSaveGameStateCurrently(bool isAutosave) {
 	return _game->canSaveGameStateCurrently();
 }
 
-bool UltimaEarlyEngine::isDataRequired(Common::Path &folder, int &majorVersion, int &minorVersion) {
-	folder = "ultima1";
-	majorVersion = 1;
-	minorVersion = 0;
-	return true;
-}
-
 } // End of namespace Shared
 } // End of namespace Ultima
diff --git a/engines/ultima/shared/early/ultima_early.h b/engines/ultima/shared/early/ultima_early.h
index 13c29b5d433..02d48ec8126 100644
--- a/engines/ultima/shared/early/ultima_early.h
+++ b/engines/ultima/shared/early/ultima_early.h
@@ -78,11 +78,6 @@ private:
 	 */
 
 	void deinitialize() override;
-
-	/**
-	 * Returns the data archive folder and version that's required
-	 */
-	bool isDataRequired(Common::Path &folder, int &majorVersion, int &minorVersion) override;
 public:
 	GameBase *_game;
 	MouseCursor *_mouseCursor;
diff --git a/engines/ultima/ultima1/u1gfx/flags.xbm b/engines/ultima/ultima1/u1gfx/flags.xbm
new file mode 100644
index 00000000000..fede61e01cd
--- /dev/null
+++ b/engines/ultima/ultima1/u1gfx/flags.xbm
@@ -0,0 +1,5 @@
+#define flags_width 24
+#define flags_height 8
+static const unsigned char flags_bits[] = {
+ 0x00,0x00,0x18,0x00,0x00,0x0c,0x00,0x03,0x07,0x01,0x3f,0x01,0x07,0x03,0x00,
+ 0x0c,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00};
diff --git a/engines/ultima/ultima1/u1gfx/logo.xbm b/engines/ultima/ultima1/u1gfx/logo.xbm
new file mode 100644
index 00000000000..b69ec13a2aa
--- /dev/null
+++ b/engines/ultima/ultima1/u1gfx/logo.xbm
@@ -0,0 +1,153 @@
+#define logo_width 275
+#define logo_height 64
+static const unsigned char logo_bits[] = {
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0x07,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xff,0xff,0xff,0x3f,0xff,
+ 0xf3,0x3f,0xff,0xf3,0x3f,0xff,0xf3,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x06,
+ 0xff,0xff,0xff,0x9f,0xff,0xf9,0x9f,0xff,0xf1,0x9f,0xff,0xf9,0x9f,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0x7f,0x06,0xff,0xff,0xff,0x9f,0xff,0xf9,0x9f,0xff,0xe0,0x9f,
+ 0xff,0xf9,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x07,0xff,0xff,0x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03,0x00,0x00,0xff,0xe1,0xff,0xff,0xf0,
+ 0x0f,0xff,0x0f,0x00,0x00,0xfc,0x87,0xff,0xe1,0xff,0x07,0xff,0xf3,0xff,0x07,
+ 0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x0f,0x00,0xf0,
+ 0xff,0xe1,0xff,0x7f,0xf8,0x0f,0xff,0x3f,0x00,0xc0,0xff,0xc3,0xff,0xf0,0xff,
+ 0x87,0xff,0xf9,0xff,0x07,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xff,0x07,0xff,0xff,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0x07,
+ 0xff,0xbf,0x03,0xf0,0x3f,0xff,0xf0,0x3f,0xff,0x03,0x60,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xfc,0xff,0x07,0xff,0x3f,0x0f,0xf0,0x3f,0xff,0xf0,0x3f,0xff,0x03,
+ 0x38,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfe,0xff,0x07,0xff,0x9f,0x1f,0xf8,0x9f,
+ 0x7f,0xf8,0x9f,0xff,0x01,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfe,0xff,0x07,
+ 0xff,0x9f,0x3f,0xf8,0x9f,0x7f,0xf8,0x9f,0xff,0xc1,0x9f,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0x3f,0xff,0xff,0x07,0xff,0xcf,0x7f,0xfc,0xcf,0x3f,0xfc,0xcf,0xff,0xf8,
+ 0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0x07,0xff,0xcf,0xff,0xfc,0xcf,
+ 0x3f,0xfc,0xcf,0xff,0xfc,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0xff,0xff,0x07,
+ 0xff,0xe7,0x7f,0xfe,0xe7,0x1f,0xfe,0xe7,0x7f,0xfe,0xe7,0x1f,0xe0,0xe1,0xe1,
+ 0x07,0xf8,0x00,0xe0,0x01,0x78,0xf8,0x87,0x0f,0xf0,0x3f,0x3c,0x1c,0x7e,0xe0,
+ 0xff,0x9f,0xff,0xff,0x07,0xff,0xe7,0x7f,0xfe,0xe7,0x1f,0xfe,0xe7,0x7f,0xfe,
+ 0xe7,0x03,0xe0,0xe1,0xe1,0x00,0xf8,0x00,0xe0,0x01,0x78,0xf8,0x87,0x01,0xf0,
+ 0x3f,0x3c,0x1c,0x1e,0xe0,0xff,0xcf,0xff,0xff,0x07,0xff,0x03,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf0,0xe1,0xff,0xf0,0x70,0xf8,0xff,0x0f,0xff,0xf0,
+ 0x3f,0xf0,0xc0,0xf0,0xff,0x1f,0x1e,0x0c,0x0f,0xff,0xff,0xcf,0xff,0xff,0x07,
+ 0xff,0xf3,0x3f,0xff,0x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xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x9f,0xff,0xff,0xff,0x07,0xe7,0x7f,0xfe,0xe7,0x07,0xc0,0xe7,0x7f,0xfe,0xe7,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0x9f,0xff,0xff,0xff,0x07,0xe7,0x7f,0xfe,0xe7,0x07,
+ 0xf0,0xe7,0x7f,0xfe,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0x07,
+ 0xf3,0x3f,0xff,0xf3,0x07,0xf8,0xf3,0x3f,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xcf,0xff,0xff,0xff,0x07,0xf3,0x3f,0xff,0xf3,0x0f,0xfe,0xf3,0x3f,0xff,0xf3,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0x07,0xf9,0x9f,0xff,0xf9,0x8f,
+ 0xff,0xf9,0x9f,0xff,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0x07,
+ 0xf9,0x9f,0xff,0xf9,0xcf,0xff,0xf9,0x9f,0xff,0xf9,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xf3,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x07,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0x07};
diff --git a/engines/ultima/ultima1/u1gfx/view_title.cpp b/engines/ultima/ultima1/u1gfx/view_title.cpp
index ad8b2b58891..9c05b2f1e5e 100644
--- a/engines/ultima/ultima1/u1gfx/view_title.cpp
+++ b/engines/ultima/ultima1/u1gfx/view_title.cpp
@@ -27,7 +27,11 @@
 #include "ultima/shared/gfx/text_cursor.h"
 #include "ultima/shared/early/font_resources.h"
 #include "ultima/shared/early/ultima_early.h"
-#include "image/bmp.h"
+#include "graphics/blit.h"
+#include "image/xbm.h"
+
+#include "ultima/ultima1/u1gfx/flags.xbm"
+#include "ultima/ultima1/u1gfx/logo.xbm"
 
 namespace Ultima {
 namespace Ultima1 {
@@ -50,39 +54,42 @@ void load16(Graphics::ManagedSurface &s, Common::ReadStream &in) {
 }
 
 ViewTitle::ViewTitle(Shared::TreeItem *parent) : Shared::Gfx::VisualItem("Title", Rect(0, 0, 320, 200), parent) {
+	// In XBM images, 0 is white and 1 is black.
+	// We need to remap this to the order required by the engine.
+	static const uint32  logo_map[] = {  1,  0 };
+	static const uint32 flags_map[] = { 11, 10 };
+
 	setMode(TITLEMODE_COPYRIGHT);
 
 	// Load the Origin logo
-	Shared::File f("data/logo.bmp");
-	Image::BitmapDecoder bmp;
-	if (!bmp.loadStream(f))
+	Image::XBMDecoder logo;
+	if (!logo.loadBits(logo_bits, logo_width, logo_height))
 		error("Couldn't load logo");
-	f.close();
 
-	const Graphics::Surface *src = bmp.getSurface();
+	const Graphics::Surface *src = logo.getSurface();
 	_logo.create(src->w, src->h);
-	_logo.blitFrom(*src);
+	Graphics::crossBlitMap((byte *)_logo.getPixels(), (const byte *)src->getPixels(),
+		_logo.pitch, src->pitch, _logo.w, _logo.h,
+		_logo.format.bytesPerPixel, logo_map);
 
 	// Load the Ultima castle bitmap
-	f.open("castle.16");
+	Shared::File f("castle.16");
 	_castle.create(320, 200);
 	load16(_castle, f);
 	f.close();
 
 	// Load the flags
-	f.open("data/flags.bmp");
-	Image::BitmapDecoder flags;
-	if (!flags.loadStream(f))
+	Image::XBMDecoder flags;
+	if (!flags.loadBits(flags_bits, flags_width, flags_height))
 		error("Could not load flags");
 
 	src = flags.getSurface();
 	for (int idx = 0; idx < 3; ++idx) {
 		_flags[idx].create(8, 8);
-		_flags[idx].blitFrom(*src,
-			Common::Rect(idx * 8, 0, (idx + 1) * 8, 8),
-			Common::Point(0, 0));
+		Graphics::crossBlitMap((byte *)_flags[idx].getPixels(), (const byte *)src->getBasePtr(idx * 8, 8),
+			_flags[idx].pitch, src->pitch, _flags[idx].w, _flags[idx].h,
+			_flags[idx].format.bytesPerPixel, flags_map);
 	}
-	f.close();
 }
 
 void ViewTitle::draw() {




More information about the Scummvm-git-logs mailing list