1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-26 18:29:54 +00:00

Fixed problem with erronously coalescing structs of same size/type affected by address-of. Closes #632

This commit is contained in:
jespergravgaard 2021-03-06 08:53:09 +01:00
parent f40050c558
commit c2bfa98d8f

View File

@ -0,0 +1,22 @@
struct Tile {
dword *Tiles;
word Offset;
byte Count;
char Name[20];
};
dword PlayerSprites[12];
dword Enemy2Sprites[12];
struct Tile S1 = {PlayerSprites, 20, 64, "Sven" };
struct Tile S2 = {Enemy2Sprites, 50, 128, "Jesper" };
struct Tile *TileDB[2] = {&S1, &S2};
void main() {
char * const SCREEN = 0x0400;
for(int i:0..1) {
struct Tile *tile = TileDB[i];
SCREEN[i] = tile->Count;
}
}