fixed/unified formatting

This commit is contained in:
Solomon W. 2020-03-28 15:28:58 -04:00
parent d94bcdf287
commit 8ae935be78
2 changed files with 73 additions and 90 deletions

View File

@ -1,2 +1,5 @@
[Buildset]
BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x0c\x00m\x00a\x00t\x00r\x00i\x00x)
[Project]
VersionControlSupport=kdevgit

View File

@ -35,14 +35,12 @@ int main(int argc, char **argv) {
timeout(time);
int maxX = COLS;
int maxY = LINES;
int initTailLen;
if(argc >= 2) {
initTailLen=atoi(argv[1]);
} else {
initTailLen=10;
}
int tailLen[maxX];
for(int i=0; i<maxX; i++) {
@ -55,7 +53,6 @@ int main(int argc, char **argv) {
}
}
}
int cascade[maxX];
int tail[maxX];
int jmpTail[maxX];
@ -76,48 +73,31 @@ int main(int argc, char **argv) {
if(cascade[xPos]==ERR) {//make sure the stream is set to active
cascade[xPos]=startPos;
}
//---------swich to weird format-----------
for(int i=0; i<maxX; i++)
{//move the streams up/down
if(!pause)
{
if(cascade[i]!=ERR)
{
for(int i=0; i<maxX; i++) {//move the streams up/down
if(!pause) {
if(cascade[i]!=ERR) {
if(dir==DOWN) {
tail[i] = cascade[i]-tailLen[i];
} else {
tail[i] = cascade[i]+tailLen[i];
}
if(cascade[i]==limit)
{//check if the position is at the bottom of the screen
if(cascade[i]==limit) {//check if the position is at the bottom of the screen
cascade[i]=ERR;//set the position to ERR if it is at the bottom
}
else
{
if(rand()%10==1)
{//check if the stream will jump
if(!(jmpTail[i]<=maxY))
{
if(dir==DOWN)
{
} else {
if(rand()%10==1) {//check if the stream will jump
if(!(jmpTail[i]<=maxY)) {
if(dir==DOWN) {
cascade[i]=cascade[i]+rand()%8;
jmpTail[i]=cascade[i]-tailLen[i];
}
else
{
} else {
cascade[i]=cascade[i]-rand()%8;
jmpTail[i]=cascade[i]+tailLen[i];
}
}
}
else
{
if(dir==DOWN)
{
} else {
if(dir==DOWN) {
cascade[i]++;//increase the position
}
else
{
} else {
cascade[i]--;
}
}