GameBoy (Color) port of the GTA San Andreas arcade game Duality
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

obj.h 751B

1234567891011121314151617181920212223242526
  1. /*
  2. * obj.h
  3. * Duality
  4. *
  5. * Copyright (C) 2025 Thomas Buck <thomas@xythobuz.de>
  6. *
  7. * Based on examples from gbdk-2020:
  8. * https://github.com/gbdk-2020/gbdk-2020/blob/develop/gbdk-lib/examples/cross-platform/metasprites/src/metasprites.c
  9. * https://github.com/gbdk-2020/gbdk-2020/blob/develop/gbdk-lib/examples/gb/galaxy/galaxy.c
  10. * https://github.com/gbdk-2020/gbdk-2020/blob/develop/gbdk-lib/examples/gb/rand/rand.c
  11. */
  12. #ifndef __OBJ_H__
  13. #define __OBJ_H__
  14. #include <stdint.h>
  15. #include "sprites.h"
  16. #define OBJ_ADDED 0
  17. #define OBJ_LIST_FULL -1
  18. void obj_init(void);
  19. int8_t obj_add(enum SPRITES sprite, int16_t off_x, int16_t off_y, int16_t spd_x, int16_t spd_y);
  20. void obj_draw(int16_t spd_x, int16_t spd_y, uint8_t *hiwater);
  21. #endif // __OBJ_H__