1
0

Implement BG callback

This commit is contained in:
otya128
2016-12-31 13:50:44 +09:00
parent 4eb6a1fc98
commit e4deae3b69
4 changed files with 36 additions and 2 deletions

View File

@@ -526,6 +526,16 @@ class PetitComputer
SDL_SetWindowSize(window, cast(int)(currentDisplay.windowSize.width * scaleX), cast(int)(currentDisplay.windowSize.height * scaleY));
}
bool isValidLayer(int layer)
{
if (layer < 0)
return false;
if(displaynum)
{
return layer < bg.length - bgmax;
}
return layer < bgmax;
}
BG getBG(int layer)
{
if(displaynum)