#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 Notice * | order [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. |
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 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().
Uint32 frameTime |
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().
Initial value:
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().