193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
-
+
|
} else {
draw_text(4,32,"*WIN*",0xF2,0xFA);
}
x=x>=left_margin?(x-left_margin)/picture_size+1:0;
y=y/picture_size+1;
if(x>0 && y>0 && x<=pfwidth && y<=pfheight) snprintf(buf,8,"(%2d,%2d)",x,y);
else strcpy(buf," ");
draw_text(0,40,buf,0xF0,0xF1);
draw_text(0,40,buf,0xF0,0xF2);
if(side_mode) {
// Inventory
x=20-(left_margin-picture_size)/8;
if(x>19) x=19;
if(x<0) x=0;
for(y=0;y<ninventory;y++) {
if(y*picture_size+60>=screen->h) break;
|
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
-
+
|
if(x<0 || x>replay_count) strcpy(buf," "); else snprintf(buf,8,"%c%6d",x<replay_pos?0xAE:x>replay_pos?0xAF:0xFE,x);
}
} else {
if(x>0 && y>0 && x<=pfwidth && y<=pfheight) snprintf(buf,8,"(%2d,%2d)",x,y);
else strcpy(buf," ");
}
SDL_LockSurface(screen);
draw_text(0,40,buf,0xF0,0xF1);
draw_text(0,40,buf,0xF0,0xF2);
SDL_UnlockSurface(screen);
SDL_Flip(screen);
}
static void save_replay(void) {
int i;
unsigned char*buf=0;
|