- // Load the spaceship graphic.
- ship.shape = malloc(sizeof(struct shape));
- if(!ship.shape) {
- fprintf(stderr, "can't allocate ship shape.\n");
- exit(1);
- }
- NULLERROR(ship.image = load_image("sprites/ship.png"));
- get_shape(ship.image, ship.shape);
-