Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Don't run indent on the Xcode templates
  • Loading branch information
slouken committed Aug 11, 2007
1 parent 7b34fe6 commit 46066487b354243d41b40fab35a2593eed95da33
Showing with 733 additions and 744 deletions.
  1. +1 −1 Makefile.in
  2. +1 −1 Xcode/SDLTest/libsdlmain_prefix.h
  3. +2 −1 Xcode/TemplatesForProjectBuilder/SDL Application/SDLMain.h
  4. +45 −45 Xcode/TemplatesForProjectBuilder/SDL Application/main.c
  5. +7 −6 Xcode/TemplatesForProjectBuilder/SDL Cocoa Application/SDLMain.h
  6. +45 −45 Xcode/TemplatesForProjectBuilder/SDL Cocoa Application/main.c
  7. +27 −24 Xcode/TemplatesForProjectBuilder/SDL Custom Cocoa Application/MyController.h
  8. +2 −1 Xcode/TemplatesForProjectBuilder/SDL Custom Cocoa Application/MyCustomView.h
  9. +9 −3 Xcode/TemplatesForProjectBuilder/SDL Custom Cocoa Application/MyCustomWindow.h
  10. +2 −2 Xcode/TemplatesForProjectBuilder/SDL Custom Cocoa Application/SDLMain.h
  11. +1 −0 Xcode/TemplatesForProjectBuilder/SDL Custom Cocoa Application/prefix.h
  12. +2 −1 Xcode/TemplatesForProjectBuilder/SDL OpenGL Application/SDLMain.h
  13. +123 −130 Xcode/TemplatesForProjectBuilder/SDL OpenGL Application/atlantis/atlantis.c
  14. +1 −2 Xcode/TemplatesForProjectBuilder/SDL OpenGL Application/atlantis/atlantis.h
  15. +5 −9 Xcode/TemplatesForProjectBuilder/SDL OpenGL Application/atlantis/swim.c
  16. +95 −102 Xcode/TemplatesForProjectBuilder/SDL OpenGL Application/main.c
  17. +2 −1 Xcode/TemplatesForXcode/SDL Application/SDLMain.h
  18. +45 −45 Xcode/TemplatesForXcode/SDL Application/main.c
  19. +7 −6 Xcode/TemplatesForXcode/SDL Cocoa Application/SDLMain.h
  20. +45 −45 Xcode/TemplatesForXcode/SDL Cocoa Application/main.c
  21. +27 −24 Xcode/TemplatesForXcode/SDL Custom Cocoa Application/MyController.h
  22. +2 −1 Xcode/TemplatesForXcode/SDL Custom Cocoa Application/MyCustomView.h
  23. +9 −3 Xcode/TemplatesForXcode/SDL Custom Cocoa Application/MyCustomWindow.h
  24. +2 −2 Xcode/TemplatesForXcode/SDL Custom Cocoa Application/SDLMain.h
  25. +2 −1 Xcode/TemplatesForXcode/SDL OpenGL Application/SDLMain.h
  26. +123 −130 Xcode/TemplatesForXcode/SDL OpenGL Application/atlantis/atlantis.c
  27. +1 −2 Xcode/TemplatesForXcode/SDL OpenGL Application/atlantis/atlantis.h
  28. +5 −9 Xcode/TemplatesForXcode/SDL OpenGL Application/atlantis/swim.c
  29. +95 −102 Xcode/TemplatesForXcode/SDL OpenGL Application/main.c
@@ -177,7 +177,7 @@ indent:
-name '*.h' -o \
-name '*.c' -o \
-name '*.cc' \) \
-print | \
-print | fgrep -v ./Xcode | \
while read file; do \
indent "$$file" -o "$$file.indent"; \
if cmp "$$file" "$$file.indent" >/dev/null; then \
@@ -10,4 +10,4 @@
#include <Cocoa/Cocoa.h>
#include <Carbon/Carbon.h>
#include "SDL.h"
#include "SDLMain.h"
#include "SDLMain.h"
@@ -7,4 +7,5 @@

#import <Cocoa/Cocoa.h>

@ interface SDLMain:NSObject @ end
@interface SDLMain : NSObject
@end
@@ -4,62 +4,62 @@
Please see the SDL documentation for details on using the SDL API:
/Developer/Documentation/SDL/docs.html
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#include "SDL.h"

int
main(int argc, char *argv[])
int main(int argc, char *argv[])
{
Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */
SDL_Surface *screen;
Uint8 video_bpp = 0;
Uint32 videoflags = SDL_SWSURFACE;
int done;
SDL_Event event;

/* Initialize the SDL library */
if (SDL_Init(initflags) < 0) {
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
exit(1);
}
Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */
SDL_Surface *screen;
Uint8 video_bpp = 0;
Uint32 videoflags = SDL_SWSURFACE;
int done;
SDL_Event event;

/* Set 640x480 video mode */
screen = SDL_SetVideoMode(640, 480, video_bpp, videoflags);
if (screen == NULL) {
fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
video_bpp, SDL_GetError());
SDL_Quit();
exit(2);
}
/* Initialize the SDL library */
if ( SDL_Init(initflags) < 0 ) {
fprintf(stderr, "Couldn't initialize SDL: %s\n",
SDL_GetError());
exit(1);
}

done = 0;
while (!done) {
/* Set 640x480 video mode */
screen=SDL_SetVideoMode(640,480, video_bpp, videoflags);
if (screen == NULL) {
fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
video_bpp, SDL_GetError());
SDL_Quit();
exit(2);
}

/* Check for events */
while (SDL_PollEvent(&event)) {
switch (event.type) {
done = 0;
while ( !done ) {

case SDL_MOUSEMOTION:
break;
case SDL_MOUSEBUTTONDOWN:
break;
case SDL_KEYDOWN:
/* Any keypress quits the app... */
case SDL_QUIT:
done = 1;
break;
default:
break;
}
}
}
/* Check for events */
while ( SDL_PollEvent(&event) ) {
switch (event.type) {

/* Clean up the SDL library */
SDL_Quit();
return (0);
case SDL_MOUSEMOTION:
break;
case SDL_MOUSEBUTTONDOWN:
break;
case SDL_KEYDOWN:
/* Any keypress quits the app... */
case SDL_QUIT:
done = 1;
break;
default:
break;
}
}
}

/* Clean up the SDL library */
SDL_Quit();
return(0);
}
@@ -7,10 +7,11 @@

#import <Cocoa/Cocoa.h>

@ interface SDLMain: NSObject - (IBAction) prefsMenu:(id) sender;
-(IBAction) newGame:(id) sender;
-(IBAction) openGame:(id) sender;
-(IBAction) saveGame:(id) sender;
-(IBAction) saveGameAs:(id) sender;
-(IBAction) help:(id) sender;
@interface SDLMain : NSObject
- (IBAction)prefsMenu:(id)sender;
- (IBAction)newGame:(id)sender;
- (IBAction)openGame:(id)sender;
- (IBAction)saveGame:(id)sender;
- (IBAction)saveGameAs:(id)sender;
- (IBAction)help:(id)sender;
@end
@@ -4,62 +4,62 @@
Please see the SDL documentation for details on using the SDL API:
/Developer/Documentation/SDL/docs.html
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#include "SDL.h"

int
main(int argc, char *argv[])
int main(int argc, char *argv[])
{
Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */
SDL_Surface *screen;
Uint8 video_bpp = 0;
Uint32 videoflags = SDL_SWSURFACE;
int done;
SDL_Event event;

/* Initialize the SDL library */
if (SDL_Init(initflags) < 0) {
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
exit(1);
}
Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */
SDL_Surface *screen;
Uint8 video_bpp = 0;
Uint32 videoflags = SDL_SWSURFACE;
int done;
SDL_Event event;

/* Set 640x480 video mode */
screen = SDL_SetVideoMode(640, 480, video_bpp, videoflags);
if (screen == NULL) {
fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
video_bpp, SDL_GetError());
SDL_Quit();
exit(2);
}
/* Initialize the SDL library */
if ( SDL_Init(initflags) < 0 ) {
fprintf(stderr, "Couldn't initialize SDL: %s\n",
SDL_GetError());
exit(1);
}

done = 0;
while (!done) {
/* Set 640x480 video mode */
screen=SDL_SetVideoMode(640,480, video_bpp, videoflags);
if (screen == NULL) {
fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
video_bpp, SDL_GetError());
SDL_Quit();
exit(2);
}

/* Check for events */
while (SDL_PollEvent(&event)) {
switch (event.type) {
done = 0;
while ( !done ) {

case SDL_MOUSEMOTION:
break;
case SDL_MOUSEBUTTONDOWN:
break;
case SDL_KEYDOWN:
/* Any keypress quits the app... */
case SDL_QUIT:
done = 1;
break;
default:
break;
}
}
}
/* Check for events */
while ( SDL_PollEvent(&event) ) {
switch (event.type) {

/* Clean up the SDL library */
SDL_Quit();
return (0);
case SDL_MOUSEMOTION:
break;
case SDL_MOUSEBUTTONDOWN:
break;
case SDL_KEYDOWN:
/* Any keypress quits the app... */
case SDL_QUIT:
done = 1;
break;
default:
break;
}
}
}

/* Clean up the SDL library */
SDL_Quit();
return(0);
}
@@ -9,35 +9,38 @@
#import <Cocoa/Cocoa.h>
#import "SDL.h"

extern id gController; // instance of this class from nib
extern id gController; // instance of this class from nib

// Declare SDL_QuartzWindowDelegate (defined in SDL.framework)
@interface SDL_QuartzWindowDelegate: NSObject @ end @ interface MyController:NSObject
@interface SDL_QuartzWindowDelegate : NSObject
@end

@interface MyController : NSObject
{
// Interface Builder Outlets
IBOutlet id _framesPerSecond;
IBOutlet id _numSprites;
IBOutlet id _window;
IBOutlet id _view;

IBOutlet id _framesPerSecond;
IBOutlet id _numSprites;
IBOutlet id _window;
IBOutlet id _view;
// Private instance variables
int _nSprites;
int _max_speed;
int _doFlip;
Uint8 *_mem;

SDL_Surface *_screen;
SDL_Surface *_sprite;
SDL_Rect *_sprite_rects;
SDL_Rect *_positions;
SDL_Rect *_velocities;
int _sprites_visible;
Uint16 _sprite_w, _sprite_h;

int _mouse_x, _mouse_y;
int _nSprites;
int _max_speed;
int _doFlip;
Uint8* _mem;
SDL_Surface* _screen;
SDL_Surface* _sprite;
SDL_Rect* _sprite_rects;
SDL_Rect* _positions;
SDL_Rect* _velocities;
int _sprites_visible;
Uint16 _sprite_w, _sprite_h;
int _mouse_x, _mouse_y;
}

// Interface Builder Actions
-(IBAction) changeNumberOfSprites:(id) sender;
-(IBAction) selectUpdateMode:(id) sender;
- (IBAction)changeNumberOfSprites:(id)sender;
- (IBAction)selectUpdateMode:(id)sender;
@end

@@ -9,7 +9,8 @@
#import <AppKit/AppKit.h>


@ interface MyCustomView:NSQuickDrawView {
@interface MyCustomView : NSQuickDrawView
{
}

@end
@@ -11,11 +11,17 @@
// Be a subclass of SDL_QuartzWindow so SDL will
// handle the redraw problems when minimizing the window
// This class is defined in SDL.framework
@ interface SDL_QuartzWindow:NSWindow @ end
@interface SDL_QuartzWindow : NSWindow
@end

// Also assign SDL_QuartzWindowDelegate to the window
// to perform other tasks. You can subclass this delegate
// if you want to add your own delegation methods
// This class is defined in SDL.framework
@ interface SDL_QuartzWindowDelegate:NSObject @ end
@interface SDL_QuartzWindowDelegate : NSObject
@end

// Declare our custom class
@ interface MyCustomWindow:SDL_QuartzWindow @ end
@interface MyCustomWindow : SDL_QuartzWindow
@end

@@ -7,8 +7,8 @@

#import <Cocoa/Cocoa.h>

@ interface SDLMain:NSObject {
@interface SDLMain : NSObject
{
IBOutlet id _controller;
}

@end
@@ -9,3 +9,4 @@

#include <Foundation/Foundation.h>
#include <Cocoa/Cocoa.h>

@@ -7,4 +7,5 @@

#import <Cocoa/Cocoa.h>

@ interface SDLMain:NSObject @ end
@interface SDLMain : NSObject
@end

0 comments on commit 4606648

Please sign in to comment.