From: sparky4 <sparky4@cock.li>
Date: Mon, 23 Jan 2017 16:18:53 +0000 (-0600)
Subject: i think something in animate_spri is making it jump a bunch
X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=24e783f1e4c16bafa56e6cff2c8c915c1f2c7cda;p=16.git

i think something in animate_spri is making it jump a bunch
---

diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h
index 1aa40e7f..e2b2161d 100755
--- a/src/lib/16_tdef.h
+++ b/src/lib/16_tdef.h
@@ -266,6 +266,7 @@ typedef struct
 	byte vga_draw_stride_limit;		// further X clipping
 //
 	word __near rs;			//render switch
+	int __near playerfilei;		//player file's i
 	boolean __near p;			//render page number //BLEH
 	boolean __near r;			//page flip if true
 	word pr[MAXPAGE][4];	//render sections of pages (this is supposed to be set up to draw sections of the screen if updated)
diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c
index dacc9cbd..e9d05c78 100755
--- a/src/lib/scroll16.c
+++ b/src/lib/scroll16.c
@@ -1105,7 +1105,7 @@ void shinku(global_game_variables_t *gv)
 
 void near ZC_drawframe(map_view_t *pip, player_t *player, word pn, sword x, sword y, word dire, word sw)
 {
-	int i=0;
+	pip->video->playerfilei=0;
 
 	switch(sw)
 	{
@@ -1122,18 +1122,15 @@ void near ZC_drawframe(map_view_t *pip, player_t *player, word pn, sword x, swor
 			dire+=2;
 		break;
 	}
-	if(pip[0].video->rs<2)
-	{
-		i = set_anim_by_id(player[pn].ent->spri, dire);	if (i == -1) return;
-		//printf("RS<2\n");
-	}
 
 	switch(pip[0].video->rs)
 	{
 		case 0:
+			pip->video->playerfilei = set_anim_by_id(player[pn].ent->spri, dire);	if(pip->video->playerfilei == -1) return;
 			animate_spri(player[pn].ent->spri, pip->video);
 		break;
 		case 1:
+			pip->video->playerfilei = set_anim_by_id(player[pn].ent->spri, dire);	if(pip->video->playerfilei == -1) return;
 			oldanimate_spri(player[pn].ent->spri, pip->video);
 		break;
 		case 2:
diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h
index eb6693dd..3d965c90 100755
--- a/src/lib/scroll16.h
+++ b/src/lib/scroll16.h
@@ -162,6 +162,7 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x);
 void shinku(global_game_variables_t *gv);
 void near ZC_drawframe(map_view_t *pip, player_t *player, word pn, sword x, sword y, word dire, word sw);
 void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch);
+void near ZC_animatePlayer_(map_view_t *pip, player_t *player, word pn, sword scrollswitch);
 void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch);
 
 // Move an entity around. Should actually be in 16_entity