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
Jan 4, 2020
1 parent
5ebbfd2
commit 8c652f5
Showing
11 changed files
with
311 additions
and
51 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,2 @@ | ||
playertyp__movecheck(playertyp this,int x,int y, int z) | ||
|
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,107 @@ | ||
shadowmask sphere(ucoord3 omega,int rho) { | ||
shadowmask * output; | ||
{ | ||
int point[3][8][3]; | ||
/* 0=xy | ||
* 1=xz | ||
* 2=yz | ||
* | ||
* 7 0 0 | ||
* 6 1 3 1 | ||
* 5 2 2 | ||
* 4 3 | ||
*/ | ||
for (int n = 0;n < 3;n++) { | ||
for (int m = 0;m < 4;m++) { | ||
point[n][m][0] = omega[0]; point[n][m][1] = omega[1]; point[n][m][2] = omega[2]; | ||
} | ||
} | ||
while ((squared(point[0][0][0] - omega[0]) + squared(point[0][0][1] - omega[1]) + squared(point[0][0][2] - omega[2])) < squared(rho)) {point[0][0][1]--;} | ||
while ((squared(point[0][1][0] - omega[0]) + squared(point[0][1][1] - omega[1]) + squared(point[0][1][2] - omega[2])) < squared(rho)) {point[0][0][0]++;} | ||
while ((squared(point[0][2][0] - omega[0]) + squared(point[0][2][1] - omega[1]) + squared(point[0][2][2] - omega[2])) < squared(rho)) {point[0][0][1]++;} | ||
while ((squared(point[0][3][0] - omega[0]) + squared(point[0][3][1] - omega[1]) + squared(point[0][3][2] - omega[2])) < squared(rho)) {point[0][0][0]--;} | ||
while ((squared(point[1][0][0] - omega[0]) + squared(point[1][0][1] - omega[1]) + squared(point[1][0][2] - omega[2])) < squared(rho)) {point[1][0][2]++;} | ||
while ((squared(point[1][1][0] - omega[0]) + squared(point[1][1][1] - omega[1]) + squared(point[1][1][2] - omega[2])) < squared(rho)) {point[1][0][0]++;} | ||
while ((squared(point[1][2][0] - omega[0]) + squared(point[1][2][1] - omega[1]) + squared(point[1][2][2] - omega[2])) < squared(rho)) {point[1][0][2]--;} | ||
while ((squared(point[1][3][0] - omega[0]) + squared(point[1][3][1] - omega[1]) + squared(point[1][3][2] - omega[2])) < squared(rho)) {point[1][0][0]--;} | ||
while ((squared(point[2][0][0] - omega[0]) + squared(point[2][0][1] - omega[1]) + squared(point[2][0][2] - omega[2])) < squared(rho)) {point[2][0][2]++;} | ||
while ((squared(point[2][1][0] - omega[0]) + squared(point[2][1][1] - omega[1]) + squared(point[2][1][2] - omega[2])) < squared(rho)) {point[2][0][1]++;} | ||
while ((squared(point[2][2][0] - omega[0]) + squared(point[2][2][1] - omega[1]) + squared(point[2][2][2] - omega[2])) < squared(rho)) {point[2][0][2]--;} | ||
while ((squared(point[2][3][0] - omega[0]) + squared(point[2][3][1] - omega[1]) + squared(point[2][3][2] - omega[2])) < squared(rho)) {point[2][0][1]--;} | ||
for (int a = 0;a < 3;a++) { | ||
for (int b = 0;b < 4;b++) { | ||
maskset(point[a][b][2],point[a][b][1],point[a][b][0],output,true); | ||
} | ||
} | ||
bool stop = (rho > 1); //dubious | ||
for (int i = 1;!stop;i++) { | ||
point[0][0][0] = omega[0] + i; point[0][0][1] = omega[1]; point[0][0][2] = omega[2]; | ||
point[0][1][0] = omega[0]; point[0][1][1] = omega[1] - i; point[0][1][2] = omega[2]; | ||
point[0][2][0] = omega[0]; point[0][2][1] = omega[1] + i; point[0][2][2] = omega[2]; | ||
point[0][3][0] = omega[0] + i; point[0][3][1] = omega[1]; point[0][3][2] = omega[2]; | ||
point[0][4][0] = omega[0] - i; point[0][4][1] = omega[1]; point[0][4][2] = omega[2]; | ||
point[0][5][0] = omega[0]; point[0][5][1] = omega[1] + i; point[0][5][2] = omega[2]; | ||
point[0][6][0] = omega[0]; point[0][6][1] = omega[1] - i; point[0][6][2] = omega[2]; | ||
point[0][7][0] = omega[0] - i; point[0][7][1] = omega[1]; point[0][7][2] = omega[2]; | ||
while ((squared(point[0][0][0] - omega[0]) + squared(point[0][0][1] - omega[1]) + squared(point[0][0][2] - omega[2])) < squared(rho)) {point[0][0][1]--;} | ||
while ((squared(point[0][1][0] - omega[0]) + squared(point[0][1][1] - omega[1]) + squared(point[0][1][2] - omega[2])) < squared(rho)) {point[0][1][0]++;} | ||
while ((squared(point[0][2][0] - omega[0]) + squared(point[0][2][1] - omega[1]) + squared(point[0][2][2] - omega[2])) < squared(rho)) {point[0][2][0]++;} | ||
while ((squared(point[0][3][0] - omega[0]) + squared(point[0][3][1] - omega[1]) + squared(point[0][3][2] - omega[2])) < squared(rho)) {point[0][3][1]++;} | ||
while ((squared(point[0][4][0] - omega[0]) + squared(point[0][4][1] - omega[1]) + squared(point[0][4][2] - omega[2])) < squared(rho)) {point[0][4][1]++;} | ||
while ((squared(point[0][5][0] - omega[0]) + squared(point[0][5][1] - omega[1]) + squared(point[0][5][2] - omega[2])) < squared(rho)) {point[0][5][0]--;} | ||
while ((squared(point[0][6][0] - omega[0]) + squared(point[0][6][1] - omega[1]) + squared(point[0][6][2] - omega[2])) < squared(rho)) {point[0][6][0]--;} | ||
while ((squared(point[0][7][0] - omega[0]) + squared(point[0][7][1] - omega[1]) + squared(point[0][7][2] - omega[2])) < squared(rho)) {point[0][7][1]--;} | ||
point[1][0][0] = omega[0] + i; point[1][0][1] = omega[1]; point[1][0][2] = omega[2]; | ||
point[1][1][0] = omega[0]; point[1][1][1] = omega[1]; point[1][1][2] = omega[2] + i; | ||
point[1][2][0] = omega[0]; point[1][2][1] = omega[1]; point[1][2][2] = omega[2] - i; | ||
point[1][3][0] = omega[0] + i; point[1][3][1] = omega[1]; point[1][3][2] = omega[2]; | ||
point[1][4][0] = omega[0] - i; point[1][4][1] = omega[1]; point[1][4][2] = omega[2]; | ||
point[1][5][0] = omega[0]; point[1][5][1] = omega[1]; point[1][5][2] = omega[2] - i; | ||
point[1][6][0] = omega[0]; point[1][6][1] = omega[1]; point[1][6][2] = omega[2] + i; | ||
point[1][7][0] = omega[0] - i; point[1][7][1] = omega[1]; point[1][7][2] = omega[2]; | ||
while ((squared(point[1][0][0] - omega[0]) + squared(point[1][0][1] - omega[1]) + squared(point[1][0][2] - omega[2])) < squared(rho)) {point[1][0][2]++;} | ||
while ((squared(point[1][1][0] - omega[0]) + squared(point[1][1][1] - omega[1]) + squared(point[1][1][2] - omega[2])) < squared(rho)) {point[1][1][0]++;} | ||
while ((squared(point[1][2][0] - omega[0]) + squared(point[1][2][1] - omega[1]) + squared(point[1][2][2] - omega[2])) < squared(rho)) {point[1][2][0]++;} | ||
while ((squared(point[1][3][0] - omega[0]) + squared(point[1][3][1] - omega[1]) + squared(point[1][3][2] - omega[2])) < squared(rho)) {point[1][3][2]--;} | ||
while ((squared(point[1][4][0] - omega[0]) + squared(point[1][4][1] - omega[1]) + squared(point[1][4][2] - omega[2])) < squared(rho)) {point[1][4][2]--;} | ||
while ((squared(point[1][5][0] - omega[0]) + squared(point[1][5][1] - omega[1]) + squared(point[1][5][2] - omega[2])) < squared(rho)) {point[1][5][0]--;} | ||
while ((squared(point[1][6][0] - omega[0]) + squared(point[1][6][1] - omega[1]) + squared(point[1][6][2] - omega[2])) < squared(rho)) {point[1][6][0]--;} | ||
while ((squared(point[1][7][0] - omega[0]) + squared(point[1][7][1] - omega[1]) + squared(point[1][7][2] - omega[2])) < squared(rho)) {point[1][7][2]++;} | ||
point[2][0][0] = omega[0]; point[2][0][1] = omega[1] + i; point[2][0][2] = omega[2]; | ||
point[2][1][0] = omega[0]; point[2][1][1] = omega[1]; point[2][1][2] = omega[2] + i; | ||
point[2][2][0] = omega[0]; point[2][2][1] = omega[1]; point[2][2][2] = omega[2] - i; | ||
point[2][3][0] = omega[0]; point[2][3][1] = omega[1] + i; point[2][3][2] = omega[2]; | ||
point[2][4][0] = omega[0]; point[2][4][1] = omega[1] - i; point[2][4][2] = omega[2]; | ||
point[2][5][0] = omega[0]; point[2][5][1] = omega[1]; point[2][5][2] = omega[2] - i; | ||
point[2][6][0] = omega[0]; point[2][6][1] = omega[1]; point[2][6][2] = omega[2] + i; | ||
point[2][7][0] = omega[0]; point[2][7][1] = omega[1] - i; point[2][7][2] = omega[2]; | ||
while ((squared(point[2][0][0] - omega[0]) + squared(point[2][0][1] - omega[1]) + squared(point[2][0][2] - omega[2])) < squared(rho)) {point[2][0][2]++;} | ||
while ((squared(point[2][1][0] - omega[0]) + squared(point[2][1][1] - omega[1]) + squared(point[2][1][2] - omega[2])) < squared(rho)) {point[2][1][1]++;} | ||
while ((squared(point[2][2][0] - omega[0]) + squared(point[2][2][1] - omega[1]) + squared(point[2][2][2] - omega[2])) < squared(rho)) {point[2][2][1]++;} | ||
while ((squared(point[2][3][0] - omega[0]) + squared(point[2][3][1] - omega[1]) + squared(point[2][3][2] - omega[2])) < squared(rho)) {point[2][3][2]--;} | ||
while ((squared(point[2][4][0] - omega[0]) + squared(point[2][4][1] - omega[1]) + squared(point[2][4][2] - omega[2])) < squared(rho)) {point[2][4][2]--;} | ||
while ((squared(point[2][5][0] - omega[0]) + squared(point[2][5][1] - omega[1]) + squared(point[2][5][2] - omega[2])) < squared(rho)) {point[2][5][1]--;} | ||
while ((squared(point[2][6][0] - omega[0]) + squared(point[2][6][1] - omega[1]) + squared(point[2][6][2] - omega[2])) < squared(rho)) {point[2][6][1]--;} | ||
while ((squared(point[2][7][0] - omega[0]) + squared(point[2][7][1] - omega[1]) + squared(point[2][7][2] - omega[2])) < squared(rho)) {point[2][7][2]++;} | ||
for (int a = 0;a < 3;a++) { | ||
for (int b = 0;b < 8;b++) { | ||
maskset(point[a][b][2],point[a][b][1],point[a][b][0],output,true); | ||
} | ||
} | ||
stop |= (point[0][0][0] == point[0][1][0]); stop |= (point[0][0][1] == point[0][1][1]); stop |= (point[0][0][2] == point[0][1][2]); | ||
stop |= (point[0][2][0] == point[0][3][0]); stop |= (point[0][2][1] == point[0][3][1]); stop |= (point[0][2][2] == point[0][3][2]); | ||
stop |= (point[0][4][0] == point[0][5][0]); stop |= (point[0][4][1] == point[0][5][1]); stop |= (point[0][4][2] == point[0][5][2]); | ||
stop |= (point[0][6][0] == point[0][7][0]); stop |= (point[0][6][1] == point[0][7][1]); stop |= (point[0][6][2] == point[0][7][2]); | ||
|
||
stop |= (point[1][0][0] == point[1][1][0]); stop |= (point[1][0][1] == point[1][1][1]); stop |= (point[1][0][2] == point[1][1][2]); | ||
stop |= (point[1][2][0] == point[1][3][0]); stop |= (point[1][2][1] == point[1][3][1]); stop |= (point[1][2][2] == point[1][3][2]); | ||
stop |= (point[1][4][0] == point[1][5][0]); stop |= (point[1][4][1] == point[1][5][1]); stop |= (point[1][4][2] == point[1][5][2]); | ||
stop |= (point[1][6][0] == point[1][7][0]); stop |= (point[1][6][1] == point[1][7][1]); stop |= (point[1][6][2] == point[1][7][2]); | ||
|
||
stop |= (point[2][0][0] == point[2][1][0]); stop |= (point[2][0][1] == point[2][1][1]); stop |= (point[2][0][2] == point[2][1][2]); | ||
stop |= (point[2][2][0] == point[2][3][0]); stop |= (point[2][2][1] == point[2][3][1]); stop |= (point[2][2][2] == point[2][3][2]); | ||
stop |= (point[2][4][0] == point[2][5][0]); stop |= (point[2][4][1] == point[2][5][1]); stop |= (point[2][4][2] == point[2][5][2]); | ||
stop |= (point[2][6][0] == point[2][7][0]); stop |= (point[2][6][1] == point[2][7][1]); stop |= (point[2][6][2] == point[2][7][2]); | ||
} | ||
return *output; | ||
} |
Empty file.
This file was deleted.
Oops, something went wrong.
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,55 @@ | ||
shadowmask ucoord3__sphere(ucoord3 omega,int r) { | ||
shadowmask output; | ||
ucoord2 xy[8],xz[8],yz[8]; | ||
for (int i = 0;;i++) { | ||
xy[0][0] = omega[0] + i; | ||
xy[0][1] = omega[1]; | ||
xy[1][0] = omega[0]; | ||
xy[1][1] = omega[1] - i; | ||
xy[2][0] = omega[0]; | ||
xy[2][1] = omega[1] + i; | ||
xy[3][0] = omega[0] + i; | ||
xy[3][1] = omega[1]; | ||
xy[4][0] = omega[0] - i; | ||
xy[4][1] = omega[1]; | ||
xy[5][0] = omega[0]; | ||
xy[5][1] = omega[1] - i; | ||
xy[6][0] = omega[0]; | ||
xy[6][1] = omega[1] + i; | ||
xy[7][0] = omega[0] - i; | ||
xy[7][1] = omega[1]; | ||
/**HR**/ | ||
xz[0][0] = omega[0] + i; | ||
xz[0][1] = omega[2]; | ||
xz[1][0] = omega[0]; | ||
xz[1][1] = omega[2] - i; | ||
xz[2][0] = omega[0]; | ||
xz[2][1] = omega[2] + i; | ||
xz[3][0] = omega[0] + i; | ||
xz[3][1] = omega[2]; | ||
xz[4][0] = omega[0] - i; | ||
xz[4][1] = omega[2]; | ||
xz[5][0] = omega[0]; | ||
xz[5][1] = omega[2] - i; | ||
xz[6][0] = omega[0]; | ||
xz[6][1] = omega[2] + i; | ||
xz[7][0] = omega[0] - i; | ||
xz[7][1] = omega[2]; | ||
/**HR**/ | ||
yz[0][0] = omega[1] + i; | ||
yz[0][1] = omega[2]; | ||
yz[1][0] = omega[1]; | ||
yz[1][1] = omega[2] - i; | ||
yz[2][0] = omega[1]; | ||
yz[2][1] = omega[2] + i; | ||
yz[3][0] = omega[1] + i; | ||
yz[3][1] = omega[2]; | ||
yz[4][0] = omega[1] - i; | ||
yz[4][1] = omega[2]; | ||
yz[5][0] = omega[1]; | ||
yz[5][1] = omega[2] - i; | ||
yz[6][0] = omega[1]; | ||
yz[6][1] = omega[2] + i; | ||
yz[7][0] = omega[1] - i; | ||
yz[7][1] = omega[2]; | ||
/**HR**/ |
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
Oops, something went wrong.