This repository has been archived by the owner on Jul 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
GeneralGuy4872
committed
Nov 10, 2019
1 parent
81381df
commit ef2b1f5
Showing
12 changed files
with
931 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
void ERRORGRAPHIC(int sig, uchar iter, ...) { | ||
BREAKCURSES | ||
printf("\033[91;103m *┐ \033[22;0m");printf("\033[1;91m Error!\033[21;22;24;0m\n"); | ||
printf("\033[91;103m ▗█▖ \033[22;0m\n"); | ||
printf("\033[91;103m ███ \033[22;0m");printf("\033[1;91m File: %s",__FILE__\033[21;22;24;0m\n"); | ||
printf("\033[91;103m ▝█▘ \033[22;0m");printf("\033[1;91m Line: %i",__LINE__\033[21;22;24;0m\n"); | ||
va_list argv; | ||
va_start(argv,iter); | ||
{ | ||
for (;iter;iter--) { | ||
size_t typ = va_arg(argv,int); | ||
switch typ : { | ||
case 0 : | ||
char* format = va_arg(argv,char*); | ||
fprintf(stderr,format); | ||
break; | ||
case sizeof(int8_t) : | ||
char* format = va_arg(argv,char*); | ||
int8_t foo = va_arg(argv,int8_t); | ||
fprintf(stderr,format,foo); | ||
break; | ||
case sizeof(int16_t) : | ||
char* format = va_arg(argv,char*); | ||
int16_t foo = va_arg(argv,int16_t); | ||
fprintf(stderr,format,foo); | ||
break; | ||
case sizeof(int32_t) : | ||
char* format = va_arg(argv,char*); | ||
int32_t foo = va_arg(argv,int32_t); | ||
fprintf(stderr,format,foo); | ||
break; | ||
case sizeof(int64_t) : | ||
char* format = va_arg(argv,char*); | ||
int64_t foo = va_arg(argv,int64_t); | ||
fprintf(stderr,format,foo); | ||
break; | ||
default : | ||
char* format = va_arg(argv,char*); | ||
intptr_t foo = va_arg(argv,intptr_t); | ||
fprintf(stderr,format,foo); | ||
break; | ||
} | ||
} | ||
va_end(argv); | ||
if (sig) { | ||
raise(sig); | ||
} | ||
getchar(); | ||
FIXCURSES | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
int stringlen(char* buffer) { | ||
int n = 0; | ||
while (buffer[n]) {n++}; | ||
return n; | ||
} | ||
|
||
lookbehind = yytext[stringlen(yytext)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,74 @@ | ||
I will probably throw Ada at this at some future date. | ||
DOCUMENTATION | ||
============= | ||
|
||
need to rewrite code to conform to this outline | ||
|
||
<CODE>dijkstra</CODE> | ||
--------------------- | ||
|
||
breadth-first search for point B | ||
|
||
move blindly from next live node until B is reached, using shortest running distance from A | ||
|
||
<CODE>a_star</CODE> | ||
------------------- | ||
|
||
depth-first search for point B | ||
|
||
1 move twords point b using shortest path using both running distance from A and norm distance from B | ||
2 if no closer tile can be found, mark as dead and find best live node; <CODE>goto 1</CODE> | ||
|
||
(<CODE>dijkstra</CODE>|<CODE>a_star</CODE>)<CODE>_net</CODE> | ||
------------------------------------------------------------ | ||
|
||
finds the shortest path over a net of paths. | ||
(the normal functions find a shortest path between 2 points accross | ||
the discreet room space) | ||
|
||
(<CODE>prim</CODE>|(<CODE>rev</CODE>)?<CODE>kruskel</CODE>|<CODE>sollin</CODE>) | ||
------------------------------------------------------------------------------- | ||
|
||
make a minimal spanning tree given a set of points. | ||
each algorithem may produce a slightly different tree, especially when given equidistant points. | ||
|
||
can specify either path generator and can use any fine tuning options | ||
|
||
<CODE>full_net</CODE> | ||
--------------------- | ||
|
||
generate a non-overlapping net between a list of points | ||
|
||
tba: | ||
---- | ||
|
||
- the existing grid generator functions | ||
- the existing blit functions | ||
|
||
WEIGHT | ||
====== | ||
|
||
node weighting is done according to distance. | ||
the norm used to specify this distance is independent from the norm for mesuring distance from B. | ||
|
||
forward is always considered most optimal. after that: | ||
- an optional elevation weighting level may be added that follows the ground. | ||
- for elevation, horizontal is considered best, then pitches from down to up. | ||
- azimuthly, north is weighted as best, then other directions moving clockwise. | ||
elevations are weighted heavier than azimuths. | ||
|
||
finer control over the pathing may be given: | ||
- no flying - nonground nodes are never checked | ||
- meteor falling - ground nodes and horizontal are checked when on a ground node, but only down nodes are checked when not on a ground node. | ||
- featherfalling - only ground nodes and nodes with a nonpositive azimuth are considered. | ||
- flying (default) - all nodes are considered | ||
|
||
- no swimming - wet nodes are never considered | ||
- no diving - only wet surface nodes are considered | ||
- swimming (default) - all wet nodes are considered | ||
|
||
- weight flying by n - add n to the distance calculation of a nonground node, default 0 | ||
- weight swimming by n - add n to the distance calculation of a wet node, default 0 | ||
|
||
- avoid foo - where foo is a type of hazard, avoid that hazard | ||
- ortho - restrict to orthogonal movement | ||
- nocollision |
Oops, something went wrong.