void draw_tile(int tid, int x, int y, int light);
static uint16_t *sprdata[NUM_HWSPRITES];
+static uint16_t *sprdata2[NUM_HWSPRITES];
/* hardcoded test sprite */
static struct sprite test_sprite;
+static struct sprite test_sprite2;
int game_init(void)
{
REG_COLOR_PTR[i + 16] = sprpal[i];
}
- sprdata[0] = spr0a;
- sprdata[1] = spr0b;
- sprdata[2] = spr1a;
- sprdata[3] = spr1b;
- sprdata[4] = spr2a;
- sprdata[5] = spr2b;
+ sprdata[0] = sprdata2[0] = spr0a;
+ sprdata[1] = sprdata2[1] = spr0b;
+ sprdata[2] = sprdata2[2] = spr1a;
+ sprdata[3] = sprdata2[3] = spr1b;
+ sprdata[4] = sprdata2[4] = spr2a;
+ sprdata[5] = sprdata2[5] = spr2b;
test_sprite.width = test_sprite.height = 48;
test_sprite.origx = 24;
test_sprite.hwspr[i] = i < 6 ? sprdata[i] : 0;
}
+ test_sprite2 = test_sprite;
+ for(i=0; i<8; i++) {
+ test_sprite2.hwspr[i] = i < 6 ? sprdata2[i] : 0;
+ }
+
return 0;
}
}
begin_sprites();
- draw_sprite(&test_sprite, 160, 100);
+ draw_sprite(&test_sprite, 160, 80);
+ draw_sprite(&test_sprite2, 160, 160);
end_sprites();
}
+#include <stdio.h>
#include <string.h>
#include "sprite.h"
#include "hwregs.h"
reg += 4;
}
+#if 0
/* sort sprites by increasing start position */
for(i=0; i<scount; i++) {
for(j=i+1; j<scount; j++) {
}
}
}
+#endif
/* set sprite positions and populate copperlist to draw
* hardware sprites
}
if(nchan_found < s->hwslices) continue;
- if(reuse) {
- add_copper(COPPER_VWAIT(sy));
- }
+// if(reuse) {
+ printf("copper wait: %d\n", (int)s->y - 1);
+ add_copper(COPPER_VWAIT(s->y - 1));
+// }
for(j=0; j<s->hwslices; j++) {
int idx = chan[j] * 2;