aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/celobj32.h
diff options
context:
space:
mode:
authorColin Snover2016-03-03 20:31:10 -0600
committerColin Snover2016-03-03 20:31:10 -0600
commit9a280d396532c9ac38cfd8589012dd47e659d002 (patch)
tree1f36c3f66ff10c84d06aa1c6e25fdfe2f6d90189 /engines/sci/graphics/celobj32.h
parentb6a7d8c6a5bc286c68fea091e43e6a51df456655 (diff)
downloadscummvm-rg350-9a280d396532c9ac38cfd8589012dd47e659d002.tar.gz
scummvm-rg350-9a280d396532c9ac38cfd8589012dd47e659d002.tar.bz2
scummvm-rg350-9a280d396532c9ac38cfd8589012dd47e659d002.zip
SCI32: Add all kBitmap signatures
Not all SCI2.1late/SCI3 function signatures are fully known yet, but all subops are now represented in the kernel tables.
Diffstat (limited to 'engines/sci/graphics/celobj32.h')
-rw-r--r--engines/sci/graphics/celobj32.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h
index 1422b76a57..5707333818 100644
--- a/engines/sci/graphics/celobj32.h
+++ b/engines/sci/graphics/celobj32.h
@@ -547,6 +547,34 @@ public:
*/
class CelObjMem : public CelObj {
public:
+ /**
+ * Writes a bitmap header to the given data buffer.
+ */
+ static void buildBitmapHeader(byte *bitmap, const int16 width, const int16 height, const uint8 skipColor, const int16 displaceX, const int16 displaceY, const int16 scaledWidth, const int16 scaledHeight, const uint32 hunkPaletteOffset, const bool useRemap);
+
+ /**
+ * Gets the size of the bitmap header for the current
+ * engine version.
+ */
+ inline static uint32 getBitmapHeaderSize() {
+ // TODO: These values are accurate for each engine, but there may be no reason
+ // to not simply just always use size 40, since SCI2.1mid does not seem to
+ // actually store any data above byte 40, and SCI2 did not allow bitmaps with
+ // scaling resolutions other than the default (320x200). Perhaps SCI3 used
+ // the extra bytes, or there is some reason why they tried to align the header
+ // size with other headers like pic headers?
+// uint32 bitmapHeaderSize;
+// if (getSciVersion() >= SCI_VERSION_2_1_MIDDLE) {
+// bitmapHeaderSize = 46;
+// } else if (getSciVersion() == SCI_VERSION_2_1_EARLY) {
+// bitmapHeaderSize = 40;
+// } else {
+// bitmapHeaderSize = 36;
+// }
+// return bitmapHeaderSize;
+ return 46;
+ }
+
CelObjMem(reg_t bitmap);
virtual ~CelObjMem() override {};