ref: 6f1f7a5eb2dd386bd17227c348e5d39b4ad71107
parent: 29015ee744fe3278003d585bb0332706099de98e
author: Fabien Sanglard <[email protected]>
date: Mon Dec 17 14:24:51 EST 2012
Renamed variables in a.c.
--- a/Engine/src/a.c
+++ b/Engine/src/a.c
@@ -31,12 +31,10 @@
//FCS: Draw ceiling/floors
-void hlineasm4(int32_t numPixels, int32_t shade, uint32_t i4, uint32_t i5, int32_t destination)
-{
+//Draw a line from destination in the framebuffer to framebuffer-numPixels
+void hlineasm4(int32_t numPixels, int32_t shade, uint32_t i4, uint32_t i5, int32_t destination){
uint8_t *dest = (uint8_t *) destination;
-
-
int32_t shifter = ((256-machxbits_al) & 0x1f);
uint32_t source;
uint8_t bits = machxbits_bl;
@@ -83,11 +81,12 @@
}
-void rhlineasm4(int32_t i1, int32_t i2, int32_t i3, uint32_t i4, uint32_t i5, int32_t numPixels)
+void rhlineasm4(int32_t i1, int32_t i2, int32_t i3, uint32_t i4, uint32_t i5, int32_t dest)
{
- uint32_t ebp = numPixels - i1;
+ uint32_t ebp = dest - i1;
uint32_t rmach6b = ebp-1;
-
+ int32_t numPixels;
+
if (i1 <= 0) return;
numPixels = i1;
@@ -110,7 +109,7 @@
i2 -= ebp;
numPixels--;
} while (numPixels);
-} /* rhlineasm4 */
+}
static int32_t rmmach_eax;
static int32_t rmmach_ebx;
@@ -128,36 +127,42 @@
//FCS: ????
-void rmhlineasm4(int32_t i1, int32_t i2, int32_t i3, int32_t i4, int32_t i5, int32_t numPixels)
+void rmhlineasm4(int32_t i1, int32_t shade, int32_t colorIndex, int32_t i4, int32_t i5, int32_t dest)
{
- uint32_t ebp = numPixels - i1;
+ uint32_t ebp = dest - i1;
uint32_t rmach6b = ebp-1;
+ int32_t numPixels;
+
+ if (i1 <= 0)
+ return;
- if (i1 <= 0) return;
-
numPixels = i1;
do {
- i3 = ((i3&0xffffff00)|(*((uint8_t *)i2)));
+ colorIndex = ((colorIndex&0xffffff00)|(*((uint8_t *)shade)));
i4 -= rmmach_eax;
ebp = (((i4+rmmach_eax) < i4) ? -1 : 0);
i5 -= rmmach_ebx;
- if ((i5 + rmmach_ebx) < i5) i2 -= (rmmach_ecx+1);
- else i2 -= rmmach_ecx;
+
+ if ((i5 + rmmach_ebx) < i5)
+ shade -= (rmmach_ecx+1);
+ else
+ shade -= rmmach_ecx;
+
ebp &= rmmach_esi;
//Check if this colorIndex is the transparent color (255).
- if ((i3&0xff) != 255) {
+ if ((colorIndex&0xff) != 255) {
if (pixelsAllowed-- > 0)
{
- i1 = ((i1&0xffffff00)|(((uint8_t *)i3)[rmmach_edx]));
+ i1 = ((i1&0xffffff00)|(((uint8_t *)colorIndex)[rmmach_edx]));
((uint8_t *)rmach6b)[numPixels] = (i1&0xff);
}
}
- i2 -= ebp;
+ shade -= ebp;
numPixels--;
} while (numPixels);