Page MenuHomeWildfire Games

Adds icons to minimap
ClosedPublic

Authored by vladislavbelov on Feb 27 2022, 10:09 PM.
Tags
None
Subscribers
Restricted Owners Package
Restricted Owners Package
Restricted Owners Package
Restricted Owners Package
Tokens
"Love" token, awarded by Silier."Dat Boi" token, awarded by wowgetoffyourcellphone."Burninate" token, awarded by Stan.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP26592: Adds icons to minimap.
Trac Tickets
#6151
Summary

Preview, current size is bit smaller:

Icon for civil centre:

Currently icons are drawn on top of the minimap, so they're not clipped by minimap bounds.

Test Plan
  1. Apply the patch and compile the game (add the icon to session/icons/minimap/)
  2. Test that minimap icons work
  3. Test that the option disables minimap icons
  4. Check how icons look like on the map border

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
SeverityLocationCodeMessage
Errorsource/simulation2/components/CCmpMinimap.cpp:1LICENCE YEAR1Inaccurate Copyright Year
Unit
Unit Tests Skipped
Build Status
Buildable 19665
Build 47069: Vulcan BuildJenkins
Build 47068: Vulcan Build (macOS)Jenkins
Build 47067: Vulcan Build (Windows)Jenkins

Event Timeline

vladislavbelov edited the summary of this revision. (Show Details)
vladislavbelov edited the summary of this revision. (Show Details)Feb 27 2022, 10:12 PM
vladislavbelov edited the test plan for this revision. (Show Details)

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/6823/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/5731/display/redirect

vladislavbelov requested review of this revision.Feb 27 2022, 10:34 PM
Stan awarded a token.Feb 27 2022, 10:44 PM
Stan added a subscriber: Stan.Feb 28 2022, 1:04 AM
Apply the patch and compile the game (add the icon to session/icons/minimap/)... ✓
Test that minimap icons work... ✓

Test that the option disables minimap icons... ✓
Check how icons look like on the map border... ✓
Test that icons change color when a building is captured... ✓
Test ARB icons... ✓
Test Limits ... ?
binaries/data/mods/public/gui/options/options.json
614
source/graphics/MiniMapTexture.cpp
61

Is there a special reason for this limit to be 64 eg could it be 128 instead?

16 cc + 8 wonders + 8 relics + 32 mines = 64

519

Not sure if intended, but it will spam a lot. Also overloading the number won't actually print 126 /64 but just 64

source/simulation2/components/CCmpMinimap.cpp
133

Path hardcoding sounds sane, I looked around and the session icons are rare anyway.

source/simulation2/components/ICmpMinimap.h
51
55–58

Why not CStr / VFSPath?
No virtual const?

Langbart updated the Trac tickets for this revision.Feb 28 2022, 2:25 AM

Apply the patch and compile the game (add the icon to session/icons/minimap/)

ok

Test that minimap icons work

yes

Test that the option disables minimap icons

You mean the Defuaut.cfg set to false, yes this works
Maybe a bit of text can be added to the Default.cfg

Check how icons look like on the map border

So beautiful. You rock!

vladislavbelov marked 2 inline comments as done.Feb 28 2022, 7:54 AM

You mean the Defuaut.cfg set to false, yes this works

I mean regular options.

Maybe a bit of text can be added to the Default.cfg

Maybe, though I'm not sure what to add exactly. Maybe duplicate options.json tooltips.

source/graphics/MiniMapTexture.cpp
61

Currently I have in mind only CCs. So it was 8 players * 8 CC per player. I'd like to have it as small as possible until we have a lazy update mechanism. Because currently I fetch icons even if simulation state wasn't changed.

519

It tries to overflow, but I don't allow to have more than the limit. The repeating message is to not forget about error for users :)

source/simulation2/components/ICmpMinimap.h
55–58

We use std::string and std::wstring as return types. I'm not sure about VfsPath or CStrW, haven't seen them as return types.

Stan added inline comments.Feb 28 2022, 8:17 AM
source/graphics/MiniMapTexture.cpp
61

Yeah I'd like to bump it just a little for mods/ campaigns.

519

It makes the game a bit laggy, can it be moved out of the loop?

source/simulation2/components/ICmpMinimap.h
55–58

Weird I was sure we used it for other interfaces (didn't check)

This revision was not accepted when it landed; it landed in state Needs Review.Mar 7 2022, 2:22 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
vladislavbelov marked 2 inline comments as done.
Owners added subscribers: Restricted Owners Package, Restricted Owners Package, Restricted Owners Package, Restricted Owners Package.Mar 7 2022, 2:22 AM