51 BtItemCashArea[slot].
Reset();
52 u_char *texture_copy = BtItemCashArea[slot].
base + BtItemCashArea[slot].
used * 16;
54 area->Alloc((texture_size >> 4) + 1);
55 memcpy(texture_copy, texture_data, texture_size);
56 TexManager.DeleteTextureBlock(slot + 0x38);
57 TexManager.CleanUpBuffer();
59 textures[0].
name = (
char *) texture_copy;
61 TexManager.LoadTextureBlockEX(slot + 0x38, textures);
62 cash[slot] = (u_int *) LoadMDSFile(model_data, area, 0, NULL, NULL);
66 model[model_no] = ITEM_MODEL_LOADED;
128 sceVu0FVECTOR position;
129 sceVu0FVECTOR rotation;
130 CFrame *hand = CharaMain.
frame->SearchFrame(
"item");
135 for (i = 0; i < 16; i++) {
137 case ITEM_MODEL_HAND:
139 TexManager.ReloadTexture(Vif1Packet, *cash_no + 0x38);
140 placement = &
frame[i];
141 sceVu0CopyVector(position, placement->
position);
142 placement->GetRotation(rotation);
143 ((
CFrame *)
cash[*cash_no])->SetPosition(position);
144 ((
CFrame *)
cash[*cash_no])->SetRotation(rotation[0], rotation[1], rotation[2]);
145 ((
CFrame *)
cash[*cash_no])->SetReference(hand);
148 case ITEM_MODEL_THROWN:
150 TexManager.ReloadTexture(Vif1Packet, *cash_no + 0x38);
151 placement = &
frame[i];
152 sceVu0CopyVector(position, placement->
position);
153 placement->GetRotation(rotation);
154 placement->SetPosition(position);
155 ((
CFrame *)
cash[*cash_no])->SetPosition(position);
156 ((
CFrame *)
cash[*cash_no])->SetRotation(rotation[0], rotation[1], rotation[2]);
157 ((
CFrame *)
cash[*cash_no])->DeleteReference();
160 case ITEM_MODEL_UNK_3:
162 TexManager.ReloadTexture(Vif1Packet, *cash_no + 0x38);
163 ((
CFrame *)
cash[*cash_no])->DeleteReference();
164 placement = &
frame[i];
165 sceVu0CopyVector(position, placement->
position);
166 placement->GetRotation(rotation);
167 ((
CFrame *)
cash[*cash_no])->SetPosition(position);
168 ((
CFrame *)
cash[*cash_no])->SetRotation(rotation[0], rotation[1], rotation[2]);
171 case ITEM_MODEL_FREE:
172 case ITEM_MODEL_LOADED:
187 sceVu0FVECTOR position;
188 sceVu0FVECTOR up = {0.0f, 1.0f, 0.0f, 0.0f};
190 for (i = 0; i < 16; i++) {
192 case ITEM_MODEL_HAND:
194 case ITEM_MODEL_THROWN: {
195 placement = &
frame[i];
196 sceVu0CopyVector(position, placement->
position);
197 step_result = ItemThrowStep(position,
velocity[i]);
198 placement->SetPosition(position);
200 if (step_result == 2) {
215 NowColData->
Set(position, 8, 5, 8.0f, 1.0f, 2, 2, 0, 0);
218 case ITEM_GOOEY_PEACH:
219 NowColData->
Set(position, 8, 5, 8.0f, 1.0f, 2, 2, 0x800, 0);
222 case ITEM_THROBBING_CHERRY:
223 NowColData->
Set(position, 2, 5, 8.0f, 1.0f, 2, 2, 0x100, 0);
226 case ITEM_POISONOUS_APPLE:
227 NowColData->
Set(position, 2, 5, 8.0f, 1.0f, 2, 2, 0x200, 0);
232 SetBombEffect(position, 3, (selectMapNo + 1) * 30, 1.0f);
235 case ITEM_HOLY_WATER:
236 SndSePlay(SE_HOLY_GEM, -1, 0);
237 SndSePlay(SE_EXPLOSION, -1, 0);
238 MasekiEffect[4].
Set(position, up, -1, -1, 0, NULL, -1);
239 MasekiEffect[4].
SetDmg((
int) (30.0f * (
float) (selectMapNo + 1)));
246 case ITEM_THUNDER_GEM:
248 case ITEM_HOLY_GEM: {
249 SndSePlay(item_no - 0x3C, -1, 0);
250 SndSePlay(SE_EXPLOSION, -1, 0);
251 CSHOT_EFFECT *effect = &MasekiEffect[item_no - ITEM_FIRE_GEM];
252 effect->
Set(position, up, -1, -1, 0, NULL, -1);
253 effect->
SetDmg((
int) (30.0f * (
float) (selectMapNo + 1)));
263 case ITEM_MODEL_UNK_3:
264 case ITEM_MODEL_FREE:
265 case ITEM_MODEL_LOADED:
int Set(float *position, int damage, int life, float radius, float scale_rate, int target_mask, int kind, int flags, int attribute)
void DeleteModel(int model_no)
int SetHandModel(int source_no)
int SetThrowModel(int source_no, float *position, float *heading)
int SetCashModel(int item_no, unsigned int *model_data, unsigned int *texture_data, int texture_size)
int Set(float *position, float *target, int owner, int sub_id, int source, CFrame *parent, int initial_phase)