Moved the hero icon from EI & TSG into the main directories

This commit is contained in:
Benoît Timbert 2006-03-10 22:17:19 +00:00
parent ebff5d2e92
commit ea1fb98605
4 changed files with 40 additions and 0 deletions

View file

@ -63,6 +63,7 @@ SVN trunk (1.1.1+svn):
* increased cost of the Draug from 40 to 50
* decreased melee damage of the Blood Bat from 6-3 to 5-3
* graphics
* moved hero icon from the South Guard into main directories
* new attack icons: animal fangs, axe, baneblade, battle axe, beak,
claws-animal, claw-undead, entangle, faery touch, fireball,
fist-troll, fist-skeletal, hammer, hatchet, human-greatsword

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 B

View file

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 446 B

View file

@ -1501,6 +1501,38 @@ void game_controller::play_replay()
}
}
void display_progress(display &dsply, int percentage)
{
CVideo &video = dsply.video();
/* Saturate percentage. */
if (percentage < 0) {
percentage = 0;
}
else if (percentage > 100) {
percentage = 100;
}
int bcr = 255, bcg = 255, bcb = 255; /* Border color. */
int dcr = 0, dcg = 0, dcb = 255; /* Done color. */
int lcr = 0, lcg = 0, lcb = 15; /* Leftover color. */
int bw = 5; /* Border width in pixels. */
int scrx = video.getx() - 2*bw; /* Available width. */
int scry = video.gety() - 2*bw; /* Available height. */
int pbx = scrx/2; /* Used width. */
int pby = scry/16; /* Used heigth. */
/* Draw border. */
draw_solid_tinted_rectangle ((scrx-pbx)/2-bw, (scry-pby)/2-bw, pbx + 2*bw, bw, bcr, bcg, bcb, 1.0, video.getSurface());
draw_solid_tinted_rectangle ((scrx-pbx)/2-bw, (scry-pby)/2-bw, bw, pby + 2*bw, bcr, bcg, bcb, 1.0, video.getSurface());
draw_solid_tinted_rectangle ((scrx-pbx)/2-bw, (scry-pby)/2+pby+bw, pbx + 2*bw, bw, bcr, bcg, bcb, 1.0, video.getSurface());
draw_solid_tinted_rectangle ((scrx-pbx)/2+pbx+bw, (scry-pby)/2-bw, bw, pby + 2*bw, bcr, bcg, bcb, 1.0, video.getSurface());
/* Draw done piece. */
draw_solid_tinted_rectangle ((scrx-pbx)/2, (scry-pby)/2, percentage * pbx / 100, pby, dcr, dcg, dcb, 1.0, video.getSurface());
/* Draw leftover piece. */
draw_solid_tinted_rectangle ((scrx-pbx)/2 + percentage * pbx / 100, (scry-pby)/2, (100 - percentage) * pbx / 100, pby, lcr, lcg, lcb, 1.0, video.getSurface());
/* Update the screen. */
update_whole_screen();
dsply.flip();
}
int play_game(int argc, char** argv)
{
const int start_ticks = SDL_GetTicks();
@ -1646,6 +1678,7 @@ int play_game(int argc, char** argv)
std::cerr << "could not initialize display\n";
return 0;
}
display_progress (game.disp(), 10);
#ifdef WIN32
res = game.init_config();
@ -1654,18 +1687,21 @@ int play_game(int argc, char** argv)
return 0;
}
#endif
display_progress (game.disp(), 25);
res = game.init_language();
if(res == false) {
std::cerr << "could not initialize the language\n";
return 0;
}
display_progress (game.disp(), 40);
res = font::load_font_config();
if(res == false) {
std::cerr << "could not re-initialize fonts for the current language\n";
return 0;
}
display_progress (game.disp(), 55);
#ifndef WIN32
// it is better for gettext-native platforms to read the config
@ -1676,6 +1712,7 @@ int play_game(int argc, char** argv)
return 0;
}
#endif
display_progress (game.disp(), 70);
const cursor::manager cursor_manager;
#if defined(_X11) && !defined(__APPLE__)
@ -1685,6 +1722,8 @@ int play_game(int argc, char** argv)
int ntip = -1;
config tips_of_day;
display_progress (game.disp(), 85);
for(;;) {
//make sure the game config is always set to how it should be at the title screen
game.reset_game_cfg();