Hi, after testing with Dev C + + to compile without result, probe with Visual Studio and ...... it worked! I can now modify or add things to the source, and version 0.18 is great! congratulations to the staff for the great job. Today I bring a small modification to the source for hardcore characters, differentiate them from the menu of characters:
FontEngine.h
Search:
const SDL_Color FONT_BLACK = {0,0,0,0};
Add after:
const SDL_Color FONT_RED = {255,0,0};
GameStateLoad.cpp
Search in GameStateLoad::readGameSlot:
else if (infile.key == "class")
stats[slot].character_class = infile.val;
Add after:
else if (infile.key == "permadeath")
stats[slot].permadeath = atoi(infile.val.c_str());
Search in GameStateLoad::render():
// name
label.x = slot_pos[slot].x + name_pos.x;
label.y = slot_pos[slot].y + name_pos.y;
label_name[slot]->set(label.x, label.y, name_pos.justify, name_pos.valign, stats[slot].name, color_normal, name_pos.font_style);
label_name[slot]->render();
And change for:
label.x = slot_pos[slot].x + name_pos.x;
label.y = slot_pos[slot].y + name_pos.y;
if(stats[slot].permadeath == 1){
label_name[slot]->set(label.x, label.y, name_pos.justify, name_pos.valign, stats[slot].name, FONT_RED, name_pos.font_style);
label_name[slot]->render();
} else {
label_name[slot]->set(label.x, label.y, name_pos.justify, name_pos.valign, stats[slot].name, color_normal, name_pos.font_style);
label_name[slot]->render();
}
Preview:
similar to diablo 2 hardcore characters, names in red to differentiate
Greetings!
Ooh, great idea! We may tweak it just slightly (maybe put the color in a config file) but I think we will add this.
mods/fantasycore/engine/font_colors.txt
# hardcore color name
hardcore_color_name=255,64,64 (I like more this Red (menu_penalty XD))
GameStateLoad.cpp
label_name[slot]->set(label.x, label.y, name_pos.justify, name_pos.valign, stats[slot].name, font->getColor("hardcore_color_name"), name_pos.font_style);
is so much better, thanks for the idea :)
Are you on GitHub? If so, you can send this patch in and I'd accept it there. The main repo is at:
http://github.com/clintbellanger/flare-engine
If you're not on GitHub, we can add the feature manually (and add you to the Credits, of course).
I am not registered in Github, if you can add it manually if you want in the next version of my perfect :)
you may want to add some kind of symbol next to the characters with permadeath if your trying to allow colorblind people to still be able to figure out things. THey cant see the red but they could identify with a symbol for the permadeath characters.
Afaik, while red-green blind people can't tell greens and reds of the same luminosity apart, they can still differentiate between darker and lighter colors. Since the red in this screenshot is much darker than the white, it should still be easily possible for them to figure out which characters are in hardcore mode.
I proposed a solution here
https://github.com/clintbellanger/flare-engine/pull/616
This changes the color of the hardcore characters and adds an additional 'Permadeath' string beside the level
Good idea!