109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
draw_text(8,52,buf,0xF0,0xF9);
snprintf(buf,8,"%5d",replay_count);
draw_text(8,screen->h-8,buf,0xF0,0xFC);
for(y=44,x=replay_pos-(screen->h-68)/32;;x++) {
y+=16;
if(y+24>screen->h) break;
if(x>=0 && x<replay_count) draw_key(16,y,replay_list[x],0xF8,0xFB);
if(x==replay_pos) draw_text(0,y,"~~",0xF0,0xFE);
if(x==replay_mark) draw_text(32,y,"~~",0xF0,0xFD);
}
SDL_UnlockSurface(screen);
}
if(quiz_text) draw_popup(quiz_text);
SDL_Flip(screen);
|
>
|
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
draw_text(8,52,buf,0xF0,0xF9);
snprintf(buf,8,"%5d",replay_count);
draw_text(8,screen->h-8,buf,0xF0,0xFC);
for(y=44,x=replay_pos-(screen->h-68)/32;;x++) {
y+=16;
if(y+24>screen->h) break;
if(x>=0 && x<replay_count) draw_key(16,y,replay_list[x],0xF8,0xFB);
if(x==replay_count) draw_key(16,y,1,0xF0,0xF8);
if(x==replay_pos) draw_text(0,y,"~~",0xF0,0xFE);
if(x==replay_mark) draw_text(32,y,"~~",0xF0,0xFD);
}
SDL_UnlockSurface(screen);
}
if(quiz_text) draw_popup(quiz_text);
SDL_Flip(screen);
|
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
} else if(side_mode) {
// Inventory
x=(ev->button.y-52)/picture_size;
if(x<0 || x>=ninventory) strcpy(buf," "); else snprintf(buf,8,"%7d",inventory[x].value);
} else {
// Move list
x=replay_pos+(ev->button.y+4)/16-(screen->h-68)/32-4;
if(x<0 || x>replay_count) strcpy(buf," "); else snprintf(buf,8,"=%6d",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);
|
|
|
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
} else if(side_mode) {
// Inventory
x=(ev->button.y-52)/picture_size;
if(x<0 || x>=ninventory) strcpy(buf," "); else snprintf(buf,8,"%7d",inventory[x].value);
} else {
// Move list
x=replay_pos+(ev->button.y+4)/16-(screen->h-68)/32-4;
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);
|