gamelog_internal.h

Go to the documentation of this file.
00001 /* $Id: gamelog_internal.h 18809 2010-01-15 16:41:15Z 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 #include "gamelog.h"
00017 
00019 enum GamelogChangeType {
00020   GLCT_MODE,        
00021   GLCT_REVISION,    
00022   GLCT_OLDVER,      
00023   GLCT_SETTING,     
00024   GLCT_GRFADD,      
00025   GLCT_GRFREM,      
00026   GLCT_GRFCOMPAT,   
00027   GLCT_GRFPARAM,    
00028   GLCT_GRFMOVE,     
00029   GLCT_GRFBUG,      
00030   GLCT_EMERGENCY,   
00031   GLCT_END,         
00032   GLCT_NONE = 0xFF, 
00033 };
00034 
00035 
00037 struct LoggedChange {
00038   GamelogChangeType ct; 
00039   union {
00040     struct {
00041       byte mode;       
00042       byte landscape;  
00043     } mode;
00044     struct {
00045       char text[NETWORK_REVISION_LENGTH]; 
00046       uint32 newgrf;   
00047       uint16 slver;    
00048       byte modified;   
00049     } revision;
00050     struct {
00051       uint32 type;     
00052       uint32 version;  
00053     } oldver;
00054     GRFIdentifier grfadd;    
00055     struct {
00056       uint32 grfid;    
00057     } grfrem;
00058     GRFIdentifier grfcompat; 
00059     struct {
00060       uint32 grfid;    
00061     } grfparam;
00062     struct {
00063       uint32 grfid;    
00064       int32 offset;    
00065     } grfmove;
00066     struct {
00067       char *name;      
00068       int32 oldval;    
00069       int32 newval;    
00070     } setting;
00071     struct {
00072       uint64 data;     
00073       uint32 grfid;    
00074       byte bug;        
00075     } grfbug;
00076   };
00077 };
00078 
00079 
00081 struct LoggedAction {
00082   LoggedChange *change; 
00083   uint32 changes;       
00084   GamelogActionType at; 
00085   uint16 tick;          
00086 };
00087 
00088 extern LoggedAction *_gamelog_action;
00089 extern uint _gamelog_actions;
00090 
00091 #endif /* GAMELOG_INTERNAL_H */

Generated on Wed Jan 20 23:38:35 2010 for OpenTTD by  doxygen 1.5.6