diff --git a/src/.objects.messy.swm b/src/.objects.messy.swm deleted file mode 100644 index 55563ed..0000000 Binary files a/src/.objects.messy.swm and /dev/null differ diff --git a/src/.objects.messy.swn b/src/.objects.messy.swn deleted file mode 100644 index a330e50..0000000 Binary files a/src/.objects.messy.swn and /dev/null differ diff --git a/src/.objects.messy.swo b/src/.objects.messy.swo deleted file mode 100644 index a6e1f0c..0000000 Binary files a/src/.objects.messy.swo and /dev/null differ diff --git a/src/NotesOnCompiling b/src/NotesOnCompiling new file mode 100644 index 0000000..f9af0ef --- /dev/null +++ b/src/NotesOnCompiling @@ -0,0 +1,16 @@ +NOTE: NOT READY FOR COMPILATION + +a .ch file is a code header file, and containes code that must +be in the same translation unit as the .c file they are used in. +these files contain volatile functions. each .ch file should +correspond to a single blackbox-like abstraction layer. + +efforts will be made to move to using the linker rather than the +proprocessor to combine files, however various sources indicate +that this would be a pessimization in most of my use cases. + +files that do not require access to a global variable will +use the linker; files that do will use preprocessor transclusion +via a .ch file + +all details are subject to change, based on compiler tinkering. diff --git a/src/iwannaflycurses.messy b/src/iwannaflycurses.messy index 6e5a5bc..82b5674 100644 --- a/src/iwannaflycurses.messy +++ b/src/iwannaflycurses.messy @@ -524,13 +524,15 @@ uchar ELECOLLECT[8] //elemental collectibles uchar QUESTCOLLECT[3] //light/dark/entropy collectibles uint64_t KILLS char* SAVEPATH -followtype *FOLLOW_ptr //pursuers, i.e. paid assasins, ninjas, the reaper... +followtyp *FOLLOW_ptr //followers/minions +followtyp *PURS_ptr //pursuers, i.e. paid assasins, ninjas, the reaper... eventtyp *EVNT_ptr //FOO_ptr refers to the doubly linked list's head. the tail is FOO_ptr->prev. FOO_ptr->prev->next is always NULL. placetyp *PLACE_ptr stringlistyp *HINT_ptr eventdatastack_ele *EVSTACK_ptr qglobobj * GLOBOBJ_ptr qglobev * GLOBEV_ptr +ushort CHAPTER bitfield globools #define NEW globools.a #define FIRST globools.b @@ -825,6 +827,14 @@ basearmortyp* armtable[256] baseshldtyp* shldtable[256] baubtyp* baubtable[256] +struct ray_vfx_typ { +(self) * prev +(self) * next +ucoord3 p +uchar dir //must be a valid octant +float mag +attr_t a +} char* legendstabs[24] = {"truthseeker"/*bow*/,"sword of justice","excalibur","thunderbolt","sickle of chaos"/*+drain*/,"stormbringer"/*+drain*/,"devilfork"/*+fire*/,"partisen of tyrants"/*+coin stealing*/,"deathscyth"/*+vampiric drain*/,"sunray"/*spear + solar flare*/,"nightedge"/*sword + moonbeam*/,"staff of merlin"/*staff of magic missile*/,"firebrand"/*burn*/,"tesla's mace"/*+spark*/,"stormgale"/*bow*/,"frostpike"/*+frostbite*/,"trident of the seas"/*+tsunami*/,"staff of the forest"/*staff of animante kudzu*/,"quake hammer","bow of fire","bow of ice","bow of darkness","bow of void","bow of dawn"}; legendtyp* legendtable[24]; @@ -2543,15 +2553,15 @@ engineloop(); notatruending() { /* used when an early win condition is met. * the game is not normally saved, * and the character remains in the file so that - * the real ending can be reached. + * the true ending can be reached. * * recieving this message is usually a bad thing, * as it means you were working in the wrong * direction; however, there are more wicks - * twords the real endings than the red herrings + * twords the true endings than the red herrings */ BREAKCURSES - printf("\033[1;3;33mTHIS IS NOT THE ENDING YOU ARE LOOKING FOR...\n"); + printf("\033[1;3;33mTHIS IS NOT A TRUE ENDING...\n"); puts(RESET); quit(0); } diff --git a/src/macro.h b/src/macro.h index 11fe1e8..102c4db 100644 --- a/src/macro.h +++ b/src/macro.h @@ -67,6 +67,13 @@ #define CAMERA_XZ 013 #define CAMERA_YZ 0xD +#define SCROLL_NORTH 3 +#define SCROLL_SOUTH 2 +#define SCROLL_EAST 4 +#define SCROLL_WEST 5 +#define SCROLL_UP 7 +#define SCROLL_DOWN 6 + /*FUNCTION MACROS*/ #define BACKGROUND 010 #define BALTERNOCT(X,Y,Z) ((sgn(Z) * 9) + (sgn(Y) * 3) + sgn(X)) diff --git a/src/questdialogs/twomasters.asc b/src/questdialogs/twomasters.asc new file mode 100644 index 0000000..3d8f1e0 --- /dev/null +++ b/src/questdialogs/twomasters.asc @@ -0,0 +1,10 @@ +Valkerie, come. I must tell you something. +In private. +One such as you cannot serve two masters. +There will soon come a time when your masters will be put at odds. +you will be forced to choose between them. +and your life will forever be changed. +If you choose incorrectly, you will find an easy life ahead of you, devoid of fufillment. +you will grow old and die without honor. +If you choose correctly, your path will be hard and trecherous. +but you will walk the path of destiny, and history will remember you as a great warrior. \ No newline at end of file diff --git a/src/questdialogs/volcanomancy.asc b/src/questdialogs/volcanomancy.asc new file mode 100644 index 0000000..b460d99 --- /dev/null +++ b/src/questdialogs/volcanomancy.asc @@ -0,0 +1,4 @@ +MONS +MORS +ITERVM +RESVRGVM \ No newline at end of file diff --git a/src/util.c b/src/util.c index edfccb6..51eda04 100644 --- a/src/util.c +++ b/src/util.c @@ -2,7 +2,7 @@ skip () {} /*---INTERGALS---*/ -__attribute__((const)) max(int a;int b) { +__attribute__((const)) max(int a,int b) { if (a ≥ b) { return a; } @@ -10,7 +10,7 @@ __attribute__((const)) max(int a;int b) { return b; } -__attribute__((const)) min(int a;int b) { +__attribute__((const)) min(int a,int b) { if (a ≥ b) { return a; } @@ -18,7 +18,7 @@ __attribute__((const)) min(int a;int b) { return b; } -unsigned __attribute__((const)) umax(unsigned a;unsigned b) { +unsigned __attribute__((const)) umax(unsigned a,unsigned b) { if (a ≥ b) { return a; } @@ -26,7 +26,7 @@ unsigned __attribute__((const)) umax(unsigned a;unsigned b) { return b; } -unsigned __attribute__((const)) umin(unsigned a;unsigned b) { +unsigned __attribute__((const)) umin(unsigned a,unsigned b) { if (a ≥ b) { return a; } @@ -52,7 +52,7 @@ __attribute__((const)) sgn(int n) { /*---LONG---*/ -long __attribute__((const)) maxl(long a;long b) { +long __attribute__((const)) maxl(long a,long b) { if (a ≥ b) { return a; } @@ -60,7 +60,7 @@ long __attribute__((const)) maxl(long a;long b) { return b; } -long __attribute__((const)) minl(long a;long b) { +long __attribute__((const)) minl(long a,long b) { if (a ≥ b) { return a; } @@ -68,7 +68,7 @@ long __attribute__((const)) minl(long a;long b) { return b; } -long __attribute__((const)) umaxl(unsigned long a;unsigned long b) { +long __attribute__((const)) umaxl(unsigned long a,unsigned long b) { if (a ≥ b) { return a; } @@ -76,7 +76,7 @@ long __attribute__((const)) umaxl(unsigned long a;unsigned long b) { return b; } -long __attribute__((const)) uminl(unsigned long a;unsigned long b) { +long __attribute__((const)) uminl(unsigned long a,unsigned long b) { if (a ≥ b) { return a; } @@ -101,7 +101,7 @@ __attribute__((const)) sgnl(long n) { /*---LONG LONG---*/ -long long __attribute__((const)) maxll(long long a;long long b) { +long long __attribute__((const)) maxll(long long a,long long b) { if (a ≥ b) { return a; } @@ -109,7 +109,7 @@ long long __attribute__((const)) maxll(long long a;long long b) { return b; } -long long __attribute__((const)) minll(long long a;long long b) { +long long __attribute__((const)) minll(long long a,long long b) { if (a ≥ b) { return a; } @@ -117,7 +117,7 @@ long long __attribute__((const)) minll(long long a;long long b) { return b; } -unsigned long long __attribute__((const)) maxll(unsigned long long a;unsigned long long b) { +unsigned long long __attribute__((const)) maxll(unsigned long long a,unsigned long long b) { if (a ≥ b) { return a; } @@ -125,7 +125,7 @@ unsigned long long __attribute__((const)) maxll(unsigned long long a;unsigned lo return b; } -unsigned long long __attribute__((const)) minll(unsigned long long a;unsigned long long b) { +unsigned long long __attribute__((const)) minll(unsigned long long a,unsigned long long b) { if (a ≥ b) { return a; } @@ -151,7 +151,7 @@ __attribute__((const)) sgnl(long long n) { /*---FLOATS---*/ -float __attribute__((const)) maxf(float a;float b) { +float __attribute__((const)) maxf(float a,float b) { if (a ≥ b) { return a; } @@ -159,7 +159,7 @@ float __attribute__((const)) maxf(float a;float b) { return b; } -float __attribute__((const)) minf(float a;float b) { +float __attribute__((const)) minf(float a,float b) { if (a ≥ b) { return a; } @@ -167,7 +167,7 @@ float __attribute__((const)) minf(float a;float b) { return b; } -__attribute__((const)) sgn(float n) { +__attribute__((const)) sgnf(float n) { if (n == 0) { return 0; } @@ -182,9 +182,9 @@ __attribute__((const)) sgn(float n) { } } -/*---FLOATS---*/ +/*---DOUBLES---*/ -double __attribute__((const)) maxf(double a;double b) { +double __attribute__((const)) maxfd(double a,double b) { if (a ≥ b) { return a; } @@ -192,7 +192,7 @@ double __attribute__((const)) maxf(double a;double b) { return b; } -double __attribute__((const)) minf(double a;double b) { +double __attribute__((const)) minfd(double a,double b) { if (a ≥ b) { return a; } @@ -200,7 +200,7 @@ double __attribute__((const)) minf(double a;double b) { return b; } -__attribute__((const)) sgn(double n) { +__attribute__((const)) sgnfd(double n) { if (n == 0) { return 0; } diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..1a880fd --- /dev/null +++ b/src/util.h @@ -0,0 +1,29 @@ +#ifndef UTIL_H_REENTERANT +#define UTIL_H_REENTERANT 1 +skip () {} + +extern signed max(signed a,signed b); +extern signed min(signed a,signed b); +extern unsigned umax(unsigned a,unsigned b); +extern unsigned umin(unsigned a,unsigned b); +extern int sgn(signed n); + +extern signed long maxl(signed long a,signed long b); +extern signed long minl(signed long a,signed long b); +extern unsigned long umaxl(unsigned long a,unsigned long b); +extern unsigned long uminl(unsigned long a,unsigned long b); +extern int sgnl(signed long n); + +extern signed long long maxll(signed long long a,signed long long b); +extern signed long minll(signed long long a,signed long long b); +extern unsigned long long umaxll(unsigned long long a,unsigned long long b); +extern unsigned long long uminll(unsigned long long a,unsigned long long b); +extern int sgnll(signed long long n); + +extern float maxf(float a,float b); +extern float minf(float a,float b); +extern int sgnf(float n); + +extern double maxfd(double a,double b); +extern double minfd(double a,double b); +extern int sgnfd(float n);