feat: program takes an argument for the room
This commit is contained in:
parent
bdb258f6b2
commit
cc657ba53d
10 changed files with 40 additions and 28 deletions
|
|
@ -6,13 +6,13 @@
|
|||
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/02 13:39:54 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/04/02 14:39:40 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/04/09 14:45:55 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef MAIN_H
|
||||
# define MAIN_H
|
||||
|
||||
int main(void);
|
||||
int main(int argc, t_const_string *argv);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/15 14:58:25 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/04/08 15:35:33 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/04/09 14:34:13 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -16,8 +16,11 @@
|
|||
typedef struct s_object t_object;
|
||||
typedef struct s_character t_character;
|
||||
|
||||
typedef t_object (*t_object_init)(t_memclass);
|
||||
|
||||
typedef struct s_objecttype
|
||||
{
|
||||
t_object_init init;
|
||||
t_point (*loop)(t_object *, t_point pos);
|
||||
void (*draw)(t_object *, int x, int y);
|
||||
// Called when a character want to walk through this object.
|
||||
|
|
@ -32,6 +35,4 @@ typedef struct s_object
|
|||
void *data;
|
||||
} t_object;
|
||||
|
||||
typedef t_object (*t_object_init)(t_memclass);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/07 23:00:45 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/04/08 15:17:12 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/04/09 14:22:51 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ typedef struct s_room
|
|||
t_memclass mc;
|
||||
} t_room;
|
||||
|
||||
t_room room_fromfile(t_const_string path);
|
||||
void room_init(t_const_string path);
|
||||
|
||||
void room_loop(t_room room);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue