-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFieldModels.flow
More file actions
61 lines (51 loc) · 1.46 KB
/
Copy pathFieldModels.flow
File metadata and controls
61 lines (51 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import("FieldModels.msg");
void SpawnFieldModelsMenu()
{
while (true && !PAD_CHK_PRESS(PadButton.L2))
{
int selection = DescriptionMenu(Title_FieldModels, Options_FieldModels);
switch (selection)
{
case -1:
return;
case 0: // Spawn Item
SpawnItemModel(true);
break;
case 1: // Spawn Object
SpawnObjectModel(true);
break;
}
}
}
int SpawnItemModel(bool transform)
{
int itemModelMajor = NumberMenu(4, Title_SpawnItemMajor);
if (itemModelMajor == -1)
return -1;
int itemModelMinor = NumberMenu(3, Title_SpawnItemMinor);
if (itemModelMinor == -1)
return -1;
int itemModel = FLD_ITEM_MODEL_LOAD(itemModelMajor, itemModelMinor);
FLD_MODEL_LOADSYNC(itemModel);
if (transform)
TransformModel(itemModel);
else
FLD_MODEL_SET_VISIBLE(itemModel, 1, 0);
return itemModel;
}
int SpawnObjectModel(bool transform)
{
int objModelMajor = NumberMenu(3, Title_SpawnObjMajor);
if (objModelMajor == -1)
return -1;
int objModelMinor = NumberMenu(3, Title_SpawnObjMinor);
if (objModelMinor == -1)
return -1;
int objModel = FLD_OBJ_MODEL_LOAD(objModelMajor, objModelMinor);
FLD_MODEL_LOADSYNC(objModel);
if (transform)
TransformModel(objModel);
else
FLD_MODEL_SET_VISIBLE(objModel, 1, 0);
return objModel;
}