From 56ff55bb2803cb6adea0a1a324272b32b4d1eba3 Mon Sep 17 00:00:00 2001 From: GeneralGuy4872 Date: Thu, 9 Jan 2020 09:14:08 -0600 Subject: [PATCH] push commit; movement preliminary --- src/class_cleric.carray | 16 +- src/class_fighter.carray | 16 +- src/class_magic_user.carray | 16 +- src/class_rogue.carray | 16 +- src/commodities.txt | 177 ++++++++++++++++++++ src/gemstones.carray | 32 +++- src/main.c | 165 +++++++++++-------- src/monster0.carray | 7 +- src/monster1.carray | 2 +- src/monster2.carray | 2 +- src/objects.messy | 6 +- src/playermove.messy | 268 +++++++++++++++++++++++++++++++ src/questdialogs/avianinn.txt | 7 + src/questdialogs/greedyjudge.txt | 5 + src/render.messy | 25 --- src/tileget.c | 17 ++ src/types.h | 143 ++++++++++------- src/util.c | 2 - src/util.h | 2 + 19 files changed, 728 insertions(+), 196 deletions(-) create mode 100644 src/commodities.txt create mode 100644 src/playermove.messy create mode 100644 src/questdialogs/avianinn.txt create mode 100644 src/questdialogs/greedyjudge.txt create mode 100644 src/tileget.c diff --git a/src/class_cleric.carray b/src/class_cleric.carray index dd977ba..7656a8c 100644 --- a/src/class_cleric.carray +++ b/src/class_cleric.carray @@ -1,8 +1,8 @@ -{"healer","healers"}, -{"cleric","clerics"}, -{"priest","priests"}, -{"druid","druids"}, -{"alchemist","alchemists"}, -{"scholar","scholars"}, -{"white mage","white mages"}, -{"seer","seers"} +{"healer","","s"}, +{"cleric","","s"}, +{"priest","","s"}, +{"druid","","s"}, +{"alchemist","","s"}, +{"scholar","","s"}, +{"white mage","","s"}, +{"seer","","s"} diff --git a/src/class_fighter.carray b/src/class_fighter.carray index f4a35d3..0f16c51 100644 --- a/src/class_fighter.carray +++ b/src/class_fighter.carray @@ -1,8 +1,8 @@ -{"fighter","fighters"} -{"knight","knights"}, -{"paladin","paladins"}, -{"valkyrie","valkyries"}, -{"viking","vikings"}, -{"samuri","samuri"}, -{"ranger","rangers"}, -{"monk","monks} +{"fighter","","s"} +{"knight","","s"}, +{"paladin","","s"}, +{"valkyrie","","s"}, +{"viking","","s"}, +{"samuri","",""}, +{"ranger","","s"}, +{"monk","","s"} diff --git a/src/class_magic_user.carray b/src/class_magic_user.carray index 7291fd5..ffe851d 100644 --- a/src/class_magic_user.carray +++ b/src/class_magic_user.carray @@ -1,8 +1,8 @@ -{"magic-user","magic-users"}, -{"wizard","wizards"}, -{"illusionist","illusionists"}, -{"enchanter","enchanters"}, -{"black mage","black mages"}, -{"red mage","red mages}, -{"psion","psions"}, -{"necromancer","necromancers"} +{"magic-user","","s"}, +{"wizard","","s"}, +{"illusionist","","s"}, +{"enchanter","","s"}, +{"black mage","","s"}, +{"red mage","","s"}, +{"psion","","s"}, +{"necromancer","","s"} diff --git a/src/class_rogue.carray b/src/class_rogue.carray index 1d04209..cf1e676 100644 --- a/src/class_rogue.carray +++ b/src/class_rogue.carray @@ -1,8 +1,8 @@ -{"changeling","changelings"}, -{"rogue","rogues"}, -{"thief","thieves"}, -{"pirate","pirates"}, -{"ninja","ninjas"}, -{"assasin","assasins"}, -{"tourist","tourists"}, -{"ronan","ronans"} +{"changeling","","s"}, +{"rogue","","s"}, +{"thie","f","ves"}, +{"pirate","","s"}, +{"ninja","","s"}, +{"assasin","","s"}, +{"tourist","","s"}, +{"ronan","","s"} diff --git a/src/commodities.txt b/src/commodities.txt new file mode 100644 index 0000000..169ff91 --- /dev/null +++ b/src/commodities.txt @@ -0,0 +1,177 @@ +magnetite +haematite +limonite +akome +masa +cuprite +malachite +stibnite +calamine +galena +nickeline +chromite +cinnabar +wolframite +charcoal +bitumous +andersite //contains jets if powdered +graphite //contains carbonados if powdered or burned +manganese +sulphur +spiegeleisen +meteorite //contains stardust if powderized +lapis lazuli +red ocher +yellow ocher +bauxite +sphalerite +acanthite +arquerite +natural gold +natural brass +orichalcum +ilmenite +indigo +tyrian purple +kermes +woad +woad seed +weld +weld seed +madder +madder seed +henna +logwood +saffron +saffron seed +titania +gypsum +gold dust +stardust +silk, thread +silk, yarn +silk, bolt +spider silk, silver, thread +spider silk, silver, yarn +spider silk, silver, bolt +spider silk, gold, thread +spider silk, gold, yarn +spider silk, gold, bolt +spider silk, rope +cotton, fluff //also seeds +cotton, thread +cotton, yarn +cotton, fabric +cotton, rope +linseed //contains linseed oil if "powderized" +linseed oil +flax, thread +flax, yarn +flax, rope +rayon, thread +rayon, yarn +rayon, fabric +rayon, rope +wool, fluff +wool, thread +wool, yarn +wool, bolt +coir, fiber //coconut +coir, twine +coir, rope +jute seed +jute, fiber +jute, twine +jute, rope +linen +burlap +pigiron ingot +iron ingot +iron plate +carbon steel ingot //flattens to steel plate +sword steel ingot +spring steel ingot +tool steel ingot //flattens to steel plate +stainless steel ingot //flattens to stainless steel plate +damascus steel ingot +steel plate +stainless steel plate +copper billet //flattens to copper plate +bronze billet //flattens to bronze plate +brass billet //flattens to brass plate +copper plate +bronze plate +brass plate +gold ingot //powders to gold dust, flattens to goldfoil +silver ingot +electrum ingot +tin ingot //flattens to tinfoil +bellmetal billet +ferrochrome ingot +nickel ingot +aluminum billet +aluminum plate +tungsten ingot +titanium ingot //flattens to titanium plate +titanium gold ingot //flattens to titanium gold plate +titanium plate +titanium gold plate +fine pewter ingot +ley pewter ingot +aluminum amalgam +gold amalgum +gold foil +tinfoil +flint +slate +obsidian +flugurite //lightning glass +bone //metadata enabled +tusk //metadata enabled +horn //metadata enabled +antler //metadata enabled +leather //metadata enabled +tooth //metadata enabled +feathers //metadata enabled +stick //metadata enabled +log //metadata enabled +gear //metadata enabled +spring +hairspring +clay +papyrus +paper +brick +tablet +pumice +limestone block //contains flint if powderized +dolomite block //contains flint if powderized +soapstone block +marble block +sandstone block +quartzite block //contains quartz (assorted) if powderized +granite block +gabbro block +basalt column +kimberlite chunk //contains diamonds if powderized +peridotite chunk //contains peridots if powderized +flint arrowhead +obsidian arrowhead +brass arrowhead +bronze arrowhead +steel arrowhead +titanium arrowhead +bone spearhead +ivory spearhead +copper spearhead +bronze spearhead +brass spearhead +iron spearhead +steel spearhead +stainless steel spearhead +damascus steel spearhead +titanium spearhead +stone hammerhead +brass hammerhead +iron hammerhead +steel hammerhead diff --git a/src/gemstones.carray b/src/gemstones.carray index 8410617..9c39bd4 100644 --- a/src/gemstones.carray +++ b/src/gemstones.carray @@ -1,8 +1,24 @@ -{"jet","jets"}, -{"sapphire","sapphires"}, -{"emerald","emeralds"}, -{"turquoise","turquoises"}, -{"ruby","rubies"}, -{"amythest","amythests"}, -{"heliodor","heliodors"}, -{"diamond","diamonds"} +{"jet","","s"}, +{"lapis lazuli","","i"}, +{"prasiolite","","s"}, +{"turquoise","","s"}, +{"garnet","","s"}, +{"amythest","","s"}, +{"citrine","","s"}, +{"quartz","","es"} +{"onyx","","es"}, +{"sapphire","","s"}, +{"peridot","","s"}, +{"aquamarine","","s"}, +{"spinel","","s"}, +{"ametrine","","s"}, +{"topaz","","es"}, +{"opal","","s"}, +{"carbonado","","s"}, +{"blue diamond","","s"}, +{"emerald","","s"}, +{"alexandrite","","s"}, +{"rub","y","ies"}, +{"pink diamond","","s"}, +{"heliodor","","s"}, +{"diamond","","s"} diff --git a/src/main.c b/src/main.c index 7aafbf9..fc52ee2 100644 --- a/src/main.c +++ b/src/main.c @@ -102,9 +102,13 @@ * seem to meet all the requirements, but note: they predate the invention of unicode. * * Controls: + * - ? show help * - number keys move in xy * - + or - followed by a number move in xyz + * - ++ or -- move in z * - < > strafe + * - ~ take flight without leaving your current space + * - ` land or dive * - backspace retreats (winged creatures also take flight) * - spacebar attacks * - tab picks up items @@ -125,7 +129,7 @@ * - F5 toggles dingbats (free action) * - . face a direction * - . ( "<" | ">" ) rotate that direction - * - . . turn around + * - , turn around * - \ initiates command entry. free action itself, but most commands are not. * more tbd * @@ -319,31 +323,6 @@ char* TERM * a default one will be provided, however. */ -//anonomous pointers, could be anything. they're anonomous. -struct drum { - char data[DRUMSIZE] - short top - } - -void* drumalloc (ptr,amount) -struct drum ptr -size_t amount -{ -if ((ptr->top + amount) ≤ (DRUMSIZE)) { - void* output = ptr->data[ptr->top] - ptr->top += amount - return output - } -else {return NULL} -} - -drumpop (ptr,amount) -struct drum ptr -size_t amount -{ -ptr->top = MAX(ptr->top - amount,0) -} - setlocale(LC_ALL, ""); initialize() { @@ -492,8 +471,32 @@ struct odds_n_ends * GLOBOOLS //shared; may be mmapped #define NOON GLOBOOLS->noon #define EVE GLOBOOLS->eve #define MIDNIT GLOBOOLS->midnit +char TMPBUFFERS[16][BUFFER_MAX]; //not saved +uchar TMPBUFFERNEXT; //not saved /*end GLOBALS*/ +char * tmpbufferalloc() { + char * output = TMPBUFFERS[TMPBUFFERNEXT][0]; + if (output[0]) { + memset(output,0,strlen(output)); + } + TMPBUFFERNEXT = (TMPBUFFERNEXT + 1) & 0x0F; + return output; + }/* this construct eliminates the need for using dynamic variables + * to pass buffers, and thus eliminates the possibility of memory + * leaks from doing so poorly. as a trade-off, however, only 16 + * strings may be held in the pseudoregisters at a time before + * being overwritten. there is no conceivable reason this should + * be a problem, however, with the paradigms I am working under. + */ + +char * getname(pluralwords this,bool plural) { + char * output = tmpbufferalloc(); + strcpy(output,this[0]); + strcat(output,this[1 + plural]); + return output; + } + bool ticktock() { TURN++; TIMER.lo++; @@ -558,7 +561,7 @@ char* psystabs[8] = {"detect alignment","charm","psychic lock","sleep","mind bla uchar id //switch case for each psionic ability -char (*classnametable[2])[8][4] = { +pluralwords classnametable[8][4] = { { #include "class_rogue.carray" },{ @@ -571,7 +574,7 @@ char (*classnametable[2])[8][4] = { struct baseclasstyp classtable[4][8][4]; -char (*monstabs[2])[256][16] = { +pluralwords monstabs[256][16] = { #include "monster0.carray" },{ #include "monster1.carray" @@ -580,14 +583,8 @@ char (*monstabs[2])[256][16] = { }} basentyp (*montable[256])[16] = { -/* contains all polymorphable monsters, of type BASENTYPE. - * all C0 controls should be valid starting races, or left empty, - * any polymorphable race can BECOME your base race... - * - * if you become polylocked to a non-player race, your class will be removed. - * becoming polylocked to one of the C0 entrys has no negative effects. - * commands can change your base race without negative side effects - */ +// contains all polymorphable monsters, of type BASENTYPE. +} /* MONSTERS BY LETTER * & : horned devil, balrog, jubilix, kerr, @@ -596,10 +593,10 @@ basentyp (*montable[256])[16] = { * a : newt, salamander, frog, * B : bear, polar bear, owlbear, * b : mockingbird, parkeet, parrot, macaw, cockatoo, songbird, sparrow, starling, jay, magpie, jackdaw, - * C : satyr, centaur, + * C : satyr, centaur, minotaur, * c : chickatrice, cockatrice, pyrolisk, * D : /(△red|↯copper|◬white|*cyan|▽blue|♠green|⍫brown|$gold|☽black|☼silver|∅grey) dragon/, - * d : hellhound, wolf, dire wolf, dog, fox, cyote, + * d : hellhound, wolf, dire wolf, dog, fox, cyote, dingo, * E : , stalker, * e : floating eye, * F : panther, lion, tiger, manticore, cat, lynx, bobcat, @@ -618,16 +615,16 @@ basentyp (*montable[256])[16] = { * l : leprachaun, * M : elephant, mammoth, rhino, * m : - * N : naga, half dragon, + * N : naga, half dragon, cecaelia, * n : merfolk, naiad, dryad, sea siren, * O : orc, half orc, uruk-hai, ogre, * o : ostrich, emu, moa, * P : dolphin, narwhal, orca, beluga, * p : penguin, puffin, auk, albatross, - * Q : fiend, drider, erinys, tiefling, + * Q : fiend, drider, erinys, tiefling, scorpio, * q : quasit, imp, homunculus, * R : eagle, falcon, owl, kite, vulture, phoenix, raven, rook, crow, - * r : mouse, rat, dire rat, raccoon, badger, opossum, platypus, groundhog, + * r : mouse, rat, dire rat, raccoon, badger, opossum, platypus, groundhog, tasmanian devil, * S : shark, stingray, swordfish, barracuda, eel, * s : copperhead, cobra, rattlesnake, python, boa, viper, coral snake, king snake, anaconda, * T : lurker above, trapper, wallmaster, rust monster, @@ -648,10 +645,12 @@ basentyp (*montable[256])[16] = { * «»: bass, trout, salmon, tuna, carp, pike, halibut, herring, cod * × : lizard, geko, skink, * ÷ : lobster, crab, shrimp, - * £ : justice. (strictly-lawful neutral) - * ⊜ : [spoiler] - * ¶ : da fuzz. (lawful neutral) + * ✯ : [spoiler] + * ✰ : [spoiler] + * ✪ : [spoiler] * Ω : [spoiler] + * ⏄ : justice. (strictly-lawful neutral) + * ¶ : da fuzz. (lawful neutral) * ⑄ : retribution. (chaotic neutral) * ∀ : ox, cow, pig, buffalo, goat, sheep, * ∄ : fear itself. (neutral somewhat-evil) @@ -665,8 +664,7 @@ basentyp (*montable[256])[16] = { * ≷?≶ ≶?≷ >?< ≤?≥ ≥?≤ ≪?≫ ≫?≪ wings * some wings disappear when not flying; others are permenantly visable * - * z : asleep - * not rendered in the pgup or pgdn views + * z indicates an entity is asleep. it is not rendered in pgup or pgdn view. * * these are rendered before (under) entities, but after tiles on each slice. */ @@ -700,6 +698,45 @@ char* wandmaterials[16] = {"oak","ash","yew","honeylocust","silver","bronze","ir char* baubmaterials[8] = {"yew","bronze","silver","gold","soapstone","ivory","obsidian","stardust"} //stoning -> soapstone +bool get_collision_map (roomtyp * this,char x,char y,char z) { + if (z < this->ceiling) { + switch (z) : { + case 0 : return this->collisionmap.solid[y + 1][x + 1] & 0x8000; + case 1 : return this->collisionmap.solid[y + 1][x + 1] & 0x4000; + case 2 : return this->collisionmap.solid[y + 1][x + 1] & 0x2000; + case 3 : return this->collisionmap.solid[y + 1][x + 1] & 0x1000; + case 4 : return this->collisionmap.solid[y + 1][x + 1] & 0x0800; + case 5 : return this->collisionmap.solid[y + 1][x + 1] & 0x0400; + case 6 : return this->collisionmap.solid[y + 1][x + 1] & 0x0200; + case 7 : return this->collisionmap.solid[y + 1][x + 1] & 0x0100; + case 8 : return this->collisionmap.solid[y + 1][x + 1] & 0x0080; + case 9 : return this->collisionmap.solid[y + 1][x + 1] & 0x0040; + case 0xA : return this->collisionmap.solid[y + 1][x + 1] & 0x0020; + case 0xB : return this->collisionmap.solid[y + 1][x + 1] & 0x0010; + case 0xC : return this->collisionmap.solid[y + 1][x + 1] & 0x0008; + case 0xD : return this->collisionmap.solid[y + 1][x + 1] & 0x0004; + case 0xE : return this->collisionmap.solid[y + 1][x + 1] & 0x0002; + case 0xF : return this->collisionmap.solid[y + 1][x + 1] & 0x0001; + default : return 0; + } + } + else if (z == this->ceiling) { + div_t tmp = div(x,8); + switch (tmp.quot) : { + case 0 : return this->collisionmap.holes[y][tmp.rem] & 0x80; + case 1 : return this->collisionmap.holes[y][tmp.rem] & 0x40; + case 2 : return this->collisionmap.holes[y][tmp.rem] & 0x20; + case 3 : return this->collisionmap.holes[y][tmp.rem] & 0x10; + case 4 : return this->collisionmap.holes[y][tmp.rem] & 0x08; + case 5 : return this->collisionmap.holes[y][tmp.rem] & 0x04; + case 6 : return this->collisionmap.holes[y][tmp.rem] & 0x02; + case 7 : return this->collisionmap.holes[y][tmp.rem] & 0x01; + default : return 0; + } + } + return 0; + } + set_collision_map (roomtyp * this,char x,char y,char z,bool q) { if (z < this->ceiling) { if (q) { @@ -788,14 +825,14 @@ set_collision_map (roomtyp * this,char x,char y,char z,bool q) { } } -char* gemcolors[2][8] = { +pluralwords gemcolors[24] = { #include "gemstones.carray" } //stoning has no effect /* cut varys by color: - * diamond = {uncut,cushion-cut,princess-cut,perfect-cut} - * beryls,emerald={uncut,oval-cut,emerald-cut,teardrop} redundancy of emerald-cut emerald is redundant - * amythest={geode,prismatic,cushion-cut,teardrop} - * jet,turquoise={piece of,byzantine,polyhedral,carved relif in} + * diamonds = {uncut,cushion-cut,princess-cut,perfect-cut} + * beryls,corundums,olivine,topaz = {uncut,oval-cut,emerald-cut,teardrop} (redundancy of emerald-cut emerald is redundant) + * quartzes = {geode,prismatic,cushion-cut,teardrop} + * others = {piece of,byzantine,polyhedral,carved relif in} */ /*blackbox*/radius @@ -825,20 +862,20 @@ or pointers (which are volatile state) an UNDERLINE is a shadow note: unicode symbols are (mostly) used be their appearence, not by their meaning -) is a sword or dagger. ⍏ are polearms. ! is a staff. ⇞ is a club or mace. ℓ is a whip. ␋ is a flail. ( is a bow. ⇤ is an arrow. ⇲ is a writing instrument. -⟦ is armor. [ is clothing. ] is a shield. ⟧ are cannons or greeves. ☜☝☞☟ is a gauntlet. % is meat. ± is food (don't shoot it). $ is gold. ¢ is copper. -⌘ is a misc item. ↧ is a digging tool. ⌥ is a key or lockpick. ♫ is a lyre. ƒ is a violin. ♪ is a lute. ≣ is a staircase or ladder. -¿ are potions (fragile). ∫ is a scroll. ⊒ is a book. ∩ is a tablet. ° is a ring. º is a bracelet. ª is an amulet. ¬ is a crown. +) is a sword or dagger. ⍏ are polearms. | is a staff. ⇞ is a club or mace. ℓ is a whip. ↸ is a flail. ( is a bow. ➵ is an arrow. ⇲ is a writing instrument. +⟦ is armor. [ is clothing. ] is a shield. ⟧ are cannons or greeves. ☜☝☞☟ is a gauntlet. % is meat. ± is food (don't shoot it). £ $ ſ ¢ ¼ ½ ⅛ are coins +⌘ is a misc item. ↧ is a digging tool. ⌥ is a key or lockpick. ♫ is a lyre. ƒ is a violin. ♪ is a lute. ≣ is a staircase. # is a ladder. +¿ are potions (fragile). ∫ is a scroll. ⊒ is a book. ∩ is a tablet. ° is a ring. º is a bracelet. ª is an amulet. ^ is a crown. ¡ is a wand. ⋎ is a fountain or gyser. ⍾ is a bell. ⎋ is a clockface. ♠ ♣ ‡ are trees. ⋏ is fire. ♜ is a pedestal. -≋ is deep liquid's surface. ∬ is a waterfall. ≈ is a shallow liquid's surface, or a deep liquid below surface. ~ (centered) is a puddle. -⌁ is electricity. * is ice. ⎈ spider web. ⌬ beehive. ↥ are spikes. ⎙ ⍝ ⎍ ∎ ⎅ are tombstones or signs. ␥ is glass. -• is a boulder. . is a rock. # ♯ is a rockslide. ◇ is a gemstone. ◊ is a giant magic crystal. ? is somone wearing a cowled cloak. +≋ is deep liquid's surface. ∬ is a waterfall. ≈ is a shallow liquid's surface, or a deep liquid below surface. ~ is a puddle. +⌁ is electricity. * is ice. ⎈ spider web. ⌬ beehive. ⇫ are wooden spikes. ↥ are metal spikes. ⎙ ⍝ ⎍ ∎ ⎅ are tombstones or signs. ␥ is glass. +• is a boulder. . is a rock. : is a rockslide. ◇ is a gemstone. ◊ is a giant magic crystal. ? is somone wearing a cowled cloak. ∪ is a sink. ⏍ is a chest. ↯ is the thunderbolt. ∅ is a spacetime anomaly (do not touch). ⍍ ⍔ are level stairs. -⇡ ⇣ ← ↑ → ↓ ↖ ↗ ↘ ↙ are flying projectiles, or facing direction. ⇐ ⇑ ⇒ ⇓ ⇖ ⇗ ⇘ ⇙ are ballistae. ✪ is a rune. ː ˑ are traps. -█ ▓ ▒ ░ ▞ ▚ ⣿ (etc) are thick walls or floor. ☁ ≎ are clouds. ☈ is a thundercloud (keep your head out of them). ⁂ is fog. -^ ␣ are holes. , is a plant. ; is a grain or sunflower (impassable). ⌸ is a door. ⍯ is a locked door. ⎕ is an open door. -box drawings are low walls or columns. ¦ Ⅲ are iron bars. / \ " are sunbeams. = is a gate. ≠ is a locked gate. : is an open gate -⍽ is mud. ≃ ≊ is stagnent water (unbreathable). ☯ is a reflecting pool. ⍬ is a mirror. ♄ is an antimagic field. +⇡ ⇣ ← ↑ → ↓ ↖ ↗ ↘ ↙ are flying projectiles, or facing direction. ⇐ ⇑ ⇒ ⇓ ⇖ ⇗ ⇘ ⇙ are ballistae. ! is a trap. ⁂ is fog. +█ ▓ ▒ ░ ▞ ▚ ⣿ (etc) are thick walls or floor. = is a board. ≠ is a rotten board. ☁ ≎ are clouds. ☈ is a thundercloud (keep your head out of them). +` ␣ are holes. , is a plant. ; is a grain or sunflower (impassable). ⍠ is a door or gate. ⌹ is a locked door or gate. ⎕ is an open door or gate. +box drawings are low walls or columns. ¦ Ⅲ are iron bars. ⊜ is a manhole cover. ♯ is a grate. / \ are sunbeams. +¬ is mud. ☯ is a reflecting pool. ⍬ is a mirror. ♄ is an antimagic field. a prompt at launch uses user responce to choose between using ~ or ∼ for centered tilde. handling of solid vs outlined symbols will use the solid symbol for a forground different from the background, @@ -974,7 +1011,7 @@ bool maskfetch(zcoord,ycoord,xcoord,mask) uchar zcoord uchar ycoord uchar xcoord -shadowmask mask +shadowmask * mask { switch (zcoord) : { case 0 : return (bool) (mask[ycoord][xcoord] & 0x8000); diff --git a/src/monster0.carray b/src/monster0.carray index 457b85a..09b17b4 100644 --- a/src/monster0.carray +++ b/src/monster0.carray @@ -1,3 +1,4 @@ -{"human","humans"},{"elf","elves"},{"dwarf","dwarfs"},{"gnome","gnomes"},{"hobbit","hobbits"},{"half elf","half elves"},{"drow","drow"},{"orc","orks"},{"half orc","half orks"},{"half dragon","half dragons"},/*half celestial*/,{"tiefling","tieflings"},{"half air elemental","half air elementals"},{"half water elemental","half water elementals"},{"half earth elemental","half earth elementals"},{"half fire elemental","half fire elementals"}, -{"merfolk","merfolk},{"sea elf","sea elves"},{"satyr","satyres"},{"fairy","fairies"},{"pixie","pixies"},{"naiad","naiads"},{"wood elf","wood elves"},{"dryad","dryads"},{"naga","nagas"},{"kobald","kobalds"},{"centaur","centaurs"},{"sphinx","sphinxes"},{"half electric elemental","half electric elementals"},{"half ice elemental","half ice elementals"},{"half nature elemental","half nature elementals"},{"half metal elemental","half metal elementals"}, -{"siren","sirens"},{"harpy","harpies"},{"erinys","erinyes"},{"kerr","keres"}, +{"human","","s"},{"el","f","ves"},{"dwarf","","s"},{"gnome","","s"},{"hobbit","","s"},{"half el","f","ves"},{"drow","",""},{"or,"c","ks"},{"half or","c","ks"},{"half dragon","","s"},/*half celestial*/,{"tiefling","","s"},{"half air elemental","","s"},{"half water elemental","","s"},{"half earth elemental","","s"},{"half fire elemental","","s"}, +{"merfolk","",""},{"sea el","f","ves"},{"satyr","","es"},{"fair","y","ies"},{"pixie","","s"},{"naiad","","s"},{"wood el","f","ves"},{"dryad","","s"},{"naga","","s"},{"kobald","","s"},{"centaur","","s"},{"sphinx","","es"},{"half electric elemental","","s"},{"half ice elemental","","s"},{"half nature elemental","","s"},{"half metal elemental","","s"}, +{"siren","","s"},{"harp","y","ies"},{"eriny","s","es"},{"ker","r","es"},{"cecaelia","","e"},{"drider","","s"},{"scorpio","","nes"},{"manticore","",""}, + diff --git a/src/monster1.carray b/src/monster1.carray index a5aaa46..cc0a04d 100644 --- a/src/monster1.carray +++ b/src/monster1.carray @@ -1 +1 @@ -{"grue","grue},{"newt","newts"}, +{"grue","",""},{"newt","","s"}, diff --git a/src/monster2.carray b/src/monster2.carray index 68a940c..fdaf847 100644 --- a/src/monster2.carray +++ b/src/monster2.carray @@ -1 +1 @@ -{"rook","rooks"},{"raven","ravens"},{"jackdaw","jackdaws"}, +{"rook","","s"},{"raven","","s"},{"jackdaw","","s"}, diff --git a/src/objects.messy b/src/objects.messy index 5eaf107..ae87f84 100644 --- a/src/objects.messy +++ b/src/objects.messy @@ -18,7 +18,7 @@ * implicit roomstackobj__setswap_ele(roomstackobj*,roomstackele*) ...push the room contained in an element to swap. * implicit roomstackobj__makecurrent(roomstackobj*,latlontyp) ...smart swap function. if an element doesn't exist, it is created. if it does, it is moved. * roomstackobj__neighbor_query(latlontyp) ...check if a room is in the neighbor register - * roomstackobj__neighbor_reset() ...set the neighbors register according to the current room + * roomstackobj__neighbor_get() ...set the neighbors register according to the current room * roomstackobj__neighbor_clear() * roomstackobj__neighbor_pull(uchar) ...copy a pointer from the neighbors register to the swapin register and clear the neighbors register * roomstackobj__neighbor_pullset(uchar) ...copy a pointer from the neighbors register to the swapin register and repopulate the neighbors register @@ -125,7 +125,7 @@ roomstackobj__makecurrent(roomstackobj * this,latlontyp query) { roomstackobj__setswap(this,roomgen(query)); } } - roomstackobj__neighbor_reset(); + roomstackobj__neighbor_get(); return 0;} roomstackobj__scroll(roomstackobj * this,playertyp * you,char dir) { @@ -141,7 +141,7 @@ roomstackobj__scroll(roomstackobj * this,playertyp * you,char dir) { default : return -1; } -roomstackobj__neighbor_reset (struct roomstack * this) { +roomstackobj__neighbor_get (struct roomstack * this) { for (int n = 0;n < 6;n++) { for (int i = 0,i < n,i++) { if (this.neighbor[1][i] == this.neighbor[1][n]) { diff --git a/src/playermove.messy b/src/playermove.messy new file mode 100644 index 0000000..13077a1 --- /dev/null +++ b/src/playermove.messy @@ -0,0 +1,268 @@ +#define + +playertyp__movecheck (playertyp * this,roomstackobj * roomstack,tileset * maintiles,char x,char y,char z,char newmovetok) { + roomtyp * here = roomstack->swapin; + roomtyp * there; + int xx,yy,zz; + /**********/ + if (newmovetok & MOVETOKEN_LAND) { + this->etc.movetoken = 0; + } + else { + if (newmovetok & MOVETOKEN_FLY) { + this->etc.movetoken |= MOVETOKEN_FLY; + } + if (newmovetok & MOVETOKEN_SWIM) { + this->etc.movetoken |= MOVETOKEN_SWIM; + } + } + /**********/ + if ( + (this->etc.movetoken == 3) + && + !(roomtileget(here,maintiles,this->pos)->liquid) + ) { + this->etc.movetoken = MOVETOKEN_FLY; + } + /**********/ + if (this->etc.movetoken & MOVETOKEN_SWIM) { + if (!(this->paffect.skill.swim || this->effect.skill.swim) { + x = 0; + y = 0; + z = 0; + this->etc.movetoken = 0; + } + } + else if (this->etc.movetoken & MOVETOKEN_FLY) { + switch umax(this->paffect.skill.fly , this->effect.skill.fly) : + case 0 : x = 0; y = 0; z = 0; this->etc.movetoken = 0; break; + case 1 : z = -1; break; + case 2 : if (z > 0) {z = 0} break; + default : break; + } + /**********/ + tilemeta * thistile = roomtileget(here,maintiles,this->pos); + /**(**/ + if (!(this->etc.movetoken)) { + for (int n = 1;this->pos[2] > 0;n++) { + tilemeta * tmptile = roomgetilei(here,maintiles,this->pos[0],this->pos[1],this->pos[2] - 1) + if (!(tmptile->solid || tmptile->liquid)) { + this->pos[2] -= 1; + if (tmptile->liquid && !(tmptile->solid)) { + this->etc.movetoken = MOVETOKEN_SWIM; + } + } + else { + goto(ground); + } + } + } + ground: + /**)**/ + xx = this->pos[0] + x; + yy = this->pos[1] + y; + zz = this->pos[2] + z; + /**(**/ + if ( + !(this->etc.movetoken) + && + (xx ≥ 0) && (xx < MAX_X) + && + (yy ≥ 0) && (yy < MAX_Y) + ) { + for (;zz > 0;zz--) { + tilemeta * tmptile = roomgetilei(here,maintiles,xx,yy,zz); + if (!(tmptile->solid || tmptile->liquid) { + zz--; + if (tmptile->liquid && !(tmptile->solid)) { + this->etc.movetoken = MOVETOKEN_SWIM; + } + } + else { + goto(ground2); + } + } + } + ground2: + if (!(zz || roomgetilei(roomstack->neighbors[ROOM_DOWN],maintiles,xx,yy,roomstack->roomneighbors[ROOM_DOWN]->ceiling)->solid)) { + zz--; + if (roomgetilei(roomstack->neighbors[ROOM_DOWN],maintiles,xx,yy,roomstack->roomneighbors[ROOM_DOWN]->ceiling)->liquid) { + } + /**)**/ + uchar whereto; + { + char key = 0; + if (xx ≥ MAX_X) {key |= 1} + else if (xx < 0) {key |= 2} + if (yy ≥ MAX_Y) {key |= 4} + else if (yy < 0) {key |= 8} + if (zz ≥ MAX_Z) {key |= 0x90} + else if (zz > here->ceiling) {key |= 0x10} + else if (zz < 0) {key |= 0x20} + switch key : + case 0 : there = here; break; + case 0x11 : + case 1 : whereto = ROOM_EAST; + there = roomstack->neighbors[whereto]; + if (zz ≤ there->ceiling) { + xx = 0; + break; + } + else { + UTIL_BEEP; return OK; + } + case 0x12 : + case 2 : whereto = ROOM_WEST; + there = roomstack->neighbors[whereto]; + if (zz ≤ there->ceiling) { + xx = MAX_X - 1; + break; + } + else { + UTIL_BEEP; return OK; + } + case 0x14 : + case 4 : whereto = ROOM_SOUTH; + there = roomstack->neighbors[whereto]; + if (zz ≤ there->ceiling) { + yy = 0; + break; + } + else { + UTIL_BEEP; return OK; + } + case 0x18 : + case 8 : whereto = ROOM_NORTH; + there = roomstack->neighbors[whereto]; + if (zz ≤ there->ceiling) { + yy = MAX_Y - 1; + break; + } + else { + UTIL_BEEP; + return OK; + } + case 0x90 : + case 0x10 : whereto = ROOM_UP; + there = roomstack->neighbors[whereto]; + zz = 0; + break; + case 0x20 : whereto = ROOM_DOWN; + there = roomstack->neighbors[whereto]; + zz = there->ceiling; + break; + default : UTIL_BEEP; return OK; + } + tilemeta * nextile = roomtilegeti(there,maintiles,xx,yy,zz); + /**********/ + bool nextilefloor; + { + if (zz > 0) { + tilemeta * undernextile = roomtilegeti(there,maintiles,xx,yy,zz - 1); + if (undernextile->solid) { + nextilefloor = 1; + } + else { + if ((zz - 1) > 0) { + tilemeta * undernextile = roomtilegeti(there,maintiles,xx,yy,zz - 2); + nextilefloor = undernextile->solid; + } + else if (here == there) { + tilemeta * undernextile = roomtilegeti(roomstack->neighbors[ROOM_DOWN],maintiles,xx,yy,roomstack->neighbors[ROOM_DOWN]->ceiling - 1); + nextilefloor = undernextile->solid; + } + } + else if (here == there) { + tilemeta * undernextile = roomtilegeti(roomstack->neighbors[ROOM_DOWN],maintiles,xx,yy,roomstack->neighbors[ROOM_DOWN]->ceiling); + if (undernextile->solid) { + nextilefloor = 1; + } + else { + zz--; + tilemeta * undernextile = roomtilegeti(roomstack->neighbors[ROOM_DOWN],maintiles,xx,yy,roomstack->neighbors[ROOM_DOWN]->ceiling - 1); + nextilefloor = undernextile->solid; + } + else { + nextilefloor = 1; + } + } + /**********/ + switch this->etc.movetoken : + /*****/ + case 0 : + if (nextilefloor) { + + /*****/ + case MOVETOKEN_SWIM : + if (nextile->solid || maskfetch(zz,yy,xx,there->collimap) { + UTIL_BEEP; + this->etc.movetoken = 0; + } + else if (!(thistile->liquid)) { + this->pos[0] = xx; + this->pos[1] = yy; + this->pos[2] = max(zz,0); + } + else { + this->pos[0] = xx; + this->pos[1] = yy; + this->pos[2] = zz; + } + if (this != that) { + roomstackobj__neighbor_pullset(whereto); + } + return OK; + } + /*****/ + case MOVETOKEN_FLY : + if (nextile->solid || maskfetch(zz,yy,xx,there->collimap) { + UTIL_BEEP; + this->etc.movetoken = 0; + } + else if (nextile->liquid) { + this->etc.movetoken |= MOVETOKEN_SWIM; + this->pos[0] = xx; + this->pos[1] = yy; + this->pos[2] = zz; + } + else { + this->pos[0] = xx; + this->pos[1] = yy; + this->pos[2] = zz; + } + if (this != that) { + roomstackobj__neighbor_pullset(whereto); + } + return OK; + } + /*****/ + case 3 : + if (nextile->solid || maskfetch(zz,yy,xx,there->collimap) { + UTIL_BEEP; + this->etc.movetoken = MOVETOKEN_SWIM; + return OK; + } + else if (!(nextile->liquid || nextile->solid)) { + this->etc.movetoken = MOVETOKEN_FLY; + this->pos[0] = xx; + this->pos[1] = yy; + this->pos[2] = zz; + } + else { + this->pos[0] = xx; + this->pos[1] = yy; + this->pos[2] = zz; + } + if (this != that) { + roomstackobj__neighbor_pullset(whereto); + } + return OK; + } + /*****/ + default : + raise(SIGBUS); + /**********/ + invalidwarp: + + } +#define playermovecheck(X,Y,Z,W) playertyp__movecheck(PLAYER,ROOM,MAINTILES,X,Y,Z,W) diff --git a/src/questdialogs/avianinn.txt b/src/questdialogs/avianinn.txt new file mode 100644 index 0000000..925ceb1 --- /dev/null +++ b/src/questdialogs/avianinn.txt @@ -0,0 +1,7 @@ +Hello, traveler! +you are welcome to stay in our village, +so long as you bare us no ill will. + +hmm? what's this made of? silver? gold? +why would I need want that? +rooms are 3 ore a night. diff --git a/src/questdialogs/greedyjudge.txt b/src/questdialogs/greedyjudge.txt new file mode 100644 index 0000000..eb8b16f --- /dev/null +++ b/src/questdialogs/greedyjudge.txt @@ -0,0 +1,5 @@ +Given the facts of the case, I have no choice but to issue +summary judgement. You are hereby found guilty of high crime of intent to +debase the currency by passing forign coin. you will be interrogeted for +one week as to the location of the mines of your people, after which you +will be (pinioned, drawn, and quartered. | hung, drawn, and quartered.) diff --git a/src/render.messy b/src/render.messy index bb5b6cf..420be75 100644 --- a/src/render.messy +++ b/src/render.messy @@ -48,33 +48,8 @@ cullplane = raycast__cullplane(); for (int x = 0;x < MAX_X;x++) { if (ROOM->tiledata[z][y][x] < 0) { mvaddch16(posy,posx,MAINTILES[ROOM->tiledata[z][y][x]]->unichar,(MAINTILES[ROOM->tiledata[z][y][x]]->blink * A_BLINK) | COLOR_PAIR(MAINTILES[ROOM->tiledata[z][y][x]]->color)) - if (MAINTILES[ROOM->tiledata[z][y][x]]->solid) { - set_collision_map(ROOM,x,y,z,true) - } - else { - set_collision_map(ROOM,x,y,z,false) - } - } - if (MAINTILES[ROOM->tiledata[z][y][x]]->liquid) { - maskset(z,y,x,ROOM->collisionmap.liquid,true) - } - else { - maskset(z,y,x,ROOM->collisionmap.liquid,false) - } else { mvaddch16(posy,posx,ROOM->hightiles[ROOM->tiledata[z][y][x] ^ 0x80]->unichar,(ROOM->hightiles[ROOM->tiledata[z][y][x] ^ 0x80]->blink * A_BLINK) | COLOR_PAIR(ROOM->hightiles[ROOM->tiledata[z][y][x] ^ 0x80]->color)) - if (ROOM->hightiles[ROOM->tiledata[z][y][x] ^ 0x80]->liquid) { - set_collision_map(ROOM,x,y,z,true) - } - else { - set_collision_map(ROOM,x,y,z,false) - } - if (ROOM->hightiles[ROOM->tiledata[z][y][x] ^ 0x80]->liquid) { - maskset(z,y,x,ROOM->collisionmap.liquid,true) - } - else { - maskset(z,y,x,ROOM->collisionmap.liquid,false) - } } posx++; } diff --git a/src/tileget.c b/src/tileget.c new file mode 100644 index 0000000..07f069f --- /dev/null +++ b/src/tileget.c @@ -0,0 +1,17 @@ +tilemeta * roomtileget(roomtyp * this,tileset * maintiles,ucoord pos) { + if (this->tiledata[pos[2]][pos[1]][pos[0]] < 0) { + return &( maintiles[this->swapin->tiledata[pos[2]][pos[1]][pos[0]]] ); + } + else { + return &( this->hightiles[this->tiledata[pos[2]][pos[1]][pos[0]] ^ 0x80] ); + } + } + +tilemeta * roomtileget(roomtyp * this,tileset * maintiles,int x,int y,int z) { + if (this->tiledata[z][y][x] < 0) { + return &( maintiles[this->swapin->tiledata[z][y][x]] ); + } + else { + return &( this->hightiles[this->tiledata[z][y][x] ^ 0x80] ); + } + } diff --git a/src/types.h b/src/types.h index 5500b60..4d7ea94 100644 --- a/src/types.h +++ b/src/types.h @@ -202,8 +202,16 @@ struct attrcolortyp { short color; } +typedef nanovector { +signed x : 2 +signed y : 2 +signed z : 2 +signed w : 2 +} + typedef float vector2[2] typedef float vector3[3] +//not implemented /* used for velocity, a parameter that holds * motion that carries accross turns. this motion * is not always cleared after being done; horizontal @@ -212,19 +220,28 @@ typedef float vector3[3] * accumulates and persists until the ground is encountered. */ -struct polar { +typedef char *pluralwords[3]; + +#define MOVETOKEN_LAND 4 +#define MOVETOKEN_FLY 1 +#define MOVETOKEN_SWIM 2 + +struct selftyp { +unsigned az : 3 +unsigned phi : 3 +unsigned fov : 2 +unsigned range : 5 +unsigned movetoken : 2 +bool no_air : 1 +} + +struct beamtyp { unsigned az : 3 //azimuth -signed el : 2 //elevation -signed slope : 3 //negative is inverse slope, most negative is undefined. defines a cone. -unsigned r : 5 //radius -bool omni : 1 //omnidirectional -bool not : 1 //invert the mask defined by slope -bool behind : 1 //EQUATOR/2 degrees are added to azimuth +unsigned phi : 3 //elevation in eighth turns. 07 is omnidirectional. +unsigned ang : 4 //total solid angle of spread in twelfths of a circle. +unsigned range : 6 } -/* amoungst other uses, defines the cone of vision - * and used to generate magic beams - * - * for all azimuths: +/* for all azimuths: * * 701 * 6 2 @@ -341,11 +358,6 @@ latlontyp latlon ucoord3 pos } -struct moneytyp { -unsigned gp : 17 -unsigned cp : 7 -} - typedef short trackaligntyp[2] typedef short trackalignplayertyp[3] /* neutral is the area between -10,000 and 10,000 @@ -356,6 +368,8 @@ typedef short trackalignplayertyp[3] * * for players, proactivness/passivity is also * tracked + * + * most negative number in both fields is an antagonist */ struct bitfield: @@ -395,6 +409,7 @@ unsigned mastery : 2 struct baseclasstyp { struct paffectyp bonus uchar spd +char airspd uchar air struct conlangtyp lang _8BITPTR spell[2] @@ -418,6 +433,17 @@ intl : u5 wis : u5 bluff : u5 +struct movecount { +uchar lungs +uchar spd +char airspd +char wspd +float move +float fly +float swim +uchar breath +} + struct conlangtype: unsigned id : 5 bool r : 1 @@ -462,20 +488,17 @@ uchar element agetyp age struct shiftstackobj race ucoord3 pos -polar facing -uchar spd -float carryover //leftover moves; maximum of 5 -paffectyp permenent -effectyp fromequip +selftyp etc +struct movecount move +paffectyp paffect //permenant +effectyp effect //from equipment trackalignplayertyp align ushort hp //they're fun and easy to...wait ushort mp -uchar air -ushort uptime uint32_t xp uchar lvl short food -moneytyp gold +float wallet langlistele *lang_ptr spellistele *spell_ptr heldobjtyp *bag_ptr @@ -486,11 +509,13 @@ subobjtyp bow //weapon subobjtyp armor //armor subobjtyp cape //armor subobjtyp amul //baub -armtyp * arms -legtyp * legs +unsigned n_arms : 4 +unsigned n_legs : 4 +armtyp *arms[2] +legtyp *legs[2] struct armtyp { -armtyp * next +struct armtyp * next subobjtyp weap[2] subobjtyp ring[2] subobjtyp wrist[2] @@ -511,11 +536,14 @@ ENUM_WRIST_RIGHT} struct basentyp: aggrotyp aggro //here, shiftable denotes a monster's aggro state is locked. also gives the value that patience is set to when a monster calms down, the value that cooldown is set to when it is angered, and the default AI. paffectyp base +unsigned n_arms : 4 +unsigned n_legs : 4 uchar spd //distance calculations use M_SQRT2 and local SQRT3 for diagonals +char airspd uchar hplvl uchar mplvl uchar xplvl -uchar airmax //how long you can hold your breath +uchar air //how long you can hold your breath struct conlangtyp lang[2] _8BITPTR spell[4] bitfield psyattack @@ -553,16 +581,15 @@ uchar element aggrotyp aggro struct shiftstackobj race ucoord3 pos -polar facing -uchar spd -float carryover +selftyp etc +struct movecount move paffectyp paffect effectyp effect ushort hp -uchar air +ushort mp uint32_t xp uchar lvl -moneytyp gold +float wallet oneobjtyp loot oneobjtyp helm subobjtyp shield @@ -570,8 +597,10 @@ subobjtyp bow subobjtyp armor subobjtyp cape subobjtyp amul -armtyp * arms -legtyp * legs +unsigned n_arms : 4 +unsigned n_legs : 4 +armtyp *arms[2] +legtyp *legs[2] struct npctyp { (self) *prev @@ -596,19 +625,17 @@ uchar element aggrotyp aggro struct shiftstackobj race ucoord3 pos -polar facing -uchar spd -float carryover +selftyp etc +struct movecount move paffectyp permenent effectyp fromequip trackaligntyp align ushort hp ushort mp -uchar air uint32_t xp uchar lvl short food -moneytyp gold +float wallet bitfield psyattack oneobjtyp holding oneobjtyp helm @@ -617,8 +644,10 @@ subobjtyp bow subobjtyp armor subobjtyp cape subobjtyp amul -armtyp * arms -legtyp * legs +unsigned n_arms : 4 +unsigned n_legs : 4 +armtyp *arms[2] +legtyp *legs[2] struct spawntyp: npctyp * depth @@ -635,8 +664,10 @@ subobjtyp bow subobjtyp armor subobjtyp cape subobjtyp amul -armtyp * arms -legtyp * legs +unsigned n_arms : 4 +unsigned n_legs : 4 +armtyp *arms[2] +legtyp *legs[2] struct oneobjtyp { objid type @@ -739,7 +770,7 @@ magictyp type char cost_typ : 2 //0 = at will, 1 = gold, -1 = mp, -2 = hp unsigned cost_amnt : 6 potiontyp effect -missiletyp delivery +beamtyp delivery intptr_t polyref : 8 struct psytyp: @@ -752,12 +783,12 @@ struct missiletyp: bool psion : 1 bool vamp : 1 unsigned damage : 8 -signed recoil : 7 -unsigned spread : 2 //0 = line, 1 = narrow (1:3), 2 = wide (1:2), 3 = very wide (1:1) +signed recoil : 8 +unsigned range : 6 +unsigned spread : 4 unsigned splash : 3 //radius of damage on impact -bool spz : 1 //spread and splash in the z plane. bool dig : 1 -//if (.spread != 0), slope = 4-.spreaad +} struct baseweaptyp: bool fire : 1 @@ -908,10 +939,9 @@ char spatk char def char spdef -struct paffectyp +struct paffectyp: the8stats eight bodytyp shape -nibbles n_arms_legs elixtyp ails_ya resistyp resist sensetyp sense @@ -1003,9 +1033,9 @@ char* tiledata[][MAX_Y][MAX_X] unsigned ceiling : 4 unsigned bgcolor : 3 bool visited : 1 -shadowmask seen -shadowmask light -collimaptyp collimap +shadowmask * seen +shadowmask * light +shadowmask * collimap //entity collision mask encontyp *encon_ptr enttyp *ent_ptr eventtyp *ev_ptr @@ -1077,12 +1107,11 @@ typedef uchar collisionmapholes[MAX_Y][MAX_X/8] struct collisionmaptyp { collisionmapcols solid - shadowmask liquid collisionmapholes holes shadowmask ents } -typedef tilemeta* tileset[128] +typedef tilemeta tileset[128] struct tilemeta { bool ladder : 1 @@ -1400,7 +1429,7 @@ SUBWARP_FLAG : contains subwarptyp CHEST_FLAG : contains chestyp DOOR_FLAG : contains doortyp LOCK_FLAG : contains locktyp (gates are this) -MONEY_FLAG : contains moneytyp +MONEY_FLAG : contains float SPAWN_FLAG : contains spawntyp SIGN_FLAG : contains signtyp diff --git a/src/util.c b/src/util.c index fd35a7f..cf54835 100644 --- a/src/util.c +++ b/src/util.c @@ -1,5 +1,3 @@ -skip () {} - /*---INTERGALS---*/ signed __attribute__((const)) max(signed a,signed b) { diff --git a/src/util.h b/src/util.h index b1dfa00..b62ad02 100644 --- a/src/util.h +++ b/src/util.h @@ -1,5 +1,7 @@ #ifndef UTIL_H_REENTERANT #define UTIL_H_REENTERANT 1 + +#define UTIL_BEEP printf("\a") skip () {} extern signed max(signed a,signed b);