15#define SHRUNK_TABLE_PROP_SIZE 0x2fe
20#define DISPLAY_GFX_WITH_SPRITE_ID_AUTO 0xFFFF
21#define SPRITE_INDEX_NOT_FOUND 0xFFFF
179 const spriteInfo *spriteInfo,
180 const paletteInfo *paletteInfo
185 const spriteInfo *spriteInfo,
186 const paletteInfo *paletteInfo,
189 short box_width_offset,
190 short box_height_offset
210 const pictureInfo *pictureInfo,
211 const paletteInfo *paletteInfo
216 const pictureInfo *pi,
217 const paletteInfo *pali,
220 short box_width_offset,
221 short box_height_offset,
227 const scrollerInfo *scrollerInfo,
228 const paletteInfo *paletteInfo
321 const spriteInfo *spriteInfo,
322 const paletteInfo *paletteInfo,
345 const spriteInfo *spriteInfo,
346 const paletteInfo *paletteInfo,
351 short box_width_offset,
352 short box_height_offset,
368 const pictureInfo *pictureInfo,
369 const paletteInfo *paletteInfo,
391 const pictureInfo *pictureInfo,
392 const paletteInfo *paletteInfo,
397 short box_width_offset,
398 short box_height_offset,
414 const scrollerInfo *scrollerInfo,
415 const paletteInfo *paletteInfo,
487#define nc_shrunk_extract_x(value) value >> 8
488#define nc_shrunk_extract_y(value) (BYTE)value
547#define nc_wait_vbl() waitVBlank();
585#define nc_rgb16_to_packed_color16(color) \
586 ((((color.dark) & 0xF) << 12) | (((color.r) & 0xF) << 8) | (((color.g) & 0xF) << 4) | ((color.b) & 0xF))
603#define nc_set_palette_by_packed_color16(palette_number, palette_index, color) \
605 int address = 0x400000 | ((palette_number) << 5) | ((palette_index) << 1); \
606 volMEMWORD(address) = (color); \
624#define nc_set_palette_by_rgb16(palette_number, palette_index, color) \
626 WORD packed_color = nc_rgb16_to_packed_color16(color); \
627 nc_set_palette_by_packed_color16(palette_number, palette_index, packed_color); \
630#define nc_get_palette_packed_color16(palette_number, palette_index) \
632 int address = 0x400000 | ((palette_number) << 5) | ((palette_index) << 1); \
633 volMEMWORD(address); \
636#define nc_set_palette_backdrop_by_packed_color16(packed_color) \
638 int address = 0x401FFE; \
639 volMEMWORD(address) = (packed_color); \
642#define nc_set_palette_backdrop_by_rgb16(color) \
644 WORD packed_color = nc_rgb16_to_packed_color16(color); \
645 nc_set_palette_backdrop_by_packed_color16(packed_color); \
655void nc_shrunk(WORD base_sprite, WORD max_width, WORD value);
675#define nc_bitwise_division_2(value) (value >> 1)
684#define nc_bitwise_division_4(value) (value >> 2)
693#define nc_bitwise_division_8(value) (value >> 3)
694#define nc_bitwise_division_16(value) (value >> 4)
695#define nc_bitwise_division_32(value) (value >> 5)
696#define nc_bitwise_division_64(value) (value >> 6)
697#define nc_bitwise_division_128(value) (value >> 7)
698#define nc_bitwise_division_256(value) (value >> 8)
700#define nc_bitwise_multiplication_2(value) (value << 1)
701#define nc_bitwise_multiplication_4(value) (value << 2)
702#define nc_bitwise_multiplication_8(value) (value << 3)
703#define nc_bitwise_multiplication_16(value) (value << 4)
704#define nc_bitwise_multiplication_32(value) (value << 5)
705#define nc_bitwise_multiplication_64(value) (value << 6)
706#define nc_bitwise_multiplication_128(value) (value << 7)
707#define nc_bitwise_multiplication_256(value) (value << 8)
720#define nc_random(range) rand() % range
733#define nc_min(a,b) ((a) < (b) ? (a) : (b))
746#define nc_max(a,b) ((a) > (b) ? (a) : (b))
759#define nc_abs(num) ((num) < 0 ? ~(num) + 1 : (num))
760#define nc_negative(num) -num
762#define nc_fix(num) num * 65536
763#define nc_fix_to_int(num) fixtoi(num)
764#define nc_int_to_fix(num) itofix(num)
765#define nc_fix_add(num1, num2) fadd(num1, num2)
766#define nc_fix_sub(num1, num2) fsub(num1, num2)
767#define nc_fix_mul(num1, num2) fmul(num1, num2)
768#define nc_cos(num) fcos(num)
769#define nc_tan(num) ftan(num)
790#define nc_copy_box(box_src, box_dest) memcpy(box_dest, box_src, sizeof(Box))
850void nc_init_box(
Box *box,
short width,
short height,
short widthOffset,
short heightOffset);
883#define nc_stop_cdda() nc_pause_cdda()
925#define nc_get_frame_counter() DAT_frameCounter
void nc_fix_set_palette_id(WORD palette)
Set palette ID for log text display.
void nc_word_to_hex(WORD value, char *hexchar)
void nc_get_position_gfx_picture(GFX_Picture *gfx_picture, Position *position)
void nc_log_int(int value)
void nc_init_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic, const pictureInfo *pi, const paletteInfo *pali, short box_witdh, short box_height, short box_width_offset, short box_height_offset, BOOL autobox_enabled)
void nc_hide_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic)
BOOL nc_joypad_is_down(BYTE id)
BOOL nc_vector_is_left(short x, short y, short v1x, short v1y, short v2x, short v2y)
WORD nc_display_gfx_scroller(GFX_Scroller *gfx_scroller, short x, short y)
Display a scroller at specified position.
void nc_log_next_line()
Move log cursor to next line.
void nc_log_rgb16(RGB16 *color)
void nc_update_animation_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic)
void nc_init_box(Box *box, short width, short height, short widthOffset, short heightOffset)
Initialize a bounding box with dimensions and offsets.
void nc_pause(BOOL(*exitFunc)())
void nc_show_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic)
BOOL nc_each_frame(DWORD frame)
WORD nc_display_gfx_picture(GFX_Picture *gfx_picture, short x, short y)
Display a picture at specified position.
void nc_move_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite, short x_offset, short y_offset)
void nc_log_word(WORD value)
BOOL nc_joypad_is_a(BYTE id)
void nc_shrunk_addr(WORD addr, WORD shrunk_value)
void nc_destroy_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic)
WORD nc_fix_load_palette_info(const paletteInfo *palette_info)
Allocate and set palette for fix layer.
void nc_log_palette_info(paletteInfo *paletteInfo)
void nc_sleep(DWORD frame)
void nc_get_position_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic, Position *position)
void nc_set_animation_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite, WORD anim)
BYTE nc_collide_boxes(Box *box, Box *boxes[], BYTE box_max)
Test collision between one box and an array of boxes.
void nc_move_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic, short x_offset, short y_offset)
void nc_read_palette_rgb16(BYTE palette_number, BYTE palette_index, RGB16 *rgb_color)
void nc_log_byte(BYTE value)
void nc_get_position_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic, Position *position)
void nc_push_remaining_frame_adpcm_player(DWORD frame)
int nc_shrunk_centroid_get_translated_x(short centerPosX, WORD tileWidth, BYTE shrunkX)
DWORD nc_wait_vbl_max(WORD nb)
void nc_init_gfx_picture(GFX_Picture *gfx_picture, const pictureInfo *pictureInfo, const paletteInfo *paletteInfo)
Initialize a picture graphics object.
WORD nc_shrunk_forge(BYTE xc, BYTE yc)
void nc_debug_joypad(BYTE id)
Adpcm_player * nc_get_adpcm_player()
WORD nc_get_max_sprite_index_used()
WORD nc_display_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic, short x, short y)
Display a picture with physics at specified position.
WORD nc_get_max_free_palette_index()
void nc_set_position_gfx_picture(GFX_Picture *gfx_picture, short x, short y)
void nc_log_dword(DWORD value)
void nc_show_gfx_picture(GFX_Picture *gfx_picture)
void nc_display_gfx_with_sprite_id(WORD sprite_id)
WORD nc_init_display_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic, const pictureInfo *pictureInfo, const paletteInfo *paletteInfo, short x, short y, short box_witdh, short box_height, short box_width_offset, short box_height_offset, BOOL autobox_enabled)
Initialize and display a picture with physics at specified position.
void nc_get_position_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite, Position *position)
BOOL nc_joypad_is_up(BYTE id)
void nc_show_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic)
void nc_set_position_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic, short x, short y)
WORD nc_log_info_line(char *txt,...)
Log formatted text with automatic line break.
void nc_destroy_gfx_picture(GFX_Picture *gfx_picture)
BOOL nc_collide_box(Box *box1, Box *box2)
Test collision between two bounding boxes.
WORD nc_get_max_palette_index_used()
BOOL nc_vectors_collide(Box *box, Position vec[], BYTE vector_max)
WORD nc_get_max_free_sprite_index()
void nc_shrunk_centroid_gfx_picture(GFX_Picture *gfx_picture, short center_x, short center_y, WORD shrunk_value)
WORD nc_get_position_y_log()
Get current vertical log cursor position.
WORD nc_get_position_x_log()
Get current horizontal log cursor position.
void nc_set_position_gfx_scroller(GFX_Scroller *gfx_scroller, short x, short y)
void nc_move_gfx_scroller(GFX_Scroller *gfx_scroller, short x, short y)
WORD nc_display_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite, short x, short y, WORD anim)
Display an animated sprite at specified position.
WORD nc_log_info(char *txt,...)
Log formatted text without automatic line break.
BOOL nc_joypad_is_right(BYTE id)
void nc_hide_gfx_picture(GFX_Picture *gfx_picture)
WORD nc_init_display_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic, const spriteInfo *spriteInfo, const paletteInfo *paletteInfo, short x, short y, short box_witdh, short box_height, short box_width_offset, short box_height_offset, WORD anim)
Initialize and display an animated sprite with physics at specified position.
void nc_packet_color16_to_rgb16(WORD packed_color, RGB16 *rgb_color)
void nc_init_gfx_scroller(GFX_Scroller *gfx_scroller, const scrollerInfo *scrollerInfo, const paletteInfo *paletteInfo)
void nc_set_joypad_edge_mode(BOOL actived)
WORD nc_init_display_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite, const spriteInfo *spriteInfo, const paletteInfo *paletteInfo, short x, short y, WORD anim)
Initialize and display an animated sprite at specified position.
BOOL nc_fix_unload_palette_id(WORD palette_id)
Unload palette data by palette ID for fix layer.
void nc_play_cdda(BYTE track)
void nc_log_short(short value)
void nc_move_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic, short x_offset, short y_offset)
WORD nc_get_free_sprite_index()
void nc_clear_palette_index_table()
void nc_destroy_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic)
void nc_move_gfx_picture(GFX_Picture *gfx_picture, short x, short y)
BOOL nc_joypad_is_start(BYTE id)
void nc_init_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite, const spriteInfo *spriteInfo, const paletteInfo *paletteInfo)
Initialize an animated sprite graphics object.
void nc_set_animation_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic, WORD anim)
void nc_fix_set_bank(WORD bank)
Set font bank for log text display.
void nc_log_packed_color16(WORD packed_color)
BOOL nc_joypad_is_c(BYTE id)
void nc_init_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic, const spriteInfo *spriteInfo, const paletteInfo *paletteInfo, short box_witdh, short box_height, short box_width_offset, short box_height_offset)
void nc_get_position_gfx_scroller(GFX_Scroller *gfx_scroller, Position *position)
BOOL nc_joypad_is_b(BYTE id)
BOOL nc_joypad_is_left(BYTE id)
void nc_shrunk_box(Box *box, Box *bOrigin, WORD shrunkValue)
DWORD nc_frame_to_second(DWORD frame)
void nc_byte_to_hex(BYTE value, char *hexchar)
void nc_hide_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite)
void nc_log_spriteInfo(spriteInfo *si)
void nc_update_adpcm_player()
WORD nc_shrunk_range(WORD addr_start, WORD addr_end, WORD shrunk_value)
void nc_destroy_gfx_scroller(GFX_Scroller *gfx_scroller)
WORD nc_get_shrunk_proportional_table(WORD index)
WORD nc_init_display_gfx_scroller(GFX_Scroller *gfx_scroller, const scrollerInfo *scrollerInfo, const paletteInfo *paletteInfo, short x, short y)
Initialize and display a scroller at specified position.
void nc_set_position_log(WORD _x, WORD _y)
Set log cursor position.
void nc_init_log()
Initialize the logging system.
void nc_set_position_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite, short x, short y)
void nc_destroy_palette(const paletteInfo *paletteInfo)
void nc_set_position_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic, short x, short y)
void nc_log_bool(BOOL value)
void nc_update_joypad(BYTE id)
WORD nc_init_display_gfx_picture(GFX_Picture *gfx_picture, const pictureInfo *pictureInfo, const paletteInfo *paletteInfo, short x, short y)
Initialize and display a picture at specified position.
WORD nc_display_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic, short x, short y, WORD anim)
Display an animated sprite with physics at specified position.
DWORD nc_second_to_frame(DWORD second)
WORD nc_palette_set_info(const paletteInfo *paletteInfo, WORD palette_index)
Load palette data and return the palette index.
void nc_print(int x, int y, char *label)
void nc_resize_box(Box *Box, short edge)
void nc_update_animation_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite)
void nc_update_mask(short x, short y, Position vec[], Position offset[], BYTE vector_max)
void nc_log_pictureInfo(pictureInfo *pi)
void nc_joypad_update(BYTE id)
void nc_hide_gfx_animated_sprite_physic(GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic)
void nc_destroy_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite)
void nc_clear_sprite_index_table()
BOOL nc_fix_unload_palette_info(const paletteInfo *palette_info)
Unload palette data by palette info for fix layer.
BOOL nc_joypad_is_d(BYTE id)
void nc_get_relative_position(Position *position, Box box, Position world_coord)
void nc_update_box(Box *box, short x, short y)
Update bounding box corner positions based on world coordinates.
void nc_show_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite)
int nc_shrunk_centroid_get_translated_y(short centerPosY, WORD tileHeight, BYTE shrunkY)
void nc_shrunk(WORD base_sprite, WORD max_width, WORD value)
Collision detection bounding box.
GFX_Animated_Sprite gfx_animated_sprite
Animated sprite graphics object.
const spriteInfo * spriteInfoDAT
const paletteInfo * paletteInfoDAT
const paletteInfo * paletteInfoDAT
const pictureInfo * pictureInfoDAT
Neo Geo RGB color representation with darkness level.