Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
FLARE

Mini contribution, Hardcore names in red

Diablo IV
Friday, April 12, 2013 - 12:47

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!

  • Log in or register to post comments
Clint Bellanger
joined 11 years 4 months ago
Friday, April 12, 2013 - 14:23
Clint Bellanger's picture

Ooh, great idea! We may tweak it just slightly (maybe put the color in a config file) but I think we will add this.

  • Log in or register to post comments
Diablo IV
joined 8 years 3 months ago
Friday, April 12, 2013 - 15:01

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 :)

 

  • Log in or register to post comments
Clint Bellanger
joined 11 years 4 months ago
Friday, April 12, 2013 - 16:32
Clint Bellanger's picture

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).

  • Log in or register to post comments
Diablo IV
joined 8 years 3 months ago
Friday, April 12, 2013 - 19:03

I am not registered in Github, if you can add it manually if you want in the next version of my perfect :)

  • Log in or register to post comments
Malifer
joined 8 years 8 months ago
Saturday, April 13, 2013 - 09:04

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.

  • Log in or register to post comments
CruzR
joined 9 years 11 months ago
Saturday, April 13, 2013 - 10:03
CruzR's picture

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.

  • Log in or register to post comments
Stefan Beller
joined 8 years 9 months ago
Sunday, April 21, 2013 - 11:19

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

 

  • Log in or register to post comments
Diablo IV
joined 8 years 3 months ago
Wednesday, April 24, 2013 - 00:05

Good idea!

  • Log in or register to post comments