X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_spri.c;h=62c01aa44980ce3401d2f35c2639d8282667d3c1;hb=28b1be191222717943878f024cddac30b026318e;hp=f2c58ff3e021a28ff2ffbfd32c999456f8d09d49;hpb=62a51803dc18b07a6d1c298220c2aaf553c802e7;p=16.git diff --git a/src/lib/16_spri.c b/src/lib/16_spri.c index f2c58ff3..62c01aa4 100755 --- a/src/lib/16_spri.c +++ b/src/lib/16_spri.c @@ -101,6 +101,7 @@ void animate_spri(entity_t *enti, video_t *video) #define INC_PER_FRAME if(enti->q&1) enti->persist_aniframe++; if(enti->persist_aniframe>4) enti->persist_aniframe = 1; unsigned int i,o,o2; int j; int x,y,rx,ry,w,h; + static struct glob_game_vars *ggvv; VGA_RAM_PTR omemptr = (VGA_RAM_PTR)video->page[0].data;// save original mem ptr x=enti->spri.x; @@ -156,7 +157,7 @@ void animate_spri(entity_t *enti, video_t *video) } // render box bounds. y does not need modification, but x and width must be multiple of 4 - if(!video->rss) + if(!video->vga_state.rss) { if (x >= enti->overdraww) rx = (x - enti->overdraww) & (~3); else rx = -(video->page[0].dx); @@ -167,7 +168,7 @@ void animate_spri(entity_t *enti, video_t *video) if ((rx+w) > video->page[0].width) w = video->page[0].width-rx; if ((ry+h) > video->page[0].height) h = video->page[0].height-ry; - if(!video->bgps){ + if(!video->vga_state.bgps){ // block copy pattern to where we will draw the sprite vga_setup_wm1_block_copy(); o2 = video->ofs.offscreen_ofs; @@ -197,14 +198,18 @@ void animate_spri(entity_t *enti, video_t *video) ); #endif #ifdef __DEBUG_SPRI__ - if(dbg_delayanimation) delay(250);//{ while(!IN_KeyDown(sc_Space)/* && !IN_KeyDown(sc_Escape)*/){} delay(250); } +// if(ggvv->player[0].enti.q<5) + if(dbg_delayanimation) + { + IN_Ack(ggvv);// delay(250);//{ while(!IN_KeyDown(sc_Space)/* && !IN_KeyDown(sc_Escape)*/){} delay(250); } + } #endif - if(!video->rss) + if(!video->vga_state.rss) { // restore ptr vga_state.vga_graphics_ram = omemptr; - if(!video->bgps){ + if(!video->vga_state.bgps){ // block copy to visible RAM from offscreen vga_setup_wm1_block_copy(); o = video->ofs.offscreen_ofs; // source offscreen @@ -217,6 +222,6 @@ void animate_spri(entity_t *enti, video_t *video) // restore stride vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = video->page[0].stridew; - vga_state.vga_graphics_ram = video->omemptr; + vga_state.vga_graphics_ram = video->vga_state.omemptr; video->dorender=1; }