Created
October 26, 2013 07:30
-
-
Save streamer45/7166356 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "krad_compositor_common.h" | |
enum { | |
KR_SPRITE_INFO, | |
KR_TEXT_INFO, | |
KR_VECTOR_INFO, | |
KR_COMPOSITOR_PATH_INFO | |
}; | |
typedef int (kr_info_to_ebml_func)(uint8_t *ebml, void *uber, int max); | |
int kr_sprite_info_to_ebml(uint8_t *out, kr_sprite_info *st, int max); | |
int kr_text_info_to_ebml(uint8_t *out, kr_text_info *st, int max); | |
int kr_vector_info_to_ebml(uint8_t *out, kr_vector_info *st, int max); | |
int kr_compositor_path_info_to_ebml(uint8_t *out, kr_compositor_path_info *st, int max); | |
int kr_sprite_info_to_ebml(uint8_t *out, kr_sprite_info *st, int max) { | |
if ((out == NULL) || (st == NULL) || (max < 1)) { | |
return -1; | |
} | |
/* FIXME */ | |
return 0; | |
} | |
int kr_text_info_to_ebml(uint8_t *out, kr_text_info *st, int max) { | |
if ((out == NULL) || (st == NULL) || (max < 1)) { | |
return -1; | |
} | |
/* FIXME */ | |
return 0; | |
} | |
int kr_vector_info_to_ebml(uint8_t *out, kr_vector_info *st, int max) { | |
if ((out == NULL) || (st == NULL) || (max < 1)) { | |
return -1; | |
} | |
/* FIXME */ | |
return 0; | |
} | |
int kr_compositor_path_info_to_ebml(uint8_t *out, kr_compositor_path_info *st, int max) { | |
if ((out == NULL) || (st == NULL) || (max < 1)) { | |
return -1; | |
} | |
/* FIXME */ | |
return 0; | |
} | |
int whatever_info_to_ebml_func(char *ebml, void *uber, int max) { | |
const kr_info_to_ebml_func to_ebml_func[4] = { kr_sprite_info_to_ebml, kr_text_info_to_ebml, kr_vector_info_to_ebml, kr_compositor_path_info_to_ebml}; | |
return to_ebml_func[0](ebml, uber, max); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment