Changeset 174 for ttyvaders/trunk/src/main.c
- Timestamp:
- Nov 14, 2003, 6:02:36 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ttyvaders/trunk/src/main.c
r154 r174 37 37 { 38 38 game *g = malloc(sizeof(game)); 39 if(g == NULL) 40 exit(1); 39 41 40 42 srand(time(NULL)); … … 71 73 g->sf = create_starfield(g); 72 74 g->wp = malloc(sizeof(weapons)); 75 if(g->wp == NULL) 76 exit(1); 73 77 g->ex = malloc(sizeof(explosions)); 78 if(g->ex == NULL) 79 exit(1); 74 80 g->bo = malloc(sizeof(bonus)); 81 if(g->bo == NULL) 82 exit(1); 75 83 g->t = create_tunnel(g, g->w, g->h); 76 84 g->p = create_player(g); 77 85 g->al = malloc(sizeof(aliens)); 86 if(g->al == NULL) 87 exit(1); 78 88 79 89 init_bonus(g, g->bo);
Note: See TracChangeset
for help on using the changeset viewer.