Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Test/test_render/spe/Load_Texture.cpp @ 352:3f5289873643
add global_alloc.h
author | admin@mb22-no-macbook-2.local |
---|---|
date | Mon, 13 Jul 2009 19:25:10 +0900 |
parents | 4be5ae77e02c |
children | b89ba1d96fff |
rev | line source |
---|---|
322 | 1 // #define DEBUG |
321 | 2 #include "error.h" |
3 | |
109 | 4 #include <stdlib.h> |
120 | 5 #include <string.h> |
109 | 6 #include "Load_Texture.h" |
120 | 7 #include "texture.h" |
167
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
8 #include "TileHash.h" |
109 | 9 #include "Func.h" |
352 | 10 #include "global_alloc.h" |
109 | 11 |
12 SchedDefineTask(LoadTexture); | |
13 | |
167
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
14 /** |
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
15 * 「Load」といいながら、結局 DrawSpan で使う |
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
16 * Hash の準備だけなので、名前変えないとなー |
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
17 */ |
352 | 18 int |
19 LoadTexture::run(void *rbuf , void *wbuf) | |
109 | 20 { |
321 | 21 __debug_spe("LoadTexture\n"); |
167
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
22 /** |
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
23 * 現在 global_alloc() では new をサポートしてないので |
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
24 * コンストラクタ呼ぶために placement new してます。 |
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
25 */ |
173 | 26 void *hash_tmp |
352 | 27 = smanager->global_alloc(GLOBAL_TEXTURE_HASH, sizeof(TileHash)); |
243 | 28 new(hash_tmp) TileHash; |
167
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
29 |
173 | 30 void *tileList_tmp |
352 | 31 = smanager->global_alloc(GLOBAL_TILE_LIST, sizeof(TileList)); |
243 | 32 new(tileList_tmp) TileList; |
167
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
157
diff
changeset
|
33 |
109 | 34 return 0; |
35 } |