summaryrefslogtreecommitdiff
path: root/spuregion.c
diff options
context:
space:
mode:
Diffstat (limited to 'spuregion.c')
-rw-r--r--spuregion.c10
1 files changed, 10 insertions, 0 deletions
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) {