Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tint the designations based on type, similar to DF #186

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions SpriteObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,15 @@ void c_sprite::assemble_world_offset(int x, int y, int z, int plateoffset, Tile
}

ALLEGRO_COLOR shade_color = shadeAdventureMode(get_color(b), b->fog_of_war, b->designation.bits.outside);
if (ssConfig.show_designations && containsDesignations(b->designation, b->occ)) {
if (b->occ.bits.dig_auto) { shade_color = al_map_rgba(0, 255, 127, 127); }
if (b->occ.bits.dig_marked) {
shade_color = al_map_rgba(0, 127, 255, 127);
if (b->occ.bits.dig_auto) {
shade_color = partialBlend(shade_color, al_map_rgba(0, 255, 127, 127), 25);
}
}
}
if(chop && ( halftile == HALFPLATECHOP)) {
if(shade_color.a > 0.001f) {
b->AssembleSprite(
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Template for new versions:
- `stonesense`: added option ``EXTRUDE_TILES`` to slightly expand sprite to avoid gaps (on by default)
- `stonesense`: added option ``PIXELPERFECT_ZOOM`` to change the zoom scale to avoid gaps (off by default)
- `stonesense`: added back minecart track graphics
- `stonesense`: designations in Stonesense now are tinted based on type, similar to DF

## Fixes
- `stonesense`: fixed announcement text rendering off-screen with larger font sizes
Expand Down