- uint8 index = (p1 >> 37) & 0xFE; // CLUT index offset (upper pix, 1-4 bpp)
- uint32 pitch = (p1 >> 15) & 0x07; // Phrase pitch
-
- uint8 * tomRam8 = TOMGetRamPointer();
- uint8 * paletteRAM = &tomRam8[0x400];
- // This is OK as long as it's used correctly: For 16-bit RAM to RAM direct copies--NOT
- // for use when using endian-corrected data (i.e., any of the *ReadWord functions!)
- uint16 * paletteRAM16 = (uint16 *)paletteRAM;
-
- uint16 hscale = p2 & 0xFF;
-// Hmm. It seems that fixing the horizontal scale necessitated re-fixing this. Not sure why,
-// but seems to be consistent with the vertical scaling now (and it may turn out to be wrong!)...
- uint16 horizontalRemainder = hscale; // Not sure if it starts full, but seems reasonable [It's not!]
-// uint8 horizontalRemainder = 0; // Let's try zero! Seems to work! Yay! [No, it doesn't!]
- int32 scaledWidthInPixels = (iwidth * phraseWidthToPixels[depth] * hscale) >> 5;
- uint32 scaledPhrasePixels = (phraseWidthToPixels[depth] * hscale) >> 5;
+ uint8_t index = (p1 >> 37) & 0xFE; // CLUT index offset (upper pix, 1-4 bpp)
+ uint32_t pitch = (p1 >> 15) & 0x07; // Phrase pitch
+
+ uint8_t * tomRam8 = TOMGetRamPointer();
+ uint8_t * paletteRAM = &tomRam8[0x400];
+ // This is OK as long as it's used correctly: For 16-bit RAM to RAM direct
+ // copies--NOT for use when using endian-corrected data (i.e., any of the
+ // *ReadWord functions!)
+ uint16_t * paletteRAM16 = (uint16_t *)paletteRAM;
+
+ uint16_t hscale = p2 & 0xFF;
+// Hmm. It seems that fixing the horizontal scale necessitated re-fixing this.
+// Not sure why, but seems to be consistent with the vertical scaling now (and
+// it may turn out to be wrong!)...
+ uint16_t horizontalRemainder = hscale; // Not sure if it starts full, but seems reasonable [It's not!]
+// uint8_t horizontalRemainder = 0; // Let's try zero! Seems to work! Yay! [No, it doesn't!]
+ int32_t scaledWidthInPixels = (iwidth * phraseWidthToPixels[depth] * hscale) >> 5;
+ uint32_t scaledPhrasePixels = (phraseWidthToPixels[depth] * hscale) >> 5;