diff options
Diffstat (limited to 'Xcode-iOS')
-rw-r--r-- | Xcode-iOS/Demos/src/accelerometer.c | 12 | ||||
-rw-r--r-- | Xcode-iOS/Demos/src/common.c | 14 | ||||
-rw-r--r-- | Xcode-iOS/Demos/src/common.h | 6 | ||||
-rw-r--r-- | Xcode-iOS/Demos/src/fireworks.c | 40 | ||||
-rw-r--r-- | Xcode-iOS/Demos/src/happy.c | 14 | ||||
-rw-r--r-- | Xcode-iOS/Demos/src/keyboard.c | 26 | ||||
-rw-r--r-- | Xcode-iOS/Demos/src/mixer.c | 20 | ||||
-rw-r--r-- | Xcode-iOS/Demos/src/rectangles.c | 10 | ||||
-rw-r--r-- | Xcode-iOS/Demos/src/touch.c | 14 | ||||
-rw-r--r-- | Xcode-iOS/Template/SDL iOS Application/main.c | 6 |
10 files changed, 81 insertions, 81 deletions
diff --git a/Xcode-iOS/Demos/src/accelerometer.c b/Xcode-iOS/Demos/src/accelerometer.c index 339febc119..78d42041be 100644 --- a/Xcode-iOS/Demos/src/accelerometer.c +++ b/Xcode-iOS/Demos/src/accelerometer.c @@ -1,7 +1,7 @@ /* - * accelerometer.c - * written by Holmes Futrell - * use however you want + * accelerometer.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" @@ -13,7 +13,7 @@ #define FRICTION 0.0008f /* coefficient of acceleration that opposes direction of motion */ #define GRAVITY_CONSTANT 0.004f /* how sensitive the ship is to the accelerometer */ -/* If we aren't on an iPhone, then this definition ought to yield reasonable behavior */ +/* If we aren't on an iPhone, then this definition ought to yield reasonable behavior */ #ifndef SDL_IPHONE_MAX_GFORCE #define SDL_IPHONE_MAX_GFORCE 5.0f #endif @@ -48,7 +48,7 @@ render(SDL_Renderer *renderer) #define SINT16_MAX ((float)(0x7FFF)) /* update velocity from accelerometer - the factor SDL_IPHONE_MAX_G_FORCE / SINT16_MAX converts between + the factor SDL_IPHONE_MAX_G_FORCE / SINT16_MAX converts between SDL's units reported from the joytick, and units of g-force, as reported by the accelerometer */ shipData.vx += @@ -159,7 +159,7 @@ main(int argc, char *argv[]) { SDL_Window *window; /* main window */ - SDL_Renderer *renderer; + SDL_Renderer *renderer; Uint32 startFrame; /* time frame began to process */ Uint32 endFrame; /* time frame ended processing */ Uint32 delay; /* time to pause waiting to draw next frame */ diff --git a/Xcode-iOS/Demos/src/common.c b/Xcode-iOS/Demos/src/common.c index fd3a176db1..b2d9634566 100644 --- a/Xcode-iOS/Demos/src/common.c +++ b/Xcode-iOS/Demos/src/common.c @@ -1,7 +1,7 @@ /* - * common.c - * written by Holmes Futrell - * use however you want + * common.c + * written by Holmes Futrell + * use however you want */ #include "common.h" @@ -9,8 +9,8 @@ #include <stdlib.h> /* - Produces a random int x, min <= x <= max - following a uniform distribution + Produces a random int x, min <= x <= max + following a uniform distribution */ int randomInt(int min, int max) @@ -19,8 +19,8 @@ randomInt(int min, int max) } /* - Produces a random float x, min <= x <= max - following a uniform distribution + Produces a random float x, min <= x <= max + following a uniform distribution */ float randomFloat(float min, float max) diff --git a/Xcode-iOS/Demos/src/common.h b/Xcode-iOS/Demos/src/common.h index 9aa01a23eb..3e0d94ecf2 100644 --- a/Xcode-iOS/Demos/src/common.h +++ b/Xcode-iOS/Demos/src/common.h @@ -1,7 +1,7 @@ /* - * common.h - * written by Holmes Futrell - * use however you want + * common.h + * written by Holmes Futrell + * use however you want */ #define SCREEN_WIDTH 320 diff --git a/Xcode-iOS/Demos/src/fireworks.c b/Xcode-iOS/Demos/src/fireworks.c index fa39abff52..5b4c4118c7 100644 --- a/Xcode-iOS/Demos/src/fireworks.c +++ b/Xcode-iOS/Demos/src/fireworks.c @@ -1,7 +1,7 @@ /* - * fireworks.c - * written by Holmes Futrell - * use however you want + * fireworks.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" @@ -17,11 +17,11 @@ static GLuint particleTextureID; /* OpenGL particle texture id */ static SDL_bool pointSizeExtensionSupported; /* is GL_OES_point_size_array supported ? */ -/* - used to describe what type of particle a given struct particle is. - emitter - this particle flies up, shooting off trail particles, then finally explodes into dust particles. - trail - shoots off, following emitter particle - dust - radiates outwards from emitter explosion +/* + used to describe what type of particle a given struct particle is. + emitter - this particle flies up, shooting off trail particles, then finally explodes into dust particles. + trail - shoots off, following emitter particle + dust - radiates outwards from emitter explosion */ enum particleType { @@ -30,7 +30,7 @@ enum particleType dust }; /* - struct particle is used to describe each particle displayed on screen + struct particle is used to describe each particle displayed on screen */ struct particle { @@ -57,8 +57,8 @@ int nextPowerOfTwo(int x); void drawParticles(); void stepParticles(void); -/* helper function (used in texture loading) - returns next power of two greater than or equal to x +/* helper function (used in texture loading) + returns next power of two greater than or equal to x */ int nextPowerOfTwo(int x) @@ -70,8 +70,8 @@ nextPowerOfTwo(int x) return val; } -/* - steps each active particle by timestep MILLESECONDS_PER_FRAME +/* + steps each active particle by timestep MILLESECONDS_PER_FRAME */ void stepParticles(void) @@ -145,13 +145,13 @@ stepParticles(void) curr++; } /* the number of active particles is computed as the difference between - old number of active particles, where slot points, and the + old number of active particles, where slot points, and the new size of the array, where particles points */ num_active_particles = slot - particles; } /* - This draws all the particles shown on screen + This draws all the particles shown on screen */ void drawParticles() @@ -177,7 +177,7 @@ drawParticles() } /* - This causes an emitter to explode in a circular bloom of dust particles + This causes an emitter to explode in a circular bloom of dust particles */ void explodeEmitter(struct particle *emitter) @@ -219,7 +219,7 @@ explodeEmitter(struct particle *emitter) } /* - This spawns a trail particle from an emitter + This spawns a trail particle from an emitter */ void spawnTrailFromEmitter(struct particle *emitter) @@ -254,7 +254,7 @@ spawnTrailFromEmitter(struct particle *emitter) } /* - spawns a new emitter particle at the bottom of the screen + spawns a new emitter particle at the bottom of the screen destined for the point (x,y). */ void @@ -313,7 +313,7 @@ initializeParticles(void) } /* - loads the particle texture + loads the particle texture */ void initializeTexture() @@ -375,7 +375,7 @@ main(int argc, char *argv[]) } /* seed the random number generator */ srand(time(NULL)); - /* + /* request some OpenGL parameters that may speed drawing */ diff --git a/Xcode-iOS/Demos/src/happy.c b/Xcode-iOS/Demos/src/happy.c index c1731b8797..7a524c0e43 100644 --- a/Xcode-iOS/Demos/src/happy.c +++ b/Xcode-iOS/Demos/src/happy.c @@ -1,7 +1,7 @@ /* - * happy.c - * written by Holmes Futrell - * use however you want + * happy.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" @@ -20,8 +20,8 @@ static struct } faces[NUM_HAPPY_FACES]; /* - Sets initial positions and velocities of happyfaces - units of velocity are pixels per millesecond + Sets initial positions and velocities of happyfaces + units of velocity are pixels per millesecond */ void initializeHappyFaces() @@ -94,7 +94,7 @@ render(SDL_Renderer *renderer) } /* - loads the happyface graphic into a texture + loads the happyface graphic into a texture */ void initializeTexture(SDL_Renderer *renderer) @@ -125,7 +125,7 @@ main(int argc, char *argv[]) { SDL_Window *window; - SDL_Renderer *renderer; + SDL_Renderer *renderer; Uint32 startFrame; Uint32 endFrame; Uint32 delay; diff --git a/Xcode-iOS/Demos/src/keyboard.c b/Xcode-iOS/Demos/src/keyboard.c index 3e2bc5459d..4b55c7be43 100644 --- a/Xcode-iOS/Demos/src/keyboard.c +++ b/Xcode-iOS/Demos/src/keyboard.c @@ -1,7 +1,7 @@ /* - * keyboard.c - * written by Holmes Futrell - * use however you want + * keyboard.c + * written by Holmes Futrell + * use however you want */ #import "SDL.h" @@ -97,14 +97,14 @@ fontMapping map[TABLE_SIZE] = { }; /* - This function maps an SDL_KeySym to an index in the bitmap font. - It does so by scanning through the font mapping table one entry - at a time. - - If a match is found (scancode and allowed modifiers), the proper - index is returned. - - If there is no entry for the key, -1 is returned + This function maps an SDL_KeySym to an index in the bitmap font. + It does so by scanning through the font mapping table one entry + at a time. + + If a match is found (scancode and allowed modifiers), the proper + index is returned. + + If there is no entry for the key, -1 is returned */ int keyToIndex(SDL_Keysym key) @@ -125,8 +125,8 @@ keyToIndex(SDL_Keysym key) return index; } -/* - This function returns and x,y position for a given character number. +/* + This function returns and x,y position for a given character number. It is used for positioning each character of text */ void diff --git a/Xcode-iOS/Demos/src/mixer.c b/Xcode-iOS/Demos/src/mixer.c index 893361f9a5..526abb07ba 100644 --- a/Xcode-iOS/Demos/src/mixer.c +++ b/Xcode-iOS/Demos/src/mixer.c @@ -1,7 +1,7 @@ /* - * mixer.c - * written by Holmes Futrell - * use however you want + * mixer.c + * written by Holmes Futrell + * use however you want */ #import "SDL.h" @@ -100,7 +100,7 @@ loadSound(const char *file, struct sound *s) if (result == -1) { fatalError("could not build audio CVT"); } else if (result != 0) { - /* + /* this happens when the .wav format differs from the output format. we convert the .wav buffer here */ @@ -179,8 +179,8 @@ render(SDL_Renderer *renderer) } /* - finds a sound channel in the mixer for a sound - and sets it up to start playing + finds a sound channel in the mixer for a sound + and sets it up to start playing */ int playSound(struct sound *s) @@ -225,9 +225,9 @@ playSound(struct sound *s) return selected_channel; } -/* - Called from SDL's audio system. Supplies sound input with data by mixing together all - currently playing sound effects. +/* + Called from SDL's audio system. Supplies sound input with data by mixing together all + currently playing sound effects. */ void audioCallback(void *userdata, Uint8 * stream, int len) @@ -273,7 +273,7 @@ main(int argc, char *argv[]) int done; /* has user tried to quit ? */ SDL_Window *window; /* main window */ - SDL_Renderer *renderer; + SDL_Renderer *renderer; SDL_Event event; Uint32 startFrame; /* holds when frame started processing */ Uint32 endFrame; /* holds when frame ended processing */ diff --git a/Xcode-iOS/Demos/src/rectangles.c b/Xcode-iOS/Demos/src/rectangles.c index 4dcb320356..11e5f135ce 100644 --- a/Xcode-iOS/Demos/src/rectangles.c +++ b/Xcode-iOS/Demos/src/rectangles.c @@ -1,7 +1,7 @@ /* - * rectangles.c - * written by Holmes Futrell - * use however you want + * rectangles.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" @@ -39,7 +39,7 @@ main(int argc, char *argv[]) { SDL_Window *window; - SDL_Renderer *renderer; + SDL_Renderer *renderer; int done; SDL_Event event; @@ -59,7 +59,7 @@ main(int argc, char *argv[]) fatalError("Could not initialize Window"); } renderer = SDL_CreateRenderer(window, -1, 0); - if (!renderer) { + if (!renderer) { fatalError("Could not create renderer"); } diff --git a/Xcode-iOS/Demos/src/touch.c b/Xcode-iOS/Demos/src/touch.c index 8ce8006a09..b5065b10aa 100644 --- a/Xcode-iOS/Demos/src/touch.c +++ b/Xcode-iOS/Demos/src/touch.c @@ -1,7 +1,7 @@ /* - * touch.c - * written by Holmes Futrell - * use however you want + * touch.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" @@ -14,8 +14,8 @@ static SDL_Texture *brush = 0; /* texture for the brush */ /* - draws a line from (startx, starty) to (startx + dx, starty + dy) - this is accomplished by drawing several blots spaced PIXELS_PER_ITERATION apart + draws a line from (startx, starty) to (startx + dx, starty + dy) + this is accomplished by drawing several blots spaced PIXELS_PER_ITERATION apart */ void drawLine(SDL_Renderer *renderer, float startx, float starty, float dx, float dy) @@ -48,7 +48,7 @@ drawLine(SDL_Renderer *renderer, float startx, float starty, float dx, float dy) } /* - loads the brush texture + loads the brush texture */ void initializeTexture(SDL_Renderer *renderer) @@ -78,7 +78,7 @@ main(int argc, char *argv[]) Uint8 state; /* mouse (touch) state */ SDL_Event event; SDL_Window *window; /* main window */ - SDL_Renderer *renderer; + SDL_Renderer *renderer; int done; /* does user want to quit? */ /* initialize SDL */ diff --git a/Xcode-iOS/Template/SDL iOS Application/main.c b/Xcode-iOS/Template/SDL iOS Application/main.c index 2a5d3f2ac0..ca05e00838 100644 --- a/Xcode-iOS/Template/SDL iOS Application/main.c +++ b/Xcode-iOS/Template/SDL iOS Application/main.c @@ -1,7 +1,7 @@ /* - * rectangles.c - * written by Holmes Futrell - * use however you want + * rectangles.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" |