Permalink
Browse files

Nuked all windows newlines.

Corrected "Foobar" to "Wizznic" in GPL header.
  • Loading branch information...
1 parent d237e7c commit aa80153cd889299e5102fbdd19da32732de577a0 @DusteDdk committed Jun 9, 2012
Showing with 1,359 additions and 1,356 deletions.
  1. +94 −94 board.c
  2. +21 −21 board.h
  3. +266 −266 credits.c
  4. +11 −11 credits.h
  5. +4 −4 cursor.c
  6. +1 −1 cursor.h
  7. +6 −1 defs.h
  8. +68 −68 draw.c
  9. +18 −18 draw.h
  10. +7 −7 dumplevelimages.c
  11. +7 −7 dumplevelimages.h
  12. +1 −1 game.c
  13. +8 −8 game.h
  14. +2 −2 input.c
  15. +7 −7 input.h
  16. +1 −1 leveleditor.c
  17. +8 −8 leveleditor.h
  18. +49 −49 levels.c
  19. +7 −7 levels.h
  20. +2 −2 levelselector.c
  21. +7 −7 levelselector.h
  22. +1 −1 list.c
  23. +7 −7 list.h
  24. +7 −7 loader.h
  25. +1 −1 main.c
  26. +1 −1 mbrowse.c
  27. +4 −4 mbrowse.h
  28. +1 −1 menu.c
  29. +5 −5 menu.h
  30. +6 −6 pack.c
  31. +5 −5 pack.h
  32. +3 −3 particle.c
  33. +8 −8 particles.h
  34. +1 −1 pixel.c
  35. +3 −3 pixel.h
  36. +62 −62 platform/pc.c
  37. +1 −1 platform/pc.h
  38. +1 −1 player.c
  39. +6 −6 player.h
  40. +1 −1 pointer.c
  41. +2 −2 pointer.h
  42. +12 −12 settings.c
  43. +7 −7 settings.h
  44. +3 −3 sound.c
  45. +8 −8 sound.h
  46. +5 −5 sprite.c
  47. +6 −6 sprite.h
  48. +198 −198 stars.c
  49. +14 −14 stars.h
  50. +15 −15 states.h
  51. +1 −1 stats.c
  52. +10 −10 stats.h
  53. +1 −1 strings.c
  54. +1 −1 strings.h
  55. +37 −37 swscale.c
  56. +1 −1 swscale.h
  57. +91 −91 teleport.c
  58. +20 −20 teleport.h
  59. +95 −95 text.c
  60. +15 −15 text.h
  61. +1 −1 ticks.c
  62. +6 −6 ticks.h
  63. +2 −2 tools/releaser/data/wiz/wiz-launch-ini.ini
  64. +1 −1 userfiles.c
  65. +6 −6 userfiles.h
  66. +51 −51 waveimg.c
  67. +17 −17 waveimg.h
  68. +14 −16 wizznic.cbp
View
@@ -12,19 +12,19 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>. *
+ * along with Wizznic. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
-#include "board.h"
+#include "board.h"
-#include <stdio.h>
+#include <stdio.h>
#include "ticks.h"
#include "strings.h"
-#include "teleport.h"
+#include "teleport.h"
#include "particles.h"
#include "draw.h"
-#include "input.h"
-
+#include "input.h"
+
static int isWall(playField* pf, int x, int y)
{
@@ -143,9 +143,9 @@ void boardSetWalls(playField* pf)
}
}
-int loadField(playField* pf, const char* file)
-{
- FILE *f = fopen(file, "r");
+int loadField(playField* pf, const char* file)
+{
+ FILE *f = fopen(file, "r");
if(!f)
{
printf("%s %i Board: couldn't open '%s'\n",__FILE__,__LINE__,file);
@@ -201,13 +201,13 @@ int loadField(playField* pf, const char* file)
pf->board[x][y]->curLock=0;
pf->board[x][y]->sx = x;
pf->board[x][y]->sy = y;
- pf->board[x][y]->dx = x;
- pf->board[x][y]->dy = y;
+ pf->board[x][y]->dx = x;
+ pf->board[x][y]->dy = y;
pf->board[x][y]->tl = MOVERCOUNTDOWN;
pf->board[x][y]->moveXspeed = 0;
pf->board[x][y]->moveYspeed = 0;
-
- pf->board[x][y]->dmx = 0;
+
+ pf->board[x][y]->dmx = 0;
} else {
pf->board[x][y] = 0;
}
@@ -228,8 +228,8 @@ int loadField(playField* pf, const char* file)
//Figure out which tile to use for each wall (int 6)
boardSetWalls(pf);
- return(1);
-}
+ return(1);
+}
void freeField(playField* pf)
{
@@ -283,7 +283,7 @@ int moveBrick(playField* pf, int x, int y, int dirx, int diry, int block, int sp
return(0);
}
}
-
+
//If destination is empty
if( !pf->board[dx][dy] || (block==NOBLOCK && (!pf->board[dx][dy] || pf->board[dx][dy]->type==RESERVED)) )
{
@@ -309,10 +309,10 @@ int moveBrick(playField* pf, int x, int y, int dirx, int diry, int block, int sp
}
return(0);
-}
-
-//Move a brick instantly to teleports dest
-void telePortBrick(playField* pf,telePort_t* t,cursorType* cur)
+}
+
+//Move a brick instantly to teleports dest
+void telePortBrick(playField* pf,telePort_t* t,cursorType* cur)
{
psysSet_t ps; //Particle system for particle effect
brickType* b = pf->board[t->sx][t->sy];
@@ -395,7 +395,7 @@ void telePortBrick(playField* pf,telePort_t* t,cursorType* cur)
//Play sound
sndPlayOnce(SND_TELEPORTED, b->pxx);
-
+
}
void doTelePort(playField* pf,cursorType* cur)
@@ -424,7 +424,7 @@ static int vertMover(playField* pf,int x, int y, int dir)
{
//Outside bounds
if(y+dir < 0 || y+dir == FIELDSIZE) return(0);
-
+
//Abort if it's not a brick, or a mover.
if(!isBrick(pf->board[x][y]) && !isMover(pf->board[x][y]) ) return(0);
@@ -518,24 +518,24 @@ void simField(playField* pf, cursorType* cur)
//Do we need to move it?
int deltaX= (b->dx*brickSize+boardOffsetX) - b->pxx ;
int deltaY= (b->dy*brickSize+boardOffsetY) - b->pxy ;
-
+
if(deltaX || deltaY )
{
//Doing this lock to only move one dir at a time
if( deltaX )
{
- b->pxx += b->moveXspeed;
-
- if(b->moveXspeed < 0 && b->pxx < (b->dx*brickSize+boardOffsetX) )
- b->pxx = (b->dx*brickSize+boardOffsetX);
-
- if(b->moveXspeed > 0 && b->pxx > (b->dx*brickSize+boardOffsetX) )
- b->pxx = (b->dx*brickSize+boardOffsetX);
-
+ b->pxx += b->moveXspeed;
+
+ if(b->moveXspeed < 0 && b->pxx < (b->dx*brickSize+boardOffsetX) )
+ b->pxx = (b->dx*brickSize+boardOffsetX);
+
+ if(b->moveXspeed > 0 && b->pxx > (b->dx*brickSize+boardOffsetX) )
+ b->pxx = (b->dx*brickSize+boardOffsetX);
+
}
- if( deltaY)
+ if( deltaY)
{
- b->pxy += b->moveYspeed;
+ b->pxy += b->moveYspeed;
}
//}
//Is cursor attached?
@@ -561,9 +561,9 @@ void simField(playField* pf, cursorType* cur)
b->moveYspeed=0;
//Put it down:
- pf->board[ b->dx ][ b->dy ] = b;
-
-
+ pf->board[ b->dx ][ b->dy ] = b;
+
+
//Clear source
pf->board[ b->sx ][ b->sy ] = 0;
@@ -577,7 +577,7 @@ void simField(playField* pf, cursorType* cur)
}
//May I be forgiven for I do not know better.
- brickType* hack;
+ brickType* hack;
//Run teleport rules first
doTelePort(pf,cur);
@@ -602,16 +602,16 @@ void simField(playField* pf, cursorType* cur)
pf->board[x][y]->curLock=0;
}
- //Things that happens below it
- if(y+1 < FIELDSIZE)
- {
+ //Things that happens below it
+ if(y+1 < FIELDSIZE)
+ {
//Falling?
if( !pf->board[x][y+1] )
{
//Move down
moveBrick(pf, x, y, 0, DIRDOWN, DOBLOCK, FALLINGSPEED);
- } else //Laying on a reserved brick might mean that it should be attached to a mover.
+ } else //Laying on a reserved brick might mean that it should be attached to a mover.
{
if( pf->board[x][y+1]->type == RESERVED) //Magnet to mover
{
@@ -638,10 +638,10 @@ void simField(playField* pf, cursorType* cur)
break;
}
} else if(b->type==MOVERVERT)
- {
-
- //Only magnet if it's moving down (if it's moving up, it will eventually hit the resting brick)
- if(b->sy < b->dy)
+ {
+
+ //Only magnet if it's moving down (if it's moving up, it will eventually hit the resting brick)
+ if(b->sy < b->dy)
{
//Fetch the original underlying brick.
b=findMoving(pf, x,y+1);
@@ -651,9 +651,9 @@ void simField(playField* pf, cursorType* cur)
hack->pxy=b->pxy-20;
hack->moveYspeed=b->moveYspeed;
break;
- }
+ }
}
- }
+ }
b=findMoving(pf,x,b->dy+1);
} else {
@@ -662,8 +662,8 @@ void simField(playField* pf, cursorType* cur)
} //Loop through list
}
- } //Resting on a reserved
- } //Not free
+ } //Resting on a reserved
+ } //Not free
}
}
@@ -746,29 +746,29 @@ void simField(playField* pf, cursorType* cur)
}
}
- }
+ }
}
}
- }
+ }
for(y=FIELDSIZE-1; y > -1; y--)
{
for(x=0; x < FIELDSIZE; x++)
{
- if(pf->board[x][y])
+ if(pf->board[x][y])
{
- //Unmark "checked" status.
- pf->board[x][y]->checked=0;
-
- //Do delayed x movement
- if( isBrick(pf->board[x][y]) && pf->board[x][y]->dmx )
- {
- b=pf->board[x][y];
- curMoveBrick(pf, b, b->dmx);
- b->dmx=0;
- }
-
+ //Unmark "checked" status.
+ pf->board[x][y]->checked=0;
+
+ //Do delayed x movement
+ if( isBrick(pf->board[x][y]) && pf->board[x][y]->dmx )
+ {
+ b=pf->board[x][y];
+ curMoveBrick(pf, b, b->dmx);
+ b->dmx=0;
+ }
+
}
}
}
@@ -799,7 +799,7 @@ int doRules(playField* pf)
listItem* li=pf->movingList;
brickType* b;
while( (li = li->next) )
- {
+ {
if( isBrick((brickType*)li->data) )
bricksLeft++;
}
@@ -965,50 +965,50 @@ brickType* findMoving(playField* pf, int x, int y)
}
return(0);
-}
-
-brickType* brickUnderCursor(playField* pf, int x, int y)
-{
- brickType* b=findMoving(pf,x,y);
-
- //If it's not moving, they maybe it's standing still
- if( !b && pf->board[x][y] )
- b=pf->board[x][y];
-
- if( b && isBrick(b) )
- return(b);
-
- return(0);
-}
-
-int curMoveBrick(playField *pf, brickType *b, int dir)
+}
+
+brickType* brickUnderCursor(playField* pf, int x, int y)
+{
+ brickType* b=findMoving(pf,x,y);
+
+ //If it's not moving, they maybe it's standing still
+ if( !b && pf->board[x][y] )
+ b=pf->board[x][y];
+
+ if( b && isBrick(b) )
+ return(b);
+
+ return(0);
+}
+
+int curMoveBrick(playField *pf, brickType *b, int dir)
{
//We can't move the brick, if it is falling.
if( isBrickFalling(pf, b) ) return(0);
//We can't move it if it is on top of brick that is exploding (makes "glitch" solving possible).
if( onTopOfReserved(pf, b->dx, b->dy) ) return(0);
- //Move brick that is not moving<.
- if(b->moveXspeed==0 && b->moveYspeed==0)
+ //Move brick that is not moving<.
+ if(b->moveXspeed==0 && b->moveYspeed==0)
{
- //First, check that it's a brick, and not a reserved.
+ //First, check that it's a brick, and not a reserved.
if(pf->board[b->sx][b->sy] && isBrick( pf->board[b->sx][b->sy]) )
- {
+ {
if(moveBrick( pf, b->sx, b->sy, dir, 0, DOBLOCK, CURSORMOVESPEED))
{
return(1);
}
- }
- } else {
- if( ((b->moveXspeed < 0 && dir > 0) || (b->moveXspeed > 0 && dir <0)) || b->moveYspeed )
+ }
+ } else {
+ if( ((b->moveXspeed < 0 && dir > 0) || (b->moveXspeed > 0 && dir <0)) || b->moveYspeed )
{
if(!b->dmx)
- {
- b->dmx = dir;
+ {
+ b->dmx = dir;
return(1);
- }
- }
+ }
+ }
}
- return(0);
-}
+ return(0);
+}
Oops, something went wrong.

0 comments on commit aa80153

Please sign in to comment.