Skip to content

Commit

Permalink
Merge pull request #190 from SquidCoderIndustries/squid-helper-methods
Browse files Browse the repository at this point in the history
* publicize clockToMs function
* Add Light blue and light red to uiColor

* add helper method `isViewTracking()`
  • Loading branch information
myk002 authored Feb 9, 2025
2 parents c076e2e + 5f4c30f commit 92794ae
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,10 @@ namespace {
}
}

bool isViewTracking() {
auto& ssConfig = stonesenseState.ssConfig;
return ssConfig.config.track_mode != Config::TRACKING_NONE;
}

bool loadConfigFile()
{
Expand Down
1 change: 1 addition & 0 deletions Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ struct action_name_mapper {
void (*func)(uint32_t);
};

bool isViewTracking();
bool loadConfigFile();
std::optional<std::string> trim_line(std::string line);
6 changes: 6 additions & 0 deletions SpriteColors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ ALLEGRO_COLOR uiColor(int32_t index)
case 3:
//lime
return ssConfig.config.colors.getDfColor(dfColors::lgreen, ssConfig.config.useDfColors);
case 4:
//light blue
return ssConfig.config.colors.getDfColor(dfColors::lblue, ssConfig.config.useDfColors);
case 5:
//light red
return ssConfig.config.colors.getDfColor(dfColors::lred, ssConfig.config.useDfColors);
default:
//white
return ssConfig.config.colors.getDfColor(dfColors::white, ssConfig.config.useDfColors);
Expand Down
3 changes: 3 additions & 0 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ constexpr auto MAX_ANIMFRAME = 6;
// binary 00111111
constexpr auto ALL_FRAMES = 0b111111;

//from Gui.cpp
float clockToMs(float clockTicks);

//from UserInput.cpp
void doMouse();
void doKeys(int32_t key, uint32_t keymod);
Expand Down

0 comments on commit 92794ae

Please sign in to comment.