void scores_draw_item( int i, stats_info * stats ) { char buffer[20]; int y; WIN(DDGRLOCK(dd_grd_curcanv)); y = 7+70+i*9; if (i==0) y -= 8; if ( i==MAX_HIGH_SCORES ) { y += 8; //scores_rprintf( 17+33+XX, y+YY, "" ); } else { scores_rprintf( 17+33+XX, y+YY, "%d.", i+1 ); } if (strlen(stats->name)==0) { GrPrintF( LHX(26+33+XX)+xOffs, LHY(y+YY)+yOffs, TXT_EMPTY ); WIN(DDGRUNLOCK(dd_grd_curcanv)); return; } GrPrintF( LHX(26+33+XX)+xOffs, LHY(y+YY)+yOffs, "%s", stats->name ); int_to_string(stats->score, buffer); scores_rprintf( 109+33+XX, y+YY, "%s", buffer ); GrPrintF( LHX(125+33+XX)+xOffs, LHY(y+YY)+yOffs, "%s", MENU_DIFFICULTY_TEXT(stats->diff_level) ); if ( (stats->starting_level > 0 ) && (stats->ending_level > 0 )) scores_rprintf( 192+33+XX, y+YY, "%d-%d", stats->starting_level, stats->ending_level ); else if ( (stats->starting_level < 0 ) && (stats->ending_level > 0 )) scores_rprintf( 192+33+XX, y+YY, "S%d-%d", -stats->starting_level, stats->ending_level ); else if ( (stats->starting_level < 0 ) && (stats->ending_level < 0 )) scores_rprintf( 192+33+XX, y+YY, "S%d-S%d", -stats->starting_level, -stats->ending_level ); else if ( (stats->starting_level > 0 ) && (stats->ending_level < 0 )) scores_rprintf( 192+33+XX, y+YY, "%d-S%d", stats->starting_level, -stats->ending_level ); { int h, m, s; h = stats->seconds/3600; s = stats->seconds%3600; m = s / 60; s = s % 60; scores_rprintf( 311-42+XX, y+YY, "%d:%02d:%02d", h, m, s ); } WIN(DDGRUNLOCK(dd_grd_curcanv)); }
void scores_draw_item(int i, stats_info * stats) { char buffer[20]; int y; y = 7 + 70 + i * 9; if (i == 0) y -= 8; if (i == MAX_HIGH_SCORES) { y += 8; //scores_rprintf( 17+33+XX, y+YY, "" ); } else { scores_rprintf(17 + 33 + XX, y + YY, "%d.", i + 1); } if (strlen(stats->name) == 0) { gr_scale_printf((26 + 33 + XX) * f2fl(Scale_x), (y + YY) * f2fl(Scale_y), Scale_factor, Scale_factor, TXT_EMPTY); return; } gr_scale_printf((26 + 33 + XX) * f2fl(Scale_x), (y + YY) * f2fl(Scale_y), Scale_factor, Scale_factor, "%s", stats->name); int_to_string(stats->score, buffer); scores_rprintf(109 + 33 + XX, y + YY, "%s", buffer); gr_scale_printf((125 + 33 + XX) * f2fl(Scale_x), (y + YY) * f2fl(Scale_y), Scale_factor, Scale_factor, "%s", MENU_DIFFICULTY_TEXT(stats->diff_level)); if ((stats->starting_level > 0) && (stats->ending_level > 0)) scores_rprintf(192 + 33 + XX, y + YY, "%d-%d", stats->starting_level, stats->ending_level); else if ((stats->starting_level < 0) && (stats->ending_level > 0)) scores_rprintf(192 + 33 + XX, y + YY, "S%d-%d", -stats->starting_level, stats->ending_level); else if ((stats->starting_level < 0) && (stats->ending_level < 0)) scores_rprintf(192 + 33 + XX, y + YY, "S%d-S%d", -stats->starting_level, -stats->ending_level); else if ((stats->starting_level > 0) && (stats->ending_level < 0)) scores_rprintf(192 + 33 + XX, y + YY, "%d-S%d", stats->starting_level, -stats->ending_level); { int h, m, s; h = stats->seconds / 3600; s = stats->seconds % 3600; m = s / 60; s = s % 60; scores_rprintf(311 - 42 + XX, y + YY, "%d:%02d:%02d", h, m, s); } }
void scores_draw_item( int i, stats_info * stats ) { char buffer[20]; int y; y = 77+i*9; if (i==0) y -= 8; if ( i==MAX_HIGH_SCORES ) y += 8; else scores_rprintf( 57, y-3, "%d.", i+1 ); y -= 3; if (strlen(stats->name)==0) { gr_printf( FSPACX(66), FSPACY(y), TXT_EMPTY ); return; } gr_printf( FSPACX(66), FSPACY(y), "%s", stats->name ); int_to_string(stats->score, buffer); scores_rprintf( 149, y, "%s", buffer ); gr_printf( FSPACX(166), FSPACY(y), "%s", MENU_DIFFICULTY_TEXT(stats->diff_level) ); if ( (stats->starting_level > 0 ) && (stats->ending_level > 0 )) scores_rprintf( 232, y, "%d-%d", stats->starting_level, stats->ending_level ); else if ( (stats->starting_level < 0 ) && (stats->ending_level > 0 )) scores_rprintf( 232, y, "S%d-%d", -stats->starting_level, stats->ending_level ); else if ( (stats->starting_level < 0 ) && (stats->ending_level < 0 )) scores_rprintf( 232, y, "S%d-S%d", -stats->starting_level, -stats->ending_level ); else if ( (stats->starting_level > 0 ) && (stats->ending_level < 0 )) scores_rprintf( 232, y, "%d-S%d", stats->starting_level, -stats->ending_level ); { int h, m, s; h = stats->seconds/3600; s = stats->seconds%3600; m = s / 60; s = s % 60; scores_rprintf( 276, y, "%d:%02d:%02d", h, m, s ); } }