Loading
#openttdcoop - Paste
Archives
Trending
Docs
Login
ABAP
ActionScript
ActionScript 3
Ada
AIMMS3
ALGOL 68
Apache configuration
AppleScript
Apt sources
ARM ASSEMBLER
ASM
ASP
asymptote
Autoconf
Autohotkey
AutoIt
AviSynth
awk
BASCOM AVR
Bash
Basic4GL
BibTeX
BlitzBasic
bnf
Boo
Brainfuck
C
C#
C (LoadRunner)
C (Mac)
C (WinAPI)
C++
C++ (Qt)
C++ (WinAPI)
CAD DCL
CAD Lisp
CFDG
ChaiScript
Chapel
CIL
Clojure
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
Dart
DCL
DCPU-16 Assembly
DCS
Delphi
Diff
DIV
DOS
dot
E
ECMAScript
Eiffel
eMail (mbox)
EPC
Erlang
Euphoria
EZT
F#
Falcon
FO (abas-ERP)
Formula One
Fortran
FreeBasic
FreeSWITCH
GADV 4CS
GAMBAS
GDB
genero
Genie
glSlang
GML
GNU/Octave
GNU Gettext
GNU make
Gnuplot
Go
Groovy
GwBasic
Haskell
Haxe
HicEst
HQ9+
HTML
HTML5
Icon
INI
Inno
INTERCAL
Io
ISPF Panel
J
Java
Java(TM) 2 Platform Standard Edition 5.0
Javascript
JCL
jQuery
KiXtart
KLone C
KLone C++
LaTeX
LDIF
Liberty BASIC
Lisp
LLVM Intermediate Representation
Locomotive Basic
Logtalk
LOLcode
Lotus Notes @Formulas
LotusScript
LScript
LSL2
Lua
MagikSF
MapBasic
Matlab M
Microchip Assembler
Microsoft Registry
mIRC Scripting
MMIX
Modula-2
Modula-3
MOS 6502 (6510) ACME Cross Assembler format
MOS 6502 (6510) Kick Assembler format
MOS 6502 (6510) TASM/64TASS 1.46 Assembler format
Motorola 68000 - HiSoft Devpac ST 2 Assembler format
Motorola 68000 Assembler
MXML
MySQL
Nagios
NetRexx
newlisp
nginx
Nimrod
NML NewGRF Meta Language
NSIS
Oberon-2
Objeck Programming Language
Objective-C
OCaml
OCaml (brief)
ooRexx
OpenBSD Packet Filter
OpenOffice.org Basic
Oracle 8 SQL
Oracle 11 SQL
Oxygene
OZ
ParaSail
PARI/GP
Pascal
PCRE
per
Perl
Perl 6
PHP
PHP (brief)
PIC16
Pike
Pixel Bender 1.0
PL/I
PL/SQL
PostgreSQL
PostScript
POVRAY
PowerBuilder
PowerShell
ProFTPd configuration
Progress
Prolog
PROPERTIES
ProvideX
Puppet
PureBasic
Python
Python for S60
q/kdb+
QBasic/QuickBASIC
QML
R / S+
Racket
Rails
RBScript
REBOL
rexx
robots.txt
RPM Specification File
Ruby
Rust
SAS
Scala
Scheme
SciLab
SCL
sdlBasic
Smalltalk
Smarty
SPARK
SPARQL
SQL
Squirrel Script
Squirrel Script with OpenTTD AI/GS
StandardML
StoneScript
SystemVerilog
T-SQL
TCL
Tera Term Macro
Text
thinBasic
TypoScript
Unicon (Unified Extended Dialect of Icon)
Uno Idl
Unreal Script
UPC
Urbi
Vala
vb.net
VBScript
Vedit macro language
Verilog
VHDL
Vim Script
Visual Basic
Visual Fox Pro
Visual Prolog
Whitespace
Whois (RPSL format)
Winbatch
X++
XBasic
XML
Xorg configuration
YAML
ZiLOG Z80 Assembler
ZXBasic
#ifndef AST_H #define AST_H #include <string> #include <vector> #include <string> /** Temporary storage of an assigned field. */ class FieldStorage { public: FieldStorage(); FieldStorage(int number, int value, int line); FieldStorage(int number, int key, int value, int line); FieldStorage(int number, std::string text, int line); FieldStorage(const FieldStorage &fs); FieldStorage &operator=(const FieldStorage &fs); int m_iNumber; ///< Field number being stored. int m_iKey; ///< Key to store. int m_iValue; ///< Value to store. std::string m_sText; ///< Text to store. int m_iLine; ///< Line number with the assignment. }; /** Pair of integer numbers. */ class PairInt { public: PairInt() : m_iKey(0), m_iValue(0) { } PairInt(int key, int value) : m_iKey(key), m_iValue(value) { } PairInt(const PairInt &pi) : m_iKey(pi.m_iKey), m_iValue(pi.m_iValue) { } PairInt &operator=(const PairInt &pi) { if (this != &pi) { m_iKey = pi.m_iKey; m_iValue = pi.m_iValue; } return *this; } int m_iKey; ///< Key of the pair. int m_iValue; ///< Value of the pair. }; /** Enumeration listing the fields of the data structures. */ enum FieldNumber { NOTHING, FE_TOP, ///< Top FE_LEFT, ///< Left FE_WIDTH, ///< Width FE_HEIGHT, ///< Height FE_XOFFSET, ///< X offset FE_YOFFSET, ///< Y offset FE_IMAGE, ///< Image name FE_RECOLOUR, ///< Recolour image name FE_RECOLLAYER, ///< Recolour layer field FE_DISPLAY, ///< Display condition (layer-class and layer-id) FE_ALPHA, ///< Amount of alpha FE_HORFLIP, ///< Horizontal flip FE_VERTFLIP, ///< Vertical flip AF_SOUND, ///< Sound index AP_TILESIZE, ///< Tile size AP_VIEW, ///< View direction FN_NUMBER_ENTRIES, ///< Number of fields. }; /** An element (a sprite) in a frame. */ class FrameElement { public: FrameElement(); FrameElement(const FrameElement &fe); FrameElement &operator=(const FrameElement &fe); int m_iTop; ///< Top edge of the uncropped sprite in the image (by default, \c 0). int m_iLeft; ///< Left edge of the uncropped sprite in the image (by default, \c 0). int m_iWidth; ///< Horizontal size of the uncropped sprite (\c -1 means the entire image). int m_iHeight; ///< Vertical size of the uncropped sprite (\c -1 means the entire image). int m_iXoffset; ///< Horizontal adjustment of the top-left edge of the sprite. int m_iYoffset; ///< Vertical adjustment of the top-left edge of the sprite. std::string m_sImageName; ///< Name of the 32bpp image file. std::string m_sRecolourName; ///< Name of the 8bpp recolour image. std::vector<PairInt> m_vRecolourLayers; ///< Recolour layer remapping PairInt m_oDisplay; ///< Display layer of the element. int m_iAlpha; ///< Amount of alpha. bool m_bHorFlip; ///< Whether to flip the sprite horizontally. bool m_bVertFlip; ///< Whether to flip the sprite vertically. }; // Merge sprite encoder + offset branch into this. // /** A frame in an animation. */ class AnimationFrame { public: AnimationFrame(); AnimationFrame(const AnimationFrame &af); AnimationFrame &operator=(const AnimationFrame &af); int m_isound; ///< Sound index, if not \c -1. std::vector<FrameElement> m_velements; ///< Frame elements. }; /** Animation view direction. */ enum ViewDirection { VD_NORTH, ///< Viewing north. VD_EAST, ///< Viewing east. VD_SOUTH, ///< Viewing south. VD_WEST, ///< Viewing west. VD_INVALID, ///< Invalid direction (not specified). }; class Animation { public: Animation(); Animation(const Animation &an); Animation &operator=(const Animation &an); void AddProperties(const AnimationProperties &props); int m_itilesize; ///< Tile size. ViewDirection m_eviewdirection; ///< Animation view direction. std::vector<AnimationFrame> m_vframes; ///< Frames of the animation. }; #endif
Mark as private
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
forever