283
|
1 #include <stdlib.h>
|
|
2 #include <string.h>
|
|
3 #include "Load_Texture.h"
|
|
4 #include "texture.h"
|
|
5 #include "TileHash.h"
|
|
6 #include "Func.h"
|
|
7
|
|
8 SchedDefineTask(LoadTexture);
|
|
9
|
|
10 /**
|
|
11 * 「Load」といいながら、結局 DrawSpan で使う
|
|
12 * Hash の準備だけなので、名前変えないとなー
|
|
13 */
|
|
14 int
|
|
15 LoadTexture::run(void *rbuf , void *wbuf)
|
|
16 {
|
|
17 /**
|
|
18 * 現在 global_alloc() では new をサポートしてないので
|
|
19 * コンストラクタ呼ぶために placement new してます。
|
|
20 */
|
|
21 void *hash_tmp
|
|
22 = smanager->global_alloc(GLOBAL_TEXTURE_HASH, sizeof(TileHash));
|
|
23 new(hash_tmp) TileHash;
|
|
24
|
|
25 void *tileList_tmp
|
|
26 = smanager->global_alloc(GLOBAL_TILE_LIST, sizeof(TileList));
|
|
27 new(tileList_tmp) TileList;
|
|
28
|
|
29 return 0;
|
|
30 }
|