From: sparky4 Date: Tue, 17 Jan 2017 18:53:28 +0000 (-0600) Subject: palllist not being worked on right now... i will work on sprite animation VERY soon X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=7663f3d2660032e802f517581ae79dbabc5acf7c;p=16.git palllist not being worked on right now... i will work on sprite animation VERY soon --- diff --git a/DEBUG.16W b/DEBUG.16W index 1a1bf2cc..2ab6f890 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,210 +1,210 @@ -Seg:0 Size:9969 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 -Seg:27b9 Size:44 Owner:0x0 +Seg:0 Size:9823 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 +Seg:2727 Size:44 Owner:0x0 + -Seg:27e5 Size:256 Owner:0x1964 -++++ -Seg:28e5 Size:256 Owner:0x1756 -+++++ -Seg:29e5 Size:256 Owner:0x1758 +Seg:2753 Size:256 Owner:0x1964 ++++++ +Seg:2853 Size:256 Owner:0x1756 ++++ -Seg:2ae5 Size:256 Owner:0x175a +Seg:2953 Size:256 Owner:0x1758 ++++ -Seg:2be5 Size:256 Owner:0x175c +Seg:2a53 Size:256 Owner:0x175a ++++ -Seg:2ce5 Size:256 Owner:0x175e +Seg:2b53 Size:256 Owner:0x175c ++++ -Seg:2de5 Size:256 Owner:0x1760 +Seg:2c53 Size:256 Owner:0x175e +++++ -Seg:2ee5 Size:256 Owner:0x1762 +Seg:2d53 Size:256 Owner:0x1760 ++++ -Seg:2fe5 Size:256 Owner:0x1764 +Seg:2e53 Size:256 Owner:0x1762 ++++ -Seg:30e5 Size:256 Owner:0x1766 +Seg:2f53 Size:256 Owner:0x1764 ++++ -Seg:31e5 Size:256 Owner:0x1768 +Seg:3053 Size:256 Owner:0x1766 ++++ -Seg:32e5 Size:256 Owner:0x176a +Seg:3153 Size:256 Owner:0x1768 +++++ -Seg:33e5 Size:256 Owner:0x176c +Seg:3253 Size:256 Owner:0x176a ++++ -Seg:34e5 Size:256 Owner:0x176e +Seg:3353 Size:256 Owner:0x176c ++++ -Seg:35e5 Size:256 Owner:0x1770 +Seg:3453 Size:256 Owner:0x176e ++++ -Seg:36e5 Size:256 Owner:0x1772 +Seg:3553 Size:256 Owner:0x1770 ++++ -Seg:37e5 Size:256 Owner:0x1774 +Seg:3653 Size:256 Owner:0x1772 +++++ -Seg:38e5 Size:256 Owner:0x1776 +Seg:3753 Size:256 Owner:0x1774 ++++ -Seg:39e5 Size:256 Owner:0x1778 +Seg:3853 Size:256 Owner:0x1776 ++++ -Seg:3ae5 Size:256 Owner:0x177a +Seg:3953 Size:256 Owner:0x1778 ++++ -Seg:3be5 Size:256 Owner:0x177c +Seg:3a53 Size:256 Owner:0x177a ++++ -Seg:3ce5 Size:256 Owner:0x177e +Seg:3b53 Size:256 Owner:0x177c +++++ -Seg:3de5 Size:256 Owner:0x1780 +Seg:3c53 Size:256 Owner:0x177e ++++ -Seg:3ee5 Size:256 Owner:0x1782 +Seg:3d53 Size:256 Owner:0x1780 ++++ -Seg:3fe5 Size:256 Owner:0x1784 +Seg:3e53 Size:256 Owner:0x1782 ++++ -Seg:40e5 Size:256 Owner:0x1786 +Seg:3f53 Size:256 Owner:0x1784 ++++ -Seg:41e5 Size:256 Owner:0x1788 +Seg:4053 Size:256 Owner:0x1786 +++++ -Seg:42e5 Size:256 Owner:0x178a +Seg:4153 Size:256 Owner:0x1788 ++++ -Seg:43e5 Size:256 Owner:0x178c +Seg:4253 Size:256 Owner:0x178a ++++ -Seg:44e5 Size:256 Owner:0x178e +Seg:4353 Size:256 Owner:0x178c ++++ -Seg:45e5 Size:256 Owner:0x1790 +Seg:4453 Size:256 Owner:0x178e ++++ -Seg:46e5 Size:256 Owner:0x1792 +Seg:4553 Size:256 Owner:0x1790 +++++ -Seg:47e5 Size:256 Owner:0x1794 +Seg:4653 Size:256 Owner:0x1792 ++++ -Seg:48e5 Size:256 Owner:0x1796 +Seg:4753 Size:256 Owner:0x1794 ++++ -Seg:49e5 Size:256 Owner:0x1798 +Seg:4853 Size:256 Owner:0x1796 ++++ -Seg:4ae5 Size:256 Owner:0x179a +Seg:4953 Size:256 Owner:0x1798 ++++ -Seg:4be5 Size:256 Owner:0x179c +Seg:4a53 Size:256 Owner:0x179a +++++ -Seg:4ce5 Size:256 Owner:0x179e +Seg:4b53 Size:256 Owner:0x179c ++++ -Seg:4de5 Size:256 Owner:0x17a0 +Seg:4c53 Size:256 Owner:0x179e ++++ -Seg:4ee5 Size:256 Owner:0x17a2 +Seg:4d53 Size:256 Owner:0x17a0 ++++ -Seg:4fe5 Size:256 Owner:0x17a4 +Seg:4e53 Size:256 Owner:0x17a2 ++++ -Seg:50e5 Size:256 Owner:0x17a6 +Seg:4f53 Size:256 Owner:0x17a4 +++++ -Seg:51e5 Size:256 Owner:0x17a8 +Seg:5053 Size:256 Owner:0x17a6 ++++ -Seg:52e5 Size:256 Owner:0x17aa +Seg:5153 Size:256 Owner:0x17a8 ++++ -Seg:53e5 Size:256 Owner:0x17ac +Seg:5253 Size:256 Owner:0x17aa ++++ -Seg:54e5 Size:256 Owner:0x17ae +Seg:5353 Size:256 Owner:0x17ac ++++ -Seg:55e5 Size:256 Owner:0x17b0 +Seg:5453 Size:256 Owner:0x17ae +++++ -Seg:56e5 Size:256 Owner:0x17b2 +Seg:5553 Size:256 Owner:0x17b0 ++++ -Seg:57e5 Size:256 Owner:0x17b4 +Seg:5653 Size:256 Owner:0x17b2 ++++ -Seg:58e5 Size:256 Owner:0x17b6 +Seg:5753 Size:256 Owner:0x17b4 ++++ -Seg:59e5 Size:256 Owner:0x17b8 +Seg:5853 Size:256 Owner:0x17b6 ++++ -Seg:5ae5 Size:256 Owner:0x17ba +Seg:5953 Size:256 Owner:0x17b8 +++++ -Seg:5be5 Size:256 Owner:0x17bc +Seg:5a53 Size:256 Owner:0x17ba ++++ -Seg:5ce5 Size:256 Owner:0x17be +Seg:5b53 Size:256 Owner:0x17bc ++++ -Seg:5de5 Size:256 Owner:0x17c0 +Seg:5c53 Size:256 Owner:0x17be ++++ -Seg:5ee5 Size:256 Owner:0x17c2 +Seg:5d53 Size:256 Owner:0x17c0 ++++ -Seg:5fe5 Size:256 Owner:0x17c4 +Seg:5e53 Size:256 Owner:0x17c2 +++++ -Seg:60e5 Size:256 Owner:0x17c6 +Seg:5f53 Size:256 Owner:0x17c4 ++++ -Seg:61e5 Size:256 Owner:0x17c8 +Seg:6053 Size:256 Owner:0x17c6 ++++ -Seg:62e5 Size:256 Owner:0x17ca +Seg:6153 Size:256 Owner:0x17c8 ++++ -Seg:63e5 Size:256 Owner:0x17cc +Seg:6253 Size:256 Owner:0x17ca ++++ -Seg:64e5 Size:256 Owner:0x17ce +Seg:6353 Size:256 Owner:0x17cc +++++ -Seg:65e5 Size:256 Owner:0x17d0 +Seg:6453 Size:256 Owner:0x17ce ++++ -Seg:66e5 Size:256 Owner:0x17d2 +Seg:6553 Size:256 Owner:0x17d0 ++++ -Seg:67e5 Size:256 Owner:0x17d4 +Seg:6653 Size:256 Owner:0x17d2 ++++ -Seg:68e5 Size:256 Owner:0x17d6 +Seg:6753 Size:256 Owner:0x17d4 ++++ -Seg:69e5 Size:256 Owner:0x17d8 +Seg:6853 Size:256 Owner:0x17d6 +++++ -Seg:6ae5 Size:256 Owner:0x17da +Seg:6953 Size:256 Owner:0x17d8 ++++ -Seg:6be5 Size:256 Owner:0x17dc +Seg:6a53 Size:256 Owner:0x17da ++++ -Seg:6ce5 Size:256 Owner:0x17de +Seg:6b53 Size:256 Owner:0x17dc ++++ -Seg:6de5 Size:256 Owner:0x17e0 +Seg:6c53 Size:256 Owner:0x17de ++++ -Seg:6ee5 Size:256 Owner:0x17e2 +Seg:6d53 Size:256 Owner:0x17e0 +++++ -Seg:6fe5 Size:256 Owner:0x17e4 +Seg:6e53 Size:256 Owner:0x17e2 ++++ -Seg:70e5 Size:256 Owner:0x17e6 +Seg:6f53 Size:256 Owner:0x17e4 ++++ -Seg:71e5 Size:256 Owner:0x17e8 +Seg:7053 Size:256 Owner:0x17e6 ++++ -Seg:72e5 Size:256 Owner:0x17ea +Seg:7153 Size:256 Owner:0x17e8 ++++ -Seg:73e5 Size:256 Owner:0x17ec +Seg:7253 Size:256 Owner:0x17ea +++++ -Seg:74e5 Size:256 Owner:0x17ee +Seg:7353 Size:256 Owner:0x17ec ++++ -Seg:75e5 Size:256 Owner:0x17f0 +Seg:7453 Size:256 Owner:0x17ee ++++ -Seg:76e5 Size:256 Owner:0x17f2 +Seg:7553 Size:256 Owner:0x17f0 ++++ -Seg:77e5 Size:256 Owner:0x17f4 +Seg:7653 Size:256 Owner:0x17f2 ++++ -Seg:78e5 Size:256 Owner:0x17f6 +Seg:7753 Size:256 Owner:0x17f4 +++++ -Seg:79e5 Size:256 Owner:0x17f8 +Seg:7853 Size:256 Owner:0x17f6 ++++ -Seg:7ae5 Size:256 Owner:0x17fa +Seg:7953 Size:256 Owner:0x17f8 ++++ -Seg:7be5 Size:256 Owner:0x17fc +Seg:7a53 Size:256 Owner:0x17fa ++++ -Seg:7ce5 Size:256 Owner:0x17fe +Seg:7b53 Size:256 Owner:0x17fc ++++ -Seg:7de5 Size:256 Owner:0x1800 +Seg:7c53 Size:256 Owner:0x17fe +++++ -Seg:7ee5 Size:256 Owner:0x1802 +Seg:7d53 Size:256 Owner:0x1800 ++++ -Seg:7fe5 Size:256 Owner:0x1804 +Seg:7e53 Size:256 Owner:0x1802 ++++ -Seg:80e5 Size:256 Owner:0x1806 +Seg:7f53 Size:256 Owner:0x1804 ++++ -Seg:81e5 Size:256 Owner:0x1808 +Seg:8053 Size:256 Owner:0x1806 ++++ -Seg:82e5 Size:256 Owner:0x180a +Seg:8153 Size:256 Owner:0x1808 +++++ -Seg:83e5 Size:256 Owner:0x180c +Seg:8253 Size:256 Owner:0x180a ++++ -Seg:84e5 Size:256 Owner:0x180e +Seg:8353 Size:256 Owner:0x180c ++++ -Seg:85e5 Size:256 Owner:0x1810 +Seg:8453 Size:256 Owner:0x180e ++++ -Seg:86e5 Size:256 Owner:0x1812 +Seg:8553 Size:256 Owner:0x1810 ++++ -Seg:87e5 Size:256 Owner:0x1814 +Seg:8653 Size:256 Owner:0x1812 +++++ -Seg:88e5 Size:256 Owner:0x1816 +Seg:8753 Size:256 Owner:0x1814 ++++ -Seg:89e5 Size:256 Owner:0x1818 +Seg:8853 Size:256 Owner:0x1816 ++++ -Seg:8ae5 Size:256 Owner:0x181a +Seg:8953 Size:256 Owner:0x1818 ++++ -Seg:8be5 Size:256 Owner:0x181c +Seg:8a53 Size:256 Owner:0x181a ++++ -Seg:8ce5 Size:401 Owner:0xef32 +Seg:8b53 Size:256 Owner:0x181c ++++++ +Seg:8c53 Size:401 Owner:0xef32 ++++++ -Seg:b7e5 Size:18458 Owner:0x0 -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file +Seg:b753 Size:18604 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index 6e8d41a3..32ccf16f 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,57 +1,57 @@ == default == - USED block at 27db0016 of size 136 - FREE block at 27db009e of size 68 - USED block at 27db00e2 of size 50 - USED block at 27db0114 of size 50 - USED block at 27db0146 of size 50 - USED block at 27db0178 of size 50 - USED block at 27db01aa of size 50 - USED block at 27db01dc of size 50 - USED block at 27db020e of size 50 - USED block at 27db0240 of size 50 - USED block at 27db0272 of size 50 - USED block at 27db02a4 of size 50 - USED block at 27db02d6 of size 50 - USED block at 27db0308 of size 50 - FREE block at 27db033a of size 14 - USED block at 27db0348 of size 20 - FREE block at 27db035c of size 7328 + USED block at 27490016 of size 136 + FREE block at 2749009e of size 68 + USED block at 274900e2 of size 50 + USED block at 27490114 of size 50 + USED block at 27490146 of size 50 + USED block at 27490178 of size 50 + USED block at 274901aa of size 50 + USED block at 274901dc of size 50 + USED block at 2749020e of size 50 + USED block at 27490240 of size 50 + USED block at 27490272 of size 50 + USED block at 274902a4 of size 50 + USED block at 274902d6 of size 50 + USED block at 27490308 of size 50 + FREE block at 2749033a of size 14 + USED block at 27490348 of size 20 + FREE block at 2749035c of size 7328 OK - end of heap == near == - USED block at 17daef76 of size 12 - USED block at 17daef82 of size 330 - USED block at 17daf0cc of size 52 - USED block at 17daf100 of size 20 - USED block at 17daf114 of size 20 - USED block at 17daf128 of size 20 - USED block at 17daf13c of size 20 - USED block at 17daf150 of size 20 - USED block at 17daf164 of size 3736 + USED block at 1748ef76 of size 12 + USED block at 1748ef82 of size 330 + USED block at 1748f0cc of size 52 + USED block at 1748f100 of size 20 + USED block at 1748f114 of size 20 + USED block at 1748f128 of size 20 + USED block at 1748f13c of size 20 + USED block at 1748f150 of size 20 + USED block at 1748f164 of size 3736 OK - end of heap == far == - USED block at 27db0016 of size 136 - USED block at 27db009e of size 68 - USED block at 27db00e2 of size 50 - USED block at 27db0114 of size 50 - USED block at 27db0146 of size 50 - USED block at 27db0178 of size 50 - USED block at 27db01aa of size 50 - USED block at 27db01dc of size 50 - USED block at 27db020e of size 50 - USED block at 27db0240 of size 50 - USED block at 27db0272 of size 50 - USED block at 27db02a4 of size 50 - USED block at 27db02d6 of size 50 - USED block at 27db0308 of size 50 - USED block at 27db033a of size 14 - USED block at 27db0348 of size 20 - USED block at 27db035c of size 7328 + USED block at 27490016 of size 136 + USED block at 2749009e of size 68 + USED block at 274900e2 of size 50 + USED block at 27490114 of size 50 + USED block at 27490146 of size 50 + USED block at 27490178 of size 50 + USED block at 274901aa of size 50 + USED block at 274901dc of size 50 + USED block at 2749020e of size 50 + USED block at 27490240 of size 50 + USED block at 27490272 of size 50 + USED block at 274902a4 of size 50 + USED block at 274902d6 of size 50 + USED block at 27490308 of size 50 + USED block at 2749033a of size 14 + USED block at 27490348 of size 20 + USED block at 2749035c of size 7328 OK - end of heap Memory Type Total Used Free diff --git a/MMDUMP.16W b/MMDUMP.16W index 35ca44ef..96cca1d9 100755 Binary files a/MMDUMP.16W and b/MMDUMP.16W differ diff --git a/src/lib/16_sprit.c b/src/lib/16_sprit.c index e498250a..db5c3c1d 100755 --- a/src/lib/16_sprit.c +++ b/src/lib/16_sprit.c @@ -97,16 +97,13 @@ void print_anim_ids(struct sprite *spri) } } - +/* void animate_spri(struct sprite *spri, global_game_variables_t *gv) { int i; // Events go here - /* replace VGA stride with our own and mem ptr. then sprite rendering at this stage is just (0,0) */ - vga_state.vga_draw_stride_limit = (gv->video.page[0].width + 3/*round up*/ - spri->x) >> 2; - // Draw sprite i = get_vrl_by_id(spri->spritesheet, spri->curr_spri_id, spri->sprite_vrl_cont); if(i < 0) @@ -114,6 +111,9 @@ void animate_spri(struct sprite *spri, global_game_variables_t *gv) Quit (gv, "Error retriving required sprite"); } + // replace VGA stride with our own and mem ptr. then sprite rendering at this stage is just (0,0) + vga_state.vga_draw_stride_limit = (gv->video.page[0].width + 3 - spri->x) >> 2; + draw_vrl1_vgax_modex( spri->x-gv->video.page[0].dx, spri->y-gv->video.page[0].dy, @@ -123,7 +123,102 @@ void animate_spri(struct sprite *spri, global_game_variables_t *gv) spri->sprite_vrl_cont->data_size ); - /* restore stride */ + // restore stride + vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = gv->video.page[0].stridew; + + // Depending on delay, update indices + switch(spri->delay){ + // Delay = 0 means that sprite should loop. Nothing to change here + case 0: + break; + + // Delay = 1 means that on next time unit sprite should be changed + case 1: + spri->curr_anim_spri++; + + // If we hit the end of an animation sequence, restart it + if(!(spri->curr_spri_id = spri->curr_anim_list[spri->curr_anim_spri].sprite_id)){ + spri->curr_anim_spri = 0; + spri->curr_spri_id = spri->curr_anim_list[spri->curr_anim_spri].sprite_id; + } + spri->delay = spri->curr_anim_list[spri->curr_anim_spri].delay; + + // Delay > 1 means that we should not change sprite yet. Decrease delay + default: + spri->delay--; + break; + } +} +*/ +void animate_spri(struct sprite *spri, global_game_variables_t *gv) +{ +#define VMEMPAGESIZE2 gv->video.page[0].pagesize+gv->video.page[1].pagesize +#define VMEMPAGEDATA2 gv->video.page[2].data + unsigned int i,o,o2; int j; + int x,rx,ry,w,h; + int overdraw = 1; // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks. + // if the sprite's edge pixels are clear anyway, you can set this to 0. + VGA_RAM_PTR omemptr; + + // Events go here + + + omemptr = vga_state.vga_graphics_ram; // save original mem ptr + x=spri->x-4; + + // Draw sprite + j = get_vrl_by_id(spri->spritesheet, spri->curr_spri_id, spri->sprite_vrl_cont); + if(j < 0) + { + Quit (gv, "Error retriving required sprite"); + } + + // render box bounds. y does not need modification, but x and width must be multiple of 4 + if (x >= overdraw) rx = (x - overdraw) & (~3); + else rx = -(gv->video.page[0].dx); + if (spri->y >= overdraw) ry = (spri->y - overdraw); + else ry = -(gv->video.page[0].dy); + h = spri->sprite_vrl_cont->vrl_header->height + overdraw + spri->y - ry; + w = (x + spri->sprite_vrl_cont->vrl_header->width + (overdraw*2) + 3 - rx) & (~3);//round up + if ((rx+w) > gv->video.page[0].width) w = gv->video.page[0].width-rx; + if ((ry+h) > gv->video.page[0].height) h = gv->video.page[0].height-ry; + + // block copy pattern to where we will draw the sprite + vga_setup_wm1_block_copy(); + o2 = VMEMPAGESIZE2; + o = (0x10000UL - (uint16_t)VMEMPAGEDATA2) + (ry * gv->video.page[0].stridew) + (rx >> 2); // source offscreen + for (i=0;i < h;i++,o += gv->video.page[0].stridew,o2 += (w >> 2)) vga_wm1_mem_block_copy(o2,o,w >> 2); + + // must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally + vga_restore_rm0wm0(); + + // replace VGA stride with our own and mem ptr. then sprite rendering at this stage is just (0,0) + vga_state.vga_draw_stride_limit = (gv->video.page[0].width + 3 - x) >> 2;//round up + vga_state.vga_draw_stride = w >> 2; + vga_state.vga_graphics_ram = omemptr + VMEMPAGESIZE2; + + // then the sprite. note modding ram ptr means we just draw to (x&3,0) + draw_vrl1_vgax_modex( + x-rx, + spri->y-ry, + spri->sprite_vrl_cont->vrl_header, + spri->sprite_vrl_cont->line_offsets, + spri->sprite_vrl_cont->buffer + sizeof(struct vrl1_vgax_header), + spri->sprite_vrl_cont->data_size + ); + + // restore ptr + vga_state.vga_graphics_ram = omemptr; + + // block copy to visible RAM from offscreen + vga_setup_wm1_block_copy(); + o = VMEMPAGESIZE2; // source offscreen + o2 = (ry * gv->video.page[0].stridew) + (rx >> 2); // dest visible (original stride) + for (i=0;i < h;i++,o += vga_state.vga_draw_stride,o2 += gv->video.page[0].stridew) vga_wm1_mem_block_copy(o2,o,w >> 2); + // must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally + vga_restore_rm0wm0(); + + // restore stride vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = gv->video.page[0].stridew; // Depending on delay, update indices diff --git a/src/lib/doslib b/src/lib/doslib index b68c3627..a4f5c444 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit b68c362763ae81c36e275dc8b962558b28d46241 +Subproject commit a4f5c4446c10647f26a89ffcba7acada1605e3c2 diff --git a/src/vrstest.c b/src/vrstest.c index 73f04f42..a7e48d1b 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -97,8 +97,8 @@ void main() { return; } - spri.x = 160; - spri.y = 120; + spri.x = TILEWH; + spri.y = TILEWH; // Uncomment to see broken sprites /* sega = mm.bufferseg; @@ -119,9 +119,11 @@ void main() /*modexLoadPalFile("data/spri/chikyuu.pal", &pal); modexPalUpdate1(pal);*/ - for (i = 0; i < 5; i++){ - spri.delay = 1; animate_spri(&spri, &gvar); spri.x += 16; /*sleep(1);*/ } VL_LoadPalFile("data/spri/chikyuu.pal", &palette); + for (i = 0; i < 5; i++){ + spri.delay = 1; animate_spri(&spri, &gvar);// spri.x += 16; + sleep(1); + } while(!IN_KeyDown(sc_Escape)) { diff --git a/src/zcroll.c b/src/zcroll.c index 0adf2751..92f54d09 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -188,10 +188,10 @@ void main(int argc, char *argv[]) { case 11: i=0; - player[0].ent->spri->x = 0; + player[0].ent->spri->x = TILEWH; default: i++; - player[0].ent->spri->delay = 1; animate_spri((player[0].ent->spri), &gvar); player[0].ent->spri->x += 20; + player[0].ent->spri->delay = 1; animate_spri((player[0].ent->spri), &gvar);// player[0].ent->spri->x += 16; break; } }