diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | hslist.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index c08852f..f0b1082 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects | |||
2 | ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} | 2 | ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} |
3 | 3 | ||
4 | bin_PROGRAMS = mazeoflife | 4 | bin_PROGRAMS = mazeoflife |
5 | mazeoflife_SOURCES = highscore.cpp hslist.cpp mazeoflife.cpp util.cpp titlestate.cpp gamestate.cpp | 5 | mazeoflife_SOURCES = highscore.cpp highscore.h hslist.cpp hslist.h mazeoflife.cpp mazeoflife.h util.cpp util.h titlestate.cpp titlestate.h gamestate.cpp gamestate.h |
6 | AM_CXXFLAGS = $(SDLTTF_CXXFLAGS) $(SDLNET_CXXFLAGS) | 6 | AM_CXXFLAGS = $(SDLTTF_CXXFLAGS) $(SDLNET_CXXFLAGS) |
7 | mazeoflife_LDADD = $(SDLTTF_LIBS) $(SDLNET_LIBS) | 7 | mazeoflife_LDADD = $(SDLTTF_LIBS) $(SDLNET_LIBS) |
8 | EXTRA_DIST = resources/chl.bmp resources/hlo_paartm.bmp resources/hlo_passartm.bmp resources/hlo_rtm.bmp resources/htp1.bmp resources/htp2.bmp resources/icon.bmp resources/mono.ttf resources/pointer.bmp resources/title.bmp | 8 | EXTRA_DIST = resources/chl.bmp resources/hlo_paartm.bmp resources/hlo_passartm.bmp resources/hlo_rtm.bmp resources/htp1.bmp resources/htp2.bmp resources/icon.bmp resources/mono.ttf resources/pointer.bmp resources/title.bmp |
diff --git a/hslist.cpp b/hslist.cpp index 9a12dac..ed7f3ca 100644 --- a/hslist.cpp +++ b/hslist.cpp | |||
@@ -8,6 +8,7 @@ | |||
8 | #include "titlestate.h" | 8 | #include "titlestate.h" |
9 | #include "gamestate.h" | 9 | #include "gamestate.h" |
10 | 10 | ||
11 | // We want to be able to sort Highscore objects in descending score order | ||
11 | struct hslist_comp { | 12 | struct hslist_comp { |
12 | bool operator() (Highscore* lhs, Highscore* rhs) const | 13 | bool operator() (Highscore* lhs, Highscore* rhs) const |
13 | { | 14 | { |
@@ -15,6 +16,7 @@ struct hslist_comp { | |||
15 | } | 16 | } |
16 | } hslist_comp_i; | 17 | } hslist_comp_i; |
17 | 18 | ||
19 | // resetRanks : sets the rank of all Highscore objects in a hslist_t to their (one-based) index in the list | ||
18 | void resetRanks(hslist_t in) | 20 | void resetRanks(hslist_t in) |
19 | { | 21 | { |
20 | int i=1; | 22 | int i=1; |