src/context.c

changeset 290
2eb3813562e7
parent 253
6ab35fcb8676
equal deleted inserted replaced
289:237cb9038109 290:2eb3813562e7
51 if (asc_test_flag(asc_context.flags, ASC_FLAG_INITIALIZED)) 51 if (asc_test_flag(asc_context.flags, ASC_FLAG_INITIALIZED))
52 return; 52 return;
53 memset(&asc_context, 0, sizeof(AscContext)); 53 memset(&asc_context, 0, sizeof(AscContext));
54 54
55 // initialize default paths 55 // initialize default paths
56 asc_context.font_path = cx_strdup(CX_STR("./fonts")); 56 asc_context.font_path = cx_strdup("./fonts");
57 asc_context.shader_path = cx_strdup(CX_STR("./shader")); 57 asc_context.shader_path = cx_strdup("./shader");
58 asc_context.texture_path = cx_strdup(CX_STR("./textures")); 58 asc_context.texture_path = cx_strdup("./textures");
59 59
60 // initialize the font cache 60 // initialize the font cache
61 asc_font_cache_init(); 61 asc_font_cache_init();
62 62
63 // no window, yet 63 // no window, yet
64 asc_context.active_window = ASC_MAX_WINDOWS; 64 asc_context.active_window = ASC_MAX_WINDOWS;
65 65
66 // initialize error buffer 66 // initialize error buffer
67 cxBufferInit( 67 cxBufferInit(
68 &asc_context.error_buffer, 68 &asc_context.error_buffer,
69 NULL, 69 NULL, NULL, 256,
70 256,
71 NULL,
72 CX_BUFFER_AUTO_EXTEND 70 CX_BUFFER_AUTO_EXTEND
73 ); 71 );
74 72
75 // initialize SDL 73 // initialize SDL
76 if (!SDL_Init(SDL_INIT_VIDEO)) { 74 if (!SDL_Init(SDL_INIT_VIDEO)) {

mercurial