|
RT
|


Go to the source code of this file.
Data Structures | |
| struct | s_parse |
| struct | s_parse_txt |
| struct | s_objset |
| struct | s_built |
Macros | |
| #define | ERR_P_CAMERA "Err : camera is missing" |
| #define | ERR_P_CONTENT "Err : content is missing" |
| #define | ERR_UNKNWD_OBJ "Err : Unknown object" |
| #define | ERR_UNKNWD_MAT "Err : Unknown material" |
| #define | ERR_UNKNWD_OBJ_A "Err : Unknown object in animation list" |
| #define | ERR_UNKNWD_MOTION "Err : Unknown motion in animation list" |
| #define | ERR_PARSE_VEC3 "Err : [Vec3] Wrong number of args" |
| #define | ERR_PARSE_FLOAT "Err : [Float] Wrong number of args" |
| #define | ERR_PARSE_COLOR "Err : [Color] Wrong number of args" |
| #define | ERR_PARSE_VEC2 "Err : [Vec2] Wrong number of args" |
| #define | ERR_OP_EQUAL_OBJ "Err : [Csg] sizeof(t_obj) == sizeof(t_csg_op)" |
| #define | ERR_PARSE_STRN "Err : line is NULL" |
| #define | ERR_GREED_NULL "Err : greed is NULL" |
| #define | ERR_PARSE_OUTR "Err : line_idx out of range" |
| #define | ERR_P_CLOSE_PAR "Err : Missing parenthese" |
| #define | ERR_P_BRACKET_CLSE "Err : Missing closing bracket" |
| #define | ERR_P_BRACKET_OPEN "Err : Missing opening bracket" |
| #define | ERR_P_KEY "Err : Missing key" |
| #define | ERR_PARSE_SET_SP "Err : *sphere is null" |
| #define | ERR_PARSE_SET_CY "Err : *cylinder is null" |
| #define | ERR_PARSE_SET_PL "Err : *plan is null" |
| #define | ERR_PARSE_SET_CO "Err : *cone is null" |
| #define | ERR_PARSE_SET_LI "Err : *light is null" |
| #define | ERR_PARSE_SET_CSG "Err : *csg is null" |
| #define | ERR_FILE "Err : File is too small to be valid" |
| #define | CSV_MATERIAL_COLUMN_COUNT 17 |
Typedefs | |
| typedef struct s_parse_txt | t_parse_txt |
| typedef struct s_parse | t_parse |
| typedef struct s_objset | t_objset |
| typedef struct s_built | t_built |
Functions | |
| void | err_set (t_parse_txt *scene_file, const char err_func[], int line_in_code, const char err_file[]) |
| Save data that produce the exit. More... | |
| void | err_exit (char *err_msg, t_parse_txt *scene_file) |
| Print the exit message and exit after cleaning the data allocated. More... | |
| char * | pop_line (t_parse_txt *scene_file) |
| Return the curr_line and move line_idx to the next line. More... | |
| char * | get_curr_line (t_parse_txt *scene_file) |
| Check if the line_idx is in range and return the curr_line. More... | |
| void | init_parse_cfg (int type, t_parse *config) |
| Setting config for the type of object we want to parse. More... | |
| int | load_parse_txt (t_parse_txt *s_f, t_data *app, char *filename) |
| : Load a file into the t_parse_txt & bind the hooks and t_data app More... | |
| void | check_opening_bracket (t_parse_txt *scene_file) |
| Verify that the curr_line is a opening bracket. More... | |
| void | check_closing_bracket (t_parse_txt *scene_file) |
| Verify that the curr_line is a closing bracket. More... | |
| void | create_obj_from_txt (t_obj *obj, t_parse_txt *scene_f, int type) |
| General parser for all of the shapes. More... | |
| void | parse_light (t_parse_txt *scene_file) |
| Built a light obj and add it to the scene.lst_light. More... | |
| void | parse_shape (t_parse_txt *scene_file, int type) |
| Built a shape obj and add it to the scene.lst_obj. More... | |
| void | parse_anim (t_parse_txt *scene_file) |
| void | parse_motion (t_parse_txt *scene_file, t_anim *anim) |
| t_color | parse_color (char *key, t_parse_txt *scene_file) |
| float | parse_fval (char *key, t_parse_txt *scene_file) |
| t_vec3 | parse_vector (char *key, t_parse_txt *scene_file) |
| t_vec2 | parse_vec2 (char *key, t_parse_txt *scene_file) |
| char * | parse_str (t_parse_txt *scene_file, char *key) |
| t_texture * | parse_texture (char *key_name, t_parse_txt *scene_file) |
| int | parse_int (char *key, t_parse_txt *scene_file) |
| void | sphere_new (t_obj *obj, void *res) |
| void | plane_new (t_obj *obj, void *res) |
| void | cylinder_new (t_obj *obj, void *res) |
| void | cone_new (t_obj *obj, void *res) |
| void | cube_new (t_obj *obj, void *res) |
| char * | name_obj (int type, int *nb) |
| int | matcmp (void *content, void *key) |
| int | texcmp (void *content, void *key) |
| int | obj_cmp_key (void *content, void *key) |
| int | light_cmp_key (void *content, void *key) |
| void | load_texture (t_texture *tex) |
| void | load_nbind_texture (t_texture *tex, uint32_t *bind) |
| void | open_textures (t_data *app) |
| int | get_obj_type (char *obj_type) |
| char * | get_args_key_require (t_parse_txt *scene_file, const char *key) |
| Verify curr_line is containing the proper value and key. More... | |
| char * | get_args_after_key (t_parse_txt *scene_file, const char *key) |
| void | obj_set (t_obj *obj, int type) |
| Setting the obj struct. More... | |
| void | light_set (t_light *light, t_parse_txt *scene_file) |
| void | cone_set (t_obj *obj, void *cone, t_parse_txt *scene_file) |
| void | cylinder_set (t_obj *obj, void *cylinder, t_parse_txt *scene_fi) |
| void | plane_set (t_obj *obj, void *plane, t_parse_txt *scene_file) |
| void | sphere_set (t_obj *obj, void *sphere, t_parse_txt *scene_file) |
| void | csg_set (t_obj *obj, void *root, t_parse_txt *scene_file) |
| void | cube_set (t_obj *obj, void *root, t_parse_txt *scene_file) |
| void | tore_set (t_obj *obj, void *root, t_parse_txt *scene_file) |
| int | csg_is_op (t_parse_txt *scene_file) |
| #define CSV_MATERIAL_COLUMN_COUNT 17 |
| #define ERR_FILE "Err : File is too small to be valid" |
| #define ERR_GREED_NULL "Err : greed is NULL" |
| #define ERR_P_BRACKET_CLSE "Err : Missing closing bracket" |
| #define ERR_P_BRACKET_OPEN "Err : Missing opening bracket" |
| #define ERR_P_CAMERA "Err : camera is missing" |
| #define ERR_P_CLOSE_PAR "Err : Missing parenthese" |
| #define ERR_P_CONTENT "Err : content is missing" |
| #define ERR_P_KEY "Err : Missing key" |
| #define ERR_PARSE_COLOR "Err : [Color] Wrong number of args" |
| #define ERR_PARSE_FLOAT "Err : [Float] Wrong number of args" |
| #define ERR_PARSE_OUTR "Err : line_idx out of range" |
| #define ERR_PARSE_SET_CO "Err : *cone is null" |
| #define ERR_PARSE_SET_CSG "Err : *csg is null" |
| #define ERR_PARSE_SET_CY "Err : *cylinder is null" |
| #define ERR_PARSE_SET_LI "Err : *light is null" |
| #define ERR_PARSE_SET_PL "Err : *plan is null" |
| #define ERR_PARSE_SET_SP "Err : *sphere is null" |
| #define ERR_PARSE_STRN "Err : line is NULL" |
| #define ERR_PARSE_VEC2 "Err : [Vec2] Wrong number of args" |
| #define ERR_PARSE_VEC3 "Err : [Vec3] Wrong number of args" |
| #define ERR_UNKNWD_MAT "Err : Unknown material" |
| #define ERR_UNKNWD_MOTION "Err : Unknown motion in animation list" |
| #define ERR_UNKNWD_OBJ "Err : Unknown object" |
| #define ERR_UNKNWD_OBJ_A "Err : Unknown object in animation list" |
| typedef struct s_parse_txt t_parse_txt |
| void check_closing_bracket | ( | t_parse_txt * | scene_file | ) |
Verify that the curr_line is a closing bracket.
| scene_file |
| void check_opening_bracket | ( | t_parse_txt * | scene_file | ) |
Verify that the curr_line is a opening bracket.
| scene_file |
| void cone_new | ( | t_obj * | obj, |
| void * | res | ||
| ) |
| void cone_set | ( | t_obj * | obj, |
| void * | cone, | ||
| t_parse_txt * | scene_file | ||
| ) |
| void create_obj_from_txt | ( | t_obj * | obj_dst, |
| t_parse_txt * | scene_file, | ||
| int | type | ||
| ) |
General parser for all of the shapes.
| obj_dst | : Dst of the data |
| scene_file | : Parsing struct |
| type | : Type of the shape to parse |
| int csg_is_op | ( | t_parse_txt * | scene_file | ) |
| void csg_set | ( | t_obj * | obj, |
| void * | root, | ||
| t_parse_txt * | scene_file | ||
| ) |
| void cube_new | ( | t_obj * | obj, |
| void * | res | ||
| ) |
| void cube_set | ( | t_obj * | obj, |
| void * | root, | ||
| t_parse_txt * | scene_file | ||
| ) |
| void cylinder_new | ( | t_obj * | obj, |
| void * | res | ||
| ) |
| void cylinder_set | ( | t_obj * | obj, |
| void * | cylinder, | ||
| t_parse_txt * | scene_fi | ||
| ) |
| void err_exit | ( | char * | err_msg, |
| t_parse_txt * | scene_file | ||
| ) |
Print the exit message and exit after cleaning the data allocated.
| err_msg | : message to explain the error. |
| scene_file | : data in txt to parse |
| void err_set | ( | t_parse_txt * | scene_file, |
| const char | err_func[], | ||
| int | line_in_code, | ||
| const char | err_file[] | ||
| ) |
Save data that produce the exit.
| scene_file | : data in txt to parse |
| err_func | : function where the error occure |
| line_in_code | : line where the error occure |
| err_file | : file where the error occure |
| char* get_args_after_key | ( | t_parse_txt * | scene_file, |
| const char * | key | ||
| ) |
| char* get_args_key_require | ( | t_parse_txt * | scene_file, |
| const char * | key | ||
| ) |
Verify curr_line is containing the proper value and key.
| scene_file | |
| key | : key to find |
| char* get_curr_line | ( | t_parse_txt * | scene_file | ) |
Check if the line_idx is in range and return the curr_line.
| scene_file | : data in txt to parse |
| int get_obj_type | ( | char * | obj_type | ) |
| void init_parse_cfg | ( | int | type, |
| t_parse * | config | ||
| ) |
Setting config for the type of object we want to parse.
| type | : type of the object requested |
| config | : Dst of the data |
| int light_cmp_key | ( | void * | content, |
| void * | key | ||
| ) |
| void light_set | ( | t_light * | light, |
| t_parse_txt * | scene_file | ||
| ) |
| void load_nbind_texture | ( | t_texture * | tex, |
| uint32_t * | bind | ||
| ) |
| int load_parse_txt | ( | t_parse_txt * | scene_file, |
| t_data * | app, | ||
| char * | filename | ||
| ) |
: Load a file into the t_parse_txt & bind the hooks and t_data app
| scene_file | : data in txt to parse |
| app | : link to the data |
| filename | : file to load |
| void load_texture | ( | t_texture * | tex | ) |
| int matcmp | ( | void * | content, |
| void * | key | ||
| ) |
| char* name_obj | ( | int | type, |
| int * | nb | ||
| ) |
| int obj_cmp_key | ( | void * | content, |
| void * | key | ||
| ) |
| void obj_set | ( | t_obj * | obj, |
| int | type | ||
| ) |
Setting the obj struct.
| obj | : Dst of the data |
| type | : type of the object requested |
| void open_textures | ( | t_data * | app | ) |
| void parse_anim | ( | t_parse_txt * | scene_file | ) |
| t_color parse_color | ( | char * | key, |
| t_parse_txt * | scene_file | ||
| ) |
| float parse_fval | ( | char * | key, |
| t_parse_txt * | scene_file | ||
| ) |
| int parse_int | ( | char * | key, |
| t_parse_txt * | scene_file | ||
| ) |
| void parse_light | ( | t_parse_txt * | scene_file | ) |
Built a light obj and add it to the scene.lst_light.
| scene_file | : Parsing struct |
| void parse_motion | ( | t_parse_txt * | scene_file, |
| t_anim * | anim | ||
| ) |
| void parse_shape | ( | t_parse_txt * | scene_file, |
| int | type | ||
| ) |
Built a shape obj and add it to the scene.lst_obj.
| scene_file | : Parsing struct |
| type | : Type of the shape to parse |
| char* parse_str | ( | t_parse_txt * | scene_file, |
| char * | key | ||
| ) |
| t_texture* parse_texture | ( | char * | key_name, |
| t_parse_txt * | scene_file | ||
| ) |
| t_vec2 parse_vec2 | ( | char * | key, |
| t_parse_txt * | scene_file | ||
| ) |
| t_vec3 parse_vector | ( | char * | key, |
| t_parse_txt * | scene_file | ||
| ) |
| void plane_new | ( | t_obj * | obj, |
| void * | res | ||
| ) |
| void plane_set | ( | t_obj * | obj, |
| void * | plane, | ||
| t_parse_txt * | scene_file | ||
| ) |
| char* pop_line | ( | t_parse_txt * | scene_file | ) |
Return the curr_line and move line_idx to the next line.
| scene_file | : data in txt to parse |
| void sphere_new | ( | t_obj * | obj, |
| void * | res | ||
| ) |
| void sphere_set | ( | t_obj * | obj, |
| void * | sphere, | ||
| t_parse_txt * | scene_file | ||
| ) |
| int texcmp | ( | void * | content, |
| void * | key | ||
| ) |
| void tore_set | ( | t_obj * | obj, |
| void * | root, | ||
| t_parse_txt * | scene_file | ||
| ) |
1.8.17