}
}
+static unsigned GetEdgeIndex (const Collection* A)
+/* Return the sprite mode from the attribute collection A */
+{
+ /* Get index for edge color in shaped mode */
+ const char* EdgeIndex = GetAttrVal (A, "edge");
+ if (EdgeIndex) {
+ return atoi(EdgeIndex);
+ } else {
+ return 0;
+ }
+}
+
static char OutBuffer[512]; /* The maximum size is 508 pixels */
static unsigned char OutIndex;
byte <<= bit_counter;
OutBuffer[OutIndex++] = byte;
if (!OutIndex) {
- Error ("ASprite is too large for the Lynx");
+ Error ("Sprite is too large for the Lynx");
}
if (byte & 0x1) {
OutBuffer[OutIndex++] = byte;
if (!OutIndex) {
- Error ("BSprite is too large for the Lynx");
+ Error ("Sprite is too large for the Lynx");
}
}
}
byte <<= bit_counter;
OutBuffer[OutIndex++] = byte;
if (!OutIndex) {
- Error ("ASprite is too large for the Lynx");
+ Error ("Sprite is too large for the Lynx");
}
}
return;
unsigned OX, OY;
char ColorBits;
char ColorMask;
+ char EdgeIndex;
+
+ /* Get EdgeIndex */
+ EdgeIndex = GetEdgeIndex (A);
/* Action point of the sprite */
OX = GetActionPointX (A);
/* Fetch next bit into byte buffer */
LineBuffer[i] = GetPixel (B, X, Y).Index & ColorMask;
- if (LineBuffer[i]) {
+ if (LineBuffer[i] != EdgeIndex) {
LastOpaquePixel = i;
}
++i;
/* Fetch next bit into byte buffer */
LineBuffer[i] = GetPixel (B, X, Y).Index & ColorMask;
- if (LineBuffer[i]) {
+ if (LineBuffer[i] != EdgeIndex) {
LastOpaquePixel = i;
}
++i;
/* Fetch next bit into byte buffer */
LineBuffer[i] = GetPixel (B, X, Y).Index & ColorMask;
- if (LineBuffer[i]) {
+ if (LineBuffer[i] != EdgeIndex) {
LastOpaquePixel = i;
}
++i;
/* Fetch next bit into byte buffer */
LineBuffer[i] = GetPixel (B, X, Y).Index & ColorMask;
- if (LineBuffer[i]) {
+ if (LineBuffer[i] != EdgeIndex) {
LastOpaquePixel = i;
}
++i;