Fix SPCLR

This commit is contained in:
otya128 committed 2016-12-29 21:27:16 +09:00
1 parent 8af9c64396
commit 735b632f52
1 file changed
+12 -1
+12 -1
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++)