summaryrefslogtreecommitdiff
path: root/src/sw_block.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sw_block.h')
-rw-r--r--src/sw_block.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/sw_block.h b/src/sw_block.h
index 3544fb7..85ae441 100644
--- a/src/sw_block.h
+++ b/src/sw_block.h
@@ -1,37 +1,35 @@
-#define BLOCK_SIZE ( 1 << BLOCK_SHIFT )
+#define BLOCK_SIZE (1 << BLOCK_SHIFT)
-void BLOCK_FUNC( void ){
+void BLOCK_FUNC(void)
+{
int v, i, b, lightstep, lighttemp, light;
byte pix, *psource, *prowdest;
psource = pbasesource;
prowdest = prowdestbase;
- for (v=0 ; v<r_numvblocks ; v++)
- {
- // FIXME: make these locals?
- // FIXME: use delta rather than both right and left, like ASM?
+ for (v = 0 ; v < r_numvblocks ; v++) {
+ // FIXME: make these locals?
+ // FIXME: use delta rather than both right and left, like ASM?
lightleft = r_lightptr[0];
lightright = r_lightptr[1];
r_lightptr += r_lightwidth;
lightleftstep = (r_lightptr[0] - lightleft) >> BLOCK_SHIFT;
lightrightstep = (r_lightptr[1] - lightright) >> BLOCK_SHIFT;
- for (i=0 ; i<BLOCK_SIZE ; i++)
- {
+ for (i = 0 ; i < BLOCK_SIZE ; i++) {
lighttemp = lightleft - lightright;
lightstep = lighttemp >> BLOCK_SHIFT;
light = lightright;
- for (b=BLOCK_SIZE-1; b>=0; b--)
- {
+ for (b = BLOCK_SIZE - 1; b >= 0; b--) {
pix = psource[b];
prowdest[b] = ((unsigned char *)vid.colormap)
- [(light & 0xFF00) + pix];
+ [(light & 0xFF00) + pix];
light += lightstep;
}
-
+
psource += sourcetstep;
lightright += lightrightstep;
lightleft += lightleftstep;