projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19981117-1
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index b8b43f55c3d51993f7f277c01e19e6789841b97c..13ae62bb51347d394f92fcb9647febd254b49ce9 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-544,7
+544,7
@@
void GameWon()
if (tape.recording)
{
TapeStop();
if (tape.recording)
{
TapeStop();
- Save
LevelTape(tape.level_nr);
/* Ask to save tape */
+ Save
Tape(tape.level_nr);
/* Ask to save tape */
}
if ((hi_pos=NewHiScore()) >= 0)
}
if ((hi_pos=NewHiScore()) >= 0)
@@
-572,7
+572,7
@@
boolean NewHiScore()
LoadScore(level_nr);
LoadScore(level_nr);
- if (!strcmp(setup.
alias_name,
EMPTY_ALIAS) ||
+ if (!strcmp(setup.
player_name,
EMPTY_ALIAS) ||
local_player->score < highscore[MAX_SCORE_ENTRIES-1].Score)
return(-1);
local_player->score < highscore[MAX_SCORE_ENTRIES-1].Score)
return(-1);
@@
-588,7
+588,7
@@
boolean NewHiScore()
#ifdef ONE_PER_NAME
for(l=k;l<MAX_SCORE_ENTRIES;l++)
#ifdef ONE_PER_NAME
for(l=k;l<MAX_SCORE_ENTRIES;l++)
- if (!strcmp(setup.
alias_name,
highscore[l].Name))
+ if (!strcmp(setup.
player_name,
highscore[l].Name))
m = l;
if (m==k) /* Spieler überschreibt seine alte Position */
goto put_into_list;
m = l;
if (m==k) /* Spieler überschreibt seine alte Position */
goto put_into_list;
@@
-604,14
+604,15
@@
boolean NewHiScore()
#ifdef ONE_PER_NAME
put_into_list:
#endif
#ifdef ONE_PER_NAME
put_into_list:
#endif
- sprintf(highscore[k].Name,setup.alias_name);
+ strncpy(highscore[k].Name, setup.player_name, MAX_NAMELEN - 1);
+ highscore[k].Name[MAX_NAMELEN - 1] = '\0';
highscore[k].Score = local_player->score;
position = k;
break;
}
#ifdef ONE_PER_NAME
highscore[k].Score = local_player->score;
position = k;
break;
}
#ifdef ONE_PER_NAME
- else if (!str
cmp(setup.alias_name,highscore[k].Name
))
+ else if (!str
ncmp(setup.player_name, highscore[k].Name, MAX_NAMELEN - 1
))
break; /* Spieler schon mit besserer Punktzahl in der Liste */
#endif
break; /* Spieler schon mit besserer Punktzahl in der Liste */
#endif
@@
-2937,7
+2938,7
@@
void GameActions()
int sieb_x = 0, sieb_y = 0;
int i, x,y, element;
byte *recorded_player_action;
int sieb_x = 0, sieb_y = 0;
int i, x,y, element;
byte *recorded_player_action;
- byte summarized_player_action;
+ byte summarized_player_action
= 0
;
if (game_status != PLAYING)
return;
if (game_status != PLAYING)
return;
@@
-3373,8
+3374,8
@@
boolean MoveFigure(struct PlayerInfo *player, int dx, int dy)
scroll_x = jx-MIDPOSX + (scroll_x < jx-MIDPOSX ? -offset : +offset);
/* don't scroll over playfield boundaries */
scroll_x = jx-MIDPOSX + (scroll_x < jx-MIDPOSX ? -offset : +offset);
/* don't scroll over playfield boundaries */
- if (scroll_x < -1 || scroll_x > lev_fieldx - SCR_FIELDX +
2
)
- scroll_x = (scroll_x < -1 ? -1 : lev_fieldx - SCR_FIELDX +
2
);
+ if (scroll_x < -1 || scroll_x > lev_fieldx - SCR_FIELDX +
1
)
+ scroll_x = (scroll_x < -1 ? -1 : lev_fieldx - SCR_FIELDX +
1
);
/* don't scroll more than one field at a time */
scroll_x = old_scroll_x + SIGN(scroll_x - old_scroll_x);
/* don't scroll more than one field at a time */
scroll_x = old_scroll_x + SIGN(scroll_x - old_scroll_x);
@@
-3391,8
+3392,8
@@
boolean MoveFigure(struct PlayerInfo *player, int dx, int dy)
scroll_y = jy-MIDPOSY + (scroll_y < jy-MIDPOSY ? -offset : +offset);
/* don't scroll over playfield boundaries */
scroll_y = jy-MIDPOSY + (scroll_y < jy-MIDPOSY ? -offset : +offset);
/* don't scroll over playfield boundaries */
- if (scroll_y < -1 || scroll_y > lev_fieldy - SCR_FIELDY +
2
)
- scroll_y = (scroll_y < -1 ? -1 : lev_fieldy - SCR_FIELDY +
2
);
+ if (scroll_y < -1 || scroll_y > lev_fieldy - SCR_FIELDY +
1
)
+ scroll_y = (scroll_y < -1 ? -1 : lev_fieldy - SCR_FIELDY +
1
);
/* don't scroll more than one field at a time */
scroll_y = old_scroll_y + SIGN(scroll_y - old_scroll_y);
/* don't scroll more than one field at a time */
scroll_y = old_scroll_y + SIGN(scroll_y - old_scroll_y);