notice.c File Reference

Implementaion of the in-game notice display. More...

#include "notice.h"
#include "color.h"
#include "player.h"
#include <assert.h>

Include dependency graph for notice.c:

Go to the source code of this file.

Data Structures

struct  Notice_t
 The data kept to describe visible notices. More...

Defines

#define MAX_NOTICES   4
 The maximum number of visible notices.
#define SPACING   2
 The number of pixels separating the bottom of one notice from the top of an adjacent notice.

Typedefs

typedef Notice_t Notice

Functions

void AddNotice (Uint32 expiryTime, Uint8 type, rtsa_char *format,...)
 Adds a new notice to the display.
void AddScoreNotice (int killerId, int killedId, int score)
 Adds a notice about a player shooting another.
void RemoveAllNotices ()
 Remove all notices from the system and the display.
void RemoveNotice (Uint8 type)
 Removes a notice of the specified type.
static void RemoveOneNotice (int index)
 Removes a specific notice from the display.
void UpdateNotices (Uint32 time)
 Update all visible notices by removing any expired notices and placing notices at their proper location when notices are added or removed.

Variables

Uint32 frameTime
 The current simulation time in milliseconds.
static Notice notices [4] = { 0 }
 Allocated memory for all the notices.
static int notimeouts = 0
 The number of notices that do not expire.
static Noticeorder [4]
 A list of pointers to the notices in the order in which they are visible.
static int timeouts = 0
 The number of notices that expire.


Detailed Description

Implementaion of the in-game notice display.

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 notice.c.


Define Documentation

#define MAX_NOTICES   4

The maximum number of visible notices.

For internal use only.

Definition at line 34 of file notice.c.

Referenced by AddNotice(), and RemoveOneNotice().

#define SPACING   2

The number of pixels separating the bottom of one notice from the top of an adjacent notice.

For internal use only.

Definition at line 41 of file notice.c.

Referenced by UpdateNotices().


Typedef Documentation

typedef struct Notice_t Notice

Definition at line 62 of file notice.c.


Variable Documentation

Uint32 frameTime

The current simulation time in milliseconds.

@ingroup StatePlay

Definition at line 63 of file main.c.

Notice notices[4] = { 0 } [static]

Allocated memory for all the notices.

For internal use only.

Definition at line 68 of file notice.c.

int notimeouts = 0 [static]

The number of notices that do not expire.

For internal use only.

Definition at line 89 of file notice.c.

Referenced by AddNotice(), RemoveAllNotices(), RemoveNotice(), RemoveOneNotice(), and UpdateNotices().

Notice* order[4] [static]

Initial value:

 { 
    &notices[0], &notices[1], &notices[2], &notices[3]
}
A list of pointers to the notices in the order in which they are visible.

Item zero is the topmost notice.

For internal use only.

Definition at line 75 of file notice.c.

Referenced by AddNotice(), RemoveAllNotices(), RemoveNotice(), RemoveOneNotice(), and UpdateNotices().

int timeouts = 0 [static]

The number of notices that expire.

For internal use only.

Definition at line 83 of file notice.c.

Referenced by AddNotice(), RemoveAllNotices(), RemoveNotice(), RemoveOneNotice(), and UpdateNotices().


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