Skip to content

Commit a43e3d6

Browse files
committed
Merge pull request #66 from Databean/moreSoftConfig
More soft config
2 parents 35c7982 + c081a36 commit a43e3d6

File tree

4 files changed

+24
-17
lines changed

4 files changed

+24
-17
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $(EXECUTABLE): $(ALLFILES)
2020
.PHONY: tests
2121
tests: $(EXECUTABLE)
2222
cd tests && $(MAKE)
23+
tests/main.test
2324

2425
.PHONY: clean
2526
clean:

resources/graphics.conf

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
# Font settings
2-
font.path=resources/ComicNeue-Bold.ttf
3-
font.size=50
2+
font.path = resources/ComicNeue-Bold.ttf
3+
font.size = 50
44

55
# General window settings
6-
screen.width=1280
7-
screen.height=720
6+
screen.width = 1280
7+
screen.height = 720
88

99
# Trading view screen coordinates
10-
screen.tradingView.bottomLeft=(0.1,0.1)
11-
screen.tradingView.topRight=(0.9,0.9)
10+
screen.tradingView.bottomLeft = (0.1,0.1)
11+
screen.tradingView.topRight = (0.9,0.9)
1212

13-
screen.tradingView.tradeButton.bottomLeft=(0.7,0.1)
14-
screen.tradingView.tradeButton.topRight=(0.9,0.2)
13+
screen.tradingView.tradeButton.bottomLeft = (0.7,0.1)
14+
screen.tradingView.tradeButton.topRight = (0.9,0.2)
1515

16-
screen.tradingView.cancelButton.bottomLeft=(0.1,0.1)
17-
screen.tradingView.cancelButton.topRight=(0.3,0.2)
16+
screen.tradingView.cancelButton.bottomLeft = (0.1,0.1)
17+
screen.tradingView.cancelButton.topRight = (0.3,0.2)
1818

19-
screen.tradingView.resources.height=0.13
20-
screen.tradingView.resources.leftX=0.3
21-
screen.tradingView.resources.rightX=0.6
22-
screen.tradingView.resources.bottomY=0.2
19+
screen.tradingView.resources.height = 0.13
20+
screen.tradingView.resources.leftX = 0.3
21+
screen.tradingView.resources.rightX = 0.6
22+
screen.tradingView.resources.bottomY = 0.2
2323

24-
screen.tradingView.players.bottomLeft=(0.1,0.8)
25-
screen.tradingView.players.topRight=(0.9,0.9)
24+
screen.tradingView.players.bottomLeft = (0.1,0.8)
25+
screen.tradingView.players.topRight = (0.9,0.9)

src/Config.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@ void Config::init(istream& source) {
114114
continue;
115115
}
116116
string name = line.substr(0, line.find('='));
117+
while(name[name.size()-1] == ' ' || name[name.size()-1] == '\t') {
118+
name = name.substr(0, name.size()-1);
119+
}
117120
string value = line.substr(line.find('=') + 1);
121+
while(value[0] == ' ' || value[0] == '\t') {
122+
value = value.substr(1);
123+
}
118124
values.insert(std::make_pair(name, ConfigValue(value)));
119125
}
120126
}

tests/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ OBJECTS_NO_MAIN := $(subst $(OBJ_HOME)/main.o,,$(OBJECTS))
55

66
.PHONY: run
77
run: $(TEST_FILE)
8-
./$(TEST_FILE)
8+
99

1010
$(TEST_FILE): ../$(EXECUTABLE) $(TEST_LINK_FILES) $(wildcard *.cpp)
1111
$(CXX) $(CXXFLAGS) $(TEST_INCLUDE) $(wildcard *.cpp) -o $@ $(TEST_LINK_FILES) $(OBJECTS_NO_MAIN) $(LDFLAGS)

0 commit comments

Comments
 (0)