- typedef struct tagTiles
- {
- unsigned short type;
- float x, y;
- }TTiles, PTiles;
- typedef struct tagTileInfo
- {
- bool moveAbleGround;
- bool moveAbleAir;
- }TTileInfo, PTileInfo;
- TTileInfo tileInfo[10];
- int tilesx = 20;
- int tilesy = 20;
- PTiles *tiles;
- int main()
- {
- tiles = (PTiles*)malloc(tilesx * tilesy * sizeof(tagTiles));
- .
- .
- .
- .
- for(int i = 0; i < 10; i++)
- {
- tileInfo[i].moveAbleGround = tileInfo[i].moveAbleAir = true;
- }
- return 0;
- }