diff --git a/data/craft/civilian.json b/data/craft/civilian.json index 24e52c5..f717d5c 100644 --- a/data/craft/civilian.json +++ b/data/craft/civilian.json @@ -1,6 +1,7 @@ { "name" : "Civilian", "description" : "", + "affiliation" : "", "health" : 15, "speed" : 1.85, "texture" : "gfx/craft/civilian01.png", diff --git a/data/craft/infTug.json b/data/craft/infTug.json index b4e6a4d..0c1416a 100644 --- a/data/craft/infTug.json +++ b/data/craft/infTug.json @@ -1,6 +1,7 @@ { "name" : "INF Tug", "description" : "", + "affiliation" : "", "health" : 50, "speed" : 1.85, "reloadTime" : 10, diff --git a/data/craft/munitionsTransport.json b/data/craft/munitionsTransport.json index 7f6c735..c0f8930 100644 --- a/data/craft/munitionsTransport.json +++ b/data/craft/munitionsTransport.json @@ -1,6 +1,7 @@ { "name" : "Munitions Transport", "description" : "", + "affiliation" : "", "health" : 150, "shield" : 50, "speed" : 1.5, diff --git a/data/craft/shuttle.json b/data/craft/shuttle.json index de7f66a..4dd9b53 100644 --- a/data/craft/shuttle.json +++ b/data/craft/shuttle.json @@ -1,6 +1,7 @@ { "name" : "Shuttle", "description" : "", + "affiliation" : "", "health" : 15, "shield" : 15, "speed" : 2, diff --git a/data/craft/supplyShip.json b/data/craft/supplyShip.json index ccd7a29..fa1c33e 100644 --- a/data/craft/supplyShip.json +++ b/data/craft/supplyShip.json @@ -1,6 +1,7 @@ { "name" : "Supply Ship", "description" : "", + "affiliation" : "", "health" : 150, "shield" : 50, "speed" : 1.5, diff --git a/data/craft/tug.json b/data/craft/tug.json index 940bd79..940b820 100644 --- a/data/craft/tug.json +++ b/data/craft/tug.json @@ -1,6 +1,7 @@ { "name" : "Tug", "description" : "", + "affiliation" : "", "health" : 50, "speed" : 1.85, "reloadTime" : 10, diff --git a/data/fighters/angel.json b/data/fighters/angel.json index df4cf12..efba871 100644 --- a/data/fighters/angel.json +++ b/data/fighters/angel.json @@ -1,6 +1,7 @@ { "name" : "Angel", "description" : "One of the oldest starfighters created by the Mitikas Empire, the Angel is rarely seen, due to it being retired in 2599. A handful of Independent Worlds continue to operate the fighter, having purchased them from the empire prior to Mitikas pulling them from service. Even so, they are quite often held back from deployment, acting as reserves to bulk up numbers. Angels are notable for being the first INF fighter to be equipped with mag cannons, and for being somewhat smaller than most of the nation's other fighters. Also of note is the appearance, the fighter sporting a purple colour scheme, as opposed to the reds of more recent INF craft.", + "affiliation" : "INF", "health" : 40, "shield" : 40, "speed" : 1.8, diff --git a/data/fighters/ataf.json b/data/fighters/ataf.json index 530fa5e..547d544 100644 --- a/data/fighters/ataf.json +++ b/data/fighters/ataf.json @@ -1,6 +1,7 @@ { "name" : "ATAF", "description" : "The Advanced Tactical Assault Fighter (ATAF) is the single most powerful single-seat starfighter in existence. Only five have so far been manufactured owing to their tremendous development costs (each one said to be on par with a carrier). Their existence and even those selected to participate in the training program have been a closely guarded secret within the CSN. It is the spiritual successor to the TAF upon which a great deal of its design was based.", + "affiliation" : "CSN", "health" : 150, "shield" : 2500, "speed" : 2.25, diff --git a/data/fighters/blizzard.json b/data/fighters/blizzard.json index 3273b54..31d21d9 100644 --- a/data/fighters/blizzard.json +++ b/data/fighters/blizzard.json @@ -1,6 +1,7 @@ { "name" : "Blizzard", "description" : "Like many other heavy-class starfighters, the Blizzard relies on firepower to make up for its somewhat sluggish performance in battle. In this respect, it is equipped with five cannons and five missiles, making it a formidable opponent in battle. The fighter is rarely seen outside of Mace, however, its primary function being the protection of Tzac's home system.", + "affiliation" : "Tzac", "health" : 120, "shield" : 70, "speed" : 1.85, diff --git a/data/fighters/cannonDart.json b/data/fighters/cannonDart.json index fcf4789..93c8740 100644 --- a/data/fighters/cannonDart.json +++ b/data/fighters/cannonDart.json @@ -1,6 +1,7 @@ { "name" : "Cannon Dart", "description" : "", + "affiliation" : "", "health" : 15, "speed" : 2.1, "reloadTime" : 24, diff --git a/data/fighters/dart.json b/data/fighters/dart.json index 61e8d31..a686ad2 100644 --- a/data/fighters/dart.json +++ b/data/fighters/dart.json @@ -1,6 +1,7 @@ { "name" : "Dart", - "description" : "TODO", + "description" : "The Dart is a very common, general purpose vessel that is used commonly by both the public and by the underworld. Because of its relatively low costs and ease of maintenance, it is highly favoured by criminal organisations. It is usually sold as a single-seat, unarmed vessel, but can be purchased in a great variety of modified states, including that with an extra seat and with a number of armaments; missiles usually being attached to the tips of each of the four fins.", + "affiliation" : "N/A", "health" : 15, "speed" : 2.1, "reloadTime" : 24, diff --git a/data/fighters/firefly.json b/data/fighters/firefly.json index 56dec37..764888e 100644 --- a/data/fighters/firefly.json +++ b/data/fighters/firefly.json @@ -1,6 +1,7 @@ { "name" : "Firefly", - "description" : "TODO", + "description" : "A relatively new starfighter, only introduced in the last seventeen years or so, the Firefly benefits from an overall reduction in manufacturing costs, while still maintaining the same defensive capabilities as other light-class fighters. It also benefits from slightly increased offensive measures, featuring two plasma cannons and one additional particle cannon. The fighter was greeted very positively when it was introduced and many hundreds were constructed exclusively for use by the UNF.", + "affiliation" : "UNF", "health" : 50, "shield" : 50, "speed" : 1.85, diff --git a/data/fighters/hammerhead.json b/data/fighters/hammerhead.json index ad1281e..c5d6a00 100644 --- a/data/fighters/hammerhead.json +++ b/data/fighters/hammerhead.json @@ -1,6 +1,7 @@ { "name" : "Hammerhead", - "description" : "TODO", + "description" : "Of all the bombers that the CSN can offer, the Hammerhead is one of the most well known. Slow, but sure, the Hammerhead is packed to the gills with rockets, missiles and torpedoes, making it a formidable and dangerous opponent within a conflict zone. Escorted by a wing of TAFs or Rays, a Hammerhead need only get in to range of a target to unleash a volley of rockets that would prove truly devastating. Hammerheads feature two seats, one for the pilot and one to aid with targeting and handling armaments. It also has room for an optional rear gunner.", + "affiliation" : "CSN", "health" : 60, "shield" : 50, "speed" : 1.7, diff --git a/data/fighters/hyenaA.json b/data/fighters/hyenaA.json index cb62bc3..985847b 100644 --- a/data/fighters/hyenaA.json +++ b/data/fighters/hyenaA.json @@ -1,6 +1,7 @@ { "name" : "Hyena-A", - "description" : "TODO", + "description" : "The Hyena is a new starfighter, introduced in the last 15 years and was constructed specifically for use by the United Naval Forces. Like most other medium-class starfighters, it treads the line between light and heavy-classes, offering high speeds and manoeuvrability, dense armour and shielding, and presenting high offensive capabilities. The Hyena is typically identified as Hyena-A or Hyena-B, depending on whether it is equipped with mag cannons or laser cannons.", + "affiliation" : "UNF", "health" : 90, "shield" : 45, "speed" : 1.85, diff --git a/data/fighters/hyenaB.json b/data/fighters/hyenaB.json index 5eb7005..d824916 100644 --- a/data/fighters/hyenaB.json +++ b/data/fighters/hyenaB.json @@ -1,6 +1,7 @@ { "name" : "Hyena-B", - "description" : "TODO", + "description" : "The Hyena is a new starfighter, introduced in the last 15 years and was constructed specifically for use by the United Naval Forces. Like most other medium-class starfighters, it treads the line between light and heavy-classes, offering high speeds and manoeuvrability, dense armour and shielding, and presenting high offensive capabilities. The Hyena is typically identified as Hyena-A or Hyena-B, depending on whether it is equipped with mag cannons or laser cannons.", + "affiliation" : "UNF", "health" : 90, "shield" : 45, "speed" : 1.85, diff --git a/data/fighters/jackal.json b/data/fighters/jackal.json index addaa53..d214c84 100644 --- a/data/fighters/jackal.json +++ b/data/fighters/jackal.json @@ -1,6 +1,7 @@ { "name" : "Jackal", - "description" : "TODO", + "description" : "The greatest mass produced starfighter in the Imperial Naval Forces, the Jackal, like the TAF, is lightly armoured and shielded, but fast. Like other INF starfighters it has been through a rapid variation process in the last few years, as a result of the Imperial Civil War.", + "affiliation" : "INF", "health" : 75, "shield" : 75, "speed" : 2, diff --git a/data/fighters/khepri.json b/data/fighters/khepri.json index fc7c866..1db8bb0 100644 --- a/data/fighters/khepri.json +++ b/data/fighters/khepri.json @@ -1,6 +1,7 @@ { "name" : "Khepri", - "description" : "TODO", + "description" : "The Khepri is a bomber, designed and built by the Kingdom of Tzac. It is an enchanced derivative of the Imperial Scarab.", + "affiliation" : "Tzac", "health" : 60, "shield" : 50, "speed" : 1.7, diff --git a/data/fighters/kingfisher.json b/data/fighters/kingfisher.json index b29b666..da93326 100644 --- a/data/fighters/kingfisher.json +++ b/data/fighters/kingfisher.json @@ -1,6 +1,7 @@ { "name" : "Kingfisher", - "description" : "TODO", + "description" : "The Kingfisher is a medium-class, CSN starfighter, built to complement the Ray (although it arrived two years later than scheduled). Whereas the Ray features two mag cannons in addition to its plasma cannons, the Kingfisher is equipped with laser cannons. Also, unlike the Ray, the Kingfisher is a single seat fighter.", + "affiliation" : "CSN", "health" : 65, "shield" : 65, "speed" : 1.85, diff --git a/data/fighters/leopard.json b/data/fighters/leopard.json index 7851c6e..643a804 100644 --- a/data/fighters/leopard.json +++ b/data/fighters/leopard.json @@ -1,6 +1,7 @@ { "name" : "Leopard", - "description" : "TODO", + "description" : "Originally developed in 2580, the Leopard was redesigned from the ground up, to act as the United Naval Forces primary heavy starfighter. It is more powerful than the Sphinx and Rook, but shares their inherent weaknesses, such as poor handling and sluggish engines. Aside from bombers, it is the only UNF fighter craft to feature two pilot seats. It is also the only fighter in existence to feature plasma cannons on the port and starboard sides, operated by the second pilot. Budget restrictions meant that a third frontal plasma cannon was replaced by a particle cannon.", + "affiliation" : "UNF", "health" : 125, "shield" : 75, "speed" : 1.7, diff --git a/data/fighters/lynx.json b/data/fighters/lynx.json index 6314491..f1cd1dc 100644 --- a/data/fighters/lynx.json +++ b/data/fighters/lynx.json @@ -1,6 +1,7 @@ { "name" : "Lynx", - "description" : "TODO", + "description" : "The Lynx was a latecomer to the UNF's spacecraft compliment, the organisation purchasing Hammerheads from the CSN and, on occasion, Khepris from the Kingdom of Tzac. Neither were desirable longterm solutions, and so the Lynx was developed to fill the gap in the navy's offerings. The bomber was heavily inspired by the Hammerhead, with the UNF having found success in the use of the CSN craft in the past, and wished to continue that way.", + "affiliation" : "UNF", "health" : 75, "shield" : 50, "speed" : 1.7, diff --git a/data/fighters/mantis.json b/data/fighters/mantis.json index 03dcd52..630158e 100644 --- a/data/fighters/mantis.json +++ b/data/fighters/mantis.json @@ -1,6 +1,7 @@ { "name" : "Mantis", - "description" : "TODO", + "description" : "So called because of the likeness of its two upper struts to that of a praying mantis, this is one of the most well recognised starfighters in the INF. A medium starfighter, like the Confederation's own Ray, the Mantis is not only better armed, featuring an extra set of offensive weaponry, but is also faster. Like other Imperial starfighters, it has seen a great number of stable variants emerge in the past few years.", + "affiliation" : "INF", "health" : 50, "shield" : 75, "speed" : 1.85, diff --git a/data/fighters/missileDart.json b/data/fighters/missileDart.json index 6aa3f66..507a965 100644 --- a/data/fighters/missileDart.json +++ b/data/fighters/missileDart.json @@ -1,6 +1,7 @@ { "name" : "Missile Dart", "description" : "", + "affiliation" : "", "health" : 15, "speed" : 2.1, "reloadTime" : 24, diff --git a/data/fighters/nymph.json b/data/fighters/nymph.json index 51aefd1..083c465 100644 --- a/data/fighters/nymph.json +++ b/data/fighters/nymph.json @@ -1,6 +1,7 @@ { "name" : "Nymph", - "description" : "TODO", + "description" : "A light class starfighter, constructed for use by the United Naval Forces. With the exception of the ATAFs, one of the latest designed and constructed starfighters in recent years.", + "affiliation" : "UNF", "health" : 45, "shield" : 40, "speed" : 2, diff --git a/data/fighters/ray.json b/data/fighters/ray.json index 162d0cf..014ed1b 100644 --- a/data/fighters/ray.json +++ b/data/fighters/ray.json @@ -1,6 +1,7 @@ { "name" : "Ray", - "description" : "TODO", + "description" : "A well armed, armoured and shielded fighter, the Ray compliments a squadron of TAFs well, although it is not as fast nor as manoeuvrable. The Ray is so called due to its outward appearance being quite similar to that of Manta Ray. It also features two seats, though it is possible to fly with one crew members.", + "affiliation" : "CSN", "health" : 70, "shield" : 70, "speed" : 1.85, diff --git a/data/fighters/razor.json b/data/fighters/razor.json index 72f7bdd..3f0fdb9 100644 --- a/data/fighters/razor.json +++ b/data/fighters/razor.json @@ -1,6 +1,7 @@ { "name" : "Razor", - "description" : "TODO", + "description" : "The Razor is a medium-class starfighter, built and deployed by the Kingdom of Tzac. The fighter has a long service history, though it has likely undergone a number of updates and modifications to the base specification since its first appearance in 2571. Like most other Tzac starfighters, the current variation id of the fighter is not known, thought it could lie around F or G.", + "affiliation" : "Tzac", "health" : 45, "shield" : 55, "speed" : 1.75, diff --git a/data/fighters/rocketDart.json b/data/fighters/rocketDart.json index 0ed8f78..1b2dcc5 100644 --- a/data/fighters/rocketDart.json +++ b/data/fighters/rocketDart.json @@ -1,6 +1,7 @@ { "name" : "Rocket Dart", "description" : "", + "affiliation" : "", "health" : 15, "speed" : 2.1, "reloadTime" : 35, diff --git a/data/fighters/rook.json b/data/fighters/rook.json index da33e3a..a9d8ad0 100644 --- a/data/fighters/rook.json +++ b/data/fighters/rook.json @@ -1,6 +1,7 @@ { "name" : "Rook", - "description" : "TODO", + "description" : "The most heavily armed and boosting the greatest defences of all the starfighters in the CSN, the Rook generally only sees action during significant missions and operations, where its increased power can bring many benefits. It is, however, the slowest of all the CSN's starfighters and some pilots have complained that it feels very sluggish in combat.", + "affiliation" : "CSN", "health" : 110, "shield" : 80, "speed" : 1.7, diff --git a/data/fighters/scarab.json b/data/fighters/scarab.json index 253adca..0494498 100644 --- a/data/fighters/scarab.json +++ b/data/fighters/scarab.json @@ -1,6 +1,7 @@ { "name" : "Scarab", - "description" : "TODO", + "description" : "A scarab beetle-shaped bomber, generally used to launch a hail of rockets and missiles at targets. Slow, but quite well armoured and shielded. As with the Hammerhead, it relies on starfighter support to protect it during operations.", + "affiliation" : "INF", "health" : 80, "shield" : 65, "speed" : 1.7, diff --git a/data/fighters/shale.json b/data/fighters/shale.json index 5adf1a0..0c5f651 100644 --- a/data/fighters/shale.json +++ b/data/fighters/shale.json @@ -1,6 +1,7 @@ { "name" : "Shale", - "description" : "TODO", + "description" : "The Shale is a light-class starfighter, based on the Nymph. It is believed to have been constructed by Tzac based on leaked information about the initial design elements of the Nymph. As such, it follows a similar form factor, but differs in both its colour scheme (green, instead of white and blue) and armaments, being equipped with three rapid-fire particle cannons, instead of the Nymph's two plasma cannons. Tzac denied any involvement in the theft of the Nymph's construction details, attesting that it believed the design documents were for a new type of Dart, and as such were not governed by any sort of intergalactic trade secrets.", + "affiliation" : "Tzac", "health" : 50, "shield" : 50, "speed" : 2, diff --git a/data/fighters/simpleDart.json b/data/fighters/simpleDart.json index 57c2453..449c597 100644 --- a/data/fighters/simpleDart.json +++ b/data/fighters/simpleDart.json @@ -1,6 +1,7 @@ { "name" : "Simple Dart", "description" : "", + "affiliation" : "", "health" : 15, "speed" : 2.1, "reloadTime" : 24, diff --git a/data/fighters/sk31.json b/data/fighters/sk31.json index e51bc8b..4a08796 100644 --- a/data/fighters/sk31.json +++ b/data/fighters/sk31.json @@ -1,6 +1,7 @@ { "name" : "SK-31", - "description" : "TODO", + "description" : "The SK-31 is a medium-class starfighter, built and deployed by the Kingdom of Tzac. Unlike the Razor and SK-34, the SK-31 is equipped with two laser cannons, to enable it to disrupt the shields of its target and make it easier to either destroy or disable. It is unknown what the SK in the fighter's name stands for, and whether or not the 31 refers to an iteration or other internal identifier.", + "affiliation" : "Tzac", "health" : 85, "shield" : 50, "speed" : 1.8, diff --git a/data/fighters/sk34.json b/data/fighters/sk34.json index c82d167..89491d4 100644 --- a/data/fighters/sk34.json +++ b/data/fighters/sk34.json @@ -1,6 +1,7 @@ { "name" : "SK-34", - "description" : "TODO", + "description" : "The SK-34 is a medium-class starfighter, built and deployed by the Kingdom of Tzac. Though its exterior appearance is very different to the SK-31, it features similar internal specifications. Unlike the SK-31, however, it is equipped with Mag cannons, instead of lasers. As with the SK-34, it is unknown what the SK in the fighter's name stands for, and whether or not the 34 refers to an iteration or other internal identifier.", + "affiliation" : "Tzac", "health" : 100, "shield" : 45, "speed" : 1.7, diff --git a/data/fighters/sphinx.json b/data/fighters/sphinx.json index 93af649..b361317 100644 --- a/data/fighters/sphinx.json +++ b/data/fighters/sphinx.json @@ -1,6 +1,7 @@ { "name" : "Sphinx", - "description" : "TODO", + "description" : "The Imperial Naval Forces answer to the Rook, the Sphinx is more heavily armed, but equally as fast and protected. Generally a single seated craft, the Sphinx can also accept a rear gunner, making it more difficult for opponents to tail it.", + "affiliation" : "INF", "health" : 110, "shield" : 75, "speed" : 1.85, diff --git a/data/fighters/staticDart.json b/data/fighters/staticDart.json index fb4eb2f..87f5593 100644 --- a/data/fighters/staticDart.json +++ b/data/fighters/staticDart.json @@ -1,6 +1,7 @@ { "name" : "Static Dart", "description" : "", + "affiliation" : "", "health" : 15, "speed" : 0, "reloadTime" : 24, diff --git a/data/fighters/swarmer.json b/data/fighters/swarmer.json index 31161b7..01bcd77 100644 --- a/data/fighters/swarmer.json +++ b/data/fighters/swarmer.json @@ -1,6 +1,7 @@ { "name" : "Swarmer", "description" : "", + "affiliation" : "", "health" : 5, "speed" : 2, "reloadTime" : 8, diff --git a/data/fighters/taf.json b/data/fighters/taf.json index f985d68..9cd603d 100644 --- a/data/fighters/taf.json +++ b/data/fighters/taf.json @@ -1,6 +1,7 @@ { "name" : "TAF", - "description" : "TODO", + "description" : "An all round, multi purpose, single-seat starfighter, the TAF is the most well known and highest produced starfighter within the CSN. Both lightly armoured and shielded, the TAF is easy to handle in the hands of a rookie and praised even by the most experienced of pilots. It makes up for its lack of armour, shielding and armaments by benefiting from good speeds and ease of manoeuvrability.", + "affiliation" : "CSN", "health" : 35, "shield" : 35, "speed" : 2, diff --git a/data/fighters/thunderhead.json b/data/fighters/thunderhead.json index bdbfbf4..fd86b76 100644 --- a/data/fighters/thunderhead.json +++ b/data/fighters/thunderhead.json @@ -1,6 +1,7 @@ { "name" : "Thunderhead", - "description" : "TODO", + "description" : "The Thunderhead evolved from an original concept design for a new bomber, of which it still shares some features (such as a generous supply of missiles and torpedo hardpoints). It is faster than the Scarab bombers, but a lot slower than the Sphinx. It is, however, better armoured and shielded than both. It is rarely seen on the field, as it is now considered old, costly to maintain and has in recent years been superseded by the Sphinx. Despite this, it remains a formidable opponent and its offensive measures means that it is able to take down light-class vessels with ease.", + "affiliation" : "INF", "health" : 90, "shield" : 65, "speed" : 1.7, diff --git a/data/fighters/unarmedDart.json b/data/fighters/unarmedDart.json index 9b29aff..247bd5d 100644 --- a/data/fighters/unarmedDart.json +++ b/data/fighters/unarmedDart.json @@ -1,6 +1,7 @@ { "name" : "Unarmed Dart", "description" : "", + "affiliation" : "", "health" : 15, "speed" : 2.1, "reloadTime" : 24, diff --git a/data/fighters/zakSphinx.json b/data/fighters/zakSphinx.json index fa9fdc9..74edc8b 100644 --- a/data/fighters/zakSphinx.json +++ b/data/fighters/zakSphinx.json @@ -1,6 +1,7 @@ { "name" : "Unique Sphinx", "description" : "", + "affiliation" : "", "health" : 999, "shield" : 999, "speed" : 1.6, diff --git a/data/turrets/plasmaTurret.json b/data/turrets/plasmaTurret.json index d958dfd..76af742 100644 --- a/data/turrets/plasmaTurret.json +++ b/data/turrets/plasmaTurret.json @@ -1,6 +1,7 @@ { "name" : "Plasma Turret", "description" : "", + "affiliation" : "", "health" : 150, "shield" : 25, "speed" : 0, diff --git a/data/turrets/rapidPlasmaTurret.json b/data/turrets/rapidPlasmaTurret.json index 240a2e0..d6e8e7c 100644 --- a/data/turrets/rapidPlasmaTurret.json +++ b/data/turrets/rapidPlasmaTurret.json @@ -1,6 +1,7 @@ { "name" : "Rapid Plasma Turret", "description" : "", + "affiliation" : "", "health" : 150, "shield" : 25, "speed" : 0, diff --git a/data/turrets/rocketTurret.json b/data/turrets/rocketTurret.json index dedffc7..750193a 100644 --- a/data/turrets/rocketTurret.json +++ b/data/turrets/rocketTurret.json @@ -1,6 +1,7 @@ { "name" : "Rocket Turret", "description" : "", + "affiliation" : "", "health" : 125, "shield" : 25, "speed" : 0, diff --git a/src/battle/fighters.c b/src/battle/fighters.c index 755336c..f8b8193 100644 --- a/src/battle/fighters.c +++ b/src/battle/fighters.c @@ -833,6 +833,7 @@ static void loadFighterDef(char *filename) STRNCPY(e->name, cJSON_GetObjectItem(root, "name")->valuestring, MAX_NAME_LENGTH); STRNCPY(e->defName, e->name, MAX_NAME_LENGTH); STRNCPY(e->description, cJSON_GetObjectItem(root, "description")->valuestring, MAX_DESCRIPTION_LENGTH); + STRNCPY(e->affiliation, cJSON_GetObjectItem(root, "affiliation")->valuestring, MAX_NAME_LENGTH); e->health = e->maxHealth = cJSON_GetObjectItem(root, "health")->valueint; e->shield = e->maxShield = getJSONValue(root, "shield", 0); e->speed = cJSON_GetObjectItem(root, "speed")->valuedouble; diff --git a/src/game/fighterDatabase.c b/src/game/fighterDatabase.c index a4482a8..a9ef8dc 100644 --- a/src/game/fighterDatabase.c +++ b/src/game/fighterDatabase.c @@ -107,7 +107,7 @@ void drawFighterDatabase(void) drawText(r.x + 25, 200, 22, TA_LEFT, colors.white, "Affiliation: %s", fighter->affiliation); drawText(r.x + 25, 240, 22, TA_LEFT, colors.white, "Armour: %d", fighter->health); drawText(r.x + 25, 280, 22, TA_LEFT, colors.white, "Shield: %d", fighter->shield); - drawText(r.x + 25, 320, 22, TA_LEFT, colors.white, "Speed: %f", fighter->speed); + drawText(r.x + 25, 320, 22, TA_LEFT, colors.white, "Speed: %.0f", ((fighter->speed * fighter->speed) * FPS)); y = 200;