1
0

GAME1が動くようになった

This commit is contained in:
otya128
2015-08-20 20:11:33 +09:00
parent 886be04289
commit 8e0a4e0ae4
8 changed files with 275 additions and 30 deletions

View File

@@ -49,7 +49,7 @@ class Sprite
PetitComputer petitcom;
void initUVTable()
{
UVTable[0] = SDL_Rect(0, 0, 16, 16);//Ichigo
UVTable[] = SDL_Rect(0, 0, 16, 16);//Ichigo
}
this(PetitComputer petitcom)
{
@@ -89,6 +89,10 @@ class Sprite
}
void spset(int id, int defno)
{
if(defno >= 2048 && defno < 4096)
{
defno -= 2048;
}
sprites[id] = SpriteData(id, UVTable[defno].x, UVTable[defno].y, UVTable[defno].w, UVTable[defno].h);
}
void spofs(int id, int x, int y)
@@ -96,4 +100,12 @@ class Sprite
sprites[id].x = x;
sprites[id].y = y;
}
void sphide(int id)
{
sprites[id].attr ^= SpriteAttr.show;
}
void spshow(int id)
{
sprites[id].attr |= SpriteAttr.show;
}
}