1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-15 23:50:44 +00:00
freebsd-ports/games/xjig/files/patch-ae
Vanilla I. Shu 2029f470e8 Add some patches for 24bpp
PR:		ports/6245
Submitted by:	Jonathan Hanna <jh@pc-21490.bc.rogers.wave.ca>
1998-04-11 18:34:45 +00:00

61 lines
1.2 KiB
Plaintext

--- objects.C.orig Wed Jul 24 15:06:28 1996
+++ objects.C Tue Apr 7 15:34:33 1998
@@ -533,28 +533,30 @@
}
#define DATA_TYPE CARD32
-#define DATA_PAD 4
void PixmapPiece::CreateTilemap32() {
# include "rotate.H"
}
#undef DATA_TYPE
-#undef DATA_PAD
+
+#define CARD24 long
+
+#define DATA_TYPE CARD24
+void PixmapPiece::CreateTilemap24() {
+# include "rotate.H"
+}
+#undef DATA_TYPE
#define DATA_TYPE CARD16
-#define DATA_PAD 2
void PixmapPiece::CreateTilemap16() {
# include "rotate.H"
}
#undef DATA_TYPE
-#undef DATA_PAD
#define DATA_TYPE CARD8
-#define DATA_PAD 1
void PixmapPiece::CreateTilemap8() {
# include "rotate.H"
}
#undef DATA_TYPE
-#undef DATA_PAD
void PixmapPiece::DirectionChanged() {
@@ -573,10 +575,16 @@
XPix(wcenter.X())-offx, YPix(wcenter.Y())-offy, width, height, 0, 0 );
}
else {
- switch(texture_mode) {
- case 1: CreateTilemap8(); break;
- case 2: CreateTilemap16(); break;
- case 3: CreateTilemap32(); break;
+ extern int pixmap_depth;
+
+ switch(pixmap_depth) {
+ case 8: CreateTilemap8(); break;
+ case 16: CreateTilemap16(); break;
+ case 32: CreateTilemap32(); break;
+ case 24: CreateTilemap24(); break;
+ default:
+ fprintf(stderr,"unhandled depth = %d\n",pixmap_depth);
+ exit(1);
}
}
}