Neocore
Loading...
Searching...
No Matches
neocore.h
Go to the documentation of this file.
1/*
2 David Vandensteen
3*/
4
5 //--------------------------------------------------------------------------//
6 // DEFINE //
7//--------------------------------------------------------------------------//
8
9#ifndef NEOCORE_H
10#define NEOCORE_H
11
12#include <DATlib.h>
13#include <math.h>
14
15#define SHRUNK_TABLE_PROP_SIZE 0x2fe
16
17#define MANUALBOX 0
18#define AUTOBOX 1
19
20#define DISPLAY_GFX_WITH_SPRITE_ID_AUTO 0xFFFF
21#define SPRITE_INDEX_NOT_FOUND 0xFFFF
22
25
26 //--------------------------------------------------------------------------//
27 // STRUCTURE //
28//--------------------------------------------------------------------------//
29
43typedef struct Position { short x; short y; } Position;
44
45//void mask_display(picture pic[], Position vec[], BYTE vector_max); // todo (minor) - rename ? (vectorsDisplay)
46void nc_update_mask(short x, short y, Position vec[], Position offset[], BYTE vector_max); // todo (minor) - rename ? (vectorsDebug)
47
69typedef struct Box {
75 short width;
76 short height;
80
95typedef struct GFX_Animated_Sprite {
96 aSprite aSpriteDAT;
97 const spriteInfo *spriteInfoDAT;
98 const paletteInfo *paletteInfoDAT;
100
101typedef struct GFX_Picture {
102 picture pictureDAT;
103 const pictureInfo *pictureInfoDAT;
104 const paletteInfo *paletteInfoDAT;
108
114
115typedef struct GFX_Picture_Physic {
121
122typedef struct GFX_Scroller {
123 scroller scrollerDAT;
124 const scrollerInfo *scrollerInfoDAT;
125 const paletteInfo *paletteInfoDAT;
127
128typedef struct Adpcm_player {
132
150typedef struct RGB16 {
151 BYTE dark : 4, r : 4, g : 4, b : 4;
153
154 //--------------------------------------------------------------------------//
155 // GFX //
156//--------------------------------------------------------------------------//
157
158 /*------------------*/
159 /* GFX INIT */
160/*------------------*/
161
178 GFX_Animated_Sprite *gfx_animated_sprite,
179 const spriteInfo *spriteInfo,
180 const paletteInfo *paletteInfo
181);
182
184 GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic,
185 const spriteInfo *spriteInfo,
186 const paletteInfo *paletteInfo,
187 short box_witdh,
188 short box_height,
189 short box_width_offset,
190 short box_height_offset
191);
192
209 GFX_Picture *gfx_picture,
210 const pictureInfo *pictureInfo,
211 const paletteInfo *paletteInfo
212);
213
215 GFX_Picture_Physic *gfx_picture_physic,
216 const pictureInfo *pi,
217 const paletteInfo *pali,
218 short box_witdh,
219 short box_height,
220 short box_width_offset,
221 short box_height_offset,
222 BOOL autobox_enabled
223);
224
226 GFX_Scroller *gfx_scroller,
227 const scrollerInfo *scrollerInfo,
228 const paletteInfo *paletteInfo
229);
230
231 /*------------------*/
232 /* GFX DISPLAY */
233/*------------------*/
234
235void nc_display_gfx_with_sprite_id(WORD sprite_id);
236
248 GFX_Animated_Sprite *gfx_animated_sprite,
249 short x,
250 short y,
251 WORD anim
252);
253
265 GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic,
266 short x,
267 short y,
268 WORD anim
269);
270
280WORD nc_display_gfx_picture(GFX_Picture *gfx_picture, short x, short y);
281
291WORD nc_display_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic, short x, short y);
292
302WORD nc_display_gfx_scroller(GFX_Scroller *gfx_scroller, short x, short y);
303
304 /*-----------------------*/
305 /* GFX INIT DISPLAY */
306/*-----------------------*/
307
320 GFX_Animated_Sprite *gfx_animated_sprite,
321 const spriteInfo *spriteInfo,
322 const paletteInfo *paletteInfo,
323 short x,
324 short y,
325 WORD anim
326);
327
344 GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic,
345 const spriteInfo *spriteInfo,
346 const paletteInfo *paletteInfo,
347 short x,
348 short y,
349 short box_witdh,
350 short box_height,
351 short box_width_offset,
352 short box_height_offset,
353 WORD anim
354);
355
367 GFX_Picture *gfx_picture,
368 const pictureInfo *pictureInfo,
369 const paletteInfo *paletteInfo,
370 short x,
371 short y
372);
373
390 GFX_Picture_Physic *gfx_picture_physic,
391 const pictureInfo *pictureInfo,
392 const paletteInfo *paletteInfo,
393 short x,
394 short y,
395 short box_witdh,
396 short box_height,
397 short box_width_offset,
398 short box_height_offset,
399 BOOL autobox_enabled
400);
401
413 GFX_Scroller *gfx_scroller,
414 const scrollerInfo *scrollerInfo,
415 const paletteInfo *paletteInfo,
416 short x,
417 short y
418);
419
420 /*------------------*/
421 /* GFX VISIBILITY */
422/*------------------*/
423
425
429
434
435 /*------------------*/
436 /* GFX POSITION */
437/*------------------*/
438
439/* GFX POSITION GETTER */
440
443 GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic,
444 Position *position
445);
449
450/* GFX POSITION SETTER */
451
452void nc_set_position_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic, short x, short y);
453
455 GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic,
456 short x,
457 short y
458);
459
460void nc_set_position_gfx_scroller(GFX_Scroller *gfx_scroller, short x, short y);
461void nc_set_position_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite, short x, short y);
462void nc_set_position_gfx_picture(GFX_Picture *gfx_picture, short x, short y);
463
464/* GFX POSITION MOVE*/
465
466void nc_move_gfx_picture_physic(GFX_Picture_Physic *gfx_picture_physic, short x_offset, short y_offset);
467
469 GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic,
470 short x_offset,
471 short y_offset
472);
473
475 GFX_Animated_Sprite *gfx_animated_sprite,
476 short x_offset,
477 short y_offset
478);
479
480void nc_move_gfx_picture(GFX_Picture *gfx_picture, short x, short y);
481void nc_move_gfx_scroller(GFX_Scroller *gfx_scroller, short x, short y);
482
483 /*-------------------*/
484 /* GFX SHRUNK */
485/*-------------------*/
486
487#define nc_shrunk_extract_x(value) value >> 8
488#define nc_shrunk_extract_y(value) (BYTE)value
489
491 GFX_Picture *gfx_picture,
492 short center_x,
493 short center_y,
494 WORD shrunk_value
495);
496
497 /*-------------------*/
498 /* GFX ANIMATION */
499/*-------------------*/
500
501void nc_set_animation_gfx_animated_sprite(GFX_Animated_Sprite *gfx_animated_sprite, WORD anim);
502
504 GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic,
505 WORD anim
506);
507
509
511 GFX_Animated_Sprite_Physic *gfx_animated_sprite_physic
512);
513
514 /*-------------------*/
515 /* GFX DESTROY */
516/*-------------------*/
517
521
524
525 //--------------------------------------------------------------------------//
526 // GPU //
527//--------------------------------------------------------------------------//
528
531
532 /*------------------------------*/
533 /* GPU VBL */
534/*------------------------------*/
535
547#define nc_wait_vbl() waitVBlank();
549DWORD nc_wait_vbl_max(WORD nb);
550
551 /*------------------------------*/
552 /* GPU SPRITE INDEX MANAGEMENT */
553/*------------------------------*/
554
558
559 /*---------------*/
560 /* GPU PALETTE */
561/*---------------*/
562
563void nc_destroy_palette(const paletteInfo* paletteInfo);
568void nc_read_palette_rgb16(BYTE palette_number, BYTE palette_index, RGB16 *rgb_color);
569void nc_packet_color16_to_rgb16(WORD packed_color, RGB16 *rgb_color);
570
585#define nc_rgb16_to_packed_color16(color) \
586 ((((color.dark) & 0xF) << 12) | (((color.r) & 0xF) << 8) | (((color.g) & 0xF) << 4) | ((color.b) & 0xF))
587
603#define nc_set_palette_by_packed_color16(palette_number, palette_index, color) \
604 do { \
605 int address = 0x400000 | ((palette_number) << 5) | ((palette_index) << 1); \
606 volMEMWORD(address) = (color); \
607 } while (0)
608
624#define nc_set_palette_by_rgb16(palette_number, palette_index, color) \
625 do { \
626 WORD packed_color = nc_rgb16_to_packed_color16(color); \
627 nc_set_palette_by_packed_color16(palette_number, palette_index, packed_color); \
628 } while (0)
629
630#define nc_get_palette_packed_color16(palette_number, palette_index) \
631 ({ \
632 int address = 0x400000 | ((palette_number) << 5) | ((palette_index) << 1); \
633 volMEMWORD(address); \
634 })
635
636#define nc_set_palette_backdrop_by_packed_color16(packed_color) \
637 do { \
638 int address = 0x401FFE; \
639 volMEMWORD(address) = (packed_color); \
640 } while (0)
641
642#define nc_set_palette_backdrop_by_rgb16(color) \
643 do { \
644 WORD packed_color = nc_rgb16_to_packed_color16(color); \
645 nc_set_palette_backdrop_by_packed_color16(packed_color); \
646 } while (0)
647
648 /*--------------*/
649 /* GPU shrunk */
650/*--------------*/
651
653int nc_shrunk_centroid_get_translated_x(short centerPosX, WORD tileWidth, BYTE shrunkX);
654int nc_shrunk_centroid_get_translated_y(short centerPosY, WORD tileHeight, BYTE shrunkY);
655void nc_shrunk(WORD base_sprite, WORD max_width, WORD value);
656WORD nc_shrunk_forge(BYTE xc, BYTE yc);
657void nc_shrunk_addr(WORD addr, WORD shrunk_value);
658WORD nc_shrunk_range(WORD addr_start, WORD addr_end, WORD shrunk_value);
659
660 //--------------------------------------------------------------------------//
661 // MATH //
662//--------------------------------------------------------------------------//
663
675#define nc_bitwise_division_2(value) (value >> 1)
676
684#define nc_bitwise_division_4(value) (value >> 2)
685
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)
699
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)
708
720#define nc_random(range) rand() % range
721
733#define nc_min(a,b) ((a) < (b) ? (a) : (b))
734
746#define nc_max(a,b) ((a) > (b) ? (a) : (b))
747
759#define nc_abs(num) ((num) < 0 ? ~(num) + 1 : (num))
760#define nc_negative(num) -num
761
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)
770
771void nc_byte_to_hex(BYTE value, char *hexchar);
772void nc_word_to_hex(WORD value, char *hexchar);
773char nc_sin(WORD index);
774
775 //--------------------------------------------------------------------------//
776 // PHYSIC //
777//--------------------------------------------------------------------------//
778
790#define nc_copy_box(box_src, box_dest) memcpy(box_dest, box_src, sizeof(Box))
791
811BYTE nc_collide_boxes(Box *box, Box *boxes[], BYTE box_max);
812
831BOOL nc_collide_box(Box *box1, Box *box2);
832
850void nc_init_box(Box *box, short width, short height, short widthOffset, short heightOffset);
851
867void nc_update_box(Box *box, short x, short y);
868
869void nc_shrunk_box(Box *box, Box *bOrigin, WORD shrunkValue);
870void nc_resize_box(Box *Box, short edge); // todo (minor) - deprecated ?
871
872 //--------------------------------------------------------------------------//
873 // SOUND //
874//--------------------------------------------------------------------------//
875
876 //---------
877 // CDDA
878//-----------
879
880void nc_play_cdda(BYTE track);
883#define nc_stop_cdda() nc_pause_cdda()
884
885 //--------
886 // ADPCM
887//----------
888
890
891 //----------------------------------------------------------------------------//
892 // JOYPAD //
893//----------------------------------------------------------------------------//
894
895void nc_set_joypad_edge_mode(BOOL actived);
896void nc_update_joypad(BYTE id);
897void nc_joypad_update(BYTE id);
898
899BOOL nc_joypad_is_up(BYTE id);
900BOOL nc_joypad_is_down(BYTE id);
901BOOL nc_joypad_is_left(BYTE id);
902BOOL nc_joypad_is_right(BYTE id);
903BOOL nc_joypad_is_start(BYTE id);
904BOOL nc_joypad_is_a(BYTE id);
905BOOL nc_joypad_is_b(BYTE id);
906BOOL nc_joypad_is_c(BYTE id);
907BOOL nc_joypad_is_d(BYTE id);
908
909void nc_debug_joypad(BYTE id);
910
911 //----------------------------------------------------------------------------//
912 // UTIL //
913//----------------------------------------------------------------------------//
914
915DWORD nc_frame_to_second(DWORD frame);
916DWORD nc_second_to_frame(DWORD second);
918void nc_reset();
919void nc_get_relative_position(Position *position, Box box, Position world_coord); // TODO
920void nc_pause(BOOL (*exitFunc)());
921void nc_sleep(DWORD frame);
922BOOL nc_each_frame(DWORD frame);
923void nc_print(int x, int y, char *label);
925#define nc_get_frame_counter() DAT_frameCounter
926
927 /*---------------*/
928 /* UTIL LOGGER */
929/*---------------*/
930
942
949
956
967void nc_set_position_log(WORD _x, WORD _y);
968
979
993void nc_fix_set_bank(WORD bank);
994
1009void nc_fix_set_palette_id(WORD palette);
1010
1030WORD nc_palette_set_info(const paletteInfo *paletteInfo, WORD palette_index);
1031
1054WORD nc_fix_load_palette_info(const paletteInfo *palette_info);
1055
1070BOOL nc_fix_unload_palette_info(const paletteInfo *palette_info);
1071
1087BOOL nc_fix_unload_palette_id(WORD palette_id);
1088
1105WORD nc_log_info(char *txt, ...);
1106
1122WORD nc_log_info_line(char *txt, ...);
1123
1124void nc_log_word(WORD value);
1125void nc_log_int(int value);
1126void nc_log_dword(DWORD value);
1127void nc_log_short(short value);
1128void nc_log_byte(BYTE value);
1129void nc_log_bool(BOOL value);
1130void nc_log_spriteInfo(spriteInfo *si);
1132void nc_log_pictureInfo(pictureInfo *pi);
1133void nc_log_palette_info(paletteInfo *paletteInfo);
1134void nc_log_packed_color16(WORD packed_color);
1135void nc_log_rgb16(RGB16 *color);
1136
1137 /*---------------*/
1138 /* SOUND */
1139/*---------------*/
1140
1145
1146 /*---------------*/
1147 /* UTIL VECTOR */
1148/*---------------*/
1149
1150BOOL nc_vectors_collide(Box *box, Position vec[], BYTE vector_max);
1151BOOL nc_vector_is_left(short x, short y, short v1x, short v1y, short v2x, short v2y);
1152
1153#endif
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_init_adpcm()
void nc_get_position_gfx_picture(GFX_Picture *gfx_picture, Position *position)
void nc_init_system()
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)
Direction
Definition: neocore.h:23
@ DOWN
Definition: neocore.h:23
@ UP
Definition: neocore.h:23
@ NONE
Definition: neocore.h:23
@ LEFT
Definition: neocore.h:23
@ RIGHT
Definition: neocore.h:23
void nc_stop_adpcm()
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_log_box(Box *b)
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)
void nc_update()
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_resume_cdda()
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)
Sound_state
Definition: neocore.h:24
@ PLAYING
Definition: neocore.h:24
@ IDLE
Definition: neocore.h:24
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_free_ram_info()
void nc_reset()
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_pause_cdda()
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.
char nc_sin(WORD index)
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_init_gpu()
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_clear_display()
void nc_shrunk(WORD base_sprite, WORD max_width, WORD value)
DWORD remaining_frame
Definition: neocore.h:130
enum Sound_state state
Definition: neocore.h:129
Collision detection bounding box.
Definition: neocore.h:69
Position p0
Definition: neocore.h:70
Position p3
Definition: neocore.h:73
Position p2
Definition: neocore.h:72
Position p4
Definition: neocore.h:74
short width
Definition: neocore.h:75
short heightOffset
Definition: neocore.h:78
Position p1
Definition: neocore.h:71
short height
Definition: neocore.h:76
short widthOffset
Definition: neocore.h:77
GFX_Animated_Sprite gfx_animated_sprite
Definition: neocore.h:110
Animated sprite graphics object.
Definition: neocore.h:95
const spriteInfo * spriteInfoDAT
Definition: neocore.h:97
const paletteInfo * paletteInfoDAT
Definition: neocore.h:98
aSprite aSpriteDAT
Definition: neocore.h:96
GFX_Picture gfx_picture
Definition: neocore.h:116
BOOL autobox_enabled
Definition: neocore.h:118
picture pictureDAT
Definition: neocore.h:102
WORD pixel_width
Definition: neocore.h:106
const paletteInfo * paletteInfoDAT
Definition: neocore.h:104
const pictureInfo * pictureInfoDAT
Definition: neocore.h:103
WORD pixel_height
Definition: neocore.h:105
const scrollerInfo * scrollerInfoDAT
Definition: neocore.h:124
scroller scrollerDAT
Definition: neocore.h:123
const paletteInfo * paletteInfoDAT
Definition: neocore.h:125
2D position coordinates
Definition: neocore.h:43
short y
Definition: neocore.h:43
short x
Definition: neocore.h:43
Neo Geo RGB color representation with darkness level.
Definition: neocore.h:150
BYTE r
Definition: neocore.h:151
BYTE g
Definition: neocore.h:151
BYTE dark
Definition: neocore.h:151
BYTE b
Definition: neocore.h:151