From ab24c7ec507478f9993718f773edebaad101a315 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 22 Sep 2009 10:52:09 +0200 Subject: add method to add a new section to a region --- spuregion.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spuregion.c') diff --git a/spuregion.c b/spuregion.c index da36a64..6ad9cca 100644 --- a/spuregion.c +++ b/spuregion.c @@ -39,6 +39,16 @@ uint8_t cSpuRegion::openSections() return usedSections + 1; } +bool cSpuRegion::newSection() +{ + if (usedSections + 1 == MAX_SECTIONS) { + return false; + } + + usedSections++; + return true; +} + sSection *cSpuRegion::section(uint8_t num) { if (usedSections == MAX_SECTIONS) { -- cgit v1.2.3