Advertisement
dragonbane

Gate Stuff HD

Nov 12th, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. in city:
  2.  
  3. S_lv7saku (this is the actual gate) (internal name: lv7saku) (params: 00000209 | FFFF) (lv7saku is assigned ID 3)
  4. S_bura_7b
  5.  
  6. in lakebed:
  7.  
  8. S_bsaku00 (this is the actual gate) (internal name: fence) (params: 0000012A, FFFF) (fence is assigned ID 2)
  9. S_bura_A
  10.  
  11.  
  12. d_a_saku.cpp
  13.  
  14. m_heap[saku_id][heap_id] != 0
  15.  
  16.  
  17.  
  18. d_a_balloon
  19. d_a_bqMap
  20. d_a_coach
  21. d_a_canoe
  22. d_a_mirror
  23. d_a_npc_coach
  24. d_a_obj_laundry
  25. d_a_obj_master_sword
  26. d_a_obj_mirror_chain
  27. d_a_obj_sakuita_rope
  28. d_a_swhit0
  29.  
  30. Tetd 022DFF00 = id 1
  31. fence 022DFF00 = id 2
  32. lv7saku 022DFF00 = id 3
  33.  
  34. 2
  35. 3
  36. 4
  37. 8
  38.  
  39. 2 oder 3
  40.  
  41.  
  42. 141E00000-1523FA61C
  43.  
  44.  
  45. string[] enum = { "daDoor20_c", "K_tetd", "S_bsaku00", "S_lv7saku" };
  46. int lastLoadedID = 0;
  47.  
  48. void spawnGate(int gateID)
  49. {
  50. string arcName = enum[gateID];
  51.  
  52. if (isArcLoaded(arcName))
  53. {
  54. ConstructGate();
  55. return;
  56. }
  57.  
  58. if (lastLoadedID > 0)
  59. {
  60. string lastLoadedArc = enum[lastLoadedID];
  61.  
  62. if (arcName != lastLoadedArc)
  63. {
  64. return;
  65. }
  66. }
  67.  
  68. LoadArc(arcName);
  69. ConstructGate();
  70. lastLoadedID = gateID;
  71.  
  72. return;
  73. }
  74.  
  75.  
  76.  
  77.  
  78. const string[] arcName = { "K_tetd", "S_bsaku00", "S_lv7saku" };
  79.  
  80. int hasLoaded = 0;
  81. string resNameLocal;
  82.  
  83. void CreateGate(int gateID)
  84. {
  85. if (hasLoaded == 0)
  86. {
  87. resNameLocal = arcName[gateID];
  88. hasLoaded = 1;
  89. }
  90.  
  91. if (LoadResource(gateID, resNameLocal) != 4) // = 4 -> object was loaded; != 4 -> object was already loaded
  92. {
  93. return;
  94. }
  95.  
  96. InitGate(); //Spawns the gate and makes it visible etc.
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement