mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2024-12-27 09:58:44 +01:00
refactor get_pos to move result holder at the end of the parameters
This commit is contained in:
parent
f77ff767c9
commit
a8a00b2ec0
1 changed files with 2 additions and 2 deletions
4
star.c
4
star.c
|
@ -315,7 +315,7 @@ int count_gifts( struct state *s )
|
|||
|
||||
/* Write the position of actor into pos
|
||||
*/
|
||||
void get_pos( struct state *s, int* pos, cell actor )
|
||||
void get_pos( struct state *s, cell actor, int* pos )
|
||||
{
|
||||
int p;
|
||||
|
||||
|
@ -436,7 +436,7 @@ void make_a_move( struct state *s, direction where )
|
|||
{
|
||||
int motion[ 2 ] = { 0, 0 };
|
||||
int item_coord[ 2 ];
|
||||
get_pos( s, item_coord, s->moving ); /* get the coordinates of the moving actor */
|
||||
get_pos( s, s->moving, item_coord ); /* get the coordinates of the moving actor */
|
||||
|
||||
/* Setup the motion vector according to direction.*/
|
||||
switch( where ) {
|
||||
|
|
Loading…
Reference in a new issue