Renamed "textureName" to simply "texture".

This commit is contained in:
Steve 2016-02-13 14:31:45 +00:00
parent dbf872c9c0
commit a5f73cc3fc
36 changed files with 45 additions and 45 deletions

View File

@ -2,7 +2,7 @@
{ {
"type" : "BT_PARTICLE", "type" : "BT_PARTICLE",
"damage" : 1, "damage" : 1,
"textureName" : "gfx/bullets/particleBolt.png", "texture" : "gfx/bullets/particleBolt.png",
"sound" : "SND_PARTICLE", "sound" : "SND_PARTICLE",
"flags" : "BF_NONE" "flags" : "BF_NONE"
}, },
@ -10,7 +10,7 @@
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",
"damage" : 3, "damage" : 3,
"textureName" : "gfx/bullets/plasmaBolt.png", "texture" : "gfx/bullets/plasmaBolt.png",
"sound" : "SND_PLASMA", "sound" : "SND_PLASMA",
"flags" : "BF_NONE" "flags" : "BF_NONE"
}, },
@ -18,7 +18,7 @@
{ {
"type" : "BT_MISSILE", "type" : "BT_MISSILE",
"damage" : 75, "damage" : 75,
"textureName" : "gfx/bullets/missile.png", "texture" : "gfx/bullets/missile.png",
"sound" : "SND_MISSILE", "sound" : "SND_MISSILE",
"flags" : "BF_ENGINE+BF_EXPLODES" "flags" : "BF_ENGINE+BF_EXPLODES"
}, },
@ -26,7 +26,7 @@
{ {
"type" : "BT_MAG", "type" : "BT_MAG",
"damage" : 10, "damage" : 10,
"textureName" : "gfx/bullets/magBolt.png", "texture" : "gfx/bullets/magBolt.png",
"sound" : "SND_MAG", "sound" : "SND_MAG",
"flags" : "BF_SYSTEM_DAMAGE" "flags" : "BF_SYSTEM_DAMAGE"
}, },
@ -34,7 +34,7 @@
{ {
"type" : "BT_LASER", "type" : "BT_LASER",
"damage" : 5, "damage" : 5,
"textureName" : "gfx/bullets/laser.png", "texture" : "gfx/bullets/laser.png",
"sound" : "SND_LASER", "sound" : "SND_LASER",
"flags" : "BF_SHIELD_DAMAGE" "flags" : "BF_SHIELD_DAMAGE"
}, },
@ -42,7 +42,7 @@
{ {
"type" : "BT_ROCKET", "type" : "BT_ROCKET",
"damage" : 50, "damage" : 50,
"textureName" : "gfx/bullets/missile.png", "texture" : "gfx/bullets/missile.png",
"sound" : "SND_MISSILE", "sound" : "SND_MISSILE",
"flags" : "BF_ENGINE+BF_EXPLODES" "flags" : "BF_ENGINE+BF_EXPLODES"
} }

View File

@ -1,10 +1,10 @@
[ [
{ {
"name" : "crate", "name" : "crate",
"textureName" : "gfx/items/crate.png" "texture" : "gfx/items/crate.png"
}, },
{ {
"name" : "smallCrate", "name" : "smallCrate",
"textureName" : "gfx/items/smallCrate.png" "texture" : "gfx/items/smallCrate.png"
} }
] ]

View File

@ -5,7 +5,7 @@
"speed" : 2, "speed" : 2,
"reloadTime" : 0, "reloadTime" : 0,
"shieldRechargeRate" : 0, "shieldRechargeRate" : 0,
"textureName" : "gfx/craft/civilian01.png", "texture" : "gfx/craft/civilian01.png",
"flags" : "EF_MISSION_TARGET+EF_RETREATING+EF_TAKES_DAMAGE", "flags" : "EF_MISSION_TARGET+EF_RETREATING+EF_TAKES_DAMAGE",
"aiFlags" : "AIF_GOAL_EXTRACTION+AIF_AVOIDS_COMBAT+AIF_FOLLOWS_PLAYER" "aiFlags" : "AIF_GOAL_EXTRACTION+AIF_AVOIDS_COMBAT+AIF_FOLLOWS_PLAYER"
} }

View File

@ -5,7 +5,7 @@
"speed" : 1.5, "speed" : 1.5,
"reloadTime" : 10, "reloadTime" : 10,
"shieldRechargeRate" : 0, "shieldRechargeRate" : 0,
"textureName" : "gfx/craft/munitionsTransport.png", "texture" : "gfx/craft/munitionsTransport.png",
"flags" : "EF_TAKES_DAMAGE", "flags" : "EF_TAKES_DAMAGE",
"aiFlags" : "AIF_AVOIDS_COMBAT" "aiFlags" : "AIF_AVOIDS_COMBAT"
} }

View File

@ -5,7 +5,7 @@
"speed" : 2, "speed" : 2,
"reloadTime" : 0, "reloadTime" : 0,
"shieldRechargeRate" : 60, "shieldRechargeRate" : 60,
"textureName" : "gfx/craft/shuttle.png", "texture" : "gfx/craft/shuttle.png",
"flags" : "EF_COLLECTS_ITEMS+EF_TAKES_DAMAGE", "flags" : "EF_COLLECTS_ITEMS+EF_TAKES_DAMAGE",
"aiFlags" : "AIF_AVOIDS_COMBAT+AIF_COLLECTS_ITEMS" "aiFlags" : "AIF_AVOIDS_COMBAT+AIF_COLLECTS_ITEMS"
} }

View File

@ -5,7 +5,7 @@
"speed" : 1.5, "speed" : 1.5,
"reloadTime" : 10, "reloadTime" : 10,
"shieldRechargeRate" : 0, "shieldRechargeRate" : 0,
"textureName" : "gfx/craft/supplyShip.png", "texture" : "gfx/craft/supplyShip.png",
"deathType" : "DT_NO_SPIN", "deathType" : "DT_NO_SPIN",
"flags" : "EF_TAKES_DAMAGE", "flags" : "EF_TAKES_DAMAGE",
"aiFlags" : "AIF_AVOIDS_COMBAT" "aiFlags" : "AIF_AVOIDS_COMBAT"

View File

@ -5,7 +5,7 @@
"speed" : 1.85, "speed" : 1.85,
"reloadTime" : 10, "reloadTime" : 10,
"shieldRechargeRate" : 0, "shieldRechargeRate" : 0,
"textureName" : "gfx/craft/tug.png", "texture" : "gfx/craft/tug.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PARTICLE", "type" : "BT_PARTICLE",

View File

@ -5,7 +5,7 @@
"speed" : 2.25, "speed" : 2.25,
"reloadTime" : 8, "reloadTime" : 8,
"shieldRechargeRate" : 5, "shieldRechargeRate" : 5,
"textureName" : "gfx/fighters/ataf.png", "texture" : "gfx/fighters/ataf.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 2.1, "speed" : 2.1,
"reloadTime" : 24, "reloadTime" : 24,
"shieldRechargeRate" : 0, "shieldRechargeRate" : 0,
"textureName" : "gfx/fighters/dart01.png", "texture" : "gfx/fighters/dart01.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PARTICLE", "type" : "BT_PARTICLE",

View File

@ -5,7 +5,7 @@
"speed" : 2.1, "speed" : 2.1,
"reloadTime" : 24, "reloadTime" : 24,
"shieldRechargeRate" : 0, "shieldRechargeRate" : 0,
"textureName" : "gfx/fighters/dart01.png", "texture" : "gfx/fighters/dart01.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PARTICLE", "type" : "BT_PARTICLE",

View File

@ -5,7 +5,7 @@
"speed" : 1.85, "speed" : 1.85,
"reloadTime" : 25, "reloadTime" : 25,
"shieldRechargeRate" : 30, "shieldRechargeRate" : 30,
"textureName" : "gfx/fighters/firefly.png", "texture" : "gfx/fighters/firefly.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PARTICLE", "type" : "BT_PARTICLE",

View File

@ -5,7 +5,7 @@
"speed" : 1.7, "speed" : 1.7,
"reloadTime" : 35, "reloadTime" : 35,
"shieldRechargeRate" : 60, "shieldRechargeRate" : 60,
"textureName" : "gfx/fighters/hammerhead.png", "texture" : "gfx/fighters/hammerhead.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.85, "speed" : 1.85,
"reloadTime" : 15, "reloadTime" : 15,
"shieldRechargeRate" : 40, "shieldRechargeRate" : 40,
"textureName" : "gfx/fighters/hyena.png", "texture" : "gfx/fighters/hyena.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.85, "speed" : 1.85,
"reloadTime" : 15, "reloadTime" : 15,
"shieldRechargeRate" : 40, "shieldRechargeRate" : 40,
"textureName" : "gfx/fighters/hyena.png", "texture" : "gfx/fighters/hyena.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 2, "speed" : 2,
"reloadTime" : 14, "reloadTime" : 14,
"shieldRechargeRate" : 45, "shieldRechargeRate" : 45,
"textureName" : "gfx/fighters/jackal.png", "texture" : "gfx/fighters/jackal.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.7, "speed" : 1.7,
"reloadTime" : 35, "reloadTime" : 35,
"shieldRechargeRate" : 60, "shieldRechargeRate" : 60,
"textureName" : "gfx/fighters/khepri.png", "texture" : "gfx/fighters/khepri.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.85, "speed" : 1.85,
"reloadTime" : 16, "reloadTime" : 16,
"shieldRechargeRate" : 60, "shieldRechargeRate" : 60,
"textureName" : "gfx/fighters/kingfisher.png", "texture" : "gfx/fighters/kingfisher.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.7, "speed" : 1.7,
"reloadTime" : 16, "reloadTime" : 16,
"shieldRechargeRate" : 70, "shieldRechargeRate" : 70,
"textureName" : "gfx/fighters/leopard.png", "texture" : "gfx/fighters/leopard.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.7, "speed" : 1.7,
"reloadTime" : 35, "reloadTime" : 35,
"shieldRechargeRate" : 60, "shieldRechargeRate" : 60,
"textureName" : "gfx/fighters/lynx.png", "texture" : "gfx/fighters/lynx.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.85, "speed" : 1.85,
"reloadTime" : 25, "reloadTime" : 25,
"shieldRechargeRate" : 35, "shieldRechargeRate" : 35,
"textureName" : "gfx/fighters/mantis.png", "texture" : "gfx/fighters/mantis.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 2.1, "speed" : 2.1,
"reloadTime" : 24, "reloadTime" : 24,
"shieldRechargeRate" : 0, "shieldRechargeRate" : 0,
"textureName" : "gfx/fighters/dart01.png", "texture" : "gfx/fighters/dart01.png",
"missiles" : 999, "missiles" : 999,
"flags" : "EF_TAKES_DAMAGE" "flags" : "EF_TAKES_DAMAGE"
} }

View File

@ -5,7 +5,7 @@
"speed" : 2, "speed" : 2,
"reloadTime" : 14, "reloadTime" : 14,
"shieldRechargeRate" : 30, "shieldRechargeRate" : 30,
"textureName" : "gfx/fighters/nymph.png", "texture" : "gfx/fighters/nymph.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.85, "speed" : 1.85,
"reloadTime" : 16, "reloadTime" : 16,
"shieldRechargeRate" : 60, "shieldRechargeRate" : 60,
"textureName" : "gfx/fighters/ray.png", "texture" : "gfx/fighters/ray.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.7, "speed" : 1.7,
"reloadTime" : 12, "reloadTime" : 12,
"shieldRechargeRate" : 45, "shieldRechargeRate" : 45,
"textureName" : "gfx/fighters/rook.png", "texture" : "gfx/fighters/rook.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.7, "speed" : 1.7,
"reloadTime" : 35, "reloadTime" : 35,
"shieldRechargeRate" : 60, "shieldRechargeRate" : 60,
"textureName" : "gfx/fighters/scarab.png", "texture" : "gfx/fighters/scarab.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 2.1, "speed" : 2.1,
"reloadTime" : 24, "reloadTime" : 24,
"shieldRechargeRate" : 0, "shieldRechargeRate" : 0,
"textureName" : "gfx/fighters/dart01.png", "texture" : "gfx/fighters/dart01.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PARTICLE", "type" : "BT_PARTICLE",

View File

@ -5,7 +5,7 @@
"speed" : 1.85, "speed" : 1.85,
"reloadTime" : 14, "reloadTime" : 14,
"shieldRechargeRate" : 60, "shieldRechargeRate" : 60,
"textureName" : "gfx/fighters/sphinx.png", "texture" : "gfx/fighters/sphinx.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,6 +5,6 @@
"speed" : 0, "speed" : 0,
"reloadTime" : 24, "reloadTime" : 24,
"shieldRechargeRate" : 0, "shieldRechargeRate" : 0,
"textureName" : "gfx/fighters/dart01.png", "texture" : "gfx/fighters/dart01.png",
"flags" : "EF_TAKES_DAMAGE" "flags" : "EF_TAKES_DAMAGE"
} }

View File

@ -5,7 +5,7 @@
"speed" : 2, "speed" : 2,
"reloadTime" : 16, "reloadTime" : 16,
"shieldRechargeRate" : 50, "shieldRechargeRate" : 50,
"textureName" : "gfx/fighters/taf.png", "texture" : "gfx/fighters/taf.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,7 +5,7 @@
"speed" : 1.7, "speed" : 1.7,
"reloadTime" : 12, "reloadTime" : 12,
"shieldRechargeRate" : 65, "shieldRechargeRate" : 65,
"textureName" : "gfx/fighters/thunderhead.png", "texture" : "gfx/fighters/thunderhead.png",
"guns" : [ "guns" : [
{ {
"type" : "BT_PLASMA", "type" : "BT_PLASMA",

View File

@ -5,6 +5,6 @@
"speed" : 2.1, "speed" : 2.1,
"reloadTime" : 24, "reloadTime" : 24,
"shieldRechargeRate" : 0, "shieldRechargeRate" : 0,
"textureName" : "gfx/fighters/dart01.png", "texture" : "gfx/fighters/dart01.png",
"flags" : "EF_TAKES_DAMAGE" "flags" : "EF_TAKES_DAMAGE"
} }

View File

@ -5,7 +5,7 @@
"speed" : 0, "speed" : 0,
"reloadTime" : 30, "reloadTime" : 30,
"shieldRechargeRate" : 10, "shieldRechargeRate" : 10,
"textureName" : "gfx/cannons/plasmaTurret.png", "texture" : "gfx/cannons/plasmaTurret.png",
"deathType" : "DT_NO_SPIN", "deathType" : "DT_NO_SPIN",
"guns" : [ "guns" : [
{ {

View File

@ -5,7 +5,7 @@
"speed" : 0, "speed" : 0,
"reloadTime" : 8, "reloadTime" : 8,
"shieldRechargeRate" : 30, "shieldRechargeRate" : 30,
"textureName" : "gfx/cannons/rocketTurret.png", "texture" : "gfx/cannons/rocketTurret.png",
"deathType" : "DT_NO_SPIN", "deathType" : "DT_NO_SPIN",
"guns" : [ "guns" : [
{ {

View File

@ -54,7 +54,7 @@ void initBulletDefs(void)
def = &bulletDef[type]; def = &bulletDef[type];
def->type = type; def->type = type;
def->damage = cJSON_GetObjectItem(node, "damage")->valueint; def->damage = cJSON_GetObjectItem(node, "damage")->valueint;
def->texture = getTexture(cJSON_GetObjectItem(node, "textureName")->valuestring); def->texture = getTexture(cJSON_GetObjectItem(node, "texture")->valuestring);
def->sound = lookup(cJSON_GetObjectItem(node, "sound")->valuestring); def->sound = lookup(cJSON_GetObjectItem(node, "sound")->valuestring);
def->flags = flagsToLong(cJSON_GetObjectItem(node, "flags")->valuestring, NULL); def->flags = flagsToLong(cJSON_GetObjectItem(node, "flags")->valuestring, NULL);

View File

@ -101,7 +101,7 @@ Entity *spawnFighter(char *name, int x, int y, int side)
static void randomizeDart(Entity *dart) static void randomizeDart(Entity *dart)
{ {
char textureName[MAX_DESCRIPTION_LENGTH]; char texture[MAX_DESCRIPTION_LENGTH];
if (rand() % 5 == 0) if (rand() % 5 == 0)
{ {
@ -128,9 +128,9 @@ static void randomizeDart(Entity *dart)
dart->missiles = rand() % 3; dart->missiles = rand() % 3;
sprintf(textureName, "gfx/fighters/dart0%d.png", 1 + rand() % 7); sprintf(texture, "gfx/fighters/dart0%d.png", 1 + rand() % 7);
dart->texture = getTexture(textureName); dart->texture = getTexture(texture);
} }
static void randomizeDartGuns(Entity *dart) static void randomizeDartGuns(Entity *dart)
@ -657,7 +657,7 @@ static void loadFighterDef(char *filename)
e->speed = cJSON_GetObjectItem(root, "speed")->valuedouble; e->speed = cJSON_GetObjectItem(root, "speed")->valuedouble;
e->reloadTime = cJSON_GetObjectItem(root, "reloadTime")->valueint; e->reloadTime = cJSON_GetObjectItem(root, "reloadTime")->valueint;
e->shieldRechargeRate = cJSON_GetObjectItem(root, "shieldRechargeRate")->valueint; e->shieldRechargeRate = cJSON_GetObjectItem(root, "shieldRechargeRate")->valueint;
e->texture = getTexture(cJSON_GetObjectItem(root, "textureName")->valuestring); e->texture = getTexture(cJSON_GetObjectItem(root, "texture")->valuestring);
SDL_QueryTexture(e->texture, NULL, NULL, &e->w, &e->h); SDL_QueryTexture(e->texture, NULL, NULL, &e->w, &e->h);

View File

@ -47,7 +47,7 @@ void loadItemDefs(void)
e->active = 1; e->active = 1;
STRNCPY(e->name, cJSON_GetObjectItem(node, "name")->valuestring, MAX_NAME_LENGTH); STRNCPY(e->name, cJSON_GetObjectItem(node, "name")->valuestring, MAX_NAME_LENGTH);
STRNCPY(e->defName, cJSON_GetObjectItem(node, "name")->valuestring, MAX_NAME_LENGTH); STRNCPY(e->defName, cJSON_GetObjectItem(node, "name")->valuestring, MAX_NAME_LENGTH);
e->texture = getTexture(cJSON_GetObjectItem(node, "textureName")->valuestring); e->texture = getTexture(cJSON_GetObjectItem(node, "texture")->valuestring);
e->health = e->maxHealth = FPS; e->health = e->maxHealth = FPS;