lol its in c
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.
 
 
 
 

41 lines
922 B

#ifndef IS_MAP_H_
#define IS_MAP_H_
#include <stdint.h>
#include "sdk/assets.h"
typedef struct {
uint16_t tile_ptr;
uint8_t tile_count;
uint16_t map_ptr;
uint16_t collision_ptr;
int8_t map_width;
int8_t map_height;
uint8_t spawn_x;
uint8_t spawn_y;
uint8_t camera_x;
uint8_t camera_y;
} map_t;
extern map_t MAP; //!< The current game map
#define MAP_ASSET(var_name, filename) \
void __##var_name##__() __naked { \
__asm__("_" #var_name "::"); \
__asm__(".incbin \"_build/level/" filename "\""); \
__asm__("_" #var_name "_end::"); \
} \
EXTERN_ASSET(var_name)
void map_load(map_t *map);
void map_scroll_up(void);
void map_scroll_down(void);
void map_scroll_right(void);
void map_scroll_left(void);
#endif