there is now a player character and the world renders using a cammera
This commit is contained in:
42
source/game_source/entities/templates/Template.c
Normal file
42
source/game_source/entities/templates/Template.c
Normal file
@@ -0,0 +1,42 @@
|
||||
#include <stdlib.h>
|
||||
#include "Template.h"
|
||||
#include "../../client_source/client.h"
|
||||
|
||||
int templateUpdate(int action, void* data) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
entity* Createtemplate() {
|
||||
entity* ent = malloc(sizeof(entity));
|
||||
template* p= malloc(sizeof(template));
|
||||
|
||||
*t = (template){
|
||||
};
|
||||
|
||||
|
||||
*ent = (entity){
|
||||
.id = ID,
|
||||
.name = "template",
|
||||
.description = "description",
|
||||
.tile = {
|
||||
.simble = 'T',
|
||||
.background = {0,0,0},
|
||||
.forground = {0,0,0},
|
||||
},
|
||||
.position = (vec2){0,0},
|
||||
.data = t,
|
||||
.world = w,
|
||||
.callback = {
|
||||
.init = PlayerInit,
|
||||
.update = PlayerUpdate,
|
||||
.free = PlayerFree,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
return ent;
|
||||
}
|
||||
|
||||
int templateInit(void* ent) {return 0;}
|
||||
int templateFree(void* ent) {return 0;}
|
||||
|
||||
Reference in New Issue
Block a user