mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
Add SurfaceCache::operator[]
This commit is contained in:
parent
e9217722f1
commit
9d741ba177
1 changed files with 4 additions and 1 deletions
|
@ -51,7 +51,6 @@ public:
|
||||||
if (!e.valid) {
|
if (!e.valid) {
|
||||||
e = surface;
|
e = surface;
|
||||||
e.allocate();
|
e.allocate();
|
||||||
Sleep(2000);
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,4 +58,8 @@ public:
|
||||||
// This should be unreachable but helps to panic anyways
|
// This should be unreachable but helps to panic anyways
|
||||||
Helpers::panic("Couldn't add surface to cache\n");
|
Helpers::panic("Couldn't add surface to cache\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SurfaceType& operator[](size_t i) {
|
||||||
|
return buffer[i];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue