#include "stdafx.h"
#include "openttd.h"
#include "tile_cmd.h"
#include "landscape.h"
#include "gfx_func.h"
#include "saveload.h"
#include "console.h"
#include "variables.h"
#include "blitter/factory.hpp"
#include "texteff.hpp"
#include "video/video_driver.hpp"
#include "transparency.h"
#include "strings_func.h"
#include "core/alloc_func.hpp"
#include "date_func.h"
#include "functions.h"
#include "viewport_func.h"
#include "settings_type.h"
#include "table/sprites.h"
#include <stdarg.h>
Go to the source code of this file.
Data Structures | |
struct | TextEffect |
struct | ChatMessage |
Enumerations | |
enum | { MAX_TEXTMESSAGE_LENGTH = 200, INIT_NUM_TEXT_MESSAGES = 20, MAX_CHAT_MESSAGES = 10 } |
Functions | |
static uint | GetChatMessageCount () |
void CDECL | AddChatMessage (uint16 color, uint8 duration, const char *message,...) |
void | InitChatMessage () |
void | UndrawChatMessage () |
Hide the chatbox. | |
void | ChatMessageDailyLoop () |
Check if a message is expired every day. | |
void | DrawChatMessage () |
Draw the chat message-box. | |
static void | MarkTextEffectAreaDirty (TextEffect *te) |
Mark the area of the text effect as dirty. | |
TextEffectID | AddTextEffect (StringID msg, int x, int y, uint16 duration, TextEffectMode mode) |
void | UpdateTextEffect (TextEffectID te_id, StringID msg) |
void | RemoveTextEffect (TextEffectID te_id) |
static void | MoveTextEffect (TextEffect *te) |
void | MoveAllTextEffects () |
void | InitTextEffects () |
void | DrawTextEffects (DrawPixelInfo *dpi) |
void | DeleteAnimatedTile (TileIndex tile) |
Removes the given tile from the animated tile table. | |
void | AddAnimatedTile (TileIndex tile) |
Add the given tile to the animated tile table (if it does not exist on that table yet). | |
void | AnimateAnimatedTiles () |
Animate all tiles in the animated tile list, i.e. call AnimateTile on them. | |
void | InitializeAnimatedTiles () |
Initialize all animated tile variables to some known begin point. | |
static void | Save_ANIT () |
Save the ANIT chunk. | |
static void | Load_ANIT () |
Load the ANIT chunk; the chunk containing the animated tiles. | |
Variables | |
static TextEffect * | _text_effect_list = NULL |
static uint16 | _num_text_effects = INIT_NUM_TEXT_MESSAGES |
static ChatMessage | _chatmsg_list [MAX_CHAT_MESSAGES] |
static bool | _chatmessage_dirty = false |
static bool | _chatmessage_visible = false |
static const PointDimension | _chatmsg_box = {10, 30, 500, 150} |
static uint8 | _chatmessage_backup [150 *500 *6] |
TileIndex * | _animated_tile_list = NULL |
The table/list with animated tiles. | |
uint | _animated_tile_count = 0 |
The number of animated tiles in the current state. | |
static uint | _animated_tile_allocated = 0 |
The number of slots for animated tiles allocated currently. | |
const ChunkHandler | _animated_tile_chunk_handlers [] |
"Definition" imported by the saveload code to be able to load and save the animated tile table. |
Definition in file texteff.cpp.
void AddAnimatedTile | ( | TileIndex | tile | ) |
Add the given tile to the animated tile table (if it does not exist on that table yet).
Also increases the size of the table if necessary.
tile | the tile to make animated |
Definition at line 459 of file texteff.cpp.
References MarkTileDirtyByTile().
Referenced by MakeHouseTile(), and TileLoop_Town().
void DeleteAnimatedTile | ( | TileIndex | tile | ) |
Removes the given tile from the animated tile table.
tile | the tile to remove |
Definition at line 438 of file texteff.cpp.
References MarkTileDirtyByTile().
Referenced by AnimateTile_Town(), and HaltLift().
uint _animated_tile_allocated = 0 [static] |
The number of slots for animated tiles allocated currently.
Definition at line 432 of file texteff.cpp.
const ChunkHandler _animated_tile_chunk_handlers[] |
uint _animated_tile_count = 0 |
TileIndex* _animated_tile_list = NULL |