Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed an unexisting GlobalEvents reference in certain maps.

The GlobalEvents reference was unexisting and thus possibly equal
to other refs, and possibly triggering random crashes.

I removed everything and didn't permit anymore to set GlobalEvents
references as it was some useless API.

This will hopefully help with issues #15 and #74.
  • Loading branch information...
commit 8a25982a9eda587b670e46e71f794fe007461004 1 parent c0784c7
Yohann Ferreira authored
Showing with 5 additions and 53 deletions.
  1. +0 −3  dat/maps/introduction.lua
  2. +0 −2  dat/maps/layna_forest/layna_forest_cave1_1.lua
  3. +0 −2  dat/maps/layna_forest/layna_forest_cave1_2.lua
  4. +0 −2  dat/maps/layna_forest/layna_forest_cave2.lua
  5. +0 −2  dat/maps/layna_forest/layna_forest_crystal.lua
  6. +1 −3 dat/maps/layna_forest/layna_forest_entrance.lua
  7. +1 −3 dat/maps/layna_forest/layna_forest_north_east.lua
  8. +1 −3 dat/maps/layna_forest/layna_forest_north_west.lua
  9. +1 −3 dat/maps/layna_forest/layna_forest_south_east.lua
  10. +1 −3 dat/maps/layna_forest/layna_forest_south_west.lua
  11. +0 −2  dat/maps/layna_forest/layna_forest_wolf_cave.lua
  12. +0 −1  dat/maps/layna_village/layna_village_bronanns_home.lua
  13. +0 −1  dat/maps/layna_village/layna_village_bronanns_home_first_floor.lua
  14. +0 −1  dat/maps/layna_village/layna_village_center.lua
  15. +0 −1  dat/maps/layna_village/layna_village_center_shop.lua
  16. +0 −1  dat/maps/layna_village/layna_village_center_sophia_house.lua
  17. +0 −1  dat/maps/layna_village/layna_village_kalya_house_exterior.lua
  18. +0 −1  dat/maps/layna_village/layna_village_kalya_house_path.lua
  19. +0 −1  dat/maps/layna_village/layna_village_kalya_house_path_small_house.lua
  20. +0 −1  dat/maps/layna_village/layna_village_riverbank.lua
  21. +0 −1  dat/maps/layna_village/layna_village_riverbank_house.lua
  22. +0 −1  dat/maps/layna_village/layna_village_south_entrance.lua
  23. +0 −1  dat/maps/layna_village/layna_village_south_entrance_left_house.lua
  24. +0 −1  dat/maps/layna_village/layna_village_south_entrance_right_house.lua
  25. +0 −11 src/common/common_bindings.cpp
  26. +0 −1  src/modes/mode_bindings.cpp
View
3  dat/maps/introduction.lua
@@ -18,7 +18,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
local crystal = {};
@@ -29,12 +28,10 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = true; -- no other enemies than the boss here.
_CreateObjects();
- --_CreateEnemies();
-- Set the camera focus on hero
Map:SetCamera(crystal);
View
2  dat/maps/layna_forest/layna_forest_cave1_1.lua
@@ -359,7 +359,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local hero = {};
@@ -377,7 +376,6 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = false;
View
2  dat/maps/layna_forest/layna_forest_cave1_2.lua
@@ -358,7 +358,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local hero = {};
@@ -376,7 +375,6 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = false;
View
2  dat/maps/layna_forest/layna_forest_cave2.lua
@@ -356,7 +356,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local hero = {};
@@ -368,7 +367,6 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = false;
View
2  dat/maps/layna_forest/layna_forest_crystal.lua
@@ -356,7 +356,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local hero = {};
@@ -374,7 +373,6 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = true; -- no other enemies than the boss here.
View
4 dat/maps/layna_forest/layna_forest_entrance.lua
@@ -213,7 +213,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local hero = {};
@@ -231,7 +230,6 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = false;
@@ -353,7 +351,7 @@ function _CreateObjects()
DialogueManager:AddDialogue(dialogue);
npc:AddDialogueReference(dialogue);
- -- Only add the squirrels and butterflies when the night isn't about to happen
+ -- Only add the squirrels and butterflies when the night isn't about to happen
if (GlobalManager:GetEventValue("story", "layna_forest_crystal_event_done") < 1) then
npc = CreateSprite(Map, "Butterfly", 42, 18);
npc:SetCollisionMask(hoa_map.MapMode.NO_COLLISION);
View
4 dat/maps/layna_forest/layna_forest_north_east.lua
@@ -355,7 +355,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local hero = {};
@@ -367,7 +366,6 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = false;
@@ -436,7 +434,7 @@ function _CreateObjects()
wolf:SetDirection(hoa_map.MapMode.SOUTH);
Map:AddGroundObject(wolf);
- -- Only add the squirrels and butterflies when the night isn't about to happen
+ -- Only add the squirrels and butterflies when the night isn't about to happen
if (GlobalManager:GetEventValue("story", "layna_forest_crystal_event_done") < 1) then
npc = CreateSprite(Map, "Butterfly", 42, 18);
View
4 dat/maps/layna_forest/layna_forest_north_west.lua
@@ -356,7 +356,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local hero = {};
@@ -377,7 +376,6 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = false;
@@ -465,7 +463,7 @@ function _CreateObjects()
local object = {}
local npc = {}
- -- Only add the squirrels and butterflies when the night isn't about to happen
+ -- Only add the squirrels and butterflies when the night isn't about to happen
if (GlobalManager:GetEventValue("story", "layna_forest_crystal_event_done") < 1) then
npc = CreateSprite(Map, "Butterfly", 42, 38);
View
4 dat/maps/layna_forest/layna_forest_south_east.lua
@@ -357,7 +357,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local hero = {};
@@ -369,7 +368,6 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = false;
@@ -475,7 +473,7 @@ function _CreateObjects()
DialogueManager:AddDialogue(dialogue);
npc:AddDialogueReference(dialogue);
- -- Only add the squirrels and butterflies when the night isn't about to happen
+ -- Only add the squirrels and butterflies when the night isn't about to happen
if (GlobalManager:GetEventValue("story", "layna_forest_crystal_event_done") < 1) then
npc = CreateSprite(Map, "Butterfly", 42, 18);
View
4 dat/maps/layna_forest/layna_forest_south_west.lua
@@ -354,7 +354,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local hero = {};
@@ -372,7 +371,6 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = false;
@@ -447,7 +445,7 @@ function _CreateObjects()
local object = {}
local npc = {}
- -- Only add the squirrels and butterflies when the night isn't about to happen
+ -- Only add the squirrels and butterflies when the night isn't about to happen
if (GlobalManager:GetEventValue("story", "layna_forest_crystal_event_done") < 1) then
npc = CreateSprite(Map, "Butterfly", 42, 18);
View
2  dat/maps/layna_forest/layna_forest_wolf_cave.lua
@@ -210,7 +210,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local hero = {};
@@ -228,7 +227,6 @@ function Load(m)
ObjectManager = Map.object_supervisor;
DialogueManager = Map.dialogue_supervisor;
EventManager = Map.event_supervisor;
- GlobalEvents = Map.map_event_group;
Map.unlimited_stamina = false;
View
1  dat/maps/layna_village/layna_village_bronanns_home.lua
@@ -240,7 +240,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- The main character handlers
local bronann = {};
View
1  dat/maps/layna_village/layna_village_bronanns_home_first_floor.lua
@@ -251,7 +251,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local bronann = {};
View
1  dat/maps/layna_village/layna_village_center.lua
@@ -265,7 +265,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
local bronann = {};
local kalya = {};
View
1  dat/maps/layna_village/layna_village_center_shop.lua
@@ -211,7 +211,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- The main character handlers
local bronann = {};
View
1  dat/maps/layna_village/layna_village_center_sophia_house.lua
@@ -211,7 +211,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local bronann = {};
View
1  dat/maps/layna_village/layna_village_kalya_house_exterior.lua
@@ -215,7 +215,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
local bronann = {};
View
1  dat/maps/layna_village/layna_village_kalya_house_path.lua
@@ -270,7 +270,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
local bronann = {};
View
1  dat/maps/layna_village/layna_village_kalya_house_path_small_house.lua
@@ -211,7 +211,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local bronann = {};
View
1  dat/maps/layna_village/layna_village_riverbank.lua
@@ -354,7 +354,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
local bronann = {};
local kalya = {};
View
1  dat/maps/layna_village/layna_village_riverbank_house.lua
@@ -212,7 +212,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local bronann = {};
View
1  dat/maps/layna_village/layna_village_south_entrance.lua
@@ -243,7 +243,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
local bronann = {};
local orlinn = {};
View
1  dat/maps/layna_village/layna_village_south_entrance_left_house.lua
@@ -211,7 +211,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local bronann = {};
View
1  dat/maps/layna_village/layna_village_south_entrance_right_house.lua
@@ -211,7 +211,6 @@ local Map = {};
local ObjectManager = {};
local DialogueManager = {};
local EventManager = {};
-local GlobalEvents = {};
-- the main character handler
local bronann = {};
View
11 src/common/common_bindings.cpp
@@ -217,17 +217,6 @@ void BindCommonCode()
luabind::module(hoa_script::ScriptManager->GetGlobalState(), "hoa_global")
[
- luabind::class_<GlobalEventGroup>("GlobalEventGroup")
- .def("DoesEventExist", &GlobalEventGroup::DoesEventExist)
- .def("AddNewEvent", &GlobalEventGroup::AddNewEvent)
- .def("GetEvent", &GlobalEventGroup::GetEvent)
- .def("SetEvent", &GlobalEventGroup::SetEvent)
- .def("GetNumberEvents", &GlobalEventGroup::GetNumberEvents)
- .def("GetGroupName", &GlobalEventGroup::GetGroupName)
- ];
-
- luabind::module(hoa_script::ScriptManager->GetGlobalState(), "hoa_global")
- [
luabind::class_<GlobalAttackPoint>("GlobalAttackPoint")
.def("GetName", &GlobalAttackPoint::GetName)
.def("GetXPosition", &GlobalAttackPoint::GetXPosition)
View
1  src/modes/mode_bindings.cpp
@@ -84,7 +84,6 @@ void BindModeCode()
.def_readonly("object_supervisor", &MapMode::_object_supervisor)
.def_readonly("event_supervisor", &MapMode::_event_supervisor)
.def_readonly("dialogue_supervisor", &MapMode::_dialogue_supervisor)
- .def_readonly("treasure_supervisor", &MapMode::_treasure_supervisor)
.def_readwrite("camera", &MapMode::_camera)
.def_readwrite("unlimited_stamina", &MapMode::_unlimited_stamina)
Please sign in to comment.
Something went wrong with that request. Please try again.