tanksprite.c File Reference

Constant data and functions the generate and draw the tank sprites. More...

#include "tanksprite.h"
#include "color.h"
#include <memory.h>

Include dependency graph for tanksprite.c:

Go to the source code of this file.

Defines

#define FHoriz   1
 Flip horizontally.
#define FVert   2
 Flip vertically.
#define Trans   4
 Transpose.

Functions

void DrawTank (SDL_Surface *dest, RenderItem *item)
 Draws a player's tank.
void GenTankSprites ()
 Generates all 16 tank sprites from 3 prototype sprites.
Bool IsCollidingShell (Player *tank, Player *shell)
 Tank to shell collision detection.
Bool IsCollidingTank (Player *p1, Player *p2)
 Tank to tank collision detection.

Variables

static const Uint8 imgFlags [16]
 The set of flags used to control rendering a tank in all 16 rotations from three sprites.
const Uint8 shellInitLoc [16][2]
static const Uint8 spriteProtos [3][8]
 The sprite as a bit pattern, on for tank pixel.
Uint8 sprites [16][8]
 Sprite data for all sixteen sprites.


Detailed Description

Constant data and functions the generate and draw the tank sprites.

Author:
Jeff Jackowski (jeffj@ro.com)
Copyright (C) 2007 Jeff Jackowski

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Or visit their website at: http://www.gnu.org/

Definition in file tanksprite.c.


Variable Documentation

const Uint8 shellInitLoc[16][2]

Initial value:

 {
    { 4, 0 }, 
    { 5, 0 },
    { 7, 0 }, 
    { 7, 2 },
    { 7, 4 }, 
    { 7, 5 },
    { 7, 7 }, 
    { 5, 7 },
    { 4, 7 }, 
    { 2, 7 },
    { 0, 7 }, 
    { 0, 5 },
    { 0, 4 }, 
    { 0, 2 },
    { 0, 0 }, 
    { 2, 0 }
}

Definition at line 110 of file tanksprite.c.

Referenced by MoveShell().


Generated on Mon May 28 04:41:40 2007 for Retro Tank Super Attack by  doxygen 1.5.2