mirror of
https://github.com/nippur72/apple1-videocard-lib.git
synced 2024-12-22 13:30:38 +00:00
add demo for sprites
This commit is contained in:
parent
1d4c4ddf32
commit
ec773f2ac2
@ -1,3 +1,5 @@
|
||||
#include <font8x8.h>
|
||||
|
||||
void demo_screen2() {
|
||||
tms_init_regs(SCREEN2_TABLE);
|
||||
|
||||
@ -28,5 +30,21 @@ void demo_screen2() {
|
||||
|
||||
screen2_plot_mode = PLOT_MODE_SET;
|
||||
|
||||
//vti_ellipse_rect(7,9,202,167);
|
||||
// define sprites using bitmap fonts
|
||||
tms_copy_to_vram(&FONT[64*8], 32*8, TMS_SPRITE_PATTERNS);
|
||||
|
||||
// set 16x16 sprites
|
||||
tms_set_sprite_double_size(1);
|
||||
|
||||
// set double pixel sprites
|
||||
tms_set_sprite_magnification(1);
|
||||
|
||||
tms_sprite spr;
|
||||
for(byte t=0;t<32;t++) {
|
||||
spr.x = 10 + t*32;
|
||||
spr.y = 5 + t*32;
|
||||
spr.name = t;
|
||||
spr.color = t+1;
|
||||
tms_set_sprite(t, &spr);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user