Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

Commit

Permalink
push commit
Browse files Browse the repository at this point in the history
  • Loading branch information
GeneralGuy4872 committed Dec 12, 2019
1 parent fb4abfa commit f35782e
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 23 deletions.
Binary file removed src/.objects.messy.swm
Binary file not shown.
Binary file removed src/.objects.messy.swn
Binary file not shown.
Binary file removed src/.objects.messy.swo
Binary file not shown.
16 changes: 16 additions & 0 deletions src/NotesOnCompiling
Original file line number Diff line number Diff line change
@@ -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.
18 changes: 14 additions & 4 deletions src/iwannaflycurses.messy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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];

Expand Down Expand Up @@ -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);
}
7 changes: 7 additions & 0 deletions src/macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
10 changes: 10 additions & 0 deletions src/questdialogs/twomasters.asc
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 4 additions & 0 deletions src/questdialogs/volcanomancy.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MONS
MORS
ITERVM
RESVRGVM
38 changes: 19 additions & 19 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ skip () {}

/*---INTERGALS---*/

__attribute__((const)) max(int a;int b) {
__attribute__((const)) max(int a,int b) {
if (ab) {
return a;
}
else {
return b;
}

__attribute__((const)) min(int a;int b) {
__attribute__((const)) min(int a,int b) {
if (ab) {
return a;
}
else {
return b;
}

unsigned __attribute__((const)) umax(unsigned a;unsigned b) {
unsigned __attribute__((const)) umax(unsigned a,unsigned b) {
if (ab) {
return a;
}
else {
return b;
}

unsigned __attribute__((const)) umin(unsigned a;unsigned b) {
unsigned __attribute__((const)) umin(unsigned a,unsigned b) {
if (ab) {
return a;
}
Expand All @@ -52,31 +52,31 @@ __attribute__((const)) sgn(int n) {

/*---LONG---*/

long __attribute__((const)) maxl(long a;long b) {
long __attribute__((const)) maxl(long a,long b) {
if (ab) {
return a;
}
else {
return b;
}

long __attribute__((const)) minl(long a;long b) {
long __attribute__((const)) minl(long a,long b) {
if (ab) {
return a;
}
else {
return b;
}

long __attribute__((const)) umaxl(unsigned long a;unsigned long b) {
long __attribute__((const)) umaxl(unsigned long a,unsigned long b) {
if (ab) {
return a;
}
else {
return b;
}

long __attribute__((const)) uminl(unsigned long a;unsigned long b) {
long __attribute__((const)) uminl(unsigned long a,unsigned long b) {
if (ab) {
return a;
}
Expand All @@ -101,31 +101,31 @@ __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 (ab) {
return a;
}
else {
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 (ab) {
return a;
}
else {
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 (ab) {
return a;
}
else {
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 (ab) {
return a;
}
Expand All @@ -151,23 +151,23 @@ __attribute__((const)) sgnl(long long n) {

/*---FLOATS---*/

float __attribute__((const)) maxf(float a;float b) {
float __attribute__((const)) maxf(float a,float b) {
if (ab) {
return a;
}
else {
return b;
}

float __attribute__((const)) minf(float a;float b) {
float __attribute__((const)) minf(float a,float b) {
if (ab) {
return a;
}
else {
return b;
}

__attribute__((const)) sgn(float n) {
__attribute__((const)) sgnf(float n) {
if (n == 0) {
return 0;
}
Expand All @@ -182,25 +182,25 @@ __attribute__((const)) sgn(float n) {
}
}

/*---FLOATS---*/
/*---DOUBLES---*/

double __attribute__((const)) maxf(double a;double b) {
double __attribute__((const)) maxfd(double a,double b) {
if (ab) {
return a;
}
else {
return b;
}

double __attribute__((const)) minf(double a;double b) {
double __attribute__((const)) minfd(double a,double b) {
if (ab) {
return a;
}
else {
return b;
}

__attribute__((const)) sgn(double n) {
__attribute__((const)) sgnfd(double n) {
if (n == 0) {
return 0;
}
Expand Down
29 changes: 29 additions & 0 deletions src/util.h
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit f35782e

Please sign in to comment.