diff --git a/data/base/sequenceaudio/cam1/c001.txa b/data/base/sequenceaudio/cam1/c001.txa index 2ddd21655..fd7ac670a 100644 --- a/data/base/sequenceaudio/cam1/c001.txa +++ b/data/base/sequenceaudio/cam1/c001.txa @@ -1,14 +1,14 @@ -270 400 0 100 _("CAMPAIGN ONE") -260 420 0 100 _("WESTERN SECTOR") +270 400 0.0 4.0 _("CAMPAIGN ONE") +260 420 0.0 4.0 _("WESTERN SECTOR") -20 20 101 399 _("Dawn, July 4th, 2100") -0 0 101 399 _("Project HQ") -0 0 101 399 _("A New Era") +20 20 4.04 15.96 _("Dawn, July 4th, 2100") +0 0 4.04 15.96 _("Project HQ") +0 0 4.04 15.96 _("A New Era") -20 20 499 799 _("Morning, July 4th, 2100") -0 0 499 799 _("In-flight to Western Sector") -0 0 499 799 _("Team Alpha nears its destination") +20 20 19.96 31.96 _("Morning, July 4th, 2100") +0 0 19.96 31.96 _("In-flight to Western Sector") +0 0 19.96 31.96 _("Team Alpha nears its destination") -20 20 1250 1725 _("OBJECTIVE: Locate and recover neural synapse technology") -20 447 1250 1725 _("Establish a base, then search for a Pre-Collapse structure.") -0 0 1250 1725 _("This structure contains technology vital for the success of the Project.") +20 20 50.0 69.0 _("OBJECTIVE: Locate and recover neural synapse technology") +20 447 50.0 69.0 _("Establish a base, then search for a Pre-Collapse structure.") +0 0 50.0 69.0 _("This structure contains technology vital for the success of the Project.") diff --git a/data/base/sequenceaudio/cam1/c001.txt b/data/base/sequenceaudio/cam1/c001.txt index 48c44a7cc..5e21428bf 100644 --- a/data/base/sequenceaudio/cam1/c001.txt +++ b/data/base/sequenceaudio/cam1/c001.txt @@ -1,12 +1,12 @@ -20 432 100 200 _("Transport destinations follow:") -0 0 100 200 _("Alpha - Western Sector....") +20 432 4.0 8.0 _("Transport destinations follow:") +0 0 4.0 8.0 _("Alpha - Western Sector....") -20 432 225 350 _("Alpha you are cleared for take-off.") -0 0 225 350 _("Good luck and good hunting.") +20 432 9.0 14.0 _("Alpha you are cleared for take-off.") +0 0 9.0 14.0 _("Good luck and good hunting.") -20 432 750 875 _("Approaching Landing Zone. Team Alpha Briefing commences.") +20 432 30.0 35.0 _("Approaching Landing Zone. Team Alpha Briefing commences.") -20 432 925 1150 _("Commander, you lead Team Alpha, one of three expeditionary teams sent out by the Project to recover artifacts from before the Collapse.") +20 432 37.0 46.0 _("Commander, you lead Team Alpha, one of three expeditionary teams sent out by the Project to recover artifacts from before the Collapse.") -20 432 1175 1240 _("Your destination lies in the western zone.") +20 432 47.0 49.6 _("Your destination lies in the western zone.") diff --git a/data/base/sequenceaudio/cam1/c001end.txt b/data/base/sequenceaudio/cam1/c001end.txt index db14b1721..0e0444fdf 100644 --- a/data/base/sequenceaudio/cam1/c001end.txt +++ b/data/base/sequenceaudio/cam1/c001end.txt @@ -1,7 +1,7 @@ -20 20 0 60 _("Incoming Transmission") +20 20 0.0 2.4 _("Incoming Transmission") -20 20 70 250 _("Transmission from Beta Base") -20 452 70 250 _("Mayday! Mayday!") -0 0 70 250 _("Please assist!...") +20 20 2.8 10.0 _("Transmission from Beta Base") +20 452 2.8 10.0 _("Mayday! Mayday!") +0 0 2.8 10.0 _("Please assist!...") -20 20 730 844 _("Commander you are to assist Team Beta") \ No newline at end of file +20 20 29.2 33.76 _("Commander you are to assist Team Beta") \ No newline at end of file diff --git a/data/base/sequenceaudio/cam1/cam1ccom.txt b/data/base/sequenceaudio/cam1/cam1ccom.txt index 1d38c621a..4658b048b 100644 --- a/data/base/sequenceaudio/cam1/cam1ccom.txt +++ b/data/base/sequenceaudio/cam1/cam1ccom.txt @@ -1,11 +1,11 @@ //pos frame //x y start end Text -20 432 0 100 _("Commander, we have recovered a command turret from the New Paradigm.") +20 432 0.0 4.0 _("Commander, we have recovered a command turret from the New Paradigm.") -20 432 125 375 _("This turret allows commanders to coordinate attacks between assigned units and to act as a delivery point for factories. Researching and using this technology has the highest priority.") +20 432 5.0 15.0 _("This turret allows commanders to coordinate attacks between assigned units and to act as a delivery point for factories. Researching and using this technology has the highest priority.") -20 432 425 475 _("Commander, we are receiving this transmission.") +20 432 17.0 19.0 _("Commander, we are receiving this transmission.") diff --git a/data/base/sequenceaudio/cam1/cam1cnp.txt b/data/base/sequenceaudio/cam1/cam1cnp.txt index 6c7bb6960..e7210c5ab 100644 --- a/data/base/sequenceaudio/cam1/cam1cnp.txt +++ b/data/base/sequenceaudio/cam1/cam1cnp.txt @@ -1,5 +1,5 @@ //pos frame //x y start end Text -20 432 150 325 _("Your attacks upon us will not go unpunished.") -0 0 150 325 _("You are in contravention of the New Paradigm.") +20 432 6.0 13.0 _("Your attacks upon us will not go unpunished.") +0 0 6.0 13.0 _("You are in contravention of the New Paradigm.") diff --git a/data/base/sequenceaudio/cam1/cam1dnp.txt b/data/base/sequenceaudio/cam1/cam1dnp.txt index 832246cb3..c02e78306 100644 --- a/data/base/sequenceaudio/cam1/cam1dnp.txt +++ b/data/base/sequenceaudio/cam1/cam1dnp.txt @@ -1,9 +1,9 @@ //pos frame //x y start end Text -20 432 200 370 _("All attack groups commence attack on enemy.") -0 0 200 370 _("They are in contravention of the New Paradigm.") +20 432 8.0 14.8 _("All attack groups commence attack on enemy.") +0 0 8.0 14.8 _("They are in contravention of the New Paradigm.") -20 432 385 450 _("They must be eradicated.") +20 432 15.4 18.0 _("They must be eradicated.") diff --git a/data/base/sequenceaudio/cam1/cam1dp2.txt b/data/base/sequenceaudio/cam1/cam1dp2.txt index d4cf93f5b..fd67c0a31 100644 --- a/data/base/sequenceaudio/cam1/cam1dp2.txt +++ b/data/base/sequenceaudio/cam1/cam1dp2.txt @@ -1,8 +1,8 @@ //pos frame //x y start end Text -20 432 25 175 _("Secure the LZ and establish a forward base.") -0 0 25 175 _("Then destroy the New Paradigm's base.") +20 432 1.0 7.0 _("Secure the LZ and establish a forward base.") +0 0 1.0 7.0 _("Then destroy the New Paradigm's base.") diff --git a/data/base/sequenceaudio/cam1/cam1out2.txt b/data/base/sequenceaudio/cam1/cam1out2.txt index 9d48a8738..ecd0e1f08 100644 --- a/data/base/sequenceaudio/cam1/cam1out2.txt +++ b/data/base/sequenceaudio/cam1/cam1out2.txt @@ -1,10 +1,10 @@ -20 432 150 325 _("Open your systems to me.") -0 0 150 325 _("Let me meld with your machines and cyborgs.") +20 432 6.0 13.0 _("Open your systems to me.") +0 0 6.0 13.0 _("Let me meld with your machines and cyborgs.") -20 432 330 550 _("We will create the perfect nexus of man and machine.") -0 0 330 550 _("Together we can create a new world.") +20 432 13.2 22.0 _("We will create the perfect nexus of man and machine.") +0 0 13.2 22.0 _("Together we can create a new world.") -20 432 575 675 _("I can give you power beyond your wildest dreams.") +20 432 23.0 27.0 _("I can give you power beyond your wildest dreams.") -20 432 700 925 _("Open your systems to me and you will be strong.") -0 0 700 925 _("I can raise you as gods upon the blasted earth.") +20 432 28.0 37.0 _("Open your systems to me and you will be strong.") +0 0 28.0 37.0 _("I can raise you as gods upon the blasted earth.") diff --git a/data/base/sequenceaudio/cam1/cam1out3.txt b/data/base/sequenceaudio/cam1/cam1out3.txt index 279d7c57a..d8b1c0520 100644 --- a/data/base/sequenceaudio/cam1/cam1out3.txt +++ b/data/base/sequenceaudio/cam1/cam1out3.txt @@ -1,6 +1,6 @@ //pos frame //x y start end Text -20 432 25 125 _("When we failed to respond it became threatening.") +20 432 1.0 5.0 _("When we failed to respond it became threatening.") diff --git a/data/base/sequenceaudio/cam1/cam1out4.txt b/data/base/sequenceaudio/cam1/cam1out4.txt index bf1f1265b..6b2e6eda2 100644 --- a/data/base/sequenceaudio/cam1/cam1out4.txt +++ b/data/base/sequenceaudio/cam1/cam1out4.txt @@ -1,6 +1,6 @@ -20 432 75 337 _("Your interference in my plans for the New Paradigm will not go unpunished.") -0 0 75 337 _("You are weak flesh-things. I am strong and have many parts.") +20 432 3.0 13.48 _("Your interference in my plans for the New Paradigm will not go unpunished.") +0 0 3.0 13.48 _("You are weak flesh-things. I am strong and have many parts.") -20 432 350 600 _("You may defeat me here, but I shall rise again.") -0 0 350 600 _("As I once cleansed the world with fire, I will destroy you and your puny Project!!") +20 432 14.0 24.0 _("You may defeat me here, but I shall rise again.") +0 0 14.0 24.0 _("As I once cleansed the world with fire, I will destroy you and your puny Project!!") diff --git a/data/base/sequenceaudio/cam1/cam1out5.txt b/data/base/sequenceaudio/cam1/cam1out5.txt index 8757885ef..f2a8b9f70 100644 --- a/data/base/sequenceaudio/cam1/cam1out5.txt +++ b/data/base/sequenceaudio/cam1/cam1out5.txt @@ -1,13 +1,13 @@ //pos frame //x y start end Text -20 432 25 190 _("Nexus then removed itself from the system, destroying its memory banks, and removing all traces of its external connections.") +20 432 1.0 7.6 _("Nexus then removed itself from the system, destroying its memory banks, and removing all traces of its external connections.") -20 432 200 475 _("We are not sure what Nexus is or who or what is directing it. Initial research links the Nexus Intruder Program with the Reed Corporation, the developer of the synaptic link.") +20 432 8.0 19.0 _("We are not sure what Nexus is or who or what is directing it. Initial research links the Nexus Intruder Program with the Reed Corporation, the developer of the synaptic link.") -20 432 500 710 _("We have ascertained that Nexus supplied the New Paradigm with most of its technology. Whatever Nexus is, it's more than a computer parasite.") +20 432 20.0 28.4 _("We have ascertained that Nexus supplied the New Paradigm with most of its technology. Whatever Nexus is, it's more than a computer parasite.") -20 432 725 900 _("It has technology and weapons. It knows about us, and it's not friendly.") +20 432 29.0 36.0 _("It has technology and weapons. It knows about us, and it's not friendly.") diff --git a/data/base/sequenceaudio/cam1/map1a_c.txt b/data/base/sequenceaudio/cam1/map1a_c.txt index b66a13a46..69c5761b8 100644 --- a/data/base/sequenceaudio/cam1/map1a_c.txt +++ b/data/base/sequenceaudio/cam1/map1a_c.txt @@ -1,16 +1,16 @@ //pos frame //x y start end Text -20 432 65 190 _("The Synaptic Link was developed by the Reed Corporation in conjunction with the US Military.") +20 432 2.6 7.6 _("The Synaptic Link was developed by the Reed Corporation in conjunction with the US Military.") -20 432 200 550 _("The synaptic link allows for almost instantaneous transfer of thought from human operators to vehicle control and guidance systems. The synaptic link is fitted into the base of the skull circling the spinal column.") +20 432 8.0 22.0 _("The synaptic link allows for almost instantaneous transfer of thought from human operators to vehicle control and guidance systems. The synaptic link is fitted into the base of the skull circling the spinal column.") -20 432 625 750 _("The link has a hi-speed data transfer port that plugs into any computer system.") +20 432 25.0 30.0 _("The link has a hi-speed data transfer port that plugs into any computer system.") -20 432 925 1200 _("More importantly the development of the synaptic link made the creation of cyborgs possible. Early attempts at power suits for individual soldiers failed as they proved to be slow and unresponsive.") +20 432 37.0 48.0 _("More importantly the development of the synaptic link made the creation of cyborgs possible. Early attempts at power suits for individual soldiers failed as they proved to be slow and unresponsive.") -20 432 1350 1700 _("The synaptic link allowed soldiers to be placed in power suits that they controlled as easily as their own bodies. Power suits allowed infantry to function effectively on the battlefields of the 21st Century.") +20 432 54.0 68.0 _("The synaptic link allowed soldiers to be placed in power suits that they controlled as easily as their own bodies. Power suits allowed infantry to function effectively on the battlefields of the 21st Century.") -20 432 1715 1925 _("Unfortunately, this technology has fallen into the hands of the New Paradigm. It is imperative that you research and develop synaptic link technologies.") +20 432 68.6 77.0 _("Unfortunately, this technology has fallen into the hands of the New Paradigm. It is imperative that you research and develop synaptic link technologies.") diff --git a/data/base/sequenceaudio/cam1/sub13np1.txt b/data/base/sequenceaudio/cam1/sub13np1.txt index a4cadf686..fb4b0de79 100644 --- a/data/base/sequenceaudio/cam1/sub13np1.txt +++ b/data/base/sequenceaudio/cam1/sub13np1.txt @@ -1,12 +1,12 @@ //pos frame //x y start end Text -20 432 200 275 _("Warning!") -0 0 200 275 _("You are entering a restricted area.") +20 432 8.0 11.0 _("Warning!") +0 0 8.0 11.0 _("You are entering a restricted area.") -20 432 300 550 _("Return to your designated zone or be destroyed.") -0 0 300 550 _("Repeat. Return to your designated zone or be destroyed.") -0 0 300 550 _("Message Ends.") +20 432 12.0 22.0 _("Return to your designated zone or be destroyed.") +0 0 12.0 22.0 _("Repeat. Return to your designated zone or be destroyed.") +0 0 12.0 22.0 _("Message Ends.") diff --git a/data/base/sequenceaudio/cam1/sub13np2.txt b/data/base/sequenceaudio/cam1/sub13np2.txt index d8907b3e6..0f96274a5 100644 --- a/data/base/sequenceaudio/cam1/sub13np2.txt +++ b/data/base/sequenceaudio/cam1/sub13np2.txt @@ -1,9 +1,9 @@ //pos frame //x y start end Text -20 432 200 370 _("Your attacks upon us will not go unpunished.") -0 0 200 370 _("You are in contravention of the New Paradigm.") +20 432 8.0 14.8 _("Your attacks upon us will not go unpunished.") +0 0 8.0 14.8 _("You are in contravention of the New Paradigm.") -20 432 380 440 _("You will be destroyed.") +20 432 15.2 17.6 _("You will be destroyed.") diff --git a/data/base/sequenceaudio/cam1/sub14anp.txt b/data/base/sequenceaudio/cam1/sub14anp.txt index 7db38e6be..0c4a90602 100644 --- a/data/base/sequenceaudio/cam1/sub14anp.txt +++ b/data/base/sequenceaudio/cam1/sub14anp.txt @@ -1,7 +1,7 @@ //pos frame //x y start end Text -20 432 210 380 _("NEXUS, the synaptic technology you required has been recovered and sent for collection.") +20 432 8.4 15.2 _("NEXUS, the synaptic technology you required has been recovered and sent for collection.") diff --git a/data/base/sequenceaudio/cam1/sub17fmv.txt b/data/base/sequenceaudio/cam1/sub17fmv.txt index baadcabd2..e28346f4d 100644 --- a/data/base/sequenceaudio/cam1/sub17fmv.txt +++ b/data/base/sequenceaudio/cam1/sub17fmv.txt @@ -1,15 +1,15 @@ //pos frame //x y start end Text -20 432 75 275 _("This Nexus Intruder Program is a self-mutating computer parasite. This makes it difficult to eradicate from systems once it has been identified.") +20 432 3.0 11.0 _("This Nexus Intruder Program is a self-mutating computer parasite. This makes it difficult to eradicate from systems once it has been identified.") -20 432 300 735 _("We have been unable to ascertain it's ultimate goal or function. In its initial form it seeks out and isolates sections of memory from the rest of the invaded system. It then begins to mutate itself and data structures, effectively reprogramming the system from within.") +20 432 12.0 29.4 _("We have been unable to ascertain it's ultimate goal or function. In its initial form it seeks out and isolates sections of memory from the rest of the invaded system. It then begins to mutate itself and data structures, effectively reprogramming the system from within.") -20 432 750 960 _("Further analysis was prevented by the manual shutdown of the system by our technicians to prevent additional contamination by the Nexus Intruder Program.") +20 432 30.0 38.4 _("Further analysis was prevented by the manual shutdown of the system by our technicians to prevent additional contamination by the Nexus Intruder Program.") -20 432 975 1225 _("However, the spread of the Nexus Intruder Program was not checked by New Paradigm. We need to capture New Paradigm's core systems to further investigate Nexus and determine its origins.") +20 432 39.0 49.0 _("However, the spread of the Nexus Intruder Program was not checked by New Paradigm. We need to capture New Paradigm's core systems to further investigate Nexus and determine its origins.") -20 432 1250 1425 _("Commander, you are to curtail the New Paradigm's activities in this sector and locate their main base.") +20 432 50.0 57.0 _("Commander, you are to curtail the New Paradigm's activities in this sector and locate their main base.") diff --git a/data/base/sequenceaudio/cam1/sub1_4bn.txt b/data/base/sequenceaudio/cam1/sub1_4bn.txt index f2c2b7690..eba697159 100644 --- a/data/base/sequenceaudio/cam1/sub1_4bn.txt +++ b/data/base/sequenceaudio/cam1/sub1_4bn.txt @@ -1,8 +1,8 @@ //pos frame //x y start end Text -20 432 150 375 _("You have done well.") -0 0 150 375 _("Once we have analyzed and authenticated the technology, your reward will follow.") +20 432 6.0 15.0 _("You have done well.") +0 0 6.0 15.0 _("Once we have analyzed and authenticated the technology, your reward will follow.") diff --git a/data/base/sequenceaudio/cam1/sub1_5pl.txt b/data/base/sequenceaudio/cam1/sub1_5pl.txt index ca35a7928..78e4c0d9f 100644 --- a/data/base/sequenceaudio/cam1/sub1_5pl.txt +++ b/data/base/sequenceaudio/cam1/sub1_5pl.txt @@ -1,7 +1,7 @@ //pos frame //x y start end Text -20 432 25 190 _("Information discovered at the previous enemy base indicates that the New Paradigm recovered two synaptic link artifacts.") +20 432 2.08333333333 15.8333333333 _("Information discovered at the previous enemy base indicates that the New Paradigm recovered two synaptic link artifacts.") diff --git a/data/base/sequenceaudio/cam2/c002.txa b/data/base/sequenceaudio/cam2/c002.txa index a27aacc33..f25f3bd4b 100644 --- a/data/base/sequenceaudio/cam2/c002.txa +++ b/data/base/sequenceaudio/cam2/c002.txa @@ -1,18 +1,18 @@ -270 400 0 100 _("CAMPAIGN TWO") -265 420 0 100 _("EASTERN SECTOR") +270 400 0.0 8.33333333333 _("CAMPAIGN TWO") +265 420 0.0 8.33333333333 _("EASTERN SECTOR") -20 20 105 285 _("Morning, September 1st, 2100") -0 0 105 285 _("In-flight to Eastern Sector") -0 0 105 285 _("Team Alpha approaches Beta Base") +20 20 8.75 23.75 _("Morning, September 1st, 2100") +0 0 8.75 23.75 _("In-flight to Eastern Sector") +0 0 8.75 23.75 _("Team Alpha approaches Beta Base") -20 20 320 912 _("BETA BASE MISSION: Eastern Sector") -20 447 320 912 _("Upon arrival you are to assume command of the base.") -0 0 320 912 _("You must defend and hold it at all costs.") +20 20 26.6666666667 76.0 _("BETA BASE MISSION: Eastern Sector") +20 447 26.6666666667 76.0 _("Upon arrival you are to assume command of the base.") +0 0 26.6666666667 76.0 _("You must defend and hold it at all costs.") -270 465 925 1125 _("THE COLLECTIVE") +270 465 77.0833333333 93.75 _("THE COLLECTIVE") -20 20 1730 1770 _("BETA BASE MISSION: Eastern Sector") +20 20 144.166666667 147.5 _("BETA BASE MISSION: Eastern Sector") -20 20 1800 2127 _("BETA BASE MISSION: Defend and Fortify") -20 447 1800 2127 _("Be sure to fortify the perimeter and establish anti-aircraft defenses.") -0 0 1800 2127 _("New technologies are available.") +20 20 150.0 177.25 _("BETA BASE MISSION: Defend and Fortify") +20 447 150.0 177.25 _("Be sure to fortify the perimeter and establish anti-aircraft defenses.") +0 0 150.0 177.25 _("New technologies are available.") diff --git a/data/base/sequenceaudio/cam2/c2diif2.txt b/data/base/sequenceaudio/cam2/c2diif2.txt index 372e776ee..d9bea05cd 100644 --- a/data/base/sequenceaudio/cam2/c2diif2.txt +++ b/data/base/sequenceaudio/cam2/c2diif2.txt @@ -1,6 +1,6 @@ -20 432 40 200 _("Commander, a new launch has been detected.") -0 0 40 200 _("It is likely to be targeted at your location.") +20 432 1.6 8.0 _("Commander, a new launch has been detected.") +0 0 1.6 8.0 _("It is likely to be targeted at your location.") -20 432 220 385 _("You are to start the immediate evacuation of Beta Base to the safe haven.") +20 432 8.8 15.4 _("You are to start the immediate evacuation of Beta Base to the safe haven.") diff --git a/data/base/sequenceaudio/cam2/cam22fmv.txt b/data/base/sequenceaudio/cam2/cam22fmv.txt index 2e4238f8a..481f571a4 100644 --- a/data/base/sequenceaudio/cam2/cam22fmv.txt +++ b/data/base/sequenceaudio/cam2/cam22fmv.txt @@ -1,28 +1,28 @@ -20 432 0 125 _("NASDA is the North American Strategic Defense Agency.") +20 432 0.0 10.4166666667 _("NASDA is the North American Strategic Defense Agency.") -20 432 150 435 _("NASDA was formed in 2076 to defend North America from conventional and nuclear attack. The construction of a satellite defense system began in 2081 and was completed in 2082.") +20 432 12.5 36.25 _("NASDA was formed in 2076 to defend North America from conventional and nuclear attack. The construction of a satellite defense system began in 2081 and was completed in 2082.") -20 432 450 590 _("In 2085 the NASDA satellites fired their nukes at Earth.") +20 432 37.5 49.1666666667 _("In 2085 the NASDA satellites fired their nukes at Earth.") -20 432 635 800 _("There were also ground-based sites. Many of these were destroyed in the nuclear counterstrikes, but there's bound to be some out there.") +20 432 52.9166666667 66.6666666667 _("There were also ground-based sites. Many of these were destroyed in the nuclear counterstrikes, but there's bound to be some out there.") -20 432 825 1000 _("The NASDA satellites also contained pulse-lasers designed to shoot down missiles approaching North America.") +20 432 68.75 83.3333333333 _("The NASDA satellites also contained pulse-lasers designed to shoot down missiles approaching North America.") + +20 432 85.8333333333 106.25 _("During the counterstrikes, these LasSats failed to fire. If brought into operation, these LasSats could inflict major damage on ground targets.") + +20 432 108.333333333 118.333333333 _("All nukes targeted at North America found their targets.") + +20 447 119.166666667 141.666666667 _("We know that Nexus is searching for NASDA Central in the Eastern Sector. This was one of the land-based control centres for the satellites.") + +20 453 142.5 147.083333333 _("If the centre is found intact, NEXUS may gain control of the satellites.") + +20 432 148.333333333 154.166666667 _("Nexus claimed that it had already destroyed the world.") -20 432 1030 1275 _("During the counterstrikes, these LasSats failed to fire. If brought into operation, these LasSats could inflict major damage on ground targets.") -20 432 1300 1420 _("All nukes targeted at North America found their targets.") -20 447 1430 1700 _("We know that Nexus is searching for NASDA Central in the Eastern Sector. This was one of the land-based control centres for the satellites.") -20 453 1710 1765 _("If the centre is found intact, NEXUS may gain control of the satellites.") -20 432 1780 1850 _("Nexus claimed that it had already destroyed the world.") - - - - - diff --git a/data/base/sequenceaudio/cam2/cam22pl2.txt b/data/base/sequenceaudio/cam2/cam22pl2.txt index 1e5421ea7..131aa2c7a 100644 --- a/data/base/sequenceaudio/cam2/cam22pl2.txt +++ b/data/base/sequenceaudio/cam2/cam22pl2.txt @@ -1,2 +1,2 @@ -20 432 25 150 _("NASDA Briefing follows...") +20 432 2.08333333333 12.5 _("NASDA Briefing follows...") diff --git a/data/base/sequenceaudio/cam2/cam22pl3.txt b/data/base/sequenceaudio/cam2/cam22pl3.txt index 5a859ecf7..3a244a27e 100644 --- a/data/base/sequenceaudio/cam2/cam22pl3.txt +++ b/data/base/sequenceaudio/cam2/cam22pl3.txt @@ -1,4 +1,4 @@ -20 432 10 100 _("We've got to make sure that it can't do it again.") +20 432 0.4 4.0 _("We've got to make sure that it can't do it again.") diff --git a/data/base/sequenceaudio/cam2/cam26afm.txt b/data/base/sequenceaudio/cam2/cam26afm.txt index fb728fc29..f19186c3b 100644 --- a/data/base/sequenceaudio/cam2/cam26afm.txt +++ b/data/base/sequenceaudio/cam2/cam26afm.txt @@ -1,9 +1,9 @@ -20 432 20 200 _("Analysis indicates that these systems were part of the control system for the NASDA satellites.") -0 0 20 200 _("It's now certain that Nexus was responsible for The Collapse.") +20 432 1.66666666667 16.6666666667 _("Analysis indicates that these systems were part of the control system for the NASDA satellites.") +0 0 1.66666666667 16.6666666667 _("It's now certain that Nexus was responsible for The Collapse.") -20 432 220 500 _("During the early stages of the Collapse, NASDA technicians switched off the infected systems in order to isolate the spread of Nexus. This seems to have prevented the LasSats from firing during the counterstrikes.") +20 432 18.3333333333 41.6666666667 _("During the early stages of the Collapse, NASDA technicians switched off the infected systems in order to isolate the spread of Nexus. This seems to have prevented the LasSats from firing during the counterstrikes.") -20 432 520 825 _("The ensuing nuclear-magnetic pulses wiped clean large amounts of NASDA's memory banks, shattering its core processor, and sent shockwaves blasting through Nexus.") +20 432 43.3333333333 68.75 _("The ensuing nuclear-magnetic pulses wiped clean large amounts of NASDA's memory banks, shattering its core processor, and sent shockwaves blasting through Nexus.") -20 432 875 1000 _("Nexus was fried as whole sections of its consciousness were obliterated in the counterstrikes.") +20 432 72.9166666667 83.3333333333 _("Nexus was fried as whole sections of its consciousness were obliterated in the counterstrikes.") diff --git a/data/base/sequenceaudio/cam2/cam26bfm.txt b/data/base/sequenceaudio/cam2/cam26bfm.txt index 97135b1ae..a60293c6e 100644 --- a/data/base/sequenceaudio/cam2/cam26bfm.txt +++ b/data/base/sequenceaudio/cam2/cam26bfm.txt @@ -1,6 +1,6 @@ -20 432 40 175 _("Commander we are detecting transmissions from this site that are reaching high orbit.") +20 432 1.6 7.0 _("Commander we are detecting transmissions from this site that are reaching high orbit.") -20 432 325 410 _("Nexus has now reconnected itself with the NASDA satellites.") +20 432 13.0 16.4 _("Nexus has now reconnected itself with the NASDA satellites.") -20 432 420 565 _("This poses a major threat to the Project and to our survival.") +20 432 16.8 22.6 _("This poses a major threat to the Project and to our survival.") diff --git a/data/base/sequenceaudio/cam2/cam26pl1.txt b/data/base/sequenceaudio/cam2/cam26pl1.txt index e94182b0f..509014bba 100644 --- a/data/base/sequenceaudio/cam2/cam26pl1.txt +++ b/data/base/sequenceaudio/cam2/cam26pl1.txt @@ -1,6 +1,6 @@ -20 432 25 190 _("Analysis of NASDA Central leaves no doubt that The Collective has introduced the Nexus Intruder Virus to it.") +20 432 1.0 7.6 _("Analysis of NASDA Central leaves no doubt that The Collective has introduced the Nexus Intruder Virus to it.") -20 432 210 350 _("The nuclear reactor was going to be used to power a vast network of pre-Collapse computer systems.") +20 432 8.4 14.0 _("The nuclear reactor was going to be used to power a vast network of pre-Collapse computer systems.") diff --git a/data/base/sequenceaudio/cam2/cam27fmv.txt b/data/base/sequenceaudio/cam2/cam27fmv.txt index eb98412dd..5f03d4125 100644 --- a/data/base/sequenceaudio/cam2/cam27fmv.txt +++ b/data/base/sequenceaudio/cam2/cam27fmv.txt @@ -1,6 +1,6 @@ -20 432 25 100 _("Commander, we have just detected a missile launch at these coordinates.") +20 432 2.08333333333 8.33333333333 _("Commander, we have just detected a missile launch at these coordinates.") -20 432 125 260 _("Team Gamma are sending a team to investigate the launch site and to prevent any further launches.") +20 432 10.4166666667 21.6666666667 _("Team Gamma are sending a team to investigate the launch site and to prevent any further launches.") -20 432 270 565 _("We can only assume that Nexus has gained control of this site. We cannot determine whether the missile is nuclear-armed or where it is targeted. You are advised to begin preparations for the evacuation of your base.") +20 432 22.5 47.0833333333 _("We can only assume that Nexus has gained control of this site. We cannot determine whether the missile is nuclear-armed or where it is targeted. You are advised to begin preparations for the evacuation of your base.") diff --git a/data/base/sequenceaudio/cam2/cam2_2n.txt b/data/base/sequenceaudio/cam2/cam2_2n.txt index 05509cf97..e0163c082 100644 --- a/data/base/sequenceaudio/cam2/cam2_2n.txt +++ b/data/base/sequenceaudio/cam2/cam2_2n.txt @@ -1,5 +1,5 @@ -20 432 225 425 _("Warriors of the Collective, I seek the location of NASDA Central.") -0 0 225 425 _("It lies somewhere in your territory.") +20 432 9.0 17.0 _("Warriors of the Collective, I seek the location of NASDA Central.") +0 0 9.0 17.0 _("It lies somewhere in your territory.") -20 432 450 635 _("Find it for me and I shall provide you with further weapons to aid you in your war against the Project.") +20 432 18.0 25.4 _("Find it for me and I shall provide you with further weapons to aid you in your war against the Project.") diff --git a/data/base/sequenceaudio/cam2/cam2_2n2.txt b/data/base/sequenceaudio/cam2/cam2_2n2.txt index 72f23bd97..84e336371 100644 --- a/data/base/sequenceaudio/cam2/cam2_2n2.txt +++ b/data/base/sequenceaudio/cam2/cam2_2n2.txt @@ -1 +1 @@ -20 432 10 325 _("As I once cleansed the world with fire, I will destroy you and your puny Project!!") +20 432 0.4 13.0 _("As I once cleansed the world with fire, I will destroy you and your puny Project!!") diff --git a/data/base/sequenceaudio/cam2/cam2acol.txt b/data/base/sequenceaudio/cam2/cam2acol.txt index 1dc4a3a75..a836dae76 100644 --- a/data/base/sequenceaudio/cam2/cam2acol.txt +++ b/data/base/sequenceaudio/cam2/cam2acol.txt @@ -1,8 +1,8 @@ -20 432 25 290 _("Warriors of The Collective, more intruders are entering our territory.") -0 0 25 290 _("They are not part of the machine.") +20 432 2.08333333333 24.1666666667 _("Warriors of The Collective, more intruders are entering our territory.") +0 0 2.08333333333 24.1666666667 _("They are not part of the machine.") -20 432 300 625 _("Warriors of The Collective, attack and destroy kill all who resist the machine.") -0 0 300 625 _("Attack! Erase their presence from this area!") +20 432 25.0 52.0833333333 _("Warriors of The Collective, attack and destroy kill all who resist the machine.") +0 0 25.0 52.0833333333 _("Attack! Erase their presence from this area!") diff --git a/data/base/sequenceaudio/cam2/cam2bcol.txt b/data/base/sequenceaudio/cam2/cam2bcol.txt index 4958f2983..59bf86b1c 100644 --- a/data/base/sequenceaudio/cam2/cam2bcol.txt +++ b/data/base/sequenceaudio/cam2/cam2bcol.txt @@ -1,11 +1,11 @@ -20 432 25 250 _("Warriors of The Collective, we are ready to destroy the intruders who pollute our lands.") +20 432 2.08333333333 20.8333333333 _("Warriors of The Collective, we are ready to destroy the intruders who pollute our lands.") -20 432 275 625 _("Those of the Project are not of the machine. They have been denied its blessing. We who have embraced the power of the machine have a destiny to sweep away such weak creatures.") +20 432 22.9166666667 52.0833333333 _("Those of the Project are not of the machine. They have been denied its blessing. We who have embraced the power of the machine have a destiny to sweep away such weak creatures.") -20 432 650 775 _("They shall fall before the might of The Collective.") +20 432 54.1666666667 64.5833333333 _("They shall fall before the might of The Collective.") -20 432 800 925 _("Attack and destroy all who resist the machine.") -0 0 800 925 _("Attack!") +20 432 66.6666666667 77.0833333333 _("Attack and destroy all who resist the machine.") +0 0 66.6666666667 77.0833333333 _("Attack!") diff --git a/data/base/sequenceaudio/cam2/cam2dico.txt b/data/base/sequenceaudio/cam2/cam2dico.txt index 8568f0c88..e39387620 100644 --- a/data/base/sequenceaudio/cam2/cam2dico.txt +++ b/data/base/sequenceaudio/cam2/cam2dico.txt @@ -1,6 +1,6 @@ -20 432 10 320 _("Warriors of the Collective, Nexus has given us the power of the machine so that we can destroy all that oppose us.") +20 432 0.833333333333 26.6666666667 _("Warriors of the Collective, Nexus has given us the power of the machine so that we can destroy all that oppose us.") -20 432 325 500 _("Nexus now asks us to crush the Project.") -0 0 325 500 _("Cleanse and destroy!!") +20 432 27.0833333333 41.6666666667 _("Nexus now asks us to crush the Project.") +0 0 27.0833333333 41.6666666667 _("Cleanse and destroy!!") diff --git a/data/base/sequenceaudio/cam2/cam2diin.txt b/data/base/sequenceaudio/cam2/cam2diin.txt index 7316fcf65..7bf38cdfc 100644 --- a/data/base/sequenceaudio/cam2/cam2diin.txt +++ b/data/base/sequenceaudio/cam2/cam2diin.txt @@ -1,8 +1,8 @@ -20 432 240 380 _("Warriors of the Collective. You have performed well.") -0 0 240 380 _("Your just reward is on its way.") +20 432 9.6 15.2 _("Warriors of the Collective. You have performed well.") +0 0 9.6 15.2 _("Your just reward is on its way.") -20 432 390 525 _("The Project is fleeing its base and stealing your technology.") -0 0 390 525 _("You must stop them!") +20 432 15.6 21.0 _("The Project is fleeing its base and stealing your technology.") +0 0 15.6 21.0 _("You must stop them!") diff --git a/data/base/sequenceaudio/cam2/cam2dipl.txt b/data/base/sequenceaudio/cam2/cam2dipl.txt index eb5811041..f11f55332 100644 --- a/data/base/sequenceaudio/cam2/cam2dipl.txt +++ b/data/base/sequenceaudio/cam2/cam2dipl.txt @@ -1,4 +1,4 @@ -20 432 10 100 _("Decoding Transmission...") +20 432 0.4 4.0 _("Decoding Transmission...") diff --git a/data/base/sequenceaudio/cam3/c003.txa b/data/base/sequenceaudio/cam3/c003.txa index c5b802af5..7690cd966 100644 --- a/data/base/sequenceaudio/cam3/c003.txa +++ b/data/base/sequenceaudio/cam3/c003.txa @@ -1,17 +1,17 @@ -260 400 0 100 _("CAMPAIGN THREE") -254 420 0 100 _("NORTHERN SECTOR") +260 400 0.0 8.33333333333 _("CAMPAIGN THREE") +254 420 0.0 8.33333333333 _("NORTHERN SECTOR") -20 20 113 479 _("TRANSPORT MISSION: Northern Sector") -20 447 113 479 _("Congratulations on your successful evacuation of Beta Base.") -0 0 113 479 _("NEXUS has gained access to nuclear weapons and is determined to destroy the Project.") +20 20 9.41666666667 39.9166666667 _("TRANSPORT MISSION: Northern Sector") +20 447 9.41666666667 39.9166666667 _("Congratulations on your successful evacuation of Beta Base.") +0 0 9.41666666667 39.9166666667 _("NEXUS has gained access to nuclear weapons and is determined to destroy the Project.") -20 20 1000 1225 _("Dusk, December 3rd, 2100") -0 0 1000 1225 _("In-flight to Northern Sector") -0 0 1000 1225 _("The Final Encounter") +20 20 83.3333333333 102.083333333 _("Dusk, December 3rd, 2100") +0 0 83.3333333333 102.083333333 _("In-flight to Northern Sector") +0 0 83.3333333333 102.083333333 _("The Final Encounter") -20 20 1278 1338 _("Briefing Commences") +20 20 106.5 111.5 _("Briefing Commences") -20 20 1347 1768 _("TRANSPORT MISSION: Northern Sector") -20 447 1347 1768 _("Once at the mountains secure an LZ. Then establish a forward base.") -0 0 1347 1768 _("Team Gamma will contact you there.") +20 20 112.25 147.333333333 _("TRANSPORT MISSION: Northern Sector") +20 447 112.25 147.333333333 _("Once at the mountains secure an LZ. Then establish a forward base.") +0 0 112.25 147.333333333 _("Team Gamma will contact you there.") diff --git a/data/base/sequenceaudio/cam3/c003.txt b/data/base/sequenceaudio/cam3/c003.txt index f69e2182a..3d29b9ddc 100644 --- a/data/base/sequenceaudio/cam3/c003.txt +++ b/data/base/sequenceaudio/cam3/c003.txt @@ -1,7 +1,7 @@ -20 432 850 1025 _("Personnel at Gamma Base have confirmed that the nuclear missiles targeted at Alpha and Beta bases were launched from a silo in their sector.") +20 432 70.8333333333 85.4166666667 _("Personnel at Gamma Base have confirmed that the nuclear missiles targeted at Alpha and Beta bases were launched from a silo in their sector.") -20 432 1150 1250 _("Team Gamma is currently scouting the silo's location and monitoring NEXUS's activity.") +20 432 95.8333333333 104.166666667 _("Team Gamma is currently scouting the silo's location and monitoring NEXUS's activity.") -20 432 1275 1350 _("Commander, the success of the Project lies with you.") +20 432 106.25 112.5 _("Commander, the success of the Project lies with you.") diff --git a/data/base/sequenceaudio/cam3/c3ad2n2.txt b/data/base/sequenceaudio/cam3/c3ad2n2.txt index 4e9d6be85..30334b883 100644 --- a/data/base/sequenceaudio/cam3/c3ad2n2.txt +++ b/data/base/sequenceaudio/cam3/c3ad2n2.txt @@ -1,4 +1,4 @@ -20 432 140 210 _("Time's up commander!!") +20 432 5.6 8.4 _("Time's up commander!!") diff --git a/data/base/sequenceaudio/cam3/c3ad2pl3.txt b/data/base/sequenceaudio/cam3/c3ad2pl3.txt index e504589c6..5a7ee85cb 100644 --- a/data/base/sequenceaudio/cam3/c3ad2pl3.txt +++ b/data/base/sequenceaudio/cam3/c3ad2pl3.txt @@ -1,4 +1,4 @@ -20 432 10 175 _("Commander, we are detecting NEXUS forces from these coordinates...") +20 432 0.4 7.0 _("Commander, we are detecting NEXUS forces from these coordinates...") diff --git a/data/base/sequenceaudio/cam3/cam32a2.txt b/data/base/sequenceaudio/cam3/cam32a2.txt index 92b40f07a..033857ece 100644 --- a/data/base/sequenceaudio/cam3/cam32a2.txt +++ b/data/base/sequenceaudio/cam3/cam32a2.txt @@ -1,10 +1,10 @@ -20 432 0 60 _("Glad you could make it, Commander.") +20 432 0.0 5.0 _("Glad you could make it, Commander.") -20 432 70 235 _("Enemy strike VTOLs have got us pinned down. We've managed to hold off cyborgs and tanks, but we haven't been able to make any progress along the valley.") +20 432 5.83333333333 19.5833333333 _("Enemy strike VTOLs have got us pinned down. We've managed to hold off cyborgs and tanks, but we haven't been able to make any progress along the valley.") -20 432 245 275 _("Can you try and reach us with anti-aircraft units?") +20 432 20.4166666667 22.9166666667 _("Can you try and reach us with anti-aircraft units?") diff --git a/data/base/sequenceaudio/cam3/cam32alp.txt b/data/base/sequenceaudio/cam3/cam32alp.txt index ff2664b77..140329c27 100644 --- a/data/base/sequenceaudio/cam3/cam32alp.txt +++ b/data/base/sequenceaudio/cam3/cam32alp.txt @@ -1,11 +1,11 @@ -20 432 20 180 _("This is Team Alpha. Repeat, this is Team Alpha. We require immediate assistance.") +20 432 0.8 7.2 _("This is Team Alpha. Repeat, this is Team Alpha. We require immediate assistance.") -20 432 190 300 _("We are under heavy attack from cyborgs, laser tanks, and strike VTOLs.") +20 432 7.6 12.0 _("We are under heavy attack from cyborgs, laser tanks, and strike VTOLs.") -20 432 315 450 _("We were trying to reach your position, but have been ambushed.") -0 0 315 450 _("We're holed up in a valley at these coordinates.") -0 0 315 450 _("Please assist.") +20 432 12.6 18.0 _("We were trying to reach your position, but have been ambushed.") +0 0 12.6 18.0 _("We're holed up in a valley at these coordinates.") +0 0 12.6 18.0 _("Please assist.") diff --git a/data/base/sequenceaudio/cam3/cam32pl2.txt b/data/base/sequenceaudio/cam3/cam32pl2.txt index 25cf7aa66..94fce582b 100644 --- a/data/base/sequenceaudio/cam3/cam32pl2.txt +++ b/data/base/sequenceaudio/cam3/cam32pl2.txt @@ -1,4 +1,4 @@ -20 432 20 85 _("Coordinate Download Completed.") +20 432 0.8 3.4 _("Coordinate Download Completed.") -20 432 90 200 _("Commander, forces from Team Alpha escaped the nuclear attack on Alpha Base.") +20 432 3.6 8.0 _("Commander, forces from Team Alpha escaped the nuclear attack on Alpha Base.") diff --git a/data/base/sequenceaudio/cam3/cam34mu1.txt b/data/base/sequenceaudio/cam3/cam34mu1.txt index 78644f153..b7631dbc1 100644 --- a/data/base/sequenceaudio/cam3/cam34mu1.txt +++ b/data/base/sequenceaudio/cam3/cam34mu1.txt @@ -1,6 +1,6 @@ -20 432 20 110 _("We are experiencing some interference from NEXUS.") +20 432 0.8 4.4 _("We are experiencing some interference from NEXUS.") -20 432 115 220 _("You must destroy his command centre before we lose control of key systems.") +20 432 4.6 8.8 _("You must destroy his command centre before we lose control of key systems.") diff --git a/data/base/sequenceaudio/cam3/cam34mu2.txt b/data/base/sequenceaudio/cam3/cam34mu2.txt index b64d25f67..bc799b2de 100644 --- a/data/base/sequenceaudio/cam3/cam34mu2.txt +++ b/data/base/sequenceaudio/cam3/cam34mu2.txt @@ -1,4 +1,4 @@ -20 432 120 250 _("Commander, welcome to NEXUS!") +20 432 4.8 10.0 _("Commander, welcome to NEXUS!") diff --git a/data/base/sequenceaudio/cam3/cam3_1bn.txt b/data/base/sequenceaudio/cam3/cam3_1bn.txt index acd8bf2e3..7518d6102 100644 --- a/data/base/sequenceaudio/cam3/cam3_1bn.txt +++ b/data/base/sequenceaudio/cam3/cam3_1bn.txt @@ -1,13 +1,13 @@ -20 432 75 250 _("Well done Commander, you've prevented my last missile from launching.") -0 0 75 250 _("Such a shame. Your Project HQ would have made a wonderful target.") +20 432 3.0 10.0 _("Well done Commander, you've prevented my last missile from launching.") +0 0 3.0 10.0 _("Such a shame. Your Project HQ would have made a wonderful target.") -20 432 275 320 _("But it's good of you to join me here.") +20 432 11.0 12.8 _("But it's good of you to join me here.") -20 432 325 425 _("Buried beneath this silo is a tactical nuclear warhead that is set to go off soon.") +20 432 13.0 17.0 _("Buried beneath this silo is a tactical nuclear warhead that is set to go off soon.") -20 432 475 550 _("As I cannot launch it, it'll just have to blow where it is.") +20 432 19.0 22.0 _("As I cannot launch it, it'll just have to blow where it is.") -20 432 560 650 _("Please note that all entrances to the underground complex have been sealed. Goodbye, Commander.") +20 432 22.4 26.0 _("Please note that all entrances to the underground complex have been sealed. Goodbye, Commander.") diff --git a/data/base/sequenceaudio/cam3/cam3_bn.txt b/data/base/sequenceaudio/cam3/cam3_bn.txt index d2dde918e..72b3b5fc4 100644 --- a/data/base/sequenceaudio/cam3/cam3_bn.txt +++ b/data/base/sequenceaudio/cam3/cam3_bn.txt @@ -1,15 +1,15 @@ -20 432 75 165 _("Ah, Commander, so good of you to join us here at Nexus base.") +20 432 3.0 6.6 _("Ah, Commander, so good of you to join us here at Nexus base.") -20 432 175 320 _("It was very useful having Gamma Team set up here in the mountains.") -0 0 175 320 _("Their absorption was such a pleasure.") +20 432 7.0 12.8 _("It was very useful having Gamma Team set up here in the mountains.") +0 0 7.0 12.8 _("Their absorption was such a pleasure.") -20 432 325 400 _("Thank you for all those useful technologies you've recovered.") +20 432 13.0 16.0 _("Thank you for all those useful technologies you've recovered.") -20 432 405 510 _("You and not those fools in the New Paradigm and the Collective.") +20 432 16.2 20.4 _("You and not those fools in the New Paradigm and the Collective.") -20 432 530 620 _("I'm now activating all your synaptic links so that your forces can meld with Nexus.") +20 432 21.2 24.8 _("I'm now activating all your synaptic links so that your forces can meld with Nexus.") -20 432 630 720 _("Your forces are now mine! Welcome to Nexus.") +20 432 25.2 28.8 _("Your forces are now mine! Welcome to Nexus.") //_(" for me. Had I known you'd be so useful, I'd have hired ") diff --git a/data/base/sequenceaudio/cam3/cam3_cn.txt b/data/base/sequenceaudio/cam3/cam3_cn.txt index ac328222f..0207142d0 100644 --- a/data/base/sequenceaudio/cam3/cam3_cn.txt +++ b/data/base/sequenceaudio/cam3/cam3_cn.txt @@ -1,14 +1,14 @@ -20 432 75 220 _("Commander, you're proving to be more resilient than I thought.") -0 0 75 220 _("Such a pity that you refused to join me earlier.") +20 432 3.0 8.8 _("Commander, you're proving to be more resilient than I thought.") +0 0 3.0 8.8 _("Such a pity that you refused to join me earlier.") -20 432 225 300 _("But no matter, as you'll not be here much longer.") +20 432 9.0 12.0 _("But no matter, as you'll not be here much longer.") -20 432 325 425 _("After much searching and reprogramming, I've finally got all my systems back on-line.") +20 432 13.0 17.0 _("After much searching and reprogramming, I've finally got all my systems back on-line.") -20 432 450 700 _("Once I destroyed the world with nuclear fire to clear the way for my cybernetic future.") -0 0 450 700 _("I now intend to further shape the world into my own image, by surgically removing unwanted growths like yourself.") +20 432 18.0 28.0 _("Once I destroyed the world with nuclear fire to clear the way for my cybernetic future.") +0 0 18.0 28.0 _("I now intend to further shape the world into my own image, by surgically removing unwanted growths like yourself.") -20 432 725 850 _("My Laser Satellites are now powering up. I intend to test them on you first, Commander!") +20 432 29.0 34.0 _("My Laser Satellites are now powering up. I intend to test them on you first, Commander!") diff --git a/data/base/sequenceaudio/cam3/cam3abf.txt b/data/base/sequenceaudio/cam3/cam3abf.txt index eced4b653..4d4286b40 100644 --- a/data/base/sequenceaudio/cam3/cam3abf.txt +++ b/data/base/sequenceaudio/cam3/cam3abf.txt @@ -1,20 +1,20 @@ -20 432 0 200 _("The Reed Corporation was founded by Dr Allan Reed. In 2080, Dr Reed landed a contract with the US Military to develop the synaptic link technology.") +20 432 0.0 16.6666666667 _("The Reed Corporation was founded by Dr Allan Reed. In 2080, Dr Reed landed a contract with the US Military to develop the synaptic link technology.") -20 432 225 350 _("After patenting the synaptic link five years later, Dr Reed continued his researches into cybernetics.") +20 432 18.75 29.1666666667 _("After patenting the synaptic link five years later, Dr Reed continued his researches into cybernetics.") -20 432 375 600 _("His goal this time was to allow transfer of human consciousness into data streams that could meld with computer technologies. While in Cyberspace the operator's bodies were kept in immersion tanks.") +20 432 31.25 50.0 _("His goal this time was to allow transfer of human consciousness into data streams that could meld with computer technologies. While in Cyberspace the operator's bodies were kept in immersion tanks.") -20 432 625 850 _("Backed again by the military, Dr Reed began work on the NEXUS Intruder Program. After three years with little progress, the military abandoned the Nexus Project and cut Dr Reed's funding.") +20 432 52.0833333333 70.8333333333 _("Backed again by the military, Dr Reed began work on the NEXUS Intruder Program. After three years with little progress, the military abandoned the Nexus Project and cut Dr Reed's funding.") -20 432 875 1000 _("Reports from the time claim that Dr Reed was furious and vowed to have his revenge on all who got in his way.") +20 432 72.9166666667 83.3333333333 _("Reports from the time claim that Dr Reed was furious and vowed to have his revenge on all who got in his way.") -20 432 1025 1225 _("It appears that Dr Reed may have succeeded in his goals and completed the Nexus Intruder Program.") -0 0 1025 1225 _("The similarity between NEXUS and Dr Reed is striking.") +20 432 85.4166666667 102.083333333 _("It appears that Dr Reed may have succeeded in his goals and completed the Nexus Intruder Program.") +0 0 85.4166666667 102.083333333 _("The similarity between NEXUS and Dr Reed is striking.") -20 432 1290 1485 _("Such an interesting history lesson. Now allow me to bring you up to date.") -0 0 1290 1485 _("The NEXUS Intruder Program was created in order to control fools like you.") +20 432 107.5 123.75 _("Such an interesting history lesson. Now allow me to bring you up to date.") +0 0 107.5 123.75 _("The NEXUS Intruder Program was created in order to control fools like you.") -20 432 1490 1760 _("It's very simple for me to infiltrate your systems and take them over. It's so simple, in fact, that you wouldn't even know I'm there. That is until I activate parts of myself etched into your core systems.") +20 432 124.166666667 146.666666667 _("It's very simple for me to infiltrate your systems and take them over. It's so simple, in fact, that you wouldn't even know I'm there. That is until I activate parts of myself etched into your core systems.") -20 432 1770 1850 _("Let's start by activating NEXUS in your core systems and see what happens!") +20 432 147.5 154.166666667 _("Let's start by activating NEXUS in your core systems and see what happens!") diff --git a/data/base/sequenceaudio/cam3/cam3abpl.txt b/data/base/sequenceaudio/cam3/cam3abpl.txt index a7708cd00..6c03e15dd 100644 --- a/data/base/sequenceaudio/cam3/cam3abpl.txt +++ b/data/base/sequenceaudio/cam3/cam3abpl.txt @@ -1,5 +1,5 @@ -20 432 25 200 _("Commander, we are experiencing interference with our equipment.") -0 0 25 200 _("Normal service will be restored as soon as possible.") +20 432 1.0 8.0 _("Commander, we are experiencing interference with our equipment.") +0 0 1.0 8.0 _("Normal service will be restored as soon as possible.") diff --git a/data/base/sequenceaudio/cam3/cam3ad2n.txt b/data/base/sequenceaudio/cam3/cam3ad2n.txt index 08ad6d6ea..06e564d67 100644 --- a/data/base/sequenceaudio/cam3/cam3ad2n.txt +++ b/data/base/sequenceaudio/cam3/cam3ad2n.txt @@ -1,9 +1,9 @@ -20 432 75 165 _("Not long to go now, Commander. There's no where else for you to run to.") +20 432 3.0 6.6 _("Not long to go now, Commander. There's no where else for you to run to.") -20 432 210 325 _("However, if you vacate this facility, then I shall let you go free, as you are no longer a threat to me.") +20 432 8.4 13.0 _("However, if you vacate this facility, then I shall let you go free, as you are no longer a threat to me.") -20 432 350 425 _("You have five minutes to comply or else it's frying time!") +20 432 14.0 17.0 _("You have five minutes to comply or else it's frying time!") diff --git a/data/base/sequenceaudio/cam3/cam3bg.txt b/data/base/sequenceaudio/cam3/cam3bg.txt index dc890a191..521ede5b5 100644 --- a/data/base/sequenceaudio/cam3/cam3bg.txt +++ b/data/base/sequenceaudio/cam3/cam3bg.txt @@ -1,6 +1,6 @@ -20 432 20 150 _("Commander, we are under attack by NEXUS cyborgs and tanks. Please help as we....") +20 432 0.8 6.0 _("Commander, we are under attack by NEXUS cyborgs and tanks. Please help as we....") -20 432 225 360 _("...cannot hold out much longer. Repeat, please help, we cannot hold out much longer....") +20 432 9.0 14.4 _("...cannot hold out much longer. Repeat, please help, we cannot hold out much longer....") diff --git a/data/base/sequenceaudio/devastation.txa b/data/base/sequenceaudio/devastation.txa index a41b4df0f..80fe3e558 100644 --- a/data/base/sequenceaudio/devastation.txa +++ b/data/base/sequenceaudio/devastation.txa @@ -1,18 +1,18 @@ //pos frame //x y start end Text -20 20 0 550 _("Dusk, November 3rd, 2085") -0 0 0 550 _("Earth, High Orbit") -0 0 0 550 _("The Collapse") +20 20 0.0 22.0 _("Dusk, November 3rd, 2085") +0 0 0.0 22.0 _("Earth, High Orbit") +0 0 0.0 22.0 _("The Collapse") -20 20 975 1450 _("January 19th, 2086") -0 0 975 1450 _("North America") -0 0 975 1450 _("Nuclear Winter") +20 20 39.0 58.0 _("January 19th, 2086") +0 0 39.0 58.0 _("North America") +0 0 39.0 58.0 _("Nuclear Winter") -20 20 1500 2000 _("Midnight, April 10th, 2086") -0 0 1500 2000 _("Rocky Mountains") -0 0 1500 2000 _("Safety") +20 20 60.0 80.0 _("Midnight, April 10th, 2086") +0 0 60.0 80.0 _("Rocky Mountains") +0 0 60.0 80.0 _("Safety") -20 20 2300 4000 _("Dawn, April 4th, 2100") -0 0 2300 4000 _("North America") -0 0 2300 4000 _("A New Beginning") \ No newline at end of file +20 20 92.0 160.0 _("Dawn, April 4th, 2100") +0 0 92.0 160.0 _("North America") +0 0 92.0 160.0 _("A New Beginning") \ No newline at end of file diff --git a/data/base/sequenceaudio/devastation.txt b/data/base/sequenceaudio/devastation.txt index 15bc82d7a..40f713a35 100644 --- a/data/base/sequenceaudio/devastation.txt +++ b/data/base/sequenceaudio/devastation.txt @@ -1,22 +1,22 @@ -20 432 0 250 _("The NASDA system was developed to protect us. It was to be the ultimate nuclear deterrent. As it turned out, it was our executioner.") +20 432 0.0 10.0 _("The NASDA system was developed to protect us. It was to be the ultimate nuclear deterrent. As it turned out, it was our executioner.") -20 432 275 550 _("Reports said that NASDA developed a fault during a routine systems check. Don't believe it. Someone wanted it to take us out.") +20 432 11.0 22.0 _("Reports said that NASDA developed a fault during a routine systems check. Don't believe it. Someone wanted it to take us out.") -20 432 625 985 _("Those nukes were targeted on every major city around the world. NASDA was programmed to start the Collapse. When the counterstrikes launched, its laser defenses and anti-missile ground sites failed.") +20 432 25.0 39.4 _("Those nukes were targeted on every major city around the world. NASDA was programmed to start the Collapse. When the counterstrikes launched, its laser defenses and anti-missile ground sites failed.") -20 432 1010 1125 _("The world as we knew it ended...") +20 432 40.4 45.0 _("The world as we knew it ended...") -20 432 1150 1475 _("The Nuclear Winter hit hard. Disease and famine claimed most of us who had survived the nuclear strikes. Wars over cans of dog food took even more.") +20 432 46.0 59.0 _("The Nuclear Winter hit hard. Disease and famine claimed most of us who had survived the nuclear strikes. Wars over cans of dog food took even more.") -20 432 1500 1650 _("We'd fled Seattle early in '86. We'd heard that the Rocky Mountains were relatively rad-free.") +20 432 60.0 66.0 _("We'd fled Seattle early in '86. We'd heard that the Rocky Mountains were relatively rad-free.") -20 432 1675 1950 _("After fighting off bands of marauders we came across the base. Its personnel were dead. Killed by any one of a number of virulent diseases.") +20 432 67.0 78.0 _("After fighting off bands of marauders we came across the base. Its personnel were dead. Killed by any one of a number of virulent diseases.") -20 432 1975 2200 _("We cracked the doors, and cleared out the bodies inside.") +20 432 79.0 88.0 _("We cracked the doors, and cleared out the bodies inside.") -20 432 2225 2560 _("We knew that things would never be the same again, but we were determined to build a new world out of the ruins. We rebuilt the landing pads and brought the old systems back on-line.") +20 432 89.0 102.4 _("We knew that things would never be the same again, but we were determined to build a new world out of the ruins. We rebuilt the landing pads and brought the old systems back on-line.") -20 432 2600 2750 _("We were finally ready to begin the Project.") +20 432 104.0 110.0 _("We were finally ready to begin the Project.") diff --git a/data/base/sequenceaudio/outro.txt b/data/base/sequenceaudio/outro.txt index 655b1249b..45950130d 100644 --- a/data/base/sequenceaudio/outro.txt +++ b/data/base/sequenceaudio/outro.txt @@ -1,10 +1,10 @@ -20 432 500 610 _("After many long months of struggle, we defeated NEXUS.") +20 432 41.6666666667 50.8333333333 _("After many long months of struggle, we defeated NEXUS.") -20 432 620 710 _("The war started by Dr Reed was over.") +20 432 51.6666666667 59.1666666667 _("The war started by Dr Reed was over.") -20 432 720 810 _("We have recovered many of the technologies we sought.") +20 432 60.0 67.5 _("We have recovered many of the technologies we sought.") -20 432 820 930 _("It is now time to use them to rebuild the world.") +20 432 68.3333333333 77.5 _("It is now time to use them to rebuild the world.") -20 432 940 1100 _("Slowly, out of the ashes we will rise again...") +20 432 78.3333333333 91.6666666667 _("Slowly, out of the ashes we will rise again...") diff --git a/lib/gamelib/gtime.cpp b/lib/gamelib/gtime.cpp index aeed4dbc6..ea5a56b45 100644 --- a/lib/gamelib/gtime.cpp +++ b/lib/gamelib/gtime.cpp @@ -32,6 +32,10 @@ #include +// Maximum seconds per frame. +// If not reaching the goal, force graphics updates, even if we aren't doing enough game state updates to maintain game speed. +#define MAXIMUM_SPF 1/4 + /* See header file for documentation */ UDWORD gameTime = 0, deltaGameTime = 0, graphicsTime = 0, deltaGraphicsTime = 0, realTime = 0, deltaRealTime = 0; float graphicsTimeFraction = 0.0, realTimeFraction = 0.0; @@ -188,10 +192,10 @@ void gameTimeUpdate() { unsigned player; - // Pause time, since we are waiting GAME_GAME_TIME from other players. - scaledCurrTime = graphicsTime; + // Pause time at current game time, since we are waiting GAME_GAME_TIME from other players. + scaledCurrTime = gameTime; baseTime = currTime; - timeOffset = graphicsTime; + timeOffset = gameTime; debug(LOG_SYNC, "Waiting for other players. gameTime = %u, player times are {%s}", gameTime, listToString("%u", ", ", gameQueueTime, gameQueueTime + game.maxPlayers).c_str()); mayUpdate = false; @@ -212,10 +216,10 @@ void gameTimeUpdate() // Adjust deltas. if (scaledCurrTime >= gameTime && mayUpdate) { - if (scaledCurrTime > gameTime + GAME_TICKS_PER_UPDATE) + if (scaledCurrTime > gameTime + GAME_TICKS_PER_SEC*MAXIMUM_SPF) { // Game isn't updating fast enough... - uint32_t slideBack = deltaGraphicsTime - GAME_TICKS_PER_UPDATE; + uint32_t slideBack = deltaGraphicsTime - GAME_TICKS_PER_SEC*MAXIMUM_SPF; baseTime += slideBack / modifier; // adjust the addition to base time deltaGraphicsTime -= slideBack; } @@ -235,6 +239,11 @@ void gameTimeUpdate() deltaGameTime = 0; } + if (deltaGameTime != 0) + { + deltaGraphicsTime = 0; // Don't update graphics until game state is updated. + } + // Store the game and graphics times gameTime += deltaGameTime; graphicsTime += deltaGraphicsTime; diff --git a/lib/ivis_opengl/imdload.cpp b/lib/ivis_opengl/imdload.cpp index 150ee29a5..3399de9ef 100644 --- a/lib/ivis_opengl/imdload.cpp +++ b/lib/ivis_opengl/imdload.cpp @@ -224,7 +224,6 @@ static bool ReadPoints( const char **ppFileData, iIMDShape *s ) static bool _imd_load_points( const char **ppFileData, iIMDShape *s ) { Vector3f *p = NULL; - int32_t tempXMax, tempXMin, tempZMax, tempZMin; int32_t xmax, ymax, zmax; double dx, dy, dz, rad_sq, rad, old_to_p_sq, old_to_p, old_to_new; double xspan, yspan, zspan, maxspan; @@ -247,8 +246,8 @@ static bool _imd_load_points( const char **ppFileData, iIMDShape *s ) return false; } - s->max.x = s->max.y = s->max.z = tempXMax = tempZMax = -FP12_MULTIPLIER; - s->min.x = s->min.y = s->min.z = tempXMin = tempZMin = FP12_MULTIPLIER; + s->max.x = s->max.y = s->max.z = -FP12_MULTIPLIER; + s->min.x = s->min.y = s->min.z = FP12_MULTIPLIER; vxmax.x = vymax.y = vzmax.z = -FP12_MULTIPLIER; vxmin.x = vymin.y = vzmin.z = FP12_MULTIPLIER; @@ -265,18 +264,6 @@ static bool _imd_load_points( const char **ppFileData, iIMDShape *s ) s->min.x = p->x; } - /* Biggest x coord so far within our height window? */ - if( p->x > tempXMax && p->y > DROID_VIS_LOWER && p->y < DROID_VIS_UPPER ) - { - tempXMax = p->x; - } - - /* Smallest x coord so far within our height window? */ - if( p->x < tempXMin && p->y > DROID_VIS_LOWER && p->y < DROID_VIS_UPPER ) - { - tempXMin = p->x; - } - if (p->y > s->max.y) { s->max.y = p->y; @@ -295,18 +282,6 @@ static bool _imd_load_points( const char **ppFileData, iIMDShape *s ) s->min.z = p->z; } - /* Biggest z coord so far within our height window? */ - if( p->z > tempZMax && p->y > DROID_VIS_LOWER && p->y < DROID_VIS_UPPER ) - { - tempZMax = p->z; - } - - /* Smallest z coord so far within our height window? */ - if( p->z < tempZMax && p->y > DROID_VIS_LOWER && p->y < DROID_VIS_UPPER ) - { - tempZMin = p->z; - } - // for tight sphere calculations if (p->x < vxmin.x) { @@ -394,7 +369,6 @@ static bool _imd_load_points( const char **ppFileData, iIMDShape *s ) if (zspan > maxspan) { - maxspan = zspan; dia1 = vzmin; dia2 = vzmax; } diff --git a/lib/script/event.cpp b/lib/script/event.cpp index fa5eb24f8..72f42e453 100644 --- a/lib/script/event.cpp +++ b/lib/script/event.cpp @@ -980,10 +980,9 @@ void eventFireCallbackTrigger(TRIGGER_TYPE callback) // Run a trigger static bool eventFireTrigger(ACTIVE_TRIGGER *psTrigger) { - bool fired; + bool fired = false; INTERP_VAL sResult; - fired = false; psFiringTrigger = psTrigger; // If this is a code trigger see if it fires diff --git a/lib/script/eventsave.cpp b/lib/script/eventsave.cpp index b28152f32..b5f07b053 100644 --- a/lib/script/eventsave.cpp +++ b/lib/script/eventsave.cpp @@ -233,13 +233,12 @@ static bool eventLoadContext(WzConfig &ini) // into the variables data space. if (!eventGetContextVal(psCCont, i, &psVal)) { - debug(LOG_FATAL, "Could not find variable in context"); + debug(LOG_FATAL, "Could not find variable %d in context %d", i, context); return false; } - if (!loadFunc(psVal, ini)) { - debug(LOG_FATAL, "Ccould not get variable value"); + debug(LOG_FATAL, "Could not get variable value context %d, variable %d", context, i); return false; } } diff --git a/lib/sequence/sequence.cpp b/lib/sequence/sequence.cpp index 4b912802f..b88a9ad78 100644 --- a/lib/sequence/sequence.cpp +++ b/lib/sequence/sequence.cpp @@ -1045,6 +1045,11 @@ int seq_GetFrameNumber() return frames; } +double seq_GetFrameTime() +{ + return videobuf_time; +} + // this controls the size of the video to display on screen void seq_SetDisplaySize(int sizeX, int sizeY, int posX, int posY) { @@ -1083,4 +1088,4 @@ void seq_setScanlineMode(SCANLINE_MODE mode) SCANLINE_MODE seq_getScanlineMode(void) { return use_scanlines; -} \ No newline at end of file +} diff --git a/lib/sequence/sequence.h b/lib/sequence/sequence.h index c698b3ef2..78c434990 100644 --- a/lib/sequence/sequence.h +++ b/lib/sequence/sequence.h @@ -36,5 +36,6 @@ extern int seq_GetFrameNumber(void); extern void seq_SetDisplaySize(int sizeX, int sizeY, int posX, int posY); extern void seq_setScanlineMode(SCANLINE_MODE mode); extern SCANLINE_MODE seq_getScanlineMode(void); +double seq_GetFrameTime(); #endif // __INCLUDED_LIB_SEQUENCE_SEQUENCE_H__ diff --git a/macosx/configs/mkdmgs.sh b/macosx/configs/mkdmgs.sh index 029d2e430..94b64afca 100755 --- a/macosx/configs/mkdmgs.sh +++ b/macosx/configs/mkdmgs.sh @@ -105,7 +105,7 @@ fi cd ../../ echo "Copying the app cleanly." rm -r -f $dmgout/Warzone.app -if ! tar -c --exclude '.svn' --exclude 'Makefile*' --exclude 'makefile*' --exclude '.DS_Store' -C build/${CONFIGURATION} Warzone.app | tar -xC $dmgout; then +if ! tar -c --exclude '*.svg' --exclude 'Makefile*' --exclude 'makefile*' --exclude '.DS_Store' -C build/${CONFIGURATION} Warzone.app | tar -xC $dmgout; then echo "error: Unable to copy the app" >&2 exit 1 fi diff --git a/src/action.cpp b/src/action.cpp index 2c02bfeae..25cb19747 100644 --- a/src/action.cpp +++ b/src/action.cpp @@ -42,6 +42,7 @@ #include "scriptcb.h" #include "scripttabs.h" #include "transporter.h" +#include "mapgrid.h" /* attack run distance */ #define VTOL_ATTACK_LENGTH 1000 @@ -314,9 +315,6 @@ void actionAlignTurret(BASE_OBJECT *psObj, int weapon_slot) uint16_t tRot; uint16_t tPitch; - //default turret rotation 0 - tRot = 0; - //get the maximum rotation this frame rotation = gameTimeAdjustedIncrement(DEG(ACTION_TURRET_ROTATION_RATE)); @@ -678,116 +676,85 @@ static void actionCalcPullBackPoint(BASE_OBJECT *psObj, BASE_OBJECT *psTarget, S // check whether a droid is in the neighboring tile to a build position -bool actionReachedBuildPos(DROID *psDroid, SDWORD x, SDWORD y, BASE_STATS *psStats) +bool actionReachedBuildPos(DROID const *psDroid, int x, int y, uint16_t dir, BASE_STATS const *psStats) { - SDWORD width, breadth, tx,ty, dx,dy; - ASSERT_OR_RETURN(false, psStats != NULL && psDroid != NULL, "Bad stat or droid"); CHECK_DROID(psDroid); + + Vector2i size = getStatsSize(psStats, dir); + Vector2i map = map_coord(Vector2i(x, y)) - size/2; + // do all calculations in half tile units so that // the droid moves to within half a tile of the target // NOT ANY MORE - JOHN - dx = map_coord(psDroid->pos.x); - dy = map_coord(psDroid->pos.y); - - if (StatIsStructure(psStats)) - { - width = ((STRUCTURE_STATS *)psStats)->baseWidth; - breadth = ((STRUCTURE_STATS *)psStats)->baseBreadth; - } - else - { - width = ((FEATURE_STATS *)psStats)->baseWidth; - breadth = ((FEATURE_STATS *)psStats)->baseBreadth; - } - - tx = map_coord(x); - ty = map_coord(y); - - // move the x,y to the top left of the structure - tx -= width/2; - ty -= breadth/2; - - if ( (dx == (tx -1)) || (dx == (tx + width)) ) - { - // droid could be at either the left or the right - if ( (dy >= (ty -1)) && (dy <= (ty + breadth)) ) - { - return true; - } - } - else if ( (dy == (ty -1)) || (dy == (ty + breadth)) ) - { - // droid could be at either the top or the bottom - if ( (dx >= (tx -1)) && (dx <= (tx + width)) ) - { - return true; - } - } - - return false; + Vector2i delta = map_coord(removeZ(psDroid->pos)) - map; + return delta.x >= -1 && delta.x <= size.x && delta.y >= -1 && delta.y <= size.y; } // check if a droid is on the foundations of a new building -static bool actionDroidOnBuildPos(DROID *psDroid, SDWORD x, SDWORD y, BASE_STATS *psStats) +static bool actionRemoveDroidsFromBuildPos(unsigned player, Vector2i pos, uint16_t dir, BASE_STATS *psStats) { - SDWORD width, breadth, tx,ty, dx,dy; - - CHECK_DROID(psDroid); ASSERT_OR_RETURN(false, psStats != NULL, "Bad stat"); - dx = map_coord(psDroid->pos.x); - dy = map_coord(psDroid->pos.y); - if (StatIsStructure(psStats)) + bool buildPosEmpty = true; + + Vector2i size = getStatsSize(psStats, dir); + Vector2i map = map_coord(pos) - size/2; + + Vector2i structureCentre = world_coord(map) + world_coord(size)/2; + unsigned structureMaxRadius = iHypot(world_coord(size)/2) + 1; // +1 since iHypot rounds down. + + gridStartIterate(structureCentre.x, structureCentre.y, structureMaxRadius); + BASE_OBJECT *psObj; + for (psObj = gridIterate(); psObj != NULL; psObj = gridIterate()) { - width = ((STRUCTURE_STATS *)psStats)->baseWidth; - breadth = ((STRUCTURE_STATS *)psStats)->baseBreadth; - } - else - { - width = ((FEATURE_STATS *)psStats)->baseWidth; - breadth = ((FEATURE_STATS *)psStats)->baseBreadth; - } - - tx = map_coord(x) - (width / 2); - ty = map_coord(y) - (breadth / 2); - - if (dx >= tx - && dx < tx + width - && dy >= ty - && dy < ty + breadth) - { - return true; - } - - return false; -} - - -// return the position of a players home base -// MAY return an invalid (0, 0) position on MP maps! -static void actionHomeBasePos(SDWORD player, SDWORD *px, SDWORD *py) -{ - STRUCTURE *psStruct; - - ASSERT_OR_RETURN(, player >= 0 && player < MAX_PLAYERS, "Invalid player number %d", (int)player); - - for(psStruct = apsStructLists[player]; psStruct; psStruct=psStruct->psNext) - { - if (psStruct->pStructureType->type == REF_HQ) + DROID *droid = castDroid(psObj); + if (droid == NULL) { - *px = (SDWORD)psStruct->pos.x; - *py = (SDWORD)psStruct->pos.y; - return; + continue; // Only looking for droids. + } + + Vector2i delta = map_coord(removeZ(droid->pos)) - map; + if (delta.x < 0 || delta.x >= size.x || delta.y < 0 || delta.y >= size.y) + { + continue; // Droid not under new structure (just near it). + } + + buildPosEmpty = false; // Found a droid, have to move it away. + + if (!aiCheckAlliances(player, droid->player)) + { + continue; // Enemy droids probably don't feel like moving. + } + + // TODO If the action code was less convoluted, it would be possible for the droid should drive away instead of just getting moved away. + Vector2i bestDest; + unsigned bestDist = UINT32_MAX; + for (int y = -1; y <= size.y; ++y) + for (int x = -1; x <= size.x; x += y >= 0 && y < size.y? size.x + 1 : 1) + { + Vector2i dest = world_coord(map + Vector2i(x, y)) + Vector2i(TILE_UNITS, TILE_UNITS)/2; + unsigned dist = iHypot(removeZ(droid->pos) - dest); + if (dist < bestDist && !fpathBlockingTile(map_coord(dest.x), map_coord(dest.y), getPropulsionStats(droid)->propulsionType)) + { + bestDest = dest; + bestDist = dist; + } + } + if (bestDist != UINT32_MAX) + { + // Push the droid out of the way. + Vector2i newPos = removeZ(droid->pos) + iSinCosR(iAtan2(bestDest - removeZ(droid->pos)), gameTimeAdjustedIncrement(TILE_UNITS)); + droidSetPosition(droid, newPos.x, newPos.y); } } - *px = getLandingX(player); - *py = getLandingY(player); + return buildPosEmpty; } + void actionSanity(DROID *psDroid) { // Don't waste ammo unless given a direct attack order. @@ -927,7 +894,7 @@ void actionUpdateDroid(DROID *psDroid) // move back to the repair facility if necessary if (DROID_STOPPED(psDroid) && !actionReachedBuildPos(psDroid, - (SDWORD)psDroid->psTarget->pos.x,(SDWORD)psDroid->psTarget->pos.y, + psDroid->psTarget->pos.x, psDroid->psTarget->pos.y, ((STRUCTURE*)psDroid->psTarget)->rot.direction, ((STRUCTURE*)psDroid->psTarget)->pStructureType ) ) { moveDroidToNoFormation(psDroid, psDroid->psTarget->pos.x, psDroid->psTarget->pos.y); @@ -1501,11 +1468,14 @@ void actionUpdateDroid(DROID *psDroid) break; } // moving to a location to build a structure - if (actionReachedBuildPos(psDroid, - (SDWORD)psDroid->orderX,(SDWORD)psDroid->orderY, psDroid->psTarStats) && - !actionDroidOnBuildPos(psDroid, - (SDWORD)psDroid->orderX,(SDWORD)psDroid->orderY, psDroid->psTarStats)) + if (actionReachedBuildPos(psDroid, psDroid->orderX, psDroid->orderY, psDroid->orderDirection, psDroid->psTarStats)) { + bool buildPosEmpty = actionRemoveDroidsFromBuildPos(psDroid->player, Vector2i(psDroid->orderX, psDroid->orderY), psDroid->orderDirection, psDroid->psTarStats); + if (!buildPosEmpty) + { + break; + } + bool helpBuild = false; // Got to destination - start building STRUCTURE_STATS* const psStructStats = (STRUCTURE_STATS*)psDroid->psTarStats; @@ -1661,26 +1631,8 @@ void actionUpdateDroid(DROID *psDroid) } else if (DROID_STOPPED(psDroid)) { - if (actionDroidOnBuildPos(psDroid, - (SDWORD)psDroid->orderX,(SDWORD)psDroid->orderY, psDroid->psTarStats)) - { - SDWORD pbx = 0, pby = 0; - - actionHomeBasePos(psDroid->player, &pbx, &pby); - if (pbx == 0 || pby == 0) - { - objTrace(psDroid->id, "DACTION_MOVETOBUILD: No HQ, cannot move in that direction"); - psDroid->action = DACTION_NONE; - break; - } - objTrace(psDroid->id, "DACTION_MOVETOBUILD: Starting to drive inside construction site"); - moveDroidToNoFormation(psDroid, (UDWORD)pbx,(UDWORD)pby); - } - else - { - objTrace(psDroid->id, "DACTION_MOVETOBUILD: Starting to drive toward construction site - move status was %d", (int)psDroid->sMove.Status); - moveDroidToNoFormation(psDroid, psDroid->actionPos.x, psDroid->actionPos.y); - } + objTrace(psDroid->id, "DACTION_MOVETOBUILD: Starting to drive toward construction site - move status was %d", (int)psDroid->sMove.Status); + moveDroidToNoFormation(psDroid, psDroid->actionPos.x, psDroid->actionPos.y); } break; case DACTION_BUILD: @@ -1691,8 +1643,7 @@ void actionUpdateDroid(DROID *psDroid) break; } if (DROID_STOPPED(psDroid) && - !actionReachedBuildPos(psDroid, - (SDWORD)psDroid->orderX,(SDWORD)psDroid->orderY, psDroid->psTarStats)) + !actionReachedBuildPos(psDroid, psDroid->orderX, psDroid->orderY, psDroid->orderDirection, psDroid->psTarStats)) { objTrace(psDroid->id, "DACTION_BUILD: Starting to drive toward construction site"); moveDroidToNoFormation(psDroid, psDroid->orderX, psDroid->orderY); @@ -1700,8 +1651,7 @@ void actionUpdateDroid(DROID *psDroid) else if (!DROID_STOPPED(psDroid) && psDroid->sMove.Status != MOVETURNTOTARGET && psDroid->sMove.Status != MOVESHUFFLE && - actionReachedBuildPos(psDroid, - (SDWORD)psDroid->orderX,(SDWORD)psDroid->orderY, psDroid->psTarStats)) + actionReachedBuildPos(psDroid, psDroid->orderX, psDroid->orderY, psDroid->orderDirection, psDroid->psTarStats)) { objTrace(psDroid->id, "DACTION_BUILD: Stopped - at construction site"); moveStopDroid(psDroid); @@ -1726,8 +1676,7 @@ void actionUpdateDroid(DROID *psDroid) break; } // see if the droid is at the edge of what it is moving to - if (actionReachedBuildPos(psDroid, psDroid->actionPos.x, psDroid->actionPos.y, psDroid->psTarStats) && - !actionDroidOnBuildPos(psDroid, psDroid->actionPos.x, psDroid->actionPos.y, psDroid->psTarStats)) + if (actionReachedBuildPos(psDroid, psDroid->actionPos.x, psDroid->actionPos.y, ((STRUCTURE *)psDroid->psActionTarget[0])->rot.direction, psDroid->psTarStats)) { moveStopDroid(psDroid); @@ -1749,23 +1698,7 @@ void actionUpdateDroid(DROID *psDroid) } else if (DROID_STOPPED(psDroid)) { - if (actionDroidOnBuildPos(psDroid, psDroid->actionPos.x, psDroid->actionPos.y, psDroid->psTarStats)) - { - SDWORD pbx = 0, pby = 0; - - actionHomeBasePos(psDroid->player, &pbx, &pby); - if (pbx == 0 || pby == 0) - { - debug(LOG_NEVER, "No HQ - cannot move in that direction."); - psDroid->action = DACTION_NONE; - break; - } - moveDroidToNoFormation(psDroid, (UDWORD)pbx,(UDWORD)pby); - } - else - { - moveDroidToNoFormation(psDroid, psDroid->actionPos.x, psDroid->actionPos.y); - } + moveDroidToNoFormation(psDroid, psDroid->actionPos.x, psDroid->actionPos.y); } break; @@ -1797,7 +1730,7 @@ void actionUpdateDroid(DROID *psDroid) } // now do the action update - if (DROID_STOPPED(psDroid) && !actionReachedBuildPos(psDroid, psDroid->actionPos.x, psDroid->actionPos.y, psDroid->psTarStats)) + if (DROID_STOPPED(psDroid) && !actionReachedBuildPos(psDroid, psDroid->actionPos.x, psDroid->actionPos.y, ((STRUCTURE *)psDroid->psActionTarget[0])->rot.direction, psDroid->psTarStats)) { if (secondaryGetState(psDroid, DSO_HALTTYPE) != DSS_HALT_HOLD || (psDroid->order != DORDER_NONE && psDroid->order != DORDER_TEMP_HOLD)) @@ -1813,7 +1746,7 @@ void actionUpdateDroid(DROID *psDroid) else if (!DROID_STOPPED(psDroid) && psDroid->sMove.Status != MOVETURNTOTARGET && psDroid->sMove.Status != MOVESHUFFLE && - actionReachedBuildPos(psDroid, psDroid->actionPos.x, psDroid->actionPos.y, psDroid->psTarStats)) + actionReachedBuildPos(psDroid, psDroid->actionPos.x, psDroid->actionPos.y, ((STRUCTURE *)psDroid->psActionTarget[0])->rot.direction, psDroid->psTarStats)) { objTrace(psDroid->id, "Stopped - reached build position"); moveStopDroid(psDroid); @@ -1838,8 +1771,7 @@ void actionUpdateDroid(DROID *psDroid) break; case DACTION_MOVETOREPAIRPOINT: /* moving from front to rear of repair facility or rearm pad */ - if (actionReachedBuildPos(psDroid, psDroid->psActionTarget[0]->pos.x,psDroid->psActionTarget[0]->pos.y, - ((STRUCTURE *)psDroid->psActionTarget[0])->pStructureType)) + if (actionReachedBuildPos(psDroid, psDroid->psActionTarget[0]->pos.x,psDroid->psActionTarget[0]->pos.y, ((STRUCTURE *)psDroid->psActionTarget[0])->rot.direction, ((STRUCTURE *)psDroid->psActionTarget[0])->pStructureType)) { objTrace(psDroid->id, "Arrived at repair point - waiting for our turn"); moveStopDroid(psDroid); @@ -2434,21 +2366,7 @@ static void actionDroidBase(DROID *psDroid, DROID_ACTION_DATA *psAction) psDroid->action = DACTION_MOVETOBUILD; psDroid->actionPos.x = psAction->x; psDroid->actionPos.y = psAction->y; - if (actionDroidOnBuildPos(psDroid, psDroid->orderX, psDroid->orderY, psDroid->psTarStats)) - { - actionHomeBasePos(psDroid->player, &pbx,&pby); - if (pbx == 0 || pby == 0) - { - objTrace(psDroid->id, "Setting DACTION_BUILD: No HQ, cannot move in that direction"); - psDroid->action = DACTION_NONE; - break; - } - moveDroidToNoFormation(psDroid, (UDWORD)pbx,(UDWORD)pby); - } - else - { - moveDroidToNoFormation(psDroid, psDroid->actionPos.x, psDroid->actionPos.y); - } + moveDroidToNoFormation(psDroid, psDroid->actionPos.x, psDroid->actionPos.y); break; case DACTION_DEMOLISH: ASSERT(psDroid->order == DORDER_DEMOLISH, diff --git a/src/action.h b/src/action.h index 675ce71ee..ebed9d3e9 100644 --- a/src/action.h +++ b/src/action.h @@ -90,7 +90,7 @@ bool actionInsideMinRange(DROID *psDroid, BASE_OBJECT *psObj, WEAPON_STATS *psWe bool actionVisibleTarget(DROID *psDroid, BASE_OBJECT *psTarget, int weapon_slot); /** Check whether a droid is in the neighboring tile to a build position. */ -bool actionReachedBuildPos(DROID *psDroid, SDWORD x, SDWORD y, BASE_STATS *psStats); +bool actionReachedBuildPos(DROID const *psDroid, int x, int y, uint16_t direction, BASE_STATS const *psStats); /** Send the vtol droid back to the nearest rearming pad - if there is one, otherwise return to base. */ void moveToRearm(DROID *psDroid); diff --git a/src/astar.cpp b/src/astar.cpp index e61a7d197..64bece531 100644 --- a/src/astar.cpp +++ b/src/astar.cpp @@ -116,12 +116,30 @@ struct PathBlockingMap std::vector dangerMap; // using threatBits }; +struct PathNonblockingArea +{ + PathNonblockingArea() {} + PathNonblockingArea(StructureTiles const &st) : x1(st.map.x), x2(st.map.x + st.size.x), y1(st.map.y), y2(st.map.y + st.size.y) {} + bool operator ==(PathNonblockingArea const &z) const { return x1 == z.x1 && x2 == z.x2 && y1 == z.y1 && y2 == z.y2; } + bool operator !=(PathNonblockingArea const &z) const { return !(*this == z); } + bool isNonblocking(int x, int y) const + { + return x >= x1 && x < x2 && y >= y1 && y < y2; + } + + int16_t x1, x2, y1, y2; +}; + // Data structures used for pathfinding, can contain cached results. struct PathfindContext { PathfindContext() : myGameTime(0), iteration(0), blockingMap(NULL) {} bool isBlocked(int x, int y) const { + if (srcIgnore.isNonblocking(x, y) || dstIgnore.isNonblocking(x, y)) + { + return false; // The path is actually blocked here by a structure, but ignore it since it's where we want to go (or where we came from). + } // Not sure whether the out-of-bounds check is needed, can only happen if pathfinding is started on a blocking tile (or off the map). return x < 0 || y < 0 || x >= mapWidth || y >= mapHeight || blockingMap->map[x + y*mapWidth]; } @@ -129,15 +147,17 @@ struct PathfindContext { return !blockingMap->dangerMap.empty() && blockingMap->dangerMap[x + y*mapWidth]; } - bool matches(PathBlockingMap const *blockingMap_, PathCoord tileS_) const + bool matches(PathBlockingMap const *blockingMap_, PathCoord tileS_, PathNonblockingArea srcIgnore_, PathNonblockingArea dstIgnore_) const { - // Must check myGameTime == blockingMap_->type.gameTime, otherwise blockingMap be a deleted pointer which coincidentally compares equal to the valid pointer blockingMap_. - return myGameTime == blockingMap_->type.gameTime && blockingMap == blockingMap_ && tileS == tileS_; + // Must check myGameTime == blockingMap_->type.gameTime, otherwise blockingMap could be a deleted pointer which coincidentally compares equal to the valid pointer blockingMap_. + return myGameTime == blockingMap_->type.gameTime && blockingMap == blockingMap_ && tileS == tileS_ && srcIgnore == srcIgnore_ && dstIgnore == dstIgnore_; } - void assign(PathBlockingMap const *blockingMap_, PathCoord tileS_) + void assign(PathBlockingMap const *blockingMap_, PathCoord tileS_, PathNonblockingArea srcIgnore_, PathNonblockingArea dstIgnore_) { blockingMap = blockingMap_; tileS = tileS_; + srcIgnore = srcIgnore_; + dstIgnore = dstIgnore_; myGameTime = blockingMap->type.gameTime; nodes.clear(); @@ -164,6 +184,8 @@ struct PathfindContext std::vector nodes; ///< Edge of explored region of the map. std::vector map; ///< Map, with paths leading back to tileS. PathBlockingMap const *blockingMap; ///< Map of blocking tiles for the type of object which needs a path. + PathNonblockingArea srcIgnore; ///< Area of structure at source which should be considered nonblocking. + PathNonblockingArea dstIgnore; ///< Area of structure at destination which should be considered nonblocking. }; /// Last recently used list of contexts. @@ -344,9 +366,9 @@ static PathCoord fpathAStarExplore(PathfindContext &context, PathCoord tileF) return nearestCoord; } -static void fpathInitContext(PathfindContext &context, PathBlockingMap const *blockingMap, PathCoord tileS, PathCoord tileRealS, PathCoord tileF) +static void fpathInitContext(PathfindContext &context, PathBlockingMap const *blockingMap, PathCoord tileS, PathCoord tileRealS, PathCoord tileF, PathNonblockingArea srcIgnore, PathNonblockingArea dstIgnore) { - context.assign(blockingMap, tileS); + context.assign(blockingMap, tileS, srcIgnore, dstIgnore); // Add the start point to the open list fpathNewNode(context, tileF, tileRealS, 0, tileRealS); @@ -361,13 +383,15 @@ ASR_RETVAL fpathAStarRoute(MOVE_CONTROL *psMove, PATHJOB *psJob) const PathCoord tileOrig(map_coord(psJob->origX), map_coord(psJob->origY)); const PathCoord tileDest(map_coord(psJob->destX), map_coord(psJob->destY)); + const PathNonblockingArea srcIgnore(psJob->srcStructure); + const PathNonblockingArea dstIgnore(psJob->dstStructure); PathCoord endCoord; // Either nearest coord (mustReverse = true) or orig (mustReverse = false). std::list::iterator contextIterator = fpathContexts.begin(); for (contextIterator = fpathContexts.begin(); contextIterator != fpathContexts.end(); ++contextIterator) { - if (!contextIterator->matches(psJob->blockingMap, tileDest)) + if (!contextIterator->matches(psJob->blockingMap, tileDest, srcIgnore, dstIgnore)) { // This context is not for the same droid type and same destination. continue; @@ -410,7 +434,7 @@ ASR_RETVAL fpathAStarRoute(MOVE_CONTROL *psMove, PATHJOB *psJob) // Init a new context, overwriting the oldest one if we are caching too many. // We will be searching from orig to dest, since we don't know where the nearest reachable tile to dest is. - fpathInitContext(*contextIterator, psJob->blockingMap, tileOrig, tileOrig, tileDest); + fpathInitContext(*contextIterator, psJob->blockingMap, tileOrig, tileOrig, tileDest, srcIgnore, dstIgnore); endCoord = fpathAStarExplore(*contextIterator, tileDest); contextIterator->nearestCoord = endCoord; } @@ -492,7 +516,7 @@ ASR_RETVAL fpathAStarRoute(MOVE_CONTROL *psMove, PATHJOB *psJob) if (!context.isBlocked(tileOrig.x, tileOrig.y)) // If blocked, searching from tileDest to tileOrig wouldn't find the tileOrig tile. { // Next time, search starting from nearest reachable tile to the destination. - fpathInitContext(context, psJob->blockingMap, tileDest, context.nearestCoord, tileOrig); + fpathInitContext(context, psJob->blockingMap, tileDest, context.nearestCoord, tileOrig, srcIgnore, dstIgnore); } } else diff --git a/src/baseobject.cpp b/src/baseobject.cpp index 01e693d63..e338ce815 100644 --- a/src/baseobject.cpp +++ b/src/baseobject.cpp @@ -27,6 +27,7 @@ #include "projectile.h" #include "structure.h" #include "feature.h" +#include "intdisplay.h" static inline uint16_t interpolateAngle(uint16_t v1, uint16_t v2, uint32_t t1, uint32_t t2, uint32_t t) @@ -153,3 +154,16 @@ void _syncDebugObject(const char *function, SIMPLE_OBJECT const *psObject, char break; } } + +Vector2i getStatsSize(BASE_STATS const *pType, uint16_t direction) +{ + if (StatIsStructure(pType)) + { + return getStructureStatsSize(static_cast(pType), direction); + } + else if(StatIsFeature(pType)) + { + return getFeatureStatsSize(static_cast(pType)); + } + return Vector2i(1, 1); +} diff --git a/src/baseobject.h b/src/baseobject.h index d091bc42f..13c4cd55c 100644 --- a/src/baseobject.h +++ b/src/baseobject.h @@ -41,4 +41,6 @@ void checkObject(const SIMPLE_OBJECT *psObject, const char *const location_descr #define syncDebugObject(psObject, ch) _syncDebugObject(__FUNCTION__, psObject, ch) void _syncDebugObject(const char *function, SIMPLE_OBJECT const *psObject, char ch); +Vector2i getStatsSize(BASE_STATS const *pType, uint16_t direction); + #endif // __INCLUDED_BASEOBJECT_H__ diff --git a/src/display.cpp b/src/display.cpp index 754e6f851..236627c2f 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -1513,6 +1513,7 @@ void FinishDeliveryPosition(UDWORD xPos,UDWORD yPos,void *UserData) //deselect it ((FLAG_POSITION*)UserData)->selected = false; + deliveryPointToMove = NULL; CancelDeliveryRepos(); } @@ -3103,6 +3104,7 @@ void clearSel(void) { psFlagPos->selected = false; } + deliveryPointToMove = NULL; setSelectedGroup(UBYTE_MAX); setSelectedCommander(UBYTE_MAX); diff --git a/src/display3d.cpp b/src/display3d.cpp index c2cedcdfd..097a8ff4a 100644 --- a/src/display3d.cpp +++ b/src/display3d.cpp @@ -1600,6 +1600,7 @@ void displayBlueprints(void) } else { + ASSERT(deliveryPointToMove != NULL, "Expected a delivery point."); if (deliveryPointToMove) { // it's a droid (from the debug menu) or a delivery point @@ -1609,18 +1610,6 @@ void displayBlueprints(void) pos.coords.z = map_Height(pos.coords.x, pos.coords.y) + world_coord(1)/8; renderDeliveryPoint(&pos, true); } - else - { - // it's a droid (from the debug menu) - // no delivery point is known, so show a fake one - FLAG_POSITION pos; - pos.coords.x = world_coord(sBuildDetails.x)+world_coord(1)/2; - pos.coords.y = world_coord(sBuildDetails.y)+world_coord(1)/2; - pos.coords.z = map_Height(pos.coords.x, pos.coords.y) + world_coord(1)/8; - pos.factoryType = REPAIR_FLAG; - pos.factoryInc = 0; - renderDeliveryPoint(&pos, true); - } } } diff --git a/src/droid.cpp b/src/droid.cpp index 00f590cac..66a06b658 100644 --- a/src/droid.cpp +++ b/src/droid.cpp @@ -416,9 +416,11 @@ void removeDroidBase(DROID *psDel) return; } + syncDebugDroid(psDel, '#'); + //ajl, inform others of destruction. // Everyone else should be doing this at the same time, assuming it's in synch (so everyone sends a GAME_DROIDDEST message at once)... - if (bMultiMessages + if (!isInSync() && bMultiMessages && !(psDel->player != selectedPlayer && psDel->order == DORDER_RECYCLE)) { ASSERT_OR_RETURN( , droidOnMap(psDel), "Asking other players to destroy droid driving off the map"); @@ -634,8 +636,9 @@ static void droidFlameFallCallback( ANIM_OBJECT * psObj ) ASSERT_OR_RETURN( , psDroid != NULL, "invalid Unit pointer"); psDroid->psCurAnim = NULL; - debug(LOG_DEATH, "droidFlameFallCallback: Droid %d destroyed", (int)psDroid->id); - destroyDroid( psDroid ); + // This breaks synch, obviously. Animations are not synched, so changing game state as part of an animation is not completely ideal. + //debug(LOG_DEATH, "droidFlameFallCallback: Droid %d destroyed", (int)psDroid->id); + //destroyDroid( psDroid ); } static void droidBurntCallback( ANIM_OBJECT * psObj ) @@ -668,6 +671,12 @@ void droidBurn(DROID *psDroid) return; } + if (psDroid->order != DORDER_RUNBURN) + { + /* set droid running */ + orderDroid(psDroid, DORDER_RUNBURN, ModeImmediate); + } + /* if already burning return else remove currently-attached anim if present */ if ( psDroid->psCurAnim != NULL ) { @@ -700,9 +709,6 @@ void droidBurn(DROID *psDroid) debug( LOG_NEVER, "baba burn" ); // NOTE: 3 types of screams are available ID_SOUND_BARB_SCREAM - ID_SOUND_BARB_SCREAM3 audio_PlayObjDynamicTrack( psDroid, ID_SOUND_BARB_SCREAM+(rand()%3), NULL ); - - /* set droid running */ - orderDroid(psDroid, DORDER_RUNBURN, ModeImmediate); } void _syncDebugDroid(const char *function, DROID const *psDroid, char ch) @@ -2806,7 +2812,7 @@ bool calcDroidMuzzleLocation(DROID *psDroid, Vector3i *muzzle, int weapon_slot) *muzzle = swapYZ(af*barrel); muzzle->z = -muzzle->z; - debugLen += sprintf(debugStr + debugLen, ",muzzle=(%d,%d,%d)", muzzle->x, muzzle->y, muzzle->z); + sprintf(debugStr + debugLen, ",muzzle=(%d,%d,%d)", muzzle->x, muzzle->y, muzzle->z); syncDebug("%s", debugStr); } @@ -3154,47 +3160,18 @@ static bool oneDroidMax(UDWORD x, UDWORD y) // returns true if it's a sensible place to put that droid. static bool sensiblePlace(SDWORD x, SDWORD y, PROPULSION_TYPE propulsion) { - UDWORD count=0; - // not too near the edges. if((x < TOO_NEAR_EDGE) || (x > (SDWORD)(mapWidth - TOO_NEAR_EDGE))) return false; if((y < TOO_NEAR_EDGE) || (y > (SDWORD)(mapHeight - TOO_NEAR_EDGE))) return false; - // check no features there - if(TileHasFeature(mapTile(x,y))) - { - return false; - } - // not on a blocking tile. if (fpathBlockingTile(x, y, propulsion)) { return false; } - // shouldn't next to more than one blocking tile, to avoid windy paths. - if (fpathBlockingTile(x - 1, y - 1, propulsion)) - count++; - if (fpathBlockingTile(x, y - 1, propulsion)) - count++; - if (fpathBlockingTile(x + 1, y - 1, propulsion)) - count++; - if (fpathBlockingTile(x - 1, y, propulsion)) - count++; - if (fpathBlockingTile(x + 1, y, propulsion)) - count++; - if (fpathBlockingTile(x -1, y + 1, propulsion)) - count++; - if (fpathBlockingTile(x, y + 1, propulsion)) - count++; - if (fpathBlockingTile(x +1, y + 1, propulsion)) - count++; - - if(count > 1) - return false; - return true; } @@ -3278,12 +3255,6 @@ bool pickATileGenThreat(UDWORD *x, UDWORD *y, UBYTE numIterations, SDWORD threat } -/// find an empty tile accessible to a wheeled droid -bool pickATile(UDWORD *x, UDWORD *y, UBYTE numIterations) -{ - return pickATileGen(x, y, numIterations, zonedPAT); -} - /// find a tile for a wheeled droid with only one other droid present PICKTILE pickHalfATile(UDWORD *x, UDWORD *y, UBYTE numIterations) { diff --git a/src/droid.h b/src/droid.h index 1eafac1fa..8aeccb266 100644 --- a/src/droid.h +++ b/src/droid.h @@ -48,7 +48,7 @@ extern DROID_TEMPLATE *apsDroidTemplates[MAX_PLAYERS]; extern DROID_TEMPLATE *apsStaticTemplates; // for AIs and scripts -//used to stop structures being built too near the edge and droids being placed down - pickATile +//used to stop structures being built too near the edge and droids being placed down #define TOO_NEAR_EDGE 3 /* Define max number of allowed droids per droid type */ @@ -70,7 +70,6 @@ enum PICKTILE { NO_FREE_TILE, FREE_TILE, - HALF_FREE_TILE }; // the structure that was last hit @@ -248,9 +247,7 @@ extern void droidSetName(DROID *psDroid, const char *pName); // returns true when no droid on x,y square. extern bool noDroid (UDWORD x, UDWORD y); // true if no droid at x,y // returns an x/y coord to place a droid -extern bool pickATile (UDWORD *x0,UDWORD *y0, UBYTE numIterations); extern PICKTILE pickHalfATile (UDWORD *x, UDWORD *y, UBYTE numIterations); -extern bool pickATile2 (UDWORD *x, UDWORD *y, UDWORD numIterations); extern bool zonedPAT(UDWORD x, UDWORD y); extern bool pickATileGen(UDWORD *x, UDWORD *y, UBYTE numIterations, bool (*function)(UDWORD x, UDWORD y)); diff --git a/src/effects.cpp b/src/effects.cpp index 3ccd4ad27..ab983d3c2 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -1894,8 +1894,6 @@ static void renderSmokeEffect(const EFFECT *psEffect) // ---------------------------------------------------------------------------------------- void effectSetupFirework(EFFECT *psEffect) { - UDWORD camExtra; - if(psEffect->type == FIREWORK_TYPE_LAUNCHER) { psEffect->velocity.x = 200 - rand()%400; @@ -1903,11 +1901,6 @@ void effectSetupFirework(EFFECT *psEffect) psEffect->velocity.y = 400 + rand()%200; //height psEffect->lifeSpan = GAME_TICKS_PER_SEC * 3; psEffect->radius = 80 + rand()%150; - camExtra = 0; - if(getCampaignNumber()!=1) - { - camExtra+=rand()%200; - } psEffect->size = 300+rand()%300; //height it goes off psEffect->imd = getImdFromIndex(MI_FIREWORK); // not actually drawn } @@ -1939,9 +1932,7 @@ void effectSetupFirework(EFFECT *psEffect) break; } } - psEffect->frameDelay = (EXPLOSION_FRAME_DELAY*2); - } void effectSetupSmoke(EFFECT *psEffect) diff --git a/src/feature.cpp b/src/feature.cpp index 1cf29049e..e19ae0e82 100644 --- a/src/feature.cpp +++ b/src/feature.cpp @@ -260,6 +260,7 @@ FEATURE * buildFeature(FEATURE_STATS *psStats, UDWORD x, UDWORD y,bool FromSave) psFeature->rot.direction = 0; } psFeature->body = psStats->body; + psFeature->inFire = false; objSensorCache((BASE_OBJECT *)psFeature, NULL); objEcmCache((BASE_OBJECT *)psFeature, NULL); @@ -556,3 +557,11 @@ SDWORD getFeatureStatFromName( const char *pName ) } return -1; } + +Vector2i getFeatureStatsSize(FEATURE_STATS const *pFeatureType) +{ + Vector2i size(pFeatureType->baseWidth, pFeatureType->baseBreadth); + + // Feature has normal orientation (or upsidedown). + return size; +} diff --git a/src/feature.h b/src/feature.h index 5e087f8d4..f109f707b 100644 --- a/src/feature.h +++ b/src/feature.h @@ -58,6 +58,8 @@ int32_t featureDamage(FEATURE *psFeature, UDWORD damage, WEAPON_CLASS weaponClas extern void featureInitVars(void); +Vector2i getFeatureStatsSize(FEATURE_STATS const *pStructureType); + #define syncDebugFeature(psFeature, ch) _syncDebugFeature(__FUNCTION__, psFeature, ch) void _syncDebugFeature(const char *function, FEATURE const *psFeature, char ch); diff --git a/src/fpath.cpp b/src/fpath.cpp index 8deb615f6..6f0f04fd0 100644 --- a/src/fpath.cpp +++ b/src/fpath.cpp @@ -350,9 +350,31 @@ void fpathRemoveDroidData(int id) wzMutexUnlock(fpathMutex); } +static StructureTiles getTilesOfStructure(BASE_OBJECT *object) +{ + StructureTiles ret; + ret.size = Vector2i(-65535, -65535); // Default to an invalid area. + ret.map = Vector2i(32767, 32767); + + STRUCTURE *psStructure = castStructure(object); + FEATURE *psFeature = castFeature(object); + + if (psStructure != NULL) + { + ret.size = getStructureSize(psStructure); + ret.map = map_coord(removeZ(psStructure->pos)) - ret.size/2; + } + else if (psFeature != NULL) + { + ret.size = Vector2i(psFeature->psStats->baseWidth, psFeature->psStats->baseBreadth); + ret.map = map_coord(removeZ(psFeature->pos)) - ret.size/2; + } + + return ret; +} static FPATH_RETVAL fpathRoute(MOVE_CONTROL *psMove, int id, int startX, int startY, int tX, int tY, PROPULSION_TYPE propulsionType, - DROID_TYPE droidType, FPATH_MOVETYPE moveType, int owner, bool acceptNearest) + DROID_TYPE droidType, FPATH_MOVETYPE moveType, int owner, bool acceptNearest, BASE_OBJECT *srcStructure, BASE_OBJECT *dstStructure) { objTrace(id, "called(*,id=%d,sx=%d,sy=%d,ex=%d,ey=%d,prop=%d,type=%d,move=%d,owner=%d)", id, startX, startY, tX, tY, (int)propulsionType, (int)droidType, (int)moveType, owner); @@ -424,6 +446,8 @@ static FPATH_RETVAL fpathRoute(MOVE_CONTROL *psMove, int id, int startX, int sta job.droidID = id; job.destX = tX; job.destY = tY; + job.srcStructure = getTilesOfStructure(srcStructure); + job.dstStructure = getTilesOfStructure(dstStructure); job.droidType = droidType; job.propulsion = propulsionType; job.moveType = moveType; @@ -472,10 +496,18 @@ FPATH_RETVAL fpathDroidRoute(DROID* psDroid, SDWORD tX, SDWORD tY, FPATH_MOVETYP // Check whether the start and end points of the route are blocking tiles and find an alternative if they are. Position startPos = psDroid->pos; Position endPos = Position(tX, tY, 0); + BASE_OBJECT *srcStructure = worldTile(startPos)->psObject; + BASE_OBJECT *dstStructure = worldTile(endPos)->psObject; if (psDroid->sMove.Status != MOVEWAITROUTE) { - startPos = findNonblockingPosition(startPos, getPropulsionStats(psDroid)->propulsionType, psDroid->player, moveType); - endPos = findNonblockingPosition(endPos, getPropulsionStats(psDroid)->propulsionType, psDroid->player, moveType); + if (srcStructure == NULL) // If there's a structure over the source, ignore it, otherwise pathfind from somewhere around the obstruction. + { + startPos = findNonblockingPosition(startPos, getPropulsionStats(psDroid)->propulsionType, psDroid->player, moveType); + } + if (dstStructure == NULL) // If there's a structure over the destination, ignore it, otherwise pathfind from somewhere around the obstruction. + { + endPos = findNonblockingPosition(endPos, getPropulsionStats(psDroid)->propulsionType, psDroid->player, moveType); + } objTrace(psDroid->id, "Want to go to (%d, %d) -> (%d, %d), going (%d, %d) -> (%d, %d)", map_coord(psDroid->pos.x), map_coord(psDroid->pos.y), map_coord(tX), map_coord(tY), map_coord(startPos.x), map_coord(startPos.y), map_coord(endPos.x), map_coord(endPos.y)); } switch (psDroid->order) @@ -492,7 +524,7 @@ FPATH_RETVAL fpathDroidRoute(DROID* psDroid, SDWORD tX, SDWORD tY, FPATH_MOVETYP break; } return fpathRoute(&psDroid->sMove, psDroid->id, startPos.x, startPos.y, endPos.x, endPos.y, psPropStats->propulsionType, - psDroid->droidType, moveType, psDroid->player, acceptNearest); + psDroid->droidType, moveType, psDroid->player, acceptNearest, srcStructure, dstStructure); } // Run only from path thread @@ -595,7 +627,7 @@ static int fpathResultQueueLength(void) // Only used by fpathTest. static FPATH_RETVAL fpathSimpleRoute(MOVE_CONTROL *psMove, int id, int startX, int startY, int tX, int tY) { - return fpathRoute(psMove, id, startX, startY, tX, tY, PROPULSION_TYPE_WHEELED, DROID_WEAPON, FMT_BLOCK, 0, true); + return fpathRoute(psMove, id, startX, startY, tX, tY, PROPULSION_TYPE_WHEELED, DROID_WEAPON, FMT_BLOCK, 0, true, NULL, NULL); } void fpathTest(int x, int y, int x2, int y2) diff --git a/src/fpath.h b/src/fpath.h index 0b8167486..5f6184b36 100644 --- a/src/fpath.h +++ b/src/fpath.h @@ -41,12 +41,20 @@ enum FPATH_MOVETYPE struct PathBlockingMap; +struct StructureTiles +{ + Vector2i map; ///< Map coordinates of upper left corner of structure. + Vector2i size; ///< Size (in map coordinates) of the structure. +}; + struct PATHJOB { PROPULSION_TYPE propulsion; DROID_TYPE droidType; int destX, destY; int origX, origY; + StructureTiles srcStructure; + StructureTiles dstStructure; UDWORD droidID; FPATH_MOVETYPE moveType; int owner; ///< Player owner diff --git a/src/game.cpp b/src/game.cpp index 376a936f7..4d71394d5 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -4790,7 +4790,6 @@ static bool loadSaveStructure2(const char *pFileName, STRUCTURE **ppList) } //clear subject psResearch->psSubject = NULL; - psResearch->timeStarted = 0; psResearch->timeStartHold = 0; //set the subject if (ini.contains("Research/target")) @@ -4799,7 +4798,6 @@ static bool loadSaveStructure2(const char *pFileName, STRUCTURE **ppList) if (researchId != NULL_ID) { psResearch->psSubject = &asResearch[researchId]; - psResearch->timeStarted = ini.value("Research/timeStarted").toInt(); psResearch->timeStartHold = ini.value("Research/timeStartHold").toInt(); } else @@ -4821,8 +4819,6 @@ static bool loadSaveStructure2(const char *pFileName, STRUCTURE **ppList) case REF_REPAIR_FACILITY: psRepair = ((REPAIR_FACILITY *)psStructure->pFunctionality); psRepair->power = ((REPAIR_DROID_FUNCTION *) psStructure->pStructureType->asFuncList[0])->repairPoints; - psRepair->timeStarted = ini.value("Repair/timeStarted").toInt(); - psRepair->currentPtsAdded = ini.value("Repair/currentPtsAdded").toInt(); if (ini.contains("Repair/deliveryPoint/pos")) { Position point = ini.vector3i("Repair/deliveryPoint/pos"); @@ -5000,7 +4996,6 @@ bool writeStructFile(const char *pFileName) if (((RESEARCH_FACILITY *)psCurr->pFunctionality)->psSubject) { ini.setValue("Research/target", ((RESEARCH_FACILITY *)psCurr->pFunctionality)->psSubject->pName); - ini.setValue("Research/timeStarted", ((RESEARCH_FACILITY *)psCurr->pFunctionality)->timeStarted); } } else if (psCurr->pStructureType->type == REF_POWER_GEN) @@ -5010,8 +5005,6 @@ bool writeStructFile(const char *pFileName) else if (psCurr->pStructureType->type == REF_REPAIR_FACILITY) { REPAIR_FACILITY *psRepair = ((REPAIR_FACILITY *)psCurr->pFunctionality); - ini.setValue("Repair/timeStarted", psRepair->timeStarted); - ini.setValue("Repair/currentPtsAdded", psRepair->currentPtsAdded); if (psRepair->psObj) { ini.setValue("Repair/target/id", psRepair->psObj->id); diff --git a/src/gateway.cpp b/src/gateway.cpp index 8b3580fbd..3b9f3ee44 100644 --- a/src/gateway.cpp +++ b/src/gateway.cpp @@ -96,23 +96,11 @@ bool gwNewGateway(SDWORD x1, SDWORD y1, SDWORD x2, SDWORD y2) GATEWAY *psNew; SDWORD pos, temp; - if ((x1 < 0) || (x1 >= gwMapWidth()) || - (y1 < 0) || (y1 >= gwMapHeight()) || - (x2 < 0) || (x2 >= gwMapWidth()) || - (y2 < 0) || (y2 >= gwMapHeight()) || - ((x1 != x2) && (y1 != y2))) - { - ASSERT( false,"gwNewGateway: invalid coordinates" ); - return false; - } - + ASSERT_OR_RETURN(false, x1 >= 0 && x1 < gwMapWidth() && y1 >= 0 && y1 < gwMapHeight() + && x2 >= 0 && x2 < gwMapWidth() && y2 >= 0 && y2 < gwMapHeight() + && (x1 == x2 || y1 == y2), "Invalid gateway coordinates (%d, %d, %d, %d)", + x1, y1, x2, y2); psNew = (GATEWAY*)malloc(sizeof(GATEWAY)); - if (!psNew) - { - debug( LOG_FATAL, "gwNewGateway: out of memory" ); - abort(); - return false; - } // make sure the first coordinate is always the smallest if (x2 < x1) diff --git a/src/group.cpp b/src/group.cpp index e26e6a8e7..cf644bbd4 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -64,6 +64,7 @@ DROID_GROUP::DROID_GROUP() refCount = 0; psList = NULL; psCommander = NULL; + memset(&sRunData, 0, sizeof(sRunData)); } // create a new group diff --git a/src/hci.cpp b/src/hci.cpp index 8ab2e4a47..f8b0b7782 100644 --- a/src/hci.cpp +++ b/src/hci.cpp @@ -85,6 +85,8 @@ static UDWORD newMapWidth, newMapHeight; +static FLAG_POSITION debugMenuDroidDeliveryPoint; + #define RETXOFFSET (0)// Reticule button offset #define RETYOFFSET (0) #define NUMRETBUTS 7 // Number of reticule buttons. @@ -1351,27 +1353,13 @@ static void intProcessEditStats(UDWORD id) { /* Clicked on a stat button - need to look for a location for it */ psPositionStats = ppsStatsList[id - IDSTAT_START]; - /*if it is a structure - need to check there is enough power available - to build */ - if (psPositionStats->ref >= REF_STRUCTURE_START && - psPositionStats->ref < REF_STRUCTURE_START + REF_RANGE) - { - if (!checkPower(selectedPlayer, ((STRUCTURE_STATS*)psPositionStats)->powerToBuild)) - { - debug(LOG_INFO, "Ignoring power check, this is only used from the edit menu, isn't it?"); - //return; - } - } - /*if it is a template - need to check there is enough power available - to build */ if (psPositionStats->ref >= REF_TEMPLATE_START && psPositionStats->ref < REF_TEMPLATE_START + REF_RANGE) { - if (!checkPower(selectedPlayer, ((DROID_TEMPLATE*)psPositionStats)->powerPoints)) - { - debug(LOG_INFO, "Ignoring power check, this is only used from the edit menu, isn't it?"); - return; - } + // Placing a droid from the debug menu, set up the flag. (This would probably be safe to do, even if we're placing something else.) + debugMenuDroidDeliveryPoint.factoryType = REPAIR_FLAG; + debugMenuDroidDeliveryPoint.factoryInc = 0; + deliveryPointToMove = &debugMenuDroidDeliveryPoint; } intStartStructPosition(psPositionStats); editPosMode = IED_POS; @@ -2052,7 +2040,6 @@ INT_RETVAL intRunWidgets(void) debug( LOG_ERROR, "PlayerHasLost Or Won\n" ); intResetScreen(true); retCode = INT_QUIT; - quitting = true; } return retCode; } @@ -2974,11 +2961,10 @@ void intNewObj(BASE_OBJECT *psObj) // clean up when an object dies static void intObjectDied(UDWORD objID) { - RENDERED_BUTTON *psBut; UDWORD statsID, gubbinsID; // clear the object button - psBut = (RENDERED_BUTTON *)widgGetUserData(psWScreen, objID); + RENDERED_BUTTON *psBut = (RENDERED_BUTTON *)widgGetUserData(psWScreen, objID); if (psBut) { psBut->Data = NULL; @@ -2993,7 +2979,6 @@ static void intObjectDied(UDWORD objID) // clear the stats button statsID = IDOBJ_STATSTART + objID - IDOBJ_OBJSTART; intSetStats(statsID, NULL); - psBut = (RENDERED_BUTTON *)widgGetUserData(psWScreen, statsID); // and disable it widgSetButtonState(psWScreen, statsID, WBUT_DISABLE); @@ -3754,13 +3739,11 @@ static bool intAddObjectWindow(BASE_OBJECT *psObjects, BASE_OBJECT *psSelected,b DROID *Droid; STRUCTURE *Structure; bool IsFactory; - bool Animate = true; int compIndex; // Is the form already up? if(widgGetFromID(psWScreen,IDOBJ_FORM) != NULL) { intRemoveObjectNoAnim(); - Animate = false; } else { @@ -3768,8 +3751,6 @@ static bool intAddObjectWindow(BASE_OBJECT *psObjects, BASE_OBJECT *psSelected,b asJumpPos.clear(); } - Animate = false; - ClearObjectBuffers(); ClearTopicBuffers(); @@ -3877,14 +3858,7 @@ static bool intAddObjectWindow(BASE_OBJECT *psObjects, BASE_OBJECT *psSelected,b sFormInit.y = (SWORD)OBJ_BACKY; sFormInit.width = OBJ_BACKWIDTH; sFormInit.height = OBJ_BACKHEIGHT; - // If the window was closed then do open animation. - if(Animate) { - sFormInit.pDisplay = intOpenPlainForm; - sFormInit.disableChildren = true; - } else { - // otherwise just recreate it. - sFormInit.pDisplay = intDisplayPlainForm; - } + sFormInit.pDisplay = intDisplayPlainForm; if (!widgAddForm(psWScreen, &sFormInit)) { return false; @@ -4768,7 +4742,6 @@ static bool intAddStats(BASE_STATS **ppsStatsList, UDWORD numStats, UDWORD i, butPerForm, statForm; SDWORD BufferID; BASE_STATS *Stat; - bool Animate = true; FACTORY *psFactory; int allyResearchIconCount = 0; @@ -4778,7 +4751,6 @@ static bool intAddStats(BASE_STATS **ppsStatsList, UDWORD numStats, // Is the form already up? if(widgGetFromID(psWScreen,IDSTAT_FORM) != NULL) { intRemoveStatsNoAnim(); - Animate = false; } // is the order form already up ? @@ -4787,8 +4759,6 @@ static bool intAddStats(BASE_STATS **ppsStatsList, UDWORD numStats, intRemoveOrderNoAnim(); } - Animate = false; - if (psOwner != NULL) { // Return if the owner is dead. @@ -4815,14 +4785,7 @@ static bool intAddStats(BASE_STATS **ppsStatsList, UDWORD numStats, sFormInit.y = (SWORD)STAT_Y; sFormInit.width = STAT_WIDTH; sFormInit.height = STAT_HEIGHT; - // If the window was closed then do open animation. - if(Animate) { - sFormInit.pDisplay = intOpenPlainForm; - sFormInit.disableChildren = true; - } else { - // otherwise just recreate it. - sFormInit.pDisplay = intDisplayPlainForm; - } + sFormInit.pDisplay = intDisplayPlainForm; if (!widgAddForm(psWScreen, &sFormInit)) { debug(LOG_ERROR, "intAddStats: Failed to add form"); @@ -5475,7 +5438,6 @@ static bool setResearchStats(BASE_OBJECT *psObj, BASE_STATS *psStats) sendResearchStatus(psBuilding,count,selectedPlayer,true); // inform others, I'm researching this. MakeResearchStarted(pPlayerRes); - psResFacilty->timeStarted = ACTION_START_TIME; psResFacilty->timeStartHold = 0; //stop the button from flashing once a topic has been chosen stopReticuleButtonFlash(IDRET_RESEARCH); @@ -5846,12 +5808,9 @@ void stopReticuleButtonFlash(UDWORD buttonID) { UBYTE DownTime = UNPACKDWORD_QUAD_C(psButton->UserData); UBYTE Index = UNPACKDWORD_QUAD_D(psButton->UserData); - UBYTE flashing = UNPACKDWORD_QUAD_A(psButton->UserData); - UBYTE flashTime = UNPACKDWORD_QUAD_B(psButton->UserData); - // clear flashing byte - flashing = false; - flashTime = 0; + UBYTE flashing = false; + UBYTE flashTime = 0; psButton->UserData = PACKDWORD_QUAD(flashTime,flashing,DownTime,Index); } } @@ -6271,7 +6230,6 @@ STRUCTURE* intGotoNextStructureType(UDWORD structType,bool JumpTo,bool CancelDri } psStruct->selected = true; CurrentStruct = psStruct; - Found = true; break; } } diff --git a/src/intdisplay.cpp b/src/intdisplay.cpp index 1438c8cd9..3a198fa78 100644 --- a/src/intdisplay.cpp +++ b/src/intdisplay.cpp @@ -2712,13 +2712,13 @@ DROID_TEMPLATE *FactoryGetTemplate(FACTORY *Factory) return (DROID_TEMPLATE *)Factory->psSubject; } -bool StatIsStructure(BASE_STATS *Stat) +bool StatIsStructure(BASE_STATS const *Stat) { return (Stat->ref >= REF_STRUCTURE_START && Stat->ref < REF_STRUCTURE_START + REF_RANGE); } -bool StatIsFeature(BASE_STATS *Stat) +bool StatIsFeature(BASE_STATS const *Stat) { return (Stat->ref >= REF_FEATURE_START && Stat->ref < REF_FEATURE_START + REF_RANGE); diff --git a/src/intdisplay.h b/src/intdisplay.h index 7c4ecd4d0..145d947de 100644 --- a/src/intdisplay.h +++ b/src/intdisplay.h @@ -244,10 +244,10 @@ FACTORY *StructureGetFactory(STRUCTURE *Structure); //SDWORD ResearchGetImage(RESEARCH_FACILITY *Research); -bool StatIsStructure(BASE_STATS *Stat); +bool StatIsStructure(BASE_STATS const *Stat); iIMDShape *StatGetStructureIMD(BASE_STATS *Stat,UDWORD Player); bool StatIsTemplate(BASE_STATS *Stat); -bool StatIsFeature(BASE_STATS *Stat); +bool StatIsFeature(BASE_STATS const *Stat); SDWORD StatIsComponent(BASE_STATS *Stat); bool StatGetComponentIMD(BASE_STATS *Stat, SDWORD compID,iIMDShape **CompIMD,iIMDShape **MountIMD); diff --git a/src/intelmap.cpp b/src/intelmap.cpp index c107f3191..0f16d6448 100644 --- a/src/intelmap.cpp +++ b/src/intelmap.cpp @@ -1266,16 +1266,15 @@ void intDisplayPIEView(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, WZ_DECL MESSAGE *psMessage = (MESSAGE *)Form->pUserData; UDWORD x0,y0,x1,y1; SWORD image = -1; - RESEARCH *psResearch; + RESEARCH *psResearch; - - //shouldn't have any proximity messages here... - if (psMessage->type == MSG_PROXIMITY) + // Should not have any proximity messages here... + if (!psMessage || psMessage->type == MSG_PROXIMITY) { return; } - if (psMessage && psMessage->pViewData) + if (psMessage->pViewData) { x0 = xOffset+Form->x; y0 = yOffset+Form->y; @@ -1321,12 +1320,12 @@ void intDisplayFLICView(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, WZ_DEC VIEW_RESEARCH *psViewResearch; //shouldn't have any proximity messages here... - if (psMessage->type == MSG_PROXIMITY) + if (!psMessage || psMessage->type == MSG_PROXIMITY) { return; } - if (psMessage && psMessage->pViewData) + if (psMessage->pViewData) { OpenButtonRender((UWORD)(xOffset+Form->x), (UWORD)(yOffset+Form->y), Form->width, Form->height); @@ -1350,7 +1349,6 @@ void intDisplayFLICView(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, WZ_DEC seq_RenderVideoToBuffer(psViewResearch->sequenceName, SEQUENCE_HOLD); CloseButtonRender(); } - } #endif diff --git a/src/intorder.cpp b/src/intorder.cpp index d606edd90..1767c3bf7 100644 --- a/src/intorder.cpp +++ b/src/intorder.cpp @@ -1161,7 +1161,6 @@ static bool intRefreshOrderButtons(void) { SECONDARY_STATE State; UWORD OrdIndex; - UWORD NumButs; UDWORD id; for (unsigned j = 0; j < AvailableOrders.size() && j < MAX_DISPLAYABLE_ORDERS; ++j) @@ -1171,25 +1170,8 @@ static bool intRefreshOrderButtons(void) // Get current order state. State = GetSecondaryStates(OrderButtons[OrdIndex].Order); - // Get number of buttons. - NumButs = OrderButtons[OrdIndex].NumButs; // Set actual number of buttons. - OrderButtons[OrdIndex].AcNumButs = NumButs; - - // Handle special case for factory -> command droid assignment buttons. - switch (OrderButtons[OrdIndex].Class) { - case ORDBUTCLASS_FACTORY: - NumButs = countAssignableFactories((UBYTE)selectedPlayer,FACTORY_FLAG); - break; - case ORDBUTCLASS_CYBORGFACTORY: - NumButs = countAssignableFactories((UBYTE)selectedPlayer,CYBORG_FLAG); - break; - case ORDBUTCLASS_VTOLFACTORY: - NumButs = countAssignableFactories((UBYTE)selectedPlayer,VTOL_FLAG); - break; - default: - break; - } + OrderButtons[OrdIndex].AcNumButs = OrderButtons[OrdIndex].NumButs; id = OrderButtons[OrdIndex].ButBaseID; for (unsigned i = 0; i < OrderButtons[OrdIndex].AcNumButs; ++i) diff --git a/src/keybind.cpp b/src/keybind.cpp index 5dd67d902..3861b9eec 100644 --- a/src/keybind.cpp +++ b/src/keybind.cpp @@ -2575,9 +2575,12 @@ float available_speed[] = { 5.f / 2.f, // n 3.f / 1.f, // n 10.f / 1.f, // n - 20.f / 1.f // n + 20.f / 1.f, // n + 30.f / 1.f, // n + 60.f / 1.f, // n + 100.f / 1.f, // n }; -unsigned int nb_available_speeds = 12; +unsigned int nb_available_speeds = ARRAY_SIZE(available_speed); void kf_SpeedUp( void ) { @@ -2820,7 +2823,6 @@ void kf_BuildPrevPage() temp = psTForm->majorT - 1; if (temp < 0) { - temp = 0 ; audio_PlayTrack(ID_SOUND_BUILD_FAIL); return; } diff --git a/src/loop.cpp b/src/loop.cpp index daab5a04b..f313a75b7 100644 --- a/src/loop.cpp +++ b/src/loop.cpp @@ -136,52 +136,14 @@ SDWORD nextMissionType = LDS_NONE;//MISSION_NONE; /* Force 3D display */ UDWORD mcTime; -/* The main game loop */ -GAMECODE gameLoop(void) +static GAMECODE renderLoop() { - DROID *psCurr, *psNext; - STRUCTURE *psCBuilding, *psNBuilding; - FEATURE *psCFeat, *psNFeat; - UDWORD i,widgval; - bool quitting=false; - INT_RETVAL intRetVal; - int clearMode = 0; - bool gameTicked; // true iff we are doing a logical update. - uint32_t lastFlushTime = 0; - - // Receive NET_BLAH messages. - // Receive GAME_BLAH messages, and if it's time, process exactly as many GAME_BLAH messages as required to be able to tick the gameTime. - recvMessage(); - - // Update gameTime and graphicsTime, and corresponding deltas. Note that gameTime and graphicsTime pause, if we aren't getting our GAME_GAME_TIME messages. - gameTimeUpdate(); - gameTicked = deltaGameTime != 0; - - if (gameTicked) - { - // Can't dump isHumanPlayer, since it causes spurious desynch dumps when players leave. - // TODO isHumanPlayer should probably be synchronised, since the game state seems to depend on it, so there might also be a risk of real desynchs when players leave. - //syncDebug("map = \"%s\", humanPlayers = %d %d %d %d %d %d %d %d", game.map, isHumanPlayer(0), isHumanPlayer(1), isHumanPlayer(2), isHumanPlayer(3), isHumanPlayer(4), isHumanPlayer(5), isHumanPlayer(6), isHumanPlayer(7)); - syncDebug("map = \"%s\"", game.map); - - // Actually send pending droid orders. - sendQueuedDroidInfo(); - - sendPlayerGameTime(); - gameSRand(gameTime); // Brute force way of synchronising the random number generator, which can't go out of synch. - } - - if (gameTicked || realTime - lastFlushTime < 400u) - { - lastFlushTime = realTime; - NETflush(); // Make sure the game time tick message is really sent over the network, and that we aren't waiting too long to send data. - } - if (bMultiPlayer && !NetPlay.isHostAlive && NetPlay.bComms && !NetPlay.isHost) { intAddInGamePopup(); } + int clearMode = 0; if(getDrawShadows()) { clearMode |= CLEAR_SHADOW; @@ -199,31 +161,14 @@ GAMECODE gameLoop(void) wzShowMouse(true); + INT_RETVAL intRetVal = INT_NONE; if (!paused) { - if (!scriptPaused() && !editPaused() && gameTicked) - { - /* Update the event system */ - if (!bInTutorial) - { - eventProcessTriggers(gameTime/SCR_TICKRATE); - } - else - { - eventProcessTriggers(realTime/SCR_TICKRATE); - } - updateScripts(); - } - /* Run the in game interface and see if it grabbed any mouse clicks */ if (!rotActive && getWidgetsStatus() && dragBox3D.status != DRAG_DRAGGING && wallDrag.status != DRAG_DRAGGING) { intRetVal = intRunWidgets(); } - else - { - intRetVal = INT_NONE; - } //don't process the object lists if paused or about to quit to the front end if (!gameUpdatePaused() && intRetVal != INT_QUIT) @@ -245,43 +190,10 @@ GAMECODE gameLoop(void) // check all flag positions for duplicate delivery points checkFactoryFlags(); #endif - if (!editPaused() && gameTicked) - { - // Update abandoned structures - handleAbandonedStructures(); - } //handles callbacks for positioning of DP's process3DBuilding(); - // Update the visibility change stuff - visUpdateLevel(); - - if (!editPaused() && gameTicked) - { - // Put all droids/structures/features into the grid. - gridReset(); - - // Check which objects are visible. - processVisibility(); - - // Update the map. - mapUpdate(); - - //update the findpath system - fpathUpdate(); - - // update the cluster system - clusterUpdate(); - - // update the command droids - cmdDroidUpdate(); - if(getDrivingStatus()) - { - driveUpdate(); - } - } - //ajl. get the incoming netgame messages and process them. // FIXME Previous comment is deprecated. multiPlayerLoop does some other weird stuff, but not that anymore. if (bMultiPlayer) @@ -289,208 +201,19 @@ GAMECODE gameLoop(void) multiPlayerLoop(); } - if (!editPaused() && gameTicked) + for (unsigned i = 0; i < MAX_PLAYERS; i++) { - - fireWaitingCallbacks(); //Now is the good time to fire waiting callbacks (since interpreter is off now) - - for(i = 0; i < MAX_PLAYERS; i++) - { - //update the current power available for a player - updatePlayerPower(i); - - //set the flag for each player - setHQExists(false, i); - setSatUplinkExists(false, i); - - numCommandDroids[i] = 0; - numConstructorDroids[i] = 0; - numDroids[i]=0; - numTransporterDroids[i]=0; - - for(psCurr = apsDroidLists[i]; psCurr; psCurr = psNext) + for (DROID *psCurr = apsDroidLists[i]; psCurr; psCurr = psCurr->psNext) { - /* Copy the next pointer - not 100% sure if the droid could get destroyed - but this covers us anyway */ - psNext = psCurr->psNext; - droidUpdate(psCurr); - - // update the droid counts - numDroids[i]++; - switch (psCurr->droidType) - { - case DROID_COMMAND: - numCommandDroids[i] += 1; - break; - case DROID_CONSTRUCT: - case DROID_CYBORG_CONSTRUCT: - numConstructorDroids[i] += 1; - break; - case DROID_TRANSPORTER: - if( (psCurr->psGroup != NULL) ) - { - DROID *psDroid = NULL; - - numTransporterDroids[i] += psCurr->psGroup->refCount-1; - // and count the units inside it... - for (psDroid = psCurr->psGroup->psList; psDroid != NULL && psDroid != psCurr; psDroid = psDroid->psGrpNext) - { - if (psDroid->droidType == DROID_CYBORG_CONSTRUCT || psDroid->droidType == DROID_CONSTRUCT) - { - numConstructorDroids[i] += 1; - } - if (psDroid->droidType == DROID_COMMAND) - { - numCommandDroids[i] += 1; - } - } - } - break; - default: - break; - } - } - - numMissionDroids[i]=0; - for(psCurr = mission.apsDroidLists[i]; psCurr; psCurr = psNext) - { - /* Copy the next pointer - not 100% sure if the droid could - get destroyed but this covers us anyway */ - psNext = psCurr->psNext; - missionDroidUpdate(psCurr); - numMissionDroids[i]++; - switch (psCurr->droidType) - { - case DROID_COMMAND: - numCommandDroids[i] += 1; - break; - case DROID_CONSTRUCT: - case DROID_CYBORG_CONSTRUCT: - numConstructorDroids[i] += 1; - break; - case DROID_TRANSPORTER: - if( (psCurr->psGroup != NULL) ) - { - numTransporterDroids[i] += psCurr->psGroup->refCount-1; - } - break; - default: - break; - } - } - for(psCurr = apsLimboDroids[i]; psCurr; psCurr = psNext) - { - /* Copy the next pointer - not 100% sure if the droid could - get destroyed but this covers us anyway */ - psNext = psCurr->psNext; - - // count the type of units - switch (psCurr->droidType) - { - case DROID_COMMAND: - numCommandDroids[i] += 1; - break; - case DROID_CONSTRUCT: - case DROID_CYBORG_CONSTRUCT: - numConstructorDroids[i] += 1; - break; - default: - break; - } - } - - // FIXME: These for-loops are code duplicationo - /*set this up AFTER droidUpdate so that if trying to building a - new one, we know whether one exists already*/ - setLasSatExists(false, i); - for (psCBuilding = apsStructLists[i]; psCBuilding; psCBuilding = psNBuilding) - { - /* Copy the next pointer - not 100% sure if the structure could get destroyed but this covers us anyway */ - psNBuilding = psCBuilding->psNext; - structureUpdate(psCBuilding, false); - //set animation flag - if (psCBuilding->pStructureType->type == REF_HQ && - psCBuilding->status == SS_BUILT) - { - setHQExists(true, i); - } - if (psCBuilding->pStructureType->type == REF_SAT_UPLINK && - psCBuilding->status == SS_BUILT) - { - setSatUplinkExists(true, i); - } - //don't wait for the Las Sat to be built - can't build another if one is partially built - if (asWeaponStats[psCBuilding->asWeaps[0].nStat]. - weaponSubClass == WSC_LAS_SAT) - { - setLasSatExists(true, i); - } - } - for (psCBuilding = mission.apsStructLists[i]; psCBuilding; - psCBuilding = psNBuilding) - { - /* Copy the next pointer - not 100% sure if the structure could get destroyed but this covers us anyway. It shouldn't do since its not even on the map!*/ - psNBuilding = psCBuilding->psNext; - structureUpdate(psCBuilding, true); // update for mission - if (psCBuilding->pStructureType->type == REF_HQ && - psCBuilding->status == SS_BUILT) - { - setHQExists(true, i); - } - if (psCBuilding->pStructureType->type == REF_SAT_UPLINK && - psCBuilding->status == SS_BUILT) - { - setSatUplinkExists(true, i); - } - //don't wait for the Las Sat to be built - can't build another if one is partially built - if (asWeaponStats[psCBuilding->asWeaps[0].nStat]. - weaponSubClass == WSC_LAS_SAT) - { - setLasSatExists(true, i); - } - } - } - - missionTimerUpdate(); - - proj_UpdateAll(); - - for(psCFeat = apsFeatureLists[0]; psCFeat; psCFeat = psNFeat) - { - psNFeat = psCFeat->psNext; - featureUpdate(psCFeat); - } - - } - else // if editPaused() or not gameTicked - make sure visual effects are updated - { - for (i = 0; i < MAX_PLAYERS; i++) - { - for(psCurr = apsDroidLists[i]; psCurr; psCurr = psNext) - { - /* Copy the next pointer - not 100% sure if the droid could get destroyed - but this covers us anyway */ - psNext = psCurr->psNext; - processVisibilityLevel((BASE_OBJECT *)psCurr); - calcDroidIllumination(psCurr); - } - for (psCBuilding = apsStructLists[i]; psCBuilding; psCBuilding = psNBuilding) - { - /* Copy the next pointer - not 100% sure if the structure could get destroyed but this covers us anyway */ - psNBuilding = psCBuilding->psNext; - processVisibilityLevel((BASE_OBJECT *)psCBuilding); - } + // Don't copy the next pointer - if droids somehow get destroyed in the graphics rendering loop, who cares if we crash. + calcDroidIllumination(psCurr); } } /* update animations */ animObj_Update(); - - if (gameTicked) - { - objmemUpdate(); - } } + if (!consolePaused()) { /* Process all the console messages */ @@ -501,13 +224,11 @@ GAMECODE gameLoop(void) scroll(); } } - else // paused + else // paused { // Using software cursors (when on) for these menus due to a bug in SDL's SDL_ShowCursor() wzSetCursor(CURSOR_DEFAULT); - intRetVal = INT_NONE; - if(dragBox3D.status != DRAG_DRAGGING) { scroll(); @@ -515,7 +236,7 @@ GAMECODE gameLoop(void) if(InGameOpUp || isInGamePopupUp) // ingame options menu up, run it! { - widgval = widgRunScreen(psWScreen); + unsigned widgval = widgRunScreen(psWScreen); intProcessInGameOptions(widgval); if(widgval == INTINGAMEOP_QUIT_CONFIRM || widgval == INTINGAMEOP_POPUP_QUIT) { @@ -580,10 +301,8 @@ GAMECODE gameLoop(void) } } - // Must end update, since we may or may not have ticked, and some message queue processing code may vary depending on whether it's in an update. - gameTimeUpdateEnd(); - /* Check for quit */ + bool quitting = false; if (intRetVal == INT_QUIT) { if (!loop_GetVideoStatus()) @@ -633,17 +352,9 @@ GAMECODE gameLoop(void) pie_GetResetCounts(&loopPieCount, &loopPolyCount, &loopStateChanges); - if (fogStatus & FOG_BACKGROUND) + if ((fogStatus & FOG_BACKGROUND) && (loopMissionState == LMS_SAVECONTINUE)) { - if (loopMissionState == LMS_SAVECONTINUE) - { - pie_SetFogStatus(false); - clearMode = CLEAR_BLACK; - } - } - else - { - clearMode = CLEAR_BLACK;//force to black 3DFX + pie_SetFogStatus(false); } if (!quitting) @@ -676,7 +387,6 @@ GAMECODE gameLoop(void) break; case LMS_SAVECONTINUE: // just wait for this to be changed when the new mission starts - clearMode = CLEAR_BLACK; break; case LMS_NEWLEVEL: //nextMissionType = MISSION_NONE; @@ -711,6 +421,283 @@ GAMECODE gameLoop(void) return GAMECODE_CONTINUE; } +static void gameStateUpdate() +{ + // Can't dump isHumanPlayer, since it causes spurious desynch dumps when players leave. + // TODO isHumanPlayer should probably be synchronised, since the game state seems to depend on it, so there might also be a risk of real desynchs when players leave. + //syncDebug("map = \"%s\", humanPlayers = %d %d %d %d %d %d %d %d", game.map, isHumanPlayer(0), isHumanPlayer(1), isHumanPlayer(2), isHumanPlayer(3), isHumanPlayer(4), isHumanPlayer(5), isHumanPlayer(6), isHumanPlayer(7)); + syncDebug("map = \"%s\"", game.map); + + // Actually send pending droid orders. + sendQueuedDroidInfo(); + + sendPlayerGameTime(); + gameSRand(gameTime); // Brute force way of synchronising the random number generator, which can't go out of synch. + + if (!paused && !scriptPaused() && !editPaused()) + { + /* Update the event system */ + if (!bInTutorial) + { + eventProcessTriggers(gameTime/SCR_TICKRATE); + } + else + { + eventProcessTriggers(realTime/SCR_TICKRATE); + } + updateScripts(); + } + + // Update abandoned structures + handleAbandonedStructures(); + + // Update the visibility change stuff + visUpdateLevel(); + + // Put all droids/structures/features into the grid. + gridReset(); + + // Check which objects are visible. + processVisibility(); + + // Update the map. + mapUpdate(); + + //update the findpath system + fpathUpdate(); + + // update the cluster system + clusterUpdate(); + + // update the command droids + cmdDroidUpdate(); + if(getDrivingStatus()) + { + driveUpdate(); + } + + fireWaitingCallbacks(); //Now is the good time to fire waiting callbacks (since interpreter is off now) + + for (unsigned i = 0; i < MAX_PLAYERS; i++) + { + //update the current power available for a player + updatePlayerPower(i); + + //set the flag for each player + setHQExists(false, i); + setSatUplinkExists(false, i); + + numCommandDroids[i] = 0; + numConstructorDroids[i] = 0; + numDroids[i]=0; + numTransporterDroids[i]=0; + + DROID *psNext; + for (DROID *psCurr = apsDroidLists[i]; psCurr != NULL; psCurr = psNext) + { + // Copy the next pointer - not 100% sure if the droid could get destroyed but this covers us anyway + psNext = psCurr->psNext; + droidUpdate(psCurr); + + // update the droid counts + numDroids[i]++; + switch (psCurr->droidType) + { + case DROID_COMMAND: + numCommandDroids[i] += 1; + break; + case DROID_CONSTRUCT: + case DROID_CYBORG_CONSTRUCT: + numConstructorDroids[i] += 1; + break; + case DROID_TRANSPORTER: + if( (psCurr->psGroup != NULL) ) + { + DROID *psDroid = NULL; + + numTransporterDroids[i] += psCurr->psGroup->refCount-1; + // and count the units inside it... + for (psDroid = psCurr->psGroup->psList; psDroid != NULL && psDroid != psCurr; psDroid = psDroid->psGrpNext) + { + if (psDroid->droidType == DROID_CYBORG_CONSTRUCT || psDroid->droidType == DROID_CONSTRUCT) + { + numConstructorDroids[i] += 1; + } + if (psDroid->droidType == DROID_COMMAND) + { + numCommandDroids[i] += 1; + } + } + } + break; + default: + break; + } + } + + numMissionDroids[i]=0; + for (DROID *psCurr = mission.apsDroidLists[i]; psCurr != NULL; psCurr = psNext) + { + /* Copy the next pointer - not 100% sure if the droid could + get destroyed but this covers us anyway */ + psNext = psCurr->psNext; + missionDroidUpdate(psCurr); + numMissionDroids[i]++; + switch (psCurr->droidType) + { + case DROID_COMMAND: + numCommandDroids[i] += 1; + break; + case DROID_CONSTRUCT: + case DROID_CYBORG_CONSTRUCT: + numConstructorDroids[i] += 1; + break; + case DROID_TRANSPORTER: + if( (psCurr->psGroup != NULL) ) + { + numTransporterDroids[i] += psCurr->psGroup->refCount-1; + } + break; + default: + break; + } + } + for (DROID *psCurr = apsLimboDroids[i]; psCurr != NULL; psCurr = psNext) + { + /* Copy the next pointer - not 100% sure if the droid could + get destroyed but this covers us anyway */ + psNext = psCurr->psNext; + + // count the type of units + switch (psCurr->droidType) + { + case DROID_COMMAND: + numCommandDroids[i] += 1; + break; + case DROID_CONSTRUCT: + case DROID_CYBORG_CONSTRUCT: + numConstructorDroids[i] += 1; + break; + default: + break; + } + } + + // FIXME: These for-loops are code duplicationo + /*set this up AFTER droidUpdate so that if trying to building a + new one, we know whether one exists already*/ + setLasSatExists(false, i); + STRUCTURE *psNBuilding; + for (STRUCTURE *psCBuilding = apsStructLists[i]; psCBuilding != NULL; psCBuilding = psNBuilding) + { + /* Copy the next pointer - not 100% sure if the structure could get destroyed but this covers us anyway */ + psNBuilding = psCBuilding->psNext; + structureUpdate(psCBuilding, false); + //set animation flag + if (psCBuilding->pStructureType->type == REF_HQ && + psCBuilding->status == SS_BUILT) + { + setHQExists(true, i); + } + if (psCBuilding->pStructureType->type == REF_SAT_UPLINK && + psCBuilding->status == SS_BUILT) + { + setSatUplinkExists(true, i); + } + //don't wait for the Las Sat to be built - can't build another if one is partially built + if (asWeaponStats[psCBuilding->asWeaps[0].nStat]. + weaponSubClass == WSC_LAS_SAT) + { + setLasSatExists(true, i); + } + } + for (STRUCTURE *psCBuilding = mission.apsStructLists[i]; psCBuilding != NULL; psCBuilding = psNBuilding) + { + /* Copy the next pointer - not 100% sure if the structure could get destroyed but this covers us anyway. It shouldn't do since its not even on the map!*/ + psNBuilding = psCBuilding->psNext; + structureUpdate(psCBuilding, true); // update for mission + if (psCBuilding->pStructureType->type == REF_HQ && + psCBuilding->status == SS_BUILT) + { + setHQExists(true, i); + } + if (psCBuilding->pStructureType->type == REF_SAT_UPLINK && + psCBuilding->status == SS_BUILT) + { + setSatUplinkExists(true, i); + } + //don't wait for the Las Sat to be built - can't build another if one is partially built + if (asWeaponStats[psCBuilding->asWeaps[0].nStat]. + weaponSubClass == WSC_LAS_SAT) + { + setLasSatExists(true, i); + } + } + } + + missionTimerUpdate(); + + proj_UpdateAll(); + + FEATURE *psNFeat; + for (FEATURE *psCFeat = apsFeatureLists[0]; psCFeat; psCFeat = psNFeat) + { + psNFeat = psCFeat->psNext; + featureUpdate(psCFeat); + } + + objmemUpdate(); + + // Do completely useless stuff. + if (!isInSync()) + { + sendCheck(); // send some pointless checking info if we're doomed anyway + } + + + // Must end update, since we may or may not have ticked, and some message queue processing code may vary depending on whether it's in an update. + gameTimeUpdateEnd(); +} + +/* The main game loop */ +GAMECODE gameLoop(void) +{ + static uint32_t lastFlushTime = 0; + + bool didTick = false; + while (true) + { + // Receive NET_BLAH messages. + // Receive GAME_BLAH messages, and if it's time, process exactly as many GAME_BLAH messages as required to be able to tick the gameTime. + recvMessage(); + + // Update gameTime and graphicsTime, and corresponding deltas. Note that gameTime and graphicsTime pause, if we aren't getting our GAME_GAME_TIME messages. + gameTimeUpdate(); + + if (deltaGameTime == 0) + { + break; // Not doing a game state update. + } + didTick = true; + + ASSERT(!paused && !gameUpdatePaused() && !editPaused(), "Nonsensical pause values."); + + syncDebug("Begin game state update, gameTime = %d", gameTime); + gameStateUpdate(); + syncDebug("End game state update, gameTime = %d", gameTime); + + ASSERT(deltaGraphicsTime == 0, "Shouldn't update graphics and game state at once."); + } + + if (didTick || realTime - lastFlushTime < 400u) + { + lastFlushTime = realTime; + NETflush(); // Make sure the game time tick message is really sent over the network, and that we aren't waiting too long to send data. + } + + return renderLoop(); +} + /* The video playback loop */ void videoLoop(void) { diff --git a/src/map.cpp b/src/map.cpp index c4868dd92..5af39a1f5 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -871,8 +871,7 @@ bool mapLoad(char *filename, bool preview) } if (!gwNewGateway(x0, y0, x1, y1)) { - debug(LOG_ERROR, "%s: Unable to add gateway", filename); - goto failure; + debug(LOG_ERROR, "%s: Unable to add gateway %d - dropping it", filename, i); } } diff --git a/src/mission.cpp b/src/mission.cpp index e03d7c0f0..f1f273880 100644 --- a/src/mission.cpp +++ b/src/mission.cpp @@ -569,7 +569,7 @@ void addMissionTimerInterface(void) adding the timer button*/ void addTransporterTimerInterface(void) { - DROID *psDroid, *psTransporter; + DROID *psTransporter = NULL; bool bAddInterface = false; W_CLICKFORM *psForm; @@ -577,8 +577,7 @@ void addTransporterTimerInterface(void) if (mission.ETA >= 0) { //check the player has at least one Transporter back at base - psDroid = psTransporter = NULL; - for (psDroid = mission.apsDroidLists[selectedPlayer]; psDroid != + for (DROID *psDroid = mission.apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid = psDroid->psNext) { if (psDroid->droidType == DROID_TRANSPORTER) @@ -587,15 +586,15 @@ void addTransporterTimerInterface(void) break; } } - if (psDroid) + if (psTransporter) { bAddInterface = true; - //check timer is not already on the screen - if (!widgGetFromID(psWScreen, IDTRANTIMER_BUTTON)) - { - intAddTransporterTimer(); - } + //check timer is not already on the screen + if (!widgGetFromID(psWScreen, IDTRANTIMER_BUTTON)) + { + intAddTransporterTimer(); + } //set the data for the transporter timer widgSetUserData(psWScreen, IDTRANTIMER_DISPLAY, (void*)psTransporter); @@ -1023,11 +1022,6 @@ void placeLimboDroids(void) } psDroid->pos.x = (UWORD)world_coord(droidX); psDroid->pos.y = (UWORD)world_coord(droidY); - if (pickRes == HALF_FREE_TILE ) - { - psDroid->pos.x += TILE_UNITS; - psDroid->pos.y += TILE_UNITS; - } ASSERT(worldOnMap(psDroid->pos.x,psDroid->pos.y), "limbo droid is not on the map"); psDroid->pos.z = map_Height(psDroid->pos.x, psDroid->pos.y); updateDroidOrientation(psDroid); @@ -1380,11 +1374,6 @@ static void processMission(void) ASSERT(pickRes != NO_FREE_TILE, "processMission: Unable to find a free location" ); x = (UWORD)world_coord(droidX); y = (UWORD)world_coord(droidY); - if (pickRes == HALF_FREE_TILE ) - { - x += TILE_UNITS; - y += TILE_UNITS; - } droidSetPosition(psDroid, x, y); ASSERT(worldOnMap(psDroid->pos.x,psDroid->pos.y), "the droid is not on the map"); updateDroidOrientation(psDroid); @@ -1677,17 +1666,12 @@ void missionDroidUpdate(DROID *psDroid) // Reset variables in Droids such as order and position static void missionResetDroids(void) { - UDWORD player; - DROID *psDroid, *psNext; - debug(LOG_SAVE, "called"); - for (player = 0; player < MAX_PLAYERS; player++) + for (unsigned int player = 0; player < MAX_PLAYERS; player++) { - for (psDroid = apsDroidLists[player]; psDroid != NULL; psDroid = psNext) + for (DROID *psDroid = apsDroidLists[player]; psDroid != NULL; psDroid = psDroid->psNext) { - psNext = psDroid->psNext; - // Reset order - unless constructor droid that is mid-build if ((psDroid->droidType == DROID_CONSTRUCT || psDroid->droidType == DROID_CYBORG_CONSTRUCT) @@ -1709,12 +1693,10 @@ static void missionResetDroids(void) } } - for (psDroid = apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid = psDroid->psNext) + for (DROID *psDroid = apsDroidLists[selectedPlayer]; psDroid != NULL; psDroid = psDroid->psNext) { bool placed = false; - psNext = psDroid->psNext; - //for all droids that have never left home base if (psDroid->pos.x == INVALID_XY && psDroid->pos.y == INVALID_XY) { @@ -1753,11 +1735,6 @@ static void missionResetDroids(void) int wx = world_coord(x); int wy = world_coord(y); - if (pickRes == HALF_FREE_TILE ) - { - wx += TILE_UNITS; - wy += TILE_UNITS; - } droidSetPosition(psDroid, wx, wy); placed = true; } @@ -1782,11 +1759,6 @@ static void missionResetDroids(void) int wx = world_coord(x); int wy = world_coord(y); - if (pickRes == HALF_FREE_TILE ) - { - wx += TILE_UNITS; - wy += TILE_UNITS; - } droidSetPosition(psDroid, wx, wy); placed = true; } diff --git a/src/move.cpp b/src/move.cpp index b72245f68..8e7d87d6d 100644 --- a/src/move.cpp +++ b/src/move.cpp @@ -1942,8 +1942,9 @@ moveCyborgLaunchAnimDone( ANIM_OBJECT *psObj ) "moveCyborgLaunchAnimDone: invalid cyborg pointer" ); /* raise cyborg a little bit so flying - terrible hack - GJ */ - psDroid->pos.z++; - psDroid->sMove.iVertSpeed = CYBORG_VERTICAL_SPEED; + // Actually, worse than a terrible hack, since it would break synch... + //psDroid->pos.z++; + //psDroid->sMove.iVertSpeed = CYBORG_VERTICAL_SPEED; psDroid->psCurAnim = NULL; } @@ -1957,7 +1958,8 @@ moveCyborgTouchDownAnimDone( ANIM_OBJECT *psObj ) "moveCyborgTouchDownAnimDone: invalid cyborg pointer" ); psDroid->psCurAnim = NULL; - psDroid->pos.z = map_Height( psDroid->pos.x, psDroid->pos.y ); + // See comment in moveCyborgLaunchAnimDone(). + //psDroid->pos.z = map_Height( psDroid->pos.x, psDroid->pos.y ); } diff --git a/src/multiint.cpp b/src/multiint.cpp index dd2f5f0ee..506843f2e 100644 --- a/src/multiint.cpp +++ b/src/multiint.cpp @@ -398,7 +398,7 @@ void loadMapPreview(bool hideInterface) // load the map data ptr = strrchr(aFileName, '/'); - ASSERT(ptr, "this string was supposed to contain a /"); + ASSERT_OR_RETURN(, ptr, "this string was supposed to contain a /"); strcpy(ptr, "/game.map"); if (!mapLoad(aFileName, true)) { diff --git a/src/multimenu.cpp b/src/multimenu.cpp index c19683196..effab4b4c 100644 --- a/src/multimenu.cpp +++ b/src/multimenu.cpp @@ -23,6 +23,7 @@ * Also the selection of disk files.. */ #include "lib/framework/frame.h" +#include "lib/framework/wzapp_c.h" #include "lib/framework/strres.h" #include "lib/widget/button.h" #include "lib/widget/widget.h" @@ -157,6 +158,8 @@ static char const * M_REQUEST_NP_TIPS[] = { N_("2 players"), N_("3 players"), #define R_BUT_W 105//112 #define R_BUT_H 30 +#define HOVER_PREVIEW_TIME 300 + bool multiRequestUp = false; //multimenu is up. static unsigned hoverPreviewId; static bool giftsUp[MAX_PLAYERS] = {true}; //gift buttons for player are up. @@ -667,6 +670,9 @@ static void closeMultiRequester(void) bool runMultiRequester(UDWORD id, UDWORD *mode, char *chosen, UDWORD *chosenValue, bool *isHoverPreview) { + static unsigned hoverId = 0; + static unsigned hoverStartTime = 0; + if( (id == M_REQUEST_CLOSE) || CancelPressed() ) // user hit close box || hit the cancel key { closeMultiRequester(); @@ -678,9 +684,14 @@ bool runMultiRequester(UDWORD id, UDWORD *mode, char *chosen, UDWORD *chosenValu if (id == 0 && context == MULTIOP_MAP) { id = widgGetMouseOver(psRScreen); - if (id == hoverPreviewId) + if (id != hoverId) { - id = 0; // Don't re-render preview. + hoverId = id; + hoverStartTime = wzGetTicks() + HOVER_PREVIEW_TIME; + } + if (id == hoverPreviewId || hoverStartTime > wzGetTicks()) + { + id = 0; // Don't re-render preview nor render preview before HOVER_PREVIEW_TIME. } hoverPreview = true; } diff --git a/src/multiplay.cpp b/src/multiplay.cpp index aae7bee7f..66ea21c33 100644 --- a/src/multiplay.cpp +++ b/src/multiplay.cpp @@ -202,8 +202,6 @@ bool multiPlayerLoop(void) UDWORD i; UBYTE joinCount; - sendCheck(); // send some checking info if possible - joinCount =0; for(i=0;itimeStarted = ACTION_START_TIME; psResFacilty->timeStartHold = 0; } diff --git a/src/multisync.cpp b/src/multisync.cpp index 09a3c7738..9b9cd51ab 100644 --- a/src/multisync.cpp +++ b/src/multisync.cpp @@ -650,7 +650,7 @@ bool recvStructureCheck(NETQUEUE queue) buildStructure(&asStructureStats[j], pS->pos.x, pS->pos.y, pS->player, false); // Check it is finished - if (pS && pS->status != SS_BUILT) + if (pS->status != SS_BUILT) { pS->id = ref; pS->status = SS_BUILT; diff --git a/src/order.cpp b/src/order.cpp index 7501fc748..c5474a797 100644 --- a/src/order.cpp +++ b/src/order.cpp @@ -1103,8 +1103,7 @@ void orderUpdateDroid(DROID *psDroid) psDroid->order = DORDER_NONE; actionDroid(psDroid, DACTION_NONE); } - else if (actionReachedBuildPos(psDroid, psDroid->psTarget->pos.x, psDroid->psTarget->pos.y, - ((STRUCTURE *)psDroid->psTarget)->pStructureType)) + else if (actionReachedBuildPos(psDroid, psDroid->psTarget->pos.x, psDroid->psTarget->pos.y, ((STRUCTURE *)psDroid->psTarget)->rot.direction, ((STRUCTURE *)psDroid->psTarget)->pStructureType)) { recycleDroid(psDroid); } diff --git a/src/qtscript.cpp b/src/qtscript.cpp index 2773ef13f..484e3c500 100644 --- a/src/qtscript.cpp +++ b/src/qtscript.cpp @@ -177,7 +177,8 @@ static QScriptValue js_queue(QScriptContext *context, QScriptEngine *engine) void scriptRemoveObject(const BASE_OBJECT *psObj) { - for (QHash::iterator i = bindings.find(psObj->id); i != bindings.end(); i++) + QHash::iterator i = bindings.find(psObj->id); + while (i != bindings.end() && i.key() == psObj->id) { int id = i.key(); bindNode node = i.value(); @@ -188,7 +189,7 @@ void scriptRemoveObject(const BASE_OBJECT *psObj) args += convMax(psObj, node.engine); callFunction(node.engine, node.funcName, args); } - bindings.erase(i); + i = bindings.erase(i); } } diff --git a/src/qtscriptfuncs.cpp b/src/qtscriptfuncs.cpp index 1e45e9c1c..65849bf91 100644 --- a/src/qtscriptfuncs.cpp +++ b/src/qtscriptfuncs.cpp @@ -62,7 +62,20 @@ QScriptValue convStructure(STRUCTURE *psStruct, QScriptEngine *engine) QScriptValue value = convObj(psStruct, engine); value.setProperty("status", (int)psStruct->status, QScriptValue::ReadOnly); value.setProperty("type", (int)OBJ_STRUCTURE, QScriptValue::ReadOnly); - value.setProperty("stattype", (int)psStruct->pStructureType->type, QScriptValue::ReadOnly); + switch (psStruct->pStructureType->type) // don't bleed our source insanities into the scripting world + { + case REF_WALL: + case REF_WALLCORNER: + case REF_GATE: + value.setProperty("stattype", (int)REF_WALL, QScriptValue::ReadOnly); + break; + case REF_BLASTDOOR: + value.setProperty("stattype", (int)REF_DEFENSE, QScriptValue::ReadOnly); + break; + default: + value.setProperty("stattype", (int)psStruct->pStructureType->type, QScriptValue::ReadOnly); + break; + } return value; } @@ -321,7 +334,7 @@ static QScriptValue js_enumStruct(QScriptContext *context, QScriptEngine *engine static QScriptValue js_enumFeature(QScriptContext *context, QScriptEngine *engine) { QList matches; - int looking = context->argument(1).toInt32(); + int looking = context->argument(0).toInt32(); QString statsName = statsName = context->argument(1).toString(); SCRIPT_ASSERT(context, looking < MAX_PLAYERS && looking >= -1, "Looking player index out of range: %d", looking); for (FEATURE *psFeat = apsFeatureLists[0]; psFeat; psFeat = psFeat->psNext) @@ -501,6 +514,17 @@ static QScriptValue js_structureIdle(QScriptContext *context, QScriptEngine *) return QScriptValue(structureIdle(psStruct)); } +static QScriptValue js_removeStruct(QScriptContext *context, QScriptEngine *) +{ + QScriptValue structVal = context->argument(0); + int id = structVal.property("id").toInt32(); + int player = structVal.property("player").toInt32(); + STRUCTURE *psStruct = IdToStruct(id, player); + SCRIPT_ASSERT(context, psStruct, "No such structure id %d belonging to player %d", id, player); + removeStruct(psStruct, true); + return QScriptValue(); +} + // TODO, should cover scrShowConsoleText, scrAddConsoleText, scrTagConsoleText and scrConsole static QScriptValue js_console(QScriptContext *context, QScriptEngine *engine) { @@ -1041,6 +1065,7 @@ bool registerFunctions(QScriptEngine *engine) engine->globalObject().setProperty("makeComponentAvailable", engine->newFunction(js_makeComponentAvailable)); engine->globalObject().setProperty("enableComponent", engine->newFunction(js_enableComponent)); engine->globalObject().setProperty("allianceExistsBetween", engine->newFunction(js_allianceExistsBetween)); + engine->globalObject().setProperty("removeStruct", engine->newFunction(js_removeStruct)); // Set some useful constants engine->globalObject().setProperty("DORDER_ATTACK", DORDER_ATTACK, QScriptValue::ReadOnly | QScriptValue::Undeletable); @@ -1073,20 +1098,37 @@ bool registerFunctions(QScriptEngine *engine) engine->globalObject().setProperty("BUILT", SS_BUILT, QScriptValue::ReadOnly | QScriptValue::Undeletable); engine->globalObject().setProperty("BEING_DEMOLISHED", SS_BEING_DEMOLISHED, QScriptValue::ReadOnly | QScriptValue::Undeletable); engine->globalObject().setProperty("DROID_CONSTRUCT", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_HQ", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_FACTORY", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_POWER_GEN", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_RESOURCE_EXTRACTOR", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_DEFENSE", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_WALL", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_RESEARCH", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_REPAIR_FACILITY", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_CYBORG_FACTORY", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_VTOL_FACTORY", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_REARM_PAD", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_SAT_UPLINK", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_GATE", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); - engine->globalObject().setProperty("REF_COMMAND_CONTROL", DROID_CONSTRUCT, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("HQ", REF_HQ, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("FACTORY", REF_FACTORY, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("POWER_GEN", REF_POWER_GEN, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("RESOURCE_EXTRACTOR", REF_RESOURCE_EXTRACTOR, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("DEFENSE", REF_DEFENSE, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("WALL", REF_WALL, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("RESEARCH", REF_RESEARCH, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("REPAIR_FACILITY", REF_REPAIR_FACILITY, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("CYBORG_FACTORY", REF_CYBORG_FACTORY, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("VTOL_FACTORY", REF_VTOL_FACTORY, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("REARM_PAD", REF_REARM_PAD, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("SAT_UPLINK", REF_SAT_UPLINK, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("GATE", REF_GATE, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("COMMAND_CONTROL", REF_COMMAND_CONTROL, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("EASY", DIFFICULTY_EASY, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("MEDIUM", DIFFICULTY_MEDIUM, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("HARD", DIFFICULTY_HARD, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("INSANE", DIFFICULTY_INSANE, QScriptValue::ReadOnly | QScriptValue::Undeletable); + + // Static knowledge about players + QScriptValue playerData = engine->newArray(game.maxPlayers); + for (int i = 0; i < game.maxPlayers; i++) + { + QScriptValue vector = engine->newObject(); + vector.setProperty("difficulty", NetPlay.players[i].difficulty, QScriptValue::ReadOnly | QScriptValue::Undeletable); + vector.setProperty("colour", NetPlay.players[i].colour, QScriptValue::ReadOnly | QScriptValue::Undeletable); + vector.setProperty("position", NetPlay.players[i].position, QScriptValue::ReadOnly | QScriptValue::Undeletable); + vector.setProperty("team", NetPlay.players[i].team, QScriptValue::ReadOnly | QScriptValue::Undeletable); + playerData.setProperty(i, vector, QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + engine->globalObject().setProperty("playerData", playerData, QScriptValue::ReadOnly | QScriptValue::Undeletable); // Static map knowledge about start positions QScriptValue startPositions = engine->newArray(game.maxPlayers); @@ -1105,8 +1147,8 @@ bool registerFunctions(QScriptEngine *engine) vector.setProperty("y", map_coord(derricks[i].y), QScriptValue::ReadOnly | QScriptValue::Undeletable); derrickPositions.setProperty(i, vector, QScriptValue::ReadOnly | QScriptValue::Undeletable); } - engine->globalObject().setProperty("startPositions", startPositions, QScriptValue::ReadOnly | QScriptValue::Undeletable); engine->globalObject().setProperty("derrickPositions", derrickPositions, QScriptValue::ReadOnly | QScriptValue::Undeletable); + engine->globalObject().setProperty("startPositions", startPositions, QScriptValue::ReadOnly | QScriptValue::Undeletable); return true; } diff --git a/src/research.cpp b/src/research.cpp index da25342c7..57a9ea1a6 100644 --- a/src/research.cpp +++ b/src/research.cpp @@ -1257,10 +1257,6 @@ void releaseResearch(STRUCTURE *psBuilding, QUEUE_MODE mode) if (psResFac->psSubject && psResFac->timeStartHold) { //adjust the start time for the current subject - if (psResFac->timeStarted != ACTION_START_TIME) - { - psResFac->timeStarted += (gameTime - psResFac->timeStartHold); - } psResFac->timeStartHold = 0; } } @@ -1322,16 +1318,13 @@ void cancelResearch(STRUCTURE *psBuilding, QUEUE_MODE mode) } //check if waiting to accrue power - if (psResFac->timeStarted == ACTION_START_TIME) + if (pPlayerRes->currentPoints == 0) { // Reset this topic as not having been researched ResetResearchStatus(pPlayerRes); } else { - /* store the points - need to keep this so can add points after the topic has been cancelled and restarted */ - pPlayerRes->currentPoints += (psResFac->researchPoints * (gameTime - psResFac->timeStarted)) / GAME_TICKS_PER_SEC; - // Set the researched flag MakeResearchCancelled(pPlayerRes); } @@ -1842,11 +1835,10 @@ bool enableResearch(RESEARCH *psResearch, UDWORD player) 'give' the results to the reward player*/ void researchReward(UBYTE losingPlayer, UBYTE rewardPlayer) { - UDWORD topicIndex, researchPoints, rewardID; + UDWORD topicIndex = 0, researchPoints = 0, rewardID = 0; STRUCTURE *psStruct; RESEARCH_FACILITY *psFacility; - topicIndex = researchPoints = rewardID = 0; //look through the losing players structures to find a research facility for (psStruct = apsStructLists[losingPlayer]; psStruct != NULL; psStruct = psStruct->psNext) diff --git a/src/scriptai.cpp b/src/scriptai.cpp index ff0386365..5c7f3fe59 100644 --- a/src/scriptai.cpp +++ b/src/scriptai.cpp @@ -1169,7 +1169,6 @@ static BASE_OBJECT *scrTargetInArea(SDWORD tarPlayer, SDWORD visPlayer, SDWORD t { BASE_OBJECT *psTarget, *psCurr; SDWORD temp; - bool bVisCheck; UDWORD tarMask; TARGET_MASK getTargetMask; TARGET_PREF targetPriority; @@ -1195,17 +1194,6 @@ static BASE_OBJECT *scrTargetInArea(SDWORD tarPlayer, SDWORD visPlayer, SDWORD t y1 = temp; } - // see if a visibility check is required and for which player - if (visPlayer < 0 || visPlayer >= MAX_PLAYERS) - { - bVisCheck = false; - } - else - { - bVisCheck = true; - } - bVisCheck = false; - // see which target type to use switch (tarType) { @@ -1231,8 +1219,7 @@ static BASE_OBJECT *scrTargetInArea(SDWORD tarPlayer, SDWORD visPlayer, SDWORD t psTarget = NULL; for(; psCurr; psCurr=psCurr->psNext) { - if ((!bVisCheck || psCurr->visible[visPlayer]) && - (cluster == 0 || psCurr->cluster == cluster) && + if ((cluster == 0 || psCurr->cluster == cluster) && ((SDWORD)psCurr->pos.x >= x1) && ((SDWORD)psCurr->pos.x <= x2) && ((SDWORD)psCurr->pos.y >= y1) && diff --git a/src/scriptfuncs.cpp b/src/scriptfuncs.cpp index 659011488..195be641d 100644 --- a/src/scriptfuncs.cpp +++ b/src/scriptfuncs.cpp @@ -3391,22 +3391,14 @@ bool scrAnyStructButWallsLeft(void) } //check the players list for any structures - structuresLeft = true; - if (apsStructLists[player] == NULL) + structuresLeft = false; + for (psCurr = apsStructLists[player]; psCurr != NULL; psCurr = psCurr->psNext) { - structuresLeft = false; - } - else - { - structuresLeft = false; - for (psCurr = apsStructLists[player]; psCurr != NULL; psCurr = psCurr->psNext) - { - if (psCurr->pStructureType->type != REF_WALL && psCurr->pStructureType-> + if (psCurr->pStructureType->type != REF_WALL && psCurr->pStructureType-> type != REF_WALLCORNER) - { - structuresLeft = true; - break; - } + { + structuresLeft = true; + break; } } @@ -7327,7 +7319,6 @@ bool scrNumResearchLeft(void) top = -1; cur = 0; //start with first index's PR - tempIndex = -1; while(true) //do { if (cur >= asResearch[index].pPRList.size()) //this one has no PRs or end of PRs reached @@ -9808,7 +9799,6 @@ bool scrPursueResearch(void) top = -1; cur = 0; //start with first index's PR - tempIndex = -1; while(true) //do { //DbgMsg("Going on with %d, numPR: %d, %s", index, asResearch[index].pPRList.size(), asResearch[index].pName); diff --git a/src/scriptobj.cpp b/src/scriptobj.cpp index 36c4d921b..e5a08472e 100644 --- a/src/scriptobj.cpp +++ b/src/scriptobj.cpp @@ -777,9 +777,10 @@ bool scrValDefSave(INTERP_VAL *psVal, WzConfig &ini) break; case ST_RESEARCH: psResearch = (RESEARCH *)psVal->v.oval; - if (psResearch) + if (psResearch && psResearch->pName[0] != '\0') { ini.setValue("data", QString(psResearch->pName)); + ASSERT(psResearch == getResearch(psResearch->pName), "Research %s not found!", psResearch->pName); } break; case ST_GROUP: @@ -1005,10 +1006,11 @@ bool scrValDefLoad(INTERP_VAL *psVal, WzConfig &ini) psVal->v.oval = NULL; if (ini.contains("data")) { - psVal->v.oval = (void*)getResearch(ini.value("data").toString().toAscii().constData()); - if (psVal->v.oval == NULL) + QString research = ini.value("data").toString(); + if (!research.isEmpty()) { - debug(LOG_FATAL, "Could not find research"); + psVal->v.oval = (void*)getResearch(research.toUtf8().constData()); + ASSERT_OR_RETURN(false, psVal->v.oval, "Could not find research %s", research.toUtf8().constData()); } } break; diff --git a/src/seqdisp.cpp b/src/seqdisp.cpp index 9793ffd42..24903f8bc 100644 --- a/src/seqdisp.cpp +++ b/src/seqdisp.cpp @@ -72,8 +72,8 @@ struct SEQTEXT char pText[MAX_STR_LENGTH]; UDWORD x; UDWORD y; - UDWORD startFrame; - UDWORD endFrame; + double startTime; + double endTime; bool bSubtitle; }; @@ -281,7 +281,7 @@ bool seq_UpdateFullScreenVideo(int *pbClear) unsigned int subMax = SUBTITLE_BOX_MIN + D_H2; //get any text lines over bottom of the video - unsigned int realFrame = seq_GetFrameNumber(); + double realTime = seq_GetFrameTime(); for (i = 0; i < MAX_TEXT_OVERLAYS; i++) { SEQTEXT seqtext = aSeqList[currentPlaySeq].aText[i]; @@ -289,7 +289,7 @@ bool seq_UpdateFullScreenVideo(int *pbClear) { if (seqtext.bSubtitle) { - if (((realFrame >= seqtext.startFrame) && (realFrame <= seqtext.endFrame)) || + if (((realTime >= seqtext.startTime) && (realTime <= seqtext.endTime)) || aSeqList[currentPlaySeq].bSeqLoop) //if its a looped video always draw the text { if (subMin > seqtext.y && seqtext.y > SUBTITLE_BOX_MIN) @@ -303,7 +303,7 @@ bool seq_UpdateFullScreenVideo(int *pbClear) } } - if (realFrame >= seqtext.endFrame && realFrame < seqtext.endFrame) + if (realTime >= seqtext.endTime && realTime < seqtext.endTime) { if (pbClear != NULL) { @@ -333,14 +333,14 @@ bool seq_UpdateFullScreenVideo(int *pbClear) //call sequence player to download last frame stillPlaying = seq_Update(); //print any text over the video - realFrame = seq_GetFrameNumber();//textFrame + 1; + realTime = seq_GetFrameTime(); for (i = 0; i < MAX_TEXT_OVERLAYS; i++) { SEQTEXT currentText = aSeqList[currentPlaySeq].aText[i]; if (currentText.pText[0] != '\0') { - if (((realFrame >= currentText.startFrame) && (realFrame <= currentText.endFrame)) || + if (((realTime >= currentText.startTime) && (realTime <= currentText.endTime)) || (aSeqList[currentPlaySeq].bSeqLoop)) //if its a looped video always draw the text { if (bMoreThanOneSequenceLine) @@ -399,7 +399,7 @@ bool seq_StopFullScreenVideo(void) } // add a string at x,y or add string below last line if x and y are 0 -bool seq_AddTextForVideo(const char* pText, SDWORD xOffset, SDWORD yOffset, SDWORD startFrame, SDWORD endFrame, SEQ_TEXT_POSITIONING textJustification) +bool seq_AddTextForVideo(const char* pText, SDWORD xOffset, SDWORD yOffset, double startTime, double endTime, SEQ_TEXT_POSITIONING textJustification) { SDWORD sourceLength, currentLength; char* currentText; @@ -476,8 +476,8 @@ bool seq_AddTextForVideo(const char* pText, SDWORD xOffset, SDWORD yOffset, SDWO } //set start and finish times for the objects - aSeqList[currentSeq].aText[aSeqList[currentSeq].currentText].startFrame = startFrame; - aSeqList[currentSeq].aText[aSeqList[currentSeq].currentText].endFrame = endFrame; + aSeqList[currentSeq].aText[aSeqList[currentSeq].currentText].startTime = startTime; + aSeqList[currentSeq].aText[aSeqList[currentSeq].currentText].endTime = endTime; aSeqList[currentSeq].aText[aSeqList[currentSeq].currentText].bSubtitle = textJustification; aSeqList[currentSeq].currentText++; @@ -494,7 +494,7 @@ bool seq_AddTextForVideo(const char* pText, SDWORD xOffset, SDWORD yOffset, SDWO { textJustification = SEQ_TEXT_POSITION; } - seq_AddTextForVideo(&pText[currentLength + 1], 0, 0, startFrame, endFrame, textJustification); + seq_AddTextForVideo(&pText[currentLength + 1], 0, 0, startTime, endTime, textJustification); } return true; } @@ -505,7 +505,8 @@ static bool seq_AddTextFromFile(const char *pTextName, SEQ_TEXT_POSITIONING text char aTextName[MAX_STR_LENGTH]; char *pTextBuffer, *pCurrentLine, *pText; UDWORD fileSize; - SDWORD xOffset, yOffset, startFrame, endFrame; + SDWORD xOffset, yOffset; + double startTime, endTime; const char *seps = "\n"; // NOTE: The original game never had a fullscreen mode for FMVs on >640x480 screens. @@ -527,7 +528,7 @@ static bool seq_AddTextFromFile(const char *pTextName, SEQ_TEXT_POSITIONING text { if (*pCurrentLine != '/') { - if (sscanf(pCurrentLine,"%d %d %d %d", &xOffset, &yOffset, &startFrame, &endFrame) == 4) + if (sscanf(pCurrentLine,"%d %d %lf %lf", &xOffset, &yOffset, &startTime, &endTime) == 4) { // Since all the positioning was hardcoded to specific values, we now calculate the // ratio of our screen, compared to what the game expects and multiply that to x, y. @@ -545,7 +546,7 @@ static bool seq_AddTextFromFile(const char *pTextName, SEQ_TEXT_POSITIONING text ASSERT(pText != NULL, "error parsing text file"); if (pText != NULL) { - seq_AddTextForVideo(_(&pText[1]), xOffset, yOffset, startFrame, endFrame, textJustification); + seq_AddTextForVideo(_(&pText[1]), xOffset, yOffset, startTime, endTime, textJustification); } } } diff --git a/src/seqdisp.h b/src/seqdisp.h index cdc5e53ac..177532dc4 100644 --- a/src/seqdisp.h +++ b/src/seqdisp.h @@ -76,7 +76,7 @@ extern bool seq_StopFullScreenVideo(void); //control extern bool seq_GetVideoSize(SDWORD* pWidth, SDWORD* pHeight); //text -extern bool seq_AddTextForVideo(const char* pText, SDWORD xOffset, SDWORD yOffset, SDWORD startTime, SDWORD endTime, SEQ_TEXT_POSITIONING textJustification); +extern bool seq_AddTextForVideo(const char* pText, SDWORD xOffset, SDWORD yOffset, double startTime, double endTime, SEQ_TEXT_POSITIONING textJustification); //clear the sequence list extern void seq_ClearSeqList(void); //add a sequence to the list to be played diff --git a/src/structure.cpp b/src/structure.cpp index c65f0f887..c77e134fa 100644 --- a/src/structure.cpp +++ b/src/structure.cpp @@ -2565,7 +2565,6 @@ static void aiUpdateStructure(STRUCTURE *psStructure, bool isMission) DROID *psDroid; BASE_OBJECT *psChosenObjs[STRUCT_MAXWEAPS] = {NULL}; BASE_OBJECT *psChosenObj = NULL; - SDWORD iDt; FACTORY *psFactory; REPAIR_FACILITY *psRepairFac = NULL; RESEARCH_FACILITY *psResFacility; @@ -2960,9 +2959,6 @@ static void aiUpdateStructure(STRUCTURE *psStructure, bool isMission) /* reset repair started if we were previously repairing something else */ if (psRepairFac->psObj != psDroid) { - psRepairFac->timeStarted = ACTION_START_TIME; - psRepairFac->currentPtsAdded = 0; - psRepairFac->psObj = psDroid; } } @@ -3093,18 +3089,9 @@ static void aiUpdateStructure(STRUCTURE *psStructure, bool isMission) { pResearch = (RESEARCH *)pSubject; - if (psResFacility->timeStarted == ACTION_START_TIME) - { - //set the time started - psResFacility->timeStarted = gameTime; - } - - ASSERT_OR_RETURN(, gameTime >= psResFacility->timeStarted, "research seems to have started in the future"); pointsToAdd = gameTimeAdjustedAverage(psResFacility->researchPoints); pointsToAdd = MIN(pointsToAdd, pResearch->researchPoints - pPlayerRes->currentPoints); - psResFacility->timeStarted = gameTime; - if (pointsToAdd > 0 && pPlayerRes->currentPoints == 0) { bool haveEnoughPower = requestPowerFor(psStructure, pResearch->researchPower); @@ -3307,29 +3294,9 @@ static void aiUpdateStructure(STRUCTURE *psStructure, bool isMission) } } - if (psRepairFac->timeStarted == ACTION_START_TIME) - { - //set the time started - psRepairFac->timeStarted = gameTime; - //reset the points added - psRepairFac->currentPtsAdded = 0; - } // FIXME: duplicate code, make repairing cost power again /* do repairing */ - iDt = gameTime - psRepairFac->timeStarted; - //- this was a bit exponential ... - pointsToAdd = (iDt * psRepairFac->power / GAME_TICKS_PER_SEC) - - psRepairFac->currentPtsAdded; - - // do some repair - if (!pointsToAdd) - { - // We need to at least repair SOMETHING - pointsToAdd = 1; - } - // just add the points; these are integers, not floats - psDroid->body += pointsToAdd; - psRepairFac->currentPtsAdded += pointsToAdd; + psDroid->body += gameTimeAdjustedAverage(psRepairFac->power); } if (psDroid->body >= psDroid->originalBody) @@ -4772,14 +4739,12 @@ bool destroyStruct(STRUCTURE *psDel) /* Firstly, are we dealing with a wall section */ bMinor = psDel->pStructureType->type == REF_WALL || psDel->pStructureType->type == REF_WALLCORNER; -//--------------------------------------- /* Only add if visible */ if(psDel->visible[selectedPlayer]) { Vector3i pos; int i; -//--------------------------------------- Do we add immediate explosions? /* Set off some explosions, but not for walls */ /* First Explosions */ widthScatter = TILE_UNITS; @@ -4798,7 +4763,6 @@ bool destroyStruct(STRUCTURE *psDel) pos.z = psDel->pos.y; // z = y [sic] intentional pos.y = map_Height(pos.x, pos.z); -//--------------------------------------- Do we add a fire? // Set off a fire, provide dimensions for the fire if(bMinor) { @@ -4828,7 +4792,6 @@ bool destroyStruct(STRUCTURE *psDel) addEffect(&pos,EFFECT_FIRE,FIRE_TYPE_LOCALISED,false,NULL,0); } -//--------------------------------------- Do we add a destruction seq, and if so, which? /* Power stations have their own desctruction sequence */ if(psDel->pStructureType->type == REF_POWER_GEN) { @@ -4846,18 +4809,15 @@ bool destroyStruct(STRUCTURE *psDel) addEffect(&pos,EFFECT_DESTRUCTION,DESTRUCTION_TYPE_STRUCTURE,false,NULL,0); } -//--------------------------------------- Start an earthquake...! /* shake the screen if we're near enough */ if(clipXY(pos.x,pos.z)) { shakeStart(); } -//--------------------------------------- And finally, add a boom sound!!!! /* and add a sound effect */ audio_PlayStaticTrack( psDel->pos.x, psDel->pos.y, ID_SOUND_EXPLOSION ); } -//--------------------------------------------------------------------------------------- // Actually set the tiles on fire - even if the effect is not visible. if (bMinor) // walls @@ -4874,38 +4834,21 @@ bool destroyStruct(STRUCTURE *psDel) tileSetFire(psDel->pos.x, psDel->pos.y, burnDurationOther); } - // Power generators give back their power when destroyed. - if (psDel->pStructureType->type == REF_POWER_GEN) - { - // Give some power back to the player, whether or not the power generator is visible. - addPower(psDel->player, structPowerToBuild(psDel)); - // If it had a module attached, need to add the power for the base struct as well, whether or not the power generator is visible. - if (psDel->pFunctionality->powerGenerator.capacity) - { - addPower(psDel->player, psDel->pStructureType->powerToBuild); - } - } - resourceFound = removeStruct(psDel, true); - //once a struct is destroyed - it leaves a wrecked struct FEATURE in its place - // Wall's don't leave wrecked features - if(psDel->visible[selectedPlayer]) + // Leave burn marks in the ground where building once stood + if (psDel->visible[selectedPlayer] && !resourceFound && !bMinor) { - if (!resourceFound && !(psDel->pStructureType->type == REF_WALL) && - !(psDel->pStructureType->type == REF_WALLCORNER)) + const Vector2i size = getStructureSize(psDel); + const Vector2i map = map_coord(removeZ(psDel->pos)) - size / 2; + for (int width = 0; width < size.x; width++) { - Vector2i size = getStructureSize(psDel); - Vector2i map = map_coord(removeZ(psDel->pos)) - size/2; - for (int width = 0; width < size.x; width++) + for (int breadth = 0; breadth < size.y; breadth++) { - for (int breadth = 0; breadth < size.y; breadth++) + MAPTILE *psTile = mapTile(map.x + width, map.y + breadth); + if (TEST_TILE_VISIBLE(selectedPlayer, psTile)) { - MAPTILE *psTile = mapTile(map.x + width, map.y + breadth); - if(TEST_TILE_VISIBLE(selectedPlayer,psTile)) - { - psTile->illumination /= 2; - } + psTile->illumination /= 2; } } } @@ -5647,6 +5590,7 @@ void buildingComplete(STRUCTURE *psBuilding) break; case REF_SAT_UPLINK: revealAll(psBuilding->player); + break; case REF_GATE: auxStructureNonblocking(psBuilding); // Clear outdated flags. auxStructureClosedGate(psBuilding); // Don't block for the sake of allied pathfinding. @@ -6643,11 +6587,9 @@ void holdProduction(STRUCTURE *psBuilding, QUEUE_MODE mode) /*release a factory's production run from hold*/ void releaseProduction(STRUCTURE *psBuilding, QUEUE_MODE mode) { - FACTORY *psFactory = &psBuilding->pFunctionality->factory; - ASSERT_OR_RETURN( , StructIsFactory(psBuilding), "structure not a factory"); - psFactory = &psBuilding->pFunctionality->factory; + FACTORY *psFactory = &psBuilding->pFunctionality->factory; if (mode == ModeQueue) { @@ -7307,8 +7249,6 @@ STRUCTURE * giftSingleStructure(STRUCTURE *psStructure, UBYTE attackPlayer, bool //certain structures give specific results - the rest swap sides! if (!electronicReward(psStructure, attackPlayer)) { - originalPlayer = psStructure->player; - //tell the system the structure no longer exists (void)removeStruct(psStructure, false); @@ -7599,11 +7539,12 @@ void resetResistanceLag(STRUCTURE *psBuilding) //if working on a topic if (psResFacility->psSubject) { + // What was this code intended to do? //adjust the start time for the current subject - if (psResFacility->timeStarted != ACTION_START_TIME) - { - psResFacility->timeStarted += (gameTime - psBuilding->lastResistance); - } + //if (psResFacility->timeStarted != ACTION_START_TIME) + //{ + // psResFacility->timeStarted += (gameTime - psBuilding->lastResistance); + //} } } case REF_FACTORY: diff --git a/src/structuredef.h b/src/structuredef.h index 8571bea7f..0a8886e94 100644 --- a/src/structuredef.h +++ b/src/structuredef.h @@ -167,7 +167,6 @@ struct RESEARCH_FACILITY StatusPending statusPending; ///< Pending = not yet synchronised. unsigned pendingCount; ///< Number of messages sent but not yet processed. UDWORD capacity; /* Number of upgrade modules added*/ - UDWORD timeStarted; /* The time the building started on the subject*/ UDWORD researchPoints; /* Research Points produced per research cycle*/ RESEARCH * psBestTopic; // The topic with the most research points that was last performed UDWORD timeStartHold; /* The time the research facility was put on hold*/ @@ -189,7 +188,6 @@ struct FACTORY unsigned pendingCount; ///< Number of messages sent but not yet processed. UDWORD timeStarted; /* The time the building started on the subject*/ - //UDWORD timeToBuild; /* Time taken to build one droid */ int buildPointsRemaining; ///< Build points required to finish building the droid. UDWORD timeStartHold; /* The time the factory was put on hold*/ FLAG_POSITION *psAssemblyPoint; /* Place for the new droids to assemble at */ @@ -214,11 +212,9 @@ class DROID_GROUP; struct REPAIR_FACILITY { - UDWORD power; /* Power used in repairing */ - UDWORD timeStarted; /* Time repair started on current object */ + UDWORD power; // Repair rate. Nothing to do with power. BASE_OBJECT *psObj; /* Object being repaired */ FLAG_POSITION *psDeliveryPoint; /* Place for the repaired droids to assemble at */ - UDWORD currentPtsAdded; /* stores the amount of body points added to the unit that is being worked on */ // The group the droids to be repaired by this facility belong to DROID_GROUP * psGroup; diff --git a/src/texture.cpp b/src/texture.cpp index 3b11656a9..6fe750c66 100644 --- a/src/texture.cpp +++ b/src/texture.cpp @@ -171,7 +171,6 @@ bool texLoad(const char *fileName) abort(); // cannot recover; we could possibly generate a random palette? } i = 0; // tile - k = 0; // number of values read j = 0; // place in buffer do { unsigned int r, g, b; diff --git a/src/transporter.cpp b/src/transporter.cpp index f295f5db8..1b865f54d 100644 --- a/src/transporter.cpp +++ b/src/transporter.cpp @@ -1595,15 +1595,8 @@ bool launchTransporter(DROID *psTransporter) have arrived - returns true when there*/ bool updateTransporter(DROID *psTransporter) { - ASSERT( psTransporter != NULL, - "updateTransporter: Invalid droid pointer" ); - - - if (psTransporter->droidType != DROID_TRANSPORTER) - { - ASSERT( false, "updateTransporter: Invalid droid type" ); - return true; - } + ASSERT_OR_RETURN(true, psTransporter != NULL, "Invalid droid pointer"); + ASSERT_OR_RETURN(true, psTransporter->droidType == DROID_TRANSPORTER, "Invalid droid type"); //if not moving to mission site, exit if ( psTransporter->action != DACTION_TRANSPORTOUT && diff --git a/src/visibility.cpp b/src/visibility.cpp index 6f44fec43..2cd92a6d5 100644 --- a/src/visibility.cpp +++ b/src/visibility.cpp @@ -52,11 +52,8 @@ #define GRAD_MUL 10000 // rate to change visibility level -static const float VIS_LEVEL_INC = 255 * 2; -static const float VIS_LEVEL_DEC = 50; - -// fractional accumulator of how much to change visibility this frame -static float visLevelIncAcc, visLevelDecAcc; +static const int VIS_LEVEL_INC = 255 * 2; +static const int VIS_LEVEL_DEC = 50; // integer amount to change visiblility this turn static SDWORD visLevelInc, visLevelDec; @@ -73,8 +70,6 @@ static Vector2i *gWall = NULL; // initialise the visibility stuff bool visInitialise(void) { - visLevelIncAcc = 0; - visLevelDecAcc = 0; visLevelInc = 0; visLevelDec = 0; @@ -84,12 +79,8 @@ bool visInitialise(void) // update the visibility change levels void visUpdateLevel(void) { - visLevelIncAcc += gameTimeAdjustedIncrement(VIS_LEVEL_INC); - visLevelInc = visLevelIncAcc; - visLevelIncAcc -= visLevelInc; - visLevelDecAcc += gameTimeAdjustedIncrement(VIS_LEVEL_DEC); - visLevelDec = visLevelDecAcc; - visLevelDecAcc -= visLevelDec; + visLevelInc = gameTimeAdjustedAverage(VIS_LEVEL_INC); + visLevelDec = gameTimeAdjustedAverage(VIS_LEVEL_DEC); } static inline void updateTileVis(MAPTILE *psTile) diff --git a/tools/map/.gitignore b/tools/map/.gitignore new file mode 100644 index 000000000..11b964ffe --- /dev/null +++ b/tools/map/.gitignore @@ -0,0 +1,3 @@ +#Mac Stuff +build/ +Build/ diff --git a/tools/map/MapUtilities.xcodeproj/project.pbxproj b/tools/map/MapUtilities.xcodeproj/project.pbxproj new file mode 100644 index 000000000..c365f2bf5 --- /dev/null +++ b/tools/map/MapUtilities.xcodeproj/project.pbxproj @@ -0,0 +1,1056 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXAggregateTarget section */ + 438C9613149BDA19001BAF3A /* All Tools */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 438C9621149BDA42001BAF3A /* Build configuration list for PBXAggregateTarget "All Tools" */; + buildPhases = ( + ); + dependencies = ( + 438C9618149BDA31001BAF3A /* PBXTargetDependency */, + 438C961A149BDA31001BAF3A /* PBXTargetDependency */, + 438C961C149BDA31001BAF3A /* PBXTargetDependency */, + 438C961E149BDA31001BAF3A /* PBXTargetDependency */, + 438C9620149BDA31001BAF3A /* PBXTargetDependency */, + ); + name = "All Tools"; + productName = "All Tools"; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 438C95A7149BD3A0001BAF3A /* map2png.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C959C149BD34E001BAF3A /* map2png.cpp */; }; + 438C95A8149BD3A2001BAF3A /* maplib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A0149BD34E001BAF3A /* maplib.cpp */; }; + 438C95A9149BD3A3001BAF3A /* mapload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A2149BD34E001BAF3A /* mapload.cpp */; }; + 438C95AA149BD3A5001BAF3A /* pngsave.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A4149BD34E001BAF3A /* pngsave.cpp */; }; + 438C95BC149BD3F2001BAF3A /* mapconv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C959E149BD34E001BAF3A /* mapconv.cpp */; }; + 438C95BD149BD3F5001BAF3A /* maplib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A0149BD34E001BAF3A /* maplib.cpp */; }; + 438C95BE149BD3F5001BAF3A /* mapload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A2149BD34E001BAF3A /* mapload.cpp */; }; + 438C95BF149BD3F6001BAF3A /* pngsave.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A4149BD34E001BAF3A /* pngsave.cpp */; }; + 438C95C0149BD407001BAF3A /* mapinfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C959F149BD34E001BAF3A /* mapinfo.cpp */; }; + 438C95C1149BD408001BAF3A /* maplib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A0149BD34E001BAF3A /* maplib.cpp */; }; + 438C95C2149BD409001BAF3A /* mapload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A2149BD34E001BAF3A /* mapload.cpp */; }; + 438C95C3149BD420001BAF3A /* map2lnd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C959B149BD34E001BAF3A /* map2lnd.cpp */; }; + 438C95C4149BD422001BAF3A /* maplib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A0149BD34E001BAF3A /* maplib.cpp */; }; + 438C95C5149BD423001BAF3A /* mapload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A2149BD34E001BAF3A /* mapload.cpp */; }; + 438C95C6149BD449001BAF3A /* map2preview.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C959D149BD34E001BAF3A /* map2preview.cpp */; }; + 438C95C7149BD44B001BAF3A /* maplib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A0149BD34E001BAF3A /* maplib.cpp */; }; + 438C95C8149BD44C001BAF3A /* mapload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A2149BD34E001BAF3A /* mapload.cpp */; }; + 438C95C9149BD44D001BAF3A /* pngsave.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438C95A4149BD34E001BAF3A /* pngsave.cpp */; }; + 438C95E9149BD62C001BAF3A /* Png.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 438C9582149BD2ED001BAF3A /* Png.framework */; }; + 438C95EA149BD62C001BAF3A /* PhysFS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 438C9584149BD2ED001BAF3A /* PhysFS.framework */; }; + 438C95ED149BD660001BAF3A /* Png.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 438C9582149BD2ED001BAF3A /* Png.framework */; }; + 438C95EE149BD660001BAF3A /* PhysFS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 438C9584149BD2ED001BAF3A /* PhysFS.framework */; }; + 438C95F3149BD683001BAF3A /* PhysFS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 438C9584149BD2ED001BAF3A /* PhysFS.framework */; }; + 438C95F6149BD6B9001BAF3A /* PhysFS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 438C9584149BD2ED001BAF3A /* PhysFS.framework */; }; + 438C95F7149BD6C4001BAF3A /* Png.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 438C9582149BD2ED001BAF3A /* Png.framework */; }; + 438C95F8149BD6C4001BAF3A /* PhysFS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 438C9584149BD2ED001BAF3A /* PhysFS.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 438C9577149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 02356D750BD3BB3400E9A019 /* Warzone.app */; + remoteInfo = Warzone; + }; + 438C9579149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4318434B1363942200BA2BC5 /* MiniUPnPc.framework */; + remoteInfo = MiniUPnPc; + }; + 438C957B149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 43502D521347640700A02A1F /* GLExtensionWrangler.framework */; + remoteInfo = GLExtensionWrangler; + }; + 438C957D149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 02356D830BD3BB4100E9A019 /* Zlib.framework */; + remoteInfo = Zlib; + }; + 438C957F149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 02356E090BD3BCFE00E9A019 /* Ogg.framework */; + remoteInfo = Ogg; + }; + 438C9581149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 02356DC20BD3BBFC00E9A019 /* Png.framework */; + remoteInfo = Png; + }; + 438C9583149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 02DDA8B10BD3C2F20049AB60 /* PhysFS.framework */; + remoteInfo = PhysFS; + }; + 438C9585149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 02DDA7EE0BD3C03F0049AB60 /* Vorbis.framework */; + remoteInfo = Vorbis; + }; + 438C9587149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 022B2F220BD55814002E64E3 /* Gettext.framework */; + remoteInfo = Gettext; + }; + 438C9589149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 97AEAB330E8C1B5200A10721 /* Theora.framework */; + remoteInfo = Theora; + }; + 438C958B149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 43AA702A13C7FC640015B52B /* QJson.framework */; + remoteInfo = QJson; + }; + 438C958D149BD2ED001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4366718213D1FD5600FE85BA /* QuesoGLC.framework */; + remoteInfo = QuesoGLC; + }; + 438C95E5149BD60B001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 02356DC10BD3BBFC00E9A019 /* Png */; + remoteInfo = Png; + }; + 438C95E7149BD60B001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 02DDA8B00BD3C2F20049AB60 /* PhysFS */; + remoteInfo = PhysFS; + }; + 438C95EF149BD669001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 02356DC10BD3BBFC00E9A019 /* Png */; + remoteInfo = Png; + }; + 438C95F1149BD669001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 02DDA8B00BD3C2F20049AB60 /* PhysFS */; + remoteInfo = PhysFS; + }; + 438C95F4149BD698001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 02DDA8B00BD3C2F20049AB60 /* PhysFS */; + remoteInfo = PhysFS; + }; + 438C95F9149BD6D3001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 02DDA8B00BD3C2F20049AB60 /* PhysFS */; + remoteInfo = PhysFS; + }; + 438C95FB149BD6E2001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 02356DC10BD3BBFC00E9A019 /* Png */; + remoteInfo = Png; + }; + 438C95FD149BD6E2001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 02DDA8B00BD3C2F20049AB60 /* PhysFS */; + remoteInfo = PhysFS; + }; + 438C9617149BDA31001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94C9149BD084001BAF3A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 438C94E3149BD19D001BAF3A /* map2png */; + remoteInfo = map2png; + }; + 438C9619149BDA31001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94C9149BD084001BAF3A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 438C952C149BD22C001BAF3A /* mapconv */; + remoteInfo = mapconv; + }; + 438C961B149BDA31001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94C9149BD084001BAF3A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 438C953C149BD26C001BAF3A /* mapinfo */; + remoteInfo = mapinfo; + }; + 438C961D149BDA31001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94C9149BD084001BAF3A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 438C9544149BD280001BAF3A /* map2lnd */; + remoteInfo = map2lnd; + }; + 438C961F149BDA31001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94C9149BD084001BAF3A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 438C954C149BD290001BAF3A /* map2preview */; + remoteInfo = map2preview; + }; + 438C9627149BDCE7001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 43FA570C10FF8E9B0074E914 /* Setup Prebuilt Components */; + remoteInfo = "Setup Prebuilt Components"; + }; + 438C9629149BDCFF001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 43FA570C10FF8E9B0074E914 /* Setup Prebuilt Components */; + remoteInfo = "Setup Prebuilt Components"; + }; + 438C962B149BDD16001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 43FA570C10FF8E9B0074E914 /* Setup Prebuilt Components */; + remoteInfo = "Setup Prebuilt Components"; + }; + 438C962D149BDD21001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 43FA570C10FF8E9B0074E914 /* Setup Prebuilt Components */; + remoteInfo = "Setup Prebuilt Components"; + }; + 438C962F149BDD2D001BAF3A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 43FA570C10FF8E9B0074E914 /* Setup Prebuilt Components */; + remoteInfo = "Setup Prebuilt Components"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 438C94E4149BD19D001BAF3A /* map2png */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = map2png; sourceTree = BUILT_PRODUCTS_DIR; }; + 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Warzone.xcodeproj; path = ../../macosx/Warzone.xcodeproj; sourceTree = SOURCE_ROOT; }; + 438C9532149BD22C001BAF3A /* mapconv */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mapconv; sourceTree = BUILT_PRODUCTS_DIR; }; + 438C9542149BD26C001BAF3A /* mapinfo */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mapinfo; sourceTree = BUILT_PRODUCTS_DIR; }; + 438C954A149BD280001BAF3A /* map2lnd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = map2lnd; sourceTree = BUILT_PRODUCTS_DIR; }; + 438C9552149BD290001BAF3A /* map2preview */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = map2preview; sourceTree = BUILT_PRODUCTS_DIR; }; + 438C959B149BD34E001BAF3A /* map2lnd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = map2lnd.cpp; sourceTree = SOURCE_ROOT; }; + 438C959C149BD34E001BAF3A /* map2png.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = map2png.cpp; sourceTree = SOURCE_ROOT; }; + 438C959D149BD34E001BAF3A /* map2preview.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = map2preview.cpp; sourceTree = SOURCE_ROOT; }; + 438C959E149BD34E001BAF3A /* mapconv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mapconv.cpp; sourceTree = SOURCE_ROOT; }; + 438C959F149BD34E001BAF3A /* mapinfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mapinfo.cpp; sourceTree = SOURCE_ROOT; }; + 438C95A0149BD34E001BAF3A /* maplib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maplib.cpp; sourceTree = SOURCE_ROOT; }; + 438C95A1149BD34E001BAF3A /* maplib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maplib.h; sourceTree = SOURCE_ROOT; }; + 438C95A2149BD34E001BAF3A /* mapload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mapload.cpp; sourceTree = SOURCE_ROOT; }; + 438C95A3149BD34E001BAF3A /* mapload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mapload.h; sourceTree = SOURCE_ROOT; }; + 438C95A4149BD34E001BAF3A /* pngsave.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pngsave.cpp; sourceTree = SOURCE_ROOT; }; + 438C95A5149BD34E001BAF3A /* pngsave.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pngsave.h; sourceTree = SOURCE_ROOT; }; + 438C95A6149BD34E001BAF3A /* vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vector.h; sourceTree = SOURCE_ROOT; }; + 438C95CF149BD4CC001BAF3A /* Base-Tools.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "Base-Tools.xcconfig"; path = "configs/Base-Tools.xcconfig"; sourceTree = ""; }; + 438C95D0149BD4CC001BAF3A /* map2lnd-All.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2lnd-All.xcconfig"; path = "configs/map2lnd-All.xcconfig"; sourceTree = ""; }; + 438C95D1149BD4CC001BAF3A /* map2lnd-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2lnd-Debug.xcconfig"; path = "configs/map2lnd-Debug.xcconfig"; sourceTree = ""; }; + 438C95D2149BD4CC001BAF3A /* map2lnd-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2lnd-Release.xcconfig"; path = "configs/map2lnd-Release.xcconfig"; sourceTree = ""; }; + 438C95D3149BD4CC001BAF3A /* map2lnd-StaticAnalyzer.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2lnd-StaticAnalyzer.xcconfig"; path = "configs/map2lnd-StaticAnalyzer.xcconfig"; sourceTree = ""; }; + 438C95D4149BD4CC001BAF3A /* map2png-All.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2png-All.xcconfig"; path = "configs/map2png-All.xcconfig"; sourceTree = ""; }; + 438C95D5149BD4CC001BAF3A /* map2png-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2png-Debug.xcconfig"; path = "configs/map2png-Debug.xcconfig"; sourceTree = ""; }; + 438C95D6149BD4CC001BAF3A /* map2png-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2png-Release.xcconfig"; path = "configs/map2png-Release.xcconfig"; sourceTree = ""; }; + 438C95D7149BD4CC001BAF3A /* map2png-StaticAnalyzer.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2png-StaticAnalyzer.xcconfig"; path = "configs/map2png-StaticAnalyzer.xcconfig"; sourceTree = ""; }; + 438C95D8149BD4CC001BAF3A /* map2preview-All.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2preview-All.xcconfig"; path = "configs/map2preview-All.xcconfig"; sourceTree = ""; }; + 438C95D9149BD4CC001BAF3A /* map2preview-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2preview-Debug.xcconfig"; path = "configs/map2preview-Debug.xcconfig"; sourceTree = ""; }; + 438C95DA149BD4CC001BAF3A /* map2preview-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2preview-Release.xcconfig"; path = "configs/map2preview-Release.xcconfig"; sourceTree = ""; }; + 438C95DB149BD4CC001BAF3A /* map2preview-StaticAnalyzer.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "map2preview-StaticAnalyzer.xcconfig"; path = "configs/map2preview-StaticAnalyzer.xcconfig"; sourceTree = ""; }; + 438C95DC149BD4CC001BAF3A /* mapconv-All.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "mapconv-All.xcconfig"; path = "configs/mapconv-All.xcconfig"; sourceTree = ""; }; + 438C95DD149BD4CC001BAF3A /* mapconv-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "mapconv-Debug.xcconfig"; path = "configs/mapconv-Debug.xcconfig"; sourceTree = ""; }; + 438C95DE149BD4CC001BAF3A /* mapconv-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "mapconv-Release.xcconfig"; path = "configs/mapconv-Release.xcconfig"; sourceTree = ""; }; + 438C95DF149BD4CC001BAF3A /* mapconv-StaticAnalyzer.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "mapconv-StaticAnalyzer.xcconfig"; path = "configs/mapconv-StaticAnalyzer.xcconfig"; sourceTree = ""; }; + 438C95E0149BD4CC001BAF3A /* mapinfo-All.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "mapinfo-All.xcconfig"; path = "configs/mapinfo-All.xcconfig"; sourceTree = ""; }; + 438C95E1149BD4CC001BAF3A /* mapinfo-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "mapinfo-Debug.xcconfig"; path = "configs/mapinfo-Debug.xcconfig"; sourceTree = ""; }; + 438C95E2149BD4CC001BAF3A /* mapinfo-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "mapinfo-Release.xcconfig"; path = "configs/mapinfo-Release.xcconfig"; sourceTree = ""; }; + 438C95E3149BD4CC001BAF3A /* mapinfo-StaticAnalyzer.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "mapinfo-StaticAnalyzer.xcconfig"; path = "configs/mapinfo-StaticAnalyzer.xcconfig"; sourceTree = ""; }; + 438C95E4149BD4CC001BAF3A /* Project-All.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "Project-All.xcconfig"; path = "configs/Project-All.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 438C94E2149BD19D001BAF3A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 438C95E9149BD62C001BAF3A /* Png.framework in Frameworks */, + 438C95EA149BD62C001BAF3A /* PhysFS.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 438C952E149BD22C001BAF3A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 438C95ED149BD660001BAF3A /* Png.framework in Frameworks */, + 438C95EE149BD660001BAF3A /* PhysFS.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 438C953E149BD26C001BAF3A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 438C95F3149BD683001BAF3A /* PhysFS.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 438C9546149BD280001BAF3A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 438C95F6149BD6B9001BAF3A /* PhysFS.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 438C954E149BD290001BAF3A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 438C95F7149BD6C4001BAF3A /* Png.framework in Frameworks */, + 438C95F8149BD6C4001BAF3A /* PhysFS.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 438C94C7149BD084001BAF3A = { + isa = PBXGroup; + children = ( + 438C9554149BD2A0001BAF3A /* Configurations */, + 438C9599149BD34E001BAF3A /* Tools */, + 438C94EA149BD1E2001BAF3A /* External frameworks */, + 438C94F1149BD1F2001BAF3A /* System frameworks */, + 438C94E5149BD19D001BAF3A /* Products */, + ); + sourceTree = ""; + }; + 438C94E5149BD19D001BAF3A /* Products */ = { + isa = PBXGroup; + children = ( + 438C94E4149BD19D001BAF3A /* map2png */, + 438C9532149BD22C001BAF3A /* mapconv */, + 438C9542149BD26C001BAF3A /* mapinfo */, + 438C954A149BD280001BAF3A /* map2lnd */, + 438C9552149BD290001BAF3A /* map2preview */, + ); + name = Products; + sourceTree = ""; + }; + 438C94EA149BD1E2001BAF3A /* External frameworks */ = { + isa = PBXGroup; + children = ( + 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */, + ); + name = "External frameworks"; + sourceTree = ""; + }; + 438C94F1149BD1F2001BAF3A /* System frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = "System frameworks"; + sourceTree = ""; + }; + 438C9554149BD2A0001BAF3A /* Configurations */ = { + isa = PBXGroup; + children = ( + 438C95CF149BD4CC001BAF3A /* Base-Tools.xcconfig */, + 438C95D0149BD4CC001BAF3A /* map2lnd-All.xcconfig */, + 438C95D1149BD4CC001BAF3A /* map2lnd-Debug.xcconfig */, + 438C95D2149BD4CC001BAF3A /* map2lnd-Release.xcconfig */, + 438C95D3149BD4CC001BAF3A /* map2lnd-StaticAnalyzer.xcconfig */, + 438C95D4149BD4CC001BAF3A /* map2png-All.xcconfig */, + 438C95D5149BD4CC001BAF3A /* map2png-Debug.xcconfig */, + 438C95D6149BD4CC001BAF3A /* map2png-Release.xcconfig */, + 438C95D7149BD4CC001BAF3A /* map2png-StaticAnalyzer.xcconfig */, + 438C95D8149BD4CC001BAF3A /* map2preview-All.xcconfig */, + 438C95D9149BD4CC001BAF3A /* map2preview-Debug.xcconfig */, + 438C95DA149BD4CC001BAF3A /* map2preview-Release.xcconfig */, + 438C95DB149BD4CC001BAF3A /* map2preview-StaticAnalyzer.xcconfig */, + 438C95DC149BD4CC001BAF3A /* mapconv-All.xcconfig */, + 438C95DD149BD4CC001BAF3A /* mapconv-Debug.xcconfig */, + 438C95DE149BD4CC001BAF3A /* mapconv-Release.xcconfig */, + 438C95DF149BD4CC001BAF3A /* mapconv-StaticAnalyzer.xcconfig */, + 438C95E0149BD4CC001BAF3A /* mapinfo-All.xcconfig */, + 438C95E1149BD4CC001BAF3A /* mapinfo-Debug.xcconfig */, + 438C95E2149BD4CC001BAF3A /* mapinfo-Release.xcconfig */, + 438C95E3149BD4CC001BAF3A /* mapinfo-StaticAnalyzer.xcconfig */, + 438C95E4149BD4CC001BAF3A /* Project-All.xcconfig */, + ); + name = Configurations; + sourceTree = ""; + }; + 438C9560149BD2ED001BAF3A /* Products */ = { + isa = PBXGroup; + children = ( + 438C9578149BD2ED001BAF3A /* Warzone.app */, + 438C957A149BD2ED001BAF3A /* MiniUPnPc.framework */, + 438C957C149BD2ED001BAF3A /* GLExtensionWrangler.framework */, + 438C957E149BD2ED001BAF3A /* Zlib.framework */, + 438C9580149BD2ED001BAF3A /* Ogg.framework */, + 438C9582149BD2ED001BAF3A /* Png.framework */, + 438C9584149BD2ED001BAF3A /* PhysFS.framework */, + 438C9586149BD2ED001BAF3A /* Vorbis.framework */, + 438C9588149BD2ED001BAF3A /* Gettext.framework */, + 438C958A149BD2ED001BAF3A /* Theora.framework */, + 438C958C149BD2ED001BAF3A /* QJson.framework */, + 438C958E149BD2ED001BAF3A /* QuesoGLC.framework */, + ); + name = Products; + sourceTree = ""; + }; + 438C9599149BD34E001BAF3A /* Tools */ = { + isa = PBXGroup; + children = ( + 438C959B149BD34E001BAF3A /* map2lnd.cpp */, + 438C959C149BD34E001BAF3A /* map2png.cpp */, + 438C959D149BD34E001BAF3A /* map2preview.cpp */, + 438C959E149BD34E001BAF3A /* mapconv.cpp */, + 438C959F149BD34E001BAF3A /* mapinfo.cpp */, + 438C95A0149BD34E001BAF3A /* maplib.cpp */, + 438C95A1149BD34E001BAF3A /* maplib.h */, + 438C95A2149BD34E001BAF3A /* mapload.cpp */, + 438C95A3149BD34E001BAF3A /* mapload.h */, + 438C95A4149BD34E001BAF3A /* pngsave.cpp */, + 438C95A5149BD34E001BAF3A /* pngsave.h */, + 438C95A6149BD34E001BAF3A /* vector.h */, + ); + name = Tools; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 438C94E3149BD19D001BAF3A /* map2png */ = { + isa = PBXNativeTarget; + buildConfigurationList = 438C94E9149BD19F001BAF3A /* Build configuration list for PBXNativeTarget "map2png" */; + buildPhases = ( + 438C94E1149BD19D001BAF3A /* Sources */, + 438C94E2149BD19D001BAF3A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 438C95E6149BD60B001BAF3A /* PBXTargetDependency */, + 438C95E8149BD60B001BAF3A /* PBXTargetDependency */, + 438C9628149BDCE7001BAF3A /* PBXTargetDependency */, + ); + name = map2png; + productName = map2png; + productReference = 438C94E4149BD19D001BAF3A /* map2png */; + productType = "com.apple.product-type.tool"; + }; + 438C952C149BD22C001BAF3A /* mapconv */ = { + isa = PBXNativeTarget; + buildConfigurationList = 438C952F149BD22C001BAF3A /* Build configuration list for PBXNativeTarget "mapconv" */; + buildPhases = ( + 438C952D149BD22C001BAF3A /* Sources */, + 438C952E149BD22C001BAF3A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 438C95F0149BD669001BAF3A /* PBXTargetDependency */, + 438C95F2149BD669001BAF3A /* PBXTargetDependency */, + 438C962A149BDCFF001BAF3A /* PBXTargetDependency */, + ); + name = mapconv; + productName = map2png; + productReference = 438C9532149BD22C001BAF3A /* mapconv */; + productType = "com.apple.product-type.tool"; + }; + 438C953C149BD26C001BAF3A /* mapinfo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 438C953F149BD26C001BAF3A /* Build configuration list for PBXNativeTarget "mapinfo" */; + buildPhases = ( + 438C953D149BD26C001BAF3A /* Sources */, + 438C953E149BD26C001BAF3A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 438C95F5149BD698001BAF3A /* PBXTargetDependency */, + 438C962C149BDD16001BAF3A /* PBXTargetDependency */, + ); + name = mapinfo; + productName = map2png; + productReference = 438C9542149BD26C001BAF3A /* mapinfo */; + productType = "com.apple.product-type.tool"; + }; + 438C9544149BD280001BAF3A /* map2lnd */ = { + isa = PBXNativeTarget; + buildConfigurationList = 438C9547149BD280001BAF3A /* Build configuration list for PBXNativeTarget "map2lnd" */; + buildPhases = ( + 438C9545149BD280001BAF3A /* Sources */, + 438C9546149BD280001BAF3A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 438C95FA149BD6D3001BAF3A /* PBXTargetDependency */, + 438C962E149BDD21001BAF3A /* PBXTargetDependency */, + ); + name = map2lnd; + productName = map2png; + productReference = 438C954A149BD280001BAF3A /* map2lnd */; + productType = "com.apple.product-type.tool"; + }; + 438C954C149BD290001BAF3A /* map2preview */ = { + isa = PBXNativeTarget; + buildConfigurationList = 438C954F149BD290001BAF3A /* Build configuration list for PBXNativeTarget "map2preview" */; + buildPhases = ( + 438C954D149BD290001BAF3A /* Sources */, + 438C954E149BD290001BAF3A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 438C95FC149BD6E2001BAF3A /* PBXTargetDependency */, + 438C95FE149BD6E2001BAF3A /* PBXTargetDependency */, + 438C9630149BDD2D001BAF3A /* PBXTargetDependency */, + ); + name = map2preview; + productName = map2png; + productReference = 438C9552149BD290001BAF3A /* map2preview */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 438C94C9149BD084001BAF3A /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 438C94CC149BD084001BAF3A /* Build configuration list for PBXProject "MapUtilities" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 438C94C7149BD084001BAF3A; + productRefGroup = 438C94E5149BD19D001BAF3A /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 438C9560149BD2ED001BAF3A /* Products */; + ProjectRef = 438C94F2149BD20F001BAF3A /* Warzone.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 438C9613149BDA19001BAF3A /* All Tools */, + 438C94E3149BD19D001BAF3A /* map2png */, + 438C952C149BD22C001BAF3A /* mapconv */, + 438C953C149BD26C001BAF3A /* mapinfo */, + 438C9544149BD280001BAF3A /* map2lnd */, + 438C954C149BD290001BAF3A /* map2preview */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 438C9578149BD2ED001BAF3A /* Warzone.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = Warzone.app; + remoteRef = 438C9577149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C957A149BD2ED001BAF3A /* MiniUPnPc.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = MiniUPnPc.framework; + remoteRef = 438C9579149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C957C149BD2ED001BAF3A /* GLExtensionWrangler.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GLExtensionWrangler.framework; + remoteRef = 438C957B149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C957E149BD2ED001BAF3A /* Zlib.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Zlib.framework; + remoteRef = 438C957D149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C9580149BD2ED001BAF3A /* Ogg.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Ogg.framework; + remoteRef = 438C957F149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C9582149BD2ED001BAF3A /* Png.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Png.framework; + remoteRef = 438C9581149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C9584149BD2ED001BAF3A /* PhysFS.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = PhysFS.framework; + remoteRef = 438C9583149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C9586149BD2ED001BAF3A /* Vorbis.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Vorbis.framework; + remoteRef = 438C9585149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C9588149BD2ED001BAF3A /* Gettext.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Gettext.framework; + remoteRef = 438C9587149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C958A149BD2ED001BAF3A /* Theora.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Theora.framework; + remoteRef = 438C9589149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C958C149BD2ED001BAF3A /* QJson.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = QJson.framework; + remoteRef = 438C958B149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 438C958E149BD2ED001BAF3A /* QuesoGLC.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = QuesoGLC.framework; + remoteRef = 438C958D149BD2ED001BAF3A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXSourcesBuildPhase section */ + 438C94E1149BD19D001BAF3A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 438C95A7149BD3A0001BAF3A /* map2png.cpp in Sources */, + 438C95A8149BD3A2001BAF3A /* maplib.cpp in Sources */, + 438C95A9149BD3A3001BAF3A /* mapload.cpp in Sources */, + 438C95AA149BD3A5001BAF3A /* pngsave.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 438C952D149BD22C001BAF3A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 438C95BC149BD3F2001BAF3A /* mapconv.cpp in Sources */, + 438C95BD149BD3F5001BAF3A /* maplib.cpp in Sources */, + 438C95BE149BD3F5001BAF3A /* mapload.cpp in Sources */, + 438C95BF149BD3F6001BAF3A /* pngsave.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 438C953D149BD26C001BAF3A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 438C95C0149BD407001BAF3A /* mapinfo.cpp in Sources */, + 438C95C1149BD408001BAF3A /* maplib.cpp in Sources */, + 438C95C2149BD409001BAF3A /* mapload.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 438C9545149BD280001BAF3A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 438C95C3149BD420001BAF3A /* map2lnd.cpp in Sources */, + 438C95C4149BD422001BAF3A /* maplib.cpp in Sources */, + 438C95C5149BD423001BAF3A /* mapload.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 438C954D149BD290001BAF3A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 438C95C6149BD449001BAF3A /* map2preview.cpp in Sources */, + 438C95C7149BD44B001BAF3A /* maplib.cpp in Sources */, + 438C95C8149BD44C001BAF3A /* mapload.cpp in Sources */, + 438C95C9149BD44D001BAF3A /* pngsave.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 438C95E6149BD60B001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Png; + targetProxy = 438C95E5149BD60B001BAF3A /* PBXContainerItemProxy */; + }; + 438C95E8149BD60B001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PhysFS; + targetProxy = 438C95E7149BD60B001BAF3A /* PBXContainerItemProxy */; + }; + 438C95F0149BD669001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Png; + targetProxy = 438C95EF149BD669001BAF3A /* PBXContainerItemProxy */; + }; + 438C95F2149BD669001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PhysFS; + targetProxy = 438C95F1149BD669001BAF3A /* PBXContainerItemProxy */; + }; + 438C95F5149BD698001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PhysFS; + targetProxy = 438C95F4149BD698001BAF3A /* PBXContainerItemProxy */; + }; + 438C95FA149BD6D3001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PhysFS; + targetProxy = 438C95F9149BD6D3001BAF3A /* PBXContainerItemProxy */; + }; + 438C95FC149BD6E2001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Png; + targetProxy = 438C95FB149BD6E2001BAF3A /* PBXContainerItemProxy */; + }; + 438C95FE149BD6E2001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PhysFS; + targetProxy = 438C95FD149BD6E2001BAF3A /* PBXContainerItemProxy */; + }; + 438C9618149BDA31001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 438C94E3149BD19D001BAF3A /* map2png */; + targetProxy = 438C9617149BDA31001BAF3A /* PBXContainerItemProxy */; + }; + 438C961A149BDA31001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 438C952C149BD22C001BAF3A /* mapconv */; + targetProxy = 438C9619149BDA31001BAF3A /* PBXContainerItemProxy */; + }; + 438C961C149BDA31001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 438C953C149BD26C001BAF3A /* mapinfo */; + targetProxy = 438C961B149BDA31001BAF3A /* PBXContainerItemProxy */; + }; + 438C961E149BDA31001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 438C9544149BD280001BAF3A /* map2lnd */; + targetProxy = 438C961D149BDA31001BAF3A /* PBXContainerItemProxy */; + }; + 438C9620149BDA31001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 438C954C149BD290001BAF3A /* map2preview */; + targetProxy = 438C961F149BDA31001BAF3A /* PBXContainerItemProxy */; + }; + 438C9628149BDCE7001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Setup Prebuilt Components"; + targetProxy = 438C9627149BDCE7001BAF3A /* PBXContainerItemProxy */; + }; + 438C962A149BDCFF001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Setup Prebuilt Components"; + targetProxy = 438C9629149BDCFF001BAF3A /* PBXContainerItemProxy */; + }; + 438C962C149BDD16001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Setup Prebuilt Components"; + targetProxy = 438C962B149BDD16001BAF3A /* PBXContainerItemProxy */; + }; + 438C962E149BDD21001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Setup Prebuilt Components"; + targetProxy = 438C962D149BDD21001BAF3A /* PBXContainerItemProxy */; + }; + 438C9630149BDD2D001BAF3A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Setup Prebuilt Components"; + targetProxy = 438C962F149BDD2D001BAF3A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 438C94CA149BD084001BAF3A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95E4149BD4CC001BAF3A /* Project-All.xcconfig */; + buildSettings = { + }; + name = Debug; + }; + 438C94CB149BD084001BAF3A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95E4149BD4CC001BAF3A /* Project-All.xcconfig */; + buildSettings = { + }; + name = Release; + }; + 438C94E7149BD19E001BAF3A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95D5149BD4CC001BAF3A /* map2png-Debug.xcconfig */; + buildSettings = { + }; + name = Debug; + }; + 438C94E8149BD19E001BAF3A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95D6149BD4CC001BAF3A /* map2png-Release.xcconfig */; + buildSettings = { + }; + name = Release; + }; + 438C9530149BD22C001BAF3A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95DD149BD4CC001BAF3A /* mapconv-Debug.xcconfig */; + buildSettings = { + }; + name = Debug; + }; + 438C9531149BD22C001BAF3A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95DE149BD4CC001BAF3A /* mapconv-Release.xcconfig */; + buildSettings = { + }; + name = Release; + }; + 438C9540149BD26C001BAF3A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95E1149BD4CC001BAF3A /* mapinfo-Debug.xcconfig */; + buildSettings = { + }; + name = Debug; + }; + 438C9541149BD26C001BAF3A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95E2149BD4CC001BAF3A /* mapinfo-Release.xcconfig */; + buildSettings = { + }; + name = Release; + }; + 438C9548149BD280001BAF3A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95D1149BD4CC001BAF3A /* map2lnd-Debug.xcconfig */; + buildSettings = { + }; + name = Debug; + }; + 438C9549149BD280001BAF3A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95D2149BD4CC001BAF3A /* map2lnd-Release.xcconfig */; + buildSettings = { + }; + name = Release; + }; + 438C9550149BD290001BAF3A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95D9149BD4CC001BAF3A /* map2preview-Debug.xcconfig */; + buildSettings = { + }; + name = Debug; + }; + 438C9551149BD290001BAF3A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95DA149BD4CC001BAF3A /* map2preview-Release.xcconfig */; + buildSettings = { + }; + name = Release; + }; + 438C95AB149BD3C6001BAF3A /* StaticAnalyzer */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95E4149BD4CC001BAF3A /* Project-All.xcconfig */; + buildSettings = { + }; + name = StaticAnalyzer; + }; + 438C95AC149BD3C6001BAF3A /* StaticAnalyzer */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95D7149BD4CC001BAF3A /* map2png-StaticAnalyzer.xcconfig */; + buildSettings = { + }; + name = StaticAnalyzer; + }; + 438C95AD149BD3C6001BAF3A /* StaticAnalyzer */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95DF149BD4CC001BAF3A /* mapconv-StaticAnalyzer.xcconfig */; + buildSettings = { + }; + name = StaticAnalyzer; + }; + 438C95AE149BD3C6001BAF3A /* StaticAnalyzer */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95E3149BD4CC001BAF3A /* mapinfo-StaticAnalyzer.xcconfig */; + buildSettings = { + }; + name = StaticAnalyzer; + }; + 438C95AF149BD3C6001BAF3A /* StaticAnalyzer */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95D3149BD4CC001BAF3A /* map2lnd-StaticAnalyzer.xcconfig */; + buildSettings = { + }; + name = StaticAnalyzer; + }; + 438C95B0149BD3C6001BAF3A /* StaticAnalyzer */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 438C95DB149BD4CC001BAF3A /* map2preview-StaticAnalyzer.xcconfig */; + buildSettings = { + }; + name = StaticAnalyzer; + }; + 438C9614149BDA19001BAF3A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "All Tools"; + }; + name = Debug; + }; + 438C9615149BDA19001BAF3A /* StaticAnalyzer */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "All Tools"; + }; + name = StaticAnalyzer; + }; + 438C9616149BDA19001BAF3A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "All Tools"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 438C94CC149BD084001BAF3A /* Build configuration list for PBXProject "MapUtilities" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 438C94CA149BD084001BAF3A /* Debug */, + 438C95AB149BD3C6001BAF3A /* StaticAnalyzer */, + 438C94CB149BD084001BAF3A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 438C94E9149BD19F001BAF3A /* Build configuration list for PBXNativeTarget "map2png" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 438C94E7149BD19E001BAF3A /* Debug */, + 438C95AC149BD3C6001BAF3A /* StaticAnalyzer */, + 438C94E8149BD19E001BAF3A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 438C952F149BD22C001BAF3A /* Build configuration list for PBXNativeTarget "mapconv" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 438C9530149BD22C001BAF3A /* Debug */, + 438C95AD149BD3C6001BAF3A /* StaticAnalyzer */, + 438C9531149BD22C001BAF3A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 438C953F149BD26C001BAF3A /* Build configuration list for PBXNativeTarget "mapinfo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 438C9540149BD26C001BAF3A /* Debug */, + 438C95AE149BD3C6001BAF3A /* StaticAnalyzer */, + 438C9541149BD26C001BAF3A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 438C9547149BD280001BAF3A /* Build configuration list for PBXNativeTarget "map2lnd" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 438C9548149BD280001BAF3A /* Debug */, + 438C95AF149BD3C6001BAF3A /* StaticAnalyzer */, + 438C9549149BD280001BAF3A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 438C954F149BD290001BAF3A /* Build configuration list for PBXNativeTarget "map2preview" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 438C9550149BD290001BAF3A /* Debug */, + 438C95B0149BD3C6001BAF3A /* StaticAnalyzer */, + 438C9551149BD290001BAF3A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 438C9621149BDA42001BAF3A /* Build configuration list for PBXAggregateTarget "All Tools" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 438C9614149BDA19001BAF3A /* Debug */, + 438C9615149BDA19001BAF3A /* StaticAnalyzer */, + 438C9616149BDA19001BAF3A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 438C94C9149BD084001BAF3A /* Project object */; +} diff --git a/macosx/configs/Base-Tools.xcconfig b/tools/map/configs/Base-Tools.xcconfig similarity index 57% rename from macosx/configs/Base-Tools.xcconfig rename to tools/map/configs/Base-Tools.xcconfig index 3fe1e5463..9ffc31bb9 100644 --- a/macosx/configs/Base-Tools.xcconfig +++ b/tools/map/configs/Base-Tools.xcconfig @@ -3,7 +3,11 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0 INSTALL_PATH = /usr/local/bin -LD_RUNPATH_SEARCH_PATHS = @loader_path @loader_path/. @loader_path/Warzone.app/Contents/Frameworks /Applications/Warzone.app/Contents/Frameworks @loader_path/../../external/QT /sw/lib/qt4-mac/lib/ /sw/lib/qt4-x11/lib/ + +LD_RUNPATH_SEARCH_PATHS = @loader_path @loader_path/. @loader_path/../../macosx/build/$(CONFIGURATION) @loader_path/../../macosx/build/$(CONFIGURATION)/. @loader_path/Warzone.app/Contents/Frameworks /Applications/Warzone.app/Contents/Frameworks + ALWAYS_SEARCH_USER_PATHS = NO + FRAMEWORK_SEARCH_PATHS = $(inherited) $(FRAMEWORK_SEARCH_PATHS_QUOTED_2) $(FRAMEWORK_SEARCH_PATHS_QUOTED_3) -USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/.." "$(SRCROOT)/../tools/map" + +USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../.." "$(SRCROOT)" diff --git a/tools/map/configs/Project-All.xcconfig b/tools/map/configs/Project-All.xcconfig new file mode 100644 index 000000000..5adf2daff --- /dev/null +++ b/tools/map/configs/Project-All.xcconfig @@ -0,0 +1,29 @@ +// Global settings for all configurations + + +ARCHS = i386 ppc +SDKROOT = macosx10.5 +SDKROOT[arch=x86_64] = macosx10.6 +DEBUG_INFORMATION_FORMAT = dwarf-with-dsym +GCC_VERSION = com.apple.compilers.llvm.clang.1_0 +MACOSX_DEPLOYMENT_TARGET = 10.5 +MACOSX_DEPLOYMENT_TARGET[sdk=macosx10.6] = 10.6 +COPY_PHASE_STRIP = NO +DEAD_CODE_STRIPPING = YES +GCC_AUTO_VECTORIZATION = YES +GCC_GENERATE_DEBUGGING_SYMBOLS = YES +GCC_DEBUGGING_SYMBOLS = full +GCC_C_LANGUAGE_STANDARD = gnu99 +GCC_ALTIVEC_EXTENSIONS = YES +OTHER_CFLAGS = $(inherited) +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) __MACOSX__ + +FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "$(SDK_DIR)/System/Library/Frameworks" +FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "$(SRCROOT)/../../macosx/build/$(CONFIGURATION)" +FRAMEWORK_SEARCH_PATHS_QUOTED_3 = "$(SRCROOT)/../../macosx/external/QT" + +LIBRARY_SEARCH_PATHS_QUOTED_1 = "$(SDK_DIR)/usr/lib" +LIBRARY_SEARCH_PATHS_QUOTED_2 = "$(SRCROOT)/../../macosx/build/$(CONFIGURATION)" +LIBRARY_SEARCH_PATHS_QUOTED_3 = "$(SRCROOT)/../../macosx/external/QT" + +HEADER_SEARCH_PATHS_QUOTED_1 = "$(SRCROOT)/../../macosx/external/glew/include/**" diff --git a/macosx/configs/map2lnd-All.xcconfig b/tools/map/configs/map2lnd-All.xcconfig similarity index 100% rename from macosx/configs/map2lnd-All.xcconfig rename to tools/map/configs/map2lnd-All.xcconfig diff --git a/macosx/configs/map2lnd-Debug.xcconfig b/tools/map/configs/map2lnd-Debug.xcconfig similarity index 100% rename from macosx/configs/map2lnd-Debug.xcconfig rename to tools/map/configs/map2lnd-Debug.xcconfig diff --git a/macosx/configs/map2lnd-Release.xcconfig b/tools/map/configs/map2lnd-Release.xcconfig similarity index 100% rename from macosx/configs/map2lnd-Release.xcconfig rename to tools/map/configs/map2lnd-Release.xcconfig diff --git a/macosx/configs/map2lnd-StaticAnalyzer.xcconfig b/tools/map/configs/map2lnd-StaticAnalyzer.xcconfig similarity index 100% rename from macosx/configs/map2lnd-StaticAnalyzer.xcconfig rename to tools/map/configs/map2lnd-StaticAnalyzer.xcconfig diff --git a/macosx/configs/map2png-All.xcconfig b/tools/map/configs/map2png-All.xcconfig similarity index 100% rename from macosx/configs/map2png-All.xcconfig rename to tools/map/configs/map2png-All.xcconfig diff --git a/macosx/configs/map2png-Debug.xcconfig b/tools/map/configs/map2png-Debug.xcconfig similarity index 100% rename from macosx/configs/map2png-Debug.xcconfig rename to tools/map/configs/map2png-Debug.xcconfig diff --git a/macosx/configs/map2png-Release.xcconfig b/tools/map/configs/map2png-Release.xcconfig similarity index 100% rename from macosx/configs/map2png-Release.xcconfig rename to tools/map/configs/map2png-Release.xcconfig diff --git a/macosx/configs/map2png-StaticAnalyzer.xcconfig b/tools/map/configs/map2png-StaticAnalyzer.xcconfig similarity index 100% rename from macosx/configs/map2png-StaticAnalyzer.xcconfig rename to tools/map/configs/map2png-StaticAnalyzer.xcconfig diff --git a/macosx/configs/map2preview-All.xcconfig b/tools/map/configs/map2preview-All.xcconfig similarity index 100% rename from macosx/configs/map2preview-All.xcconfig rename to tools/map/configs/map2preview-All.xcconfig diff --git a/macosx/configs/map2preview-Debug.xcconfig b/tools/map/configs/map2preview-Debug.xcconfig similarity index 100% rename from macosx/configs/map2preview-Debug.xcconfig rename to tools/map/configs/map2preview-Debug.xcconfig diff --git a/macosx/configs/map2preview-Release.xcconfig b/tools/map/configs/map2preview-Release.xcconfig similarity index 100% rename from macosx/configs/map2preview-Release.xcconfig rename to tools/map/configs/map2preview-Release.xcconfig diff --git a/macosx/configs/map2preview-StaticAnalyzer.xcconfig b/tools/map/configs/map2preview-StaticAnalyzer.xcconfig similarity index 100% rename from macosx/configs/map2preview-StaticAnalyzer.xcconfig rename to tools/map/configs/map2preview-StaticAnalyzer.xcconfig diff --git a/macosx/configs/mapconv-All.xcconfig b/tools/map/configs/mapconv-All.xcconfig similarity index 100% rename from macosx/configs/mapconv-All.xcconfig rename to tools/map/configs/mapconv-All.xcconfig diff --git a/macosx/configs/mapconv-Debug.xcconfig b/tools/map/configs/mapconv-Debug.xcconfig similarity index 100% rename from macosx/configs/mapconv-Debug.xcconfig rename to tools/map/configs/mapconv-Debug.xcconfig diff --git a/macosx/configs/mapconv-Release.xcconfig b/tools/map/configs/mapconv-Release.xcconfig similarity index 100% rename from macosx/configs/mapconv-Release.xcconfig rename to tools/map/configs/mapconv-Release.xcconfig diff --git a/macosx/configs/mapconv-StaticAnalyzer.xcconfig b/tools/map/configs/mapconv-StaticAnalyzer.xcconfig similarity index 100% rename from macosx/configs/mapconv-StaticAnalyzer.xcconfig rename to tools/map/configs/mapconv-StaticAnalyzer.xcconfig diff --git a/macosx/configs/mapinfo-All.xcconfig b/tools/map/configs/mapinfo-All.xcconfig similarity index 100% rename from macosx/configs/mapinfo-All.xcconfig rename to tools/map/configs/mapinfo-All.xcconfig diff --git a/macosx/configs/mapinfo-Debug.xcconfig b/tools/map/configs/mapinfo-Debug.xcconfig similarity index 100% rename from macosx/configs/mapinfo-Debug.xcconfig rename to tools/map/configs/mapinfo-Debug.xcconfig diff --git a/macosx/configs/mapinfo-Release.xcconfig b/tools/map/configs/mapinfo-Release.xcconfig similarity index 100% rename from macosx/configs/mapinfo-Release.xcconfig rename to tools/map/configs/mapinfo-Release.xcconfig diff --git a/macosx/configs/mapinfo-StaticAnalyzer.xcconfig b/tools/map/configs/mapinfo-StaticAnalyzer.xcconfig similarity index 100% rename from macosx/configs/mapinfo-StaticAnalyzer.xcconfig rename to tools/map/configs/mapinfo-StaticAnalyzer.xcconfig diff --git a/tools/subtitle-converter/convert-subtitles.py b/tools/subtitle-converter/convert-subtitles.py new file mode 100755 index 000000000..1b26d4073 --- /dev/null +++ b/tools/subtitle-converter/convert-subtitles.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python2 +# Convert subtitle timings from frames to seconds. +# Original author: Beliar (http://developer.wz2100.net/ticket/748) +# Changed to use subsecond precision. + +def parseLine(line): + tokens = line.split('\t') + try: + tokens.remove("") + except ValueError: + pass + xpos = int(tokens[0]) + ypos = int(tokens[1]) + framestart = float(tokens[2]) + frameend = float(tokens[3]) + text = tokens[4] + return (xpos, ypos, framestart, frameend, text) + +def convertFile(old_filename, new_filename, fps = 25): + text_file = open(old_filename) + new_file = open(new_filename, "w") + try: + for line in text_file: + if(line.strip()): + try: + valueList = list(parseLine(line)) + valueList[2] /= fps + valueList[3] /= fps + new_file.write("{0}\t{1}\t\t{2}\t{3}\t{4}".format(*valueList)) + except ValueError: + new_file.write(line) + continue + else: + new_file.write("\n") + + finally: + new_file.close() + text_file.close() + +def convertFiles(old_dir, new_dir, video_dir = "", fps = 25): + """Converts the the subtitle files in old_dir and subdirectories + from using fps to using the actual time + @param old_dir The directory where the to be converted subtititle files are + @param new_dir Where the changed files should go + @param video_dir Directory where the video files, for which the + subtitles in old_dir where written, are. This is optional but recommended. + @param fps This is the default fps used to calculate the time. + Will be overwritten by the actual fps of the video if video_dir is set + """ + import os + use_video_fps = os.path.exists(video_dir) + if use_video_fps: + from theora import Theora + if use_video_fps: + print "Using fps values from the actual video files" + else: + print "Using the default fps: " + str(fps) + for dirpath, dirnames, filenames in os.walk (old_dir): + os.mkdir (os.path.join (new_dir, dirpath[1+len (old_dir):])) + for filename in filenames: + old_file = (os.path.join(dirpath, filename)) + new_file = (os.path.join(new_dir, dirpath[1+len (old_dir):], filename)) + if use_video_fps: + video_file = os.path.join(video_dir, dirpath[1+len (old_dir):], os.path.splitext(filename)[0] + ".ogg") + video = Theora(video_file) + fps = int(video.fps_ratio[0] / video.fps_ratio[1]) + print old_file + "->" + new_file + convertFile(old_file, new_file, fps) + +if __name__ == "__main__": + import argparse + parser = argparse.ArgumentParser(description='Convert wz2100 subtitle files') + parser.add_argument('old_dir', metavar='old_dir', type=str, + help='Directory where the original subtitle files are') + parser.add_argument('new_dir', metavar='new_dir', type=str, + help='Directory where the new subtitle files go to') + parser.add_argument('-video_dir', '--v' , metavar='video_dir', type=str, dest="video_dir", + help='Directory where the original video files are. Used to get the fps from them.') + parser.add_argument('-fps', '--f', metavar='fps', type=int, dest="fps", + help='FPS to use. Defaults to 25') + got_args = parser.parse_args().__dict__ + args = {} + for arg in got_args: + if got_args[arg]: + args[arg] = got_args[arg] + convertFiles(**args)