comparison src/mbaf/mbapp.c @ 993:5b58e74988bc refine_backend_if

Use mb_backend_t::new instead of mb_backend_t::init
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 22 Nov 2010 00:42:29 +0800
parents 586e50f82c1f
children 5d9def42df12
comparison
equal deleted inserted replaced
992:2cbe3721dc9a 993:5b58e74988bc
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- 1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*-
2 // vim: sw=4:ts=8:sts=4 2 // vim: sw=4:ts=8:sts=4
3 #include <mb.h> 3 #include <mb.h>
4 #include <mb_af.h> 4 #include <mb_af.h>
5 #include <mb_backend.h>
5 6
6 mbaf_t *mbaf_init(const char *module, const char *module_dir) 7 mbaf_t *mbaf_init(const char *module, const char *module_dir)
7 { 8 {
8 mbaf_t *app = (mbaf_t *) malloc(sizeof(mbaf_t)); 9 mbaf_t *app = (mbaf_t *) malloc(sizeof(mbaf_t));
9 void *rt; 10 mb_rt_t *rt;
10 11
11 rt = backend.init(":0.0", 800, 600); 12 rt = backend.new(":0.0", 800, 600);
12 if(rt == NULL) 13 if(rt == NULL)
13 return NULL; 14 return NULL;
14 15
15 sprite_set_search_path(module_dir); 16 sprite_set_search_path(module_dir);
16 17