From b2b3a3f6689cff4dbf719138d824045f32041d6d Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 22 Sep 2009 10:39:41 +0200 Subject: use section method to get a pointer to a valid sSection or NULL --- spuregion.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spuregion.h') diff --git a/spuregion.h b/spuregion.h index 0af9996..8fa0e3d 100644 --- a/spuregion.h +++ b/spuregion.h @@ -30,6 +30,7 @@ #include const static int MAX_COLORS = 4; +const static int MAX_SECTIONS = 15; // we can support up to 15 sections per region struct sSection { uint16_t startColumn; @@ -45,15 +46,16 @@ public: uint16_t startLine; uint16_t endLine; - sSection sections[15]; // sections per region uint8_t openSections(); + sSection *section(uint8_t num); bool addColIndex(tIndex idx); bool containsColIndex(tIndex idx); private: uint8_t usedSections; + sSection sections[MAX_SECTIONS]; }; #endif // SPUREGION_H -- cgit v1.2.3