From 4c04cc39beb9423ddfff238720b266e4c489ad99 Mon Sep 17 00:00:00 2001 From: Dave Vandervies Date: Sat, 14 Dec 2019 16:17:40 -0500 Subject: [PATCH] Don't put variable definitions in header --- character.c | 14 ++++++++++++++ character.h | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/character.c b/character.c index f70ec59..dd86b7d 100644 --- a/character.c +++ b/character.c @@ -6,6 +6,20 @@ #include "chargen.h" #include "character.h" +unsigned long profs; +unsigned long languages; +char otherprofs[100]; +char* background; +char* race; +char* class; + +char* classes[] = {"Barbarian", "Bard", "Cleric", "Druid", "Fighter", "Monk", "Paladin", "Ranger", "Rogue", "Sorcerer", "Warlock", "Wizard" }; +char* races[] = { "Dragonborn", "Dwarf", "Elf", "Gnome", "Half-Elf", "Halfling", "Half-Orc", "Human", "Tiefling" }; +char* backgrounds[] = { "Acolyte", "Charlatan", "Criminal", "Entertainer", "Folk Hero", "Guild Artisan", "Hermit", "Noble", "Outlander", "Sage", "Sailor", "Soldier", "Urchin" }; +int stats[6]; +int mods[6]; +int hp; + int dieroll(int num,int sides){ int total = 0; for(num;num>0;num--){ diff --git a/character.h b/character.h index c8bee84..dbeddd6 100644 --- a/character.h +++ b/character.h @@ -79,17 +79,3 @@ #define INT 3 #define WIS 4 #define CHA 5 - -unsigned long profs; -unsigned long languages; -char otherprofs[100]; -char* background; -char* race; -char* class; - -char* classes[] = {"Barbarian", "Bard", "Cleric", "Druid", "Fighter", "Monk", "Paladin", "Ranger", "Rogue", "Sorcerer", "Warlock", "Wizard" }; -char* races[] = { "Dragonborn", "Dwarf", "Elf", "Gnome", "Half-Elf", "Halfling", "Half-Orc", "Human", "Tiefling" }; -char* backgrounds[] = { "Acolyte", "Charlatan", "Criminal", "Entertainer", "Folk Hero", "Guild Artisan", "Hermit", "Noble", "Outlander", "Sage", "Sailor", "Soldier", "Urchin" }; -int stats[6]; -int mods[6]; -int hp;