gamelog_internal.h

Go to the documentation of this file.
00001 /* $Id: gamelog_internal.h 17248 2009-08-21 20:21:05Z rubidium $ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * OpenTTD 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, version 2.
00006  * OpenTTD 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.
00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
00008  */
00009 
00012 #ifndef GAMELOG_INTERNAL_H
00013 #define GAMELOG_INTERNAL_H
00014 
00015 #include "network/core/config.h"
00016 
00018 enum GamelogChangeType {
00019   GLCT_MODE,        
00020   GLCT_REVISION,    
00021   GLCT_OLDVER,      
00022   GLCT_SETTING,     
00023   GLCT_GRFADD,      
00024   GLCT_GRFREM,      
00025   GLCT_GRFCOMPAT,   
00026   GLCT_GRFPARAM,    
00027   GLCT_GRFMOVE,     
00028   GLCT_GRFBUG,      
00029   GLCT_EMERGENCY,   
00030   GLCT_END,         
00031   GLCT_NONE = 0xFF, 
00032 };
00033 
00034 
00036 struct LoggedChange {
00037   GamelogChangeType ct; 
00038   union {
00039     struct {
00040       byte mode;       
00041       byte landscape;  
00042     } mode;
00043     struct {
00044       char text[NETWORK_REVISION_LENGTH]; 
00045       uint32 newgrf;   
00046       uint16 slver;    
00047       byte modified;   
00048     } revision;
00049     struct {
00050       uint32 type;     
00051       uint32 version;  
00052     } oldver;
00053     GRFIdentifier grfadd;    
00054     struct {
00055       uint32 grfid;    
00056     } grfrem;
00057     GRFIdentifier grfcompat; 
00058     struct {
00059       uint32 grfid;    
00060     } grfparam;
00061     struct {
00062       uint32 grfid;    
00063       int32 offset;    
00064     } grfmove;
00065     struct {
00066       char *name;      
00067       int32 oldval;    
00068       int32 newval;    
00069     } setting;
00070     struct {
00071       uint64 data;     
00072       uint32 grfid;    
00073       byte bug;        
00074     } grfbug;
00075   };
00076 };
00077 
00078 
00080 struct LoggedAction {
00081   LoggedChange *change; 
00082   uint32 changes;       
00083   GamelogActionType at; 
00084   uint16 tick;          
00085 };
00086 
00087 extern LoggedAction *_gamelog_action;
00088 extern uint _gamelog_actions;
00089 
00090 #endif /* GAMELOG_INTERNAL_H */

Generated on Wed Dec 23 23:27:50 2009 for OpenTTD by  doxygen 1.5.6