507
|
1 // #define DEBUG
|
|
2 #include "error.h"
|
|
3
|
|
4 #include <stdlib.h>
|
|
5 #include <string.h>
|
|
6 #include "Load_Texture.h"
|
|
7 #include "texture.h"
|
|
8 #if !USE_MEMHASH
|
|
9 #include "TileHash.h"
|
|
10 #endif
|
|
11 #include "Func.h"
|
|
12 #include "global_alloc.h"
|
|
13
|
|
14 SchedDefineTask(LoadTexture);
|
|
15
|
|
16 /**
|
|
17 * 「Load」といいながら、結局 DrawSpan で使う
|
|
18 * Hash の準備だけなので、名前変えないとなー
|
|
19 */
|
|
20 static int
|
|
21 run(SchedTask *smanager, void *rbuf , void *wbuf)
|
|
22 {
|
|
23 __debug_spe("LoadTexture\n");
|
|
24
|
|
25 MemList *ml = smanager->createMemList(sizeof(uint32) * TEXTURE_BLOCK_SIZE, MAX_TILE);
|
|
26 smanager->global_set(GLOBAL_TILE_LIST, (void *)ml);
|
|
27
|
|
28 return 0;
|
|
29 }
|