1
0

Fix SPCLR

This commit is contained in:
otya128
2016-12-29 21:27:16 +09:00
parent 8af9c64396
commit 735b632f52

View File

@@ -973,11 +973,22 @@ class Sprite
} }
void spclr() void spclr()
{ {
synchronized (this) for(int i = 0; i < sprites.length; i++) auto id = spid(0);
if(spmax <= id)
{
synchronized (this) for(int i = id; i < sprites.length; i++)
{ {
sprites[i].clear; sprites[i].clear;
} }
} }
else
{
synchronized (this) for(int i = 0; i < spmax; i++)
{
sprites[i].clear;
}
}
}
void allclear() void allclear()
{ {
synchronized (this) for(int i = 0; i < sprites.length; i++) synchronized (this) for(int i = 0; i < sprites.length; i++)