Mercurial > hg > CbC > old > device
view test/stralign.c @ 556:ef225b589888 s-dandy-work
s-dandy fix
emit_copy register parallel rassign
struct init alignment
MIPS fregister save
author | kono |
---|---|
date | Fri, 06 Jan 2006 21:19:13 +0900 |
parents | |
children | 528fed826f17 |
line wrap: on
line source
extern int printf(const char *,...); #define BOOL char #define TRUE 1 // TRUE value #define FALSE 5 // FALSE value typedef struct player { int x; int y; int ch; int point; BOOL bf; int muteki; int zanki; int ccount; }player; typedef struct laser { float x; float y; float sx; float sy; int r; int enemyno; }laser; typedef struct stge { int stg; }stge; player jiki={60,200,3,0,FALSE,120,3,3}; /* .word 60 .word 200 .word 3 .word 0 .byte 0 .space 3 .word 120 .word 3 .word 3 .globl lg .align 2 .type lg,@object .size lg,4 */ stge lg={4096}; /* .word 4096 .globl pg .align 2 .type pg,@object .size pg,4 */ laser laser_lv3[64]={{0,0,0,0,64,0}}; /* .word 0x00000000 # 0 (float) .word 0x00000000 # 0 (float) .word 0x00000000 # 0 (float) .word 0x00000000 # 0 (float) .word 64 .word 0 .space 1512 */ int se_key[6]={-1,-1,-1,-1,-1,-1}; /* .word -1 .word -1 .word -1 .word -1 .word -1 .word -1 .text */ int main() { printf("%d\n", jiki. x); printf("%d\n", jiki. y); printf("%d\n", jiki. ch); printf("%d\n", jiki. point); printf("%d\n", jiki. bf); printf("%d\n", jiki. muteki); printf("%d\n", jiki. zanki); printf("%d\n", jiki. ccount); printf("%g\n", laser_lv3[0].x); printf("%g\n", laser_lv3[0].y); printf("%g\n", laser_lv3[0].sx); printf("%g\n", laser_lv3[0].sy); printf("%d\n", laser_lv3[0].r); printf("%d\n", laser_lv3[0].enemyno); printf("%d\n", lg.stg); }