hcodedb::HCodeObject Class Reference

Inheritance diagram for hcodedb::HCodeObject:

Inheritance graph
[legend]

Public Member Functions

def __init__
def __repr__

Data Fields

 key
 type
 size
 data

Detailed Description

Definition at line 101 of file hcodedb.py.


Member Function Documentation

def hcodedb::HCodeObject::__init__ (   self,
  key,
  type,
  size,
  data 
)

Reimplemented in hcodedb::MECHObject, and hcodedb::MAPObject.

Definition at line 102 of file hcodedb.py.

00102                                              :
00103         self.key = key
00104         self.type = type
00105         self.size = size
00106         self.data = data
    def __repr__(self):

def hcodedb::HCodeObject::__repr__ (   self  ) 

Definition at line 107 of file hcodedb.py.

00107                       :
00108         return "<HCodeObject key %s type %s>"%(self.key, gtypes.map[self.type])
00109 
00110 # MECH struct is:
00111 # dbref mynum (4 bytes)
00112 # int mapnumber (4 bytes)
00113 # dbref mapindex (4 bytes)
00114 # char ID[2] (2 bytes (2-char string))
00115 # char brief (1 byte)
00116 # unsigned long tic[4][3] (48 bytes, 4-list of 3-list of int ?)
00117 # char chantitle[16][16] (256 bytes, 16-list of lenght-15 strings (w/ nul byte))
00118 # int freq[16] (64 bytes, 16-list of ints)
00119 # int freqmodes[16] (64 bytes, 16-list of ints)
00120 # --> mech_ud follows, which is:
00121 #  char mech_name[31] (31 bytes, maybe no nul byte)
00122 #  char mech_type[15] (15 bytes, maybe no nul byte)
00123 #  char type (1 byte)
00124 #  char move (1 byte)
00125 #  int tons (4 bytes)
00126 #  short radio_range (2 bytes)
00127 #  char tac_range (1 byte)
00128 #  char lrs_range (1 byte)
00129 #  char scan_range (1 byte)
00130 #  --> 8 times session_struct, which is:
00131 #   unsigned char armor (1 byte)
00132 #   unsigned char internal (1 byte)
00133 #   unsigned char rear (1 byte)
00134 #   unsigned char armor_orig (1 byte)
00135 #   unsigned char internal_orig (1 byte)
00136 #   unsigned char rear_orig (1 byte)
00137 #   char basetohit (1 byte)
00138 #   char config (1 byte)
00139 #   char recycle (1 byte)
00140 #   --> 12 times critical_slot, which is:
00141 #    unsigned short type (2 bytes)
00142 #    unsigned char data (1 byte)
00143 #    unsigned short mode (2 bytes)
00144 #    unsigned char brand (1 byte)
00145 #   <-- end of critslot (6 bytes times 12 is 72 bytes)
00146 #  <-- end of session_struct (81 bytes times 8 is 648 bytes)
00147 #  char si (1 byte)
00148 #  char si_orig (1 byte)
00149 #  int fuel (4 bytes)
00150 #  int fuel_orig (4 bytes)
00151 #  float maxspeed (4 bytes)
00152 #  char computer (1 byte)
00153 #  char radio (1 byte)
00154 #  char radioinfo (1 byte)
00155 #  int mechbv (4 bytes)
00156 #  int cargospace (4 bytes)
00157 #  int unused[8] (32 bytes)
00158 # <-- end of mech_ud (772 bytes ?)
00159 #
00160 # --> mech_pd, which is:
00161 #  dbref pilot (4 bytes)
00162 #  char pilotstatus (1 byte)
00163 #  short hexes_walked (2 byte)
00164 #  char terrian (1 byte)
00165 #  char elev (1 byte)
00166 #  short facing (2 bytes)
00167 #  dbref master_c3_node (4 bytes)
00168 #  char team (1 byte)
00169 #  short x (2 bytes)
00170 #  short y (2 bytes)
00171 #  short z (2 bytes)
00172 #  short last_x (2 bytes)
00173 #  short last_y (2 bytes)
00174 #  float fx (4 bytes)
00175 #  float fy (4 bytes)
00176 #  float fz (4 bytes)
00177 #  int unusable_arcs (4 bytes)
00178 #  int stall (4 bytes)
00179 #  dbref bay[4] (16 bytes, 4-list of ints)
00180 #  dbref turret[3] (12 bytes, 3-list of ints)
00181 # <-- mech_pd (74 bytes)
00182 #
00183 # --> mech_rd, which is:
00184 #  float startfx (4 bytes)
00185 #  float startfy (4 bytes)
00186 #  float startfz (4 bytes)
00187 #  float endfz (4 bytes)
00188 
00189 #  short jumplength (2 bytes)
00190 #  char jumptop (1 byte)
00191 #  short goingx (2 bytes)
00192 #  short goingy (2 bytes)
00193 #  float verticalspeed (4 bytes)
00194 #  short desiredfacing (2 bytes)
00195 #  short angle ( 2 bytes)
00196 #  float speed ( 4 bytes)
00197 #  float desired_speed ( 4 bytes)
00198 #  float jumpspeed ( 4 bytes)
00199 #  short jumpheading (4 bytes)
00200 #  short targx (4 bytes)
00201 #  short targy (4 bytes)
00202 #  short targz (4 bytes)
00203 #  short turretfacing (4 bytes)
00204 #
00205 #  char aim ( 1 byte)
00206 #  char pilotskillbase (1 byte)
00207 #  short turndamage (1 byte)
00208 #  char basetohit (1 byte)
00209 #
00210 #  dbref chgtarget (4 byte)
00211 #  dbref dfatarget (4 bytes)
00212 #  dbref target (4 bytes)
00213 #  dbref swarming (4 bytes)
00214 #  dbref carrying (4 bytes)
00215 #  dbref spotter (4 bytes)
00216 #
00217 #  char engineheat (1 byte)
00218 #  float heat (4 bytes)
00219 #  float weapheat (4 bytes)
00220 #  float plus_heat (4 bytes)
00221 #  float minus_heat (4 bytes)
00222 #  int critstatus (4 bytes)
00223 #  int status (4 bytes)
00224 #  int specials (4 bytes)
00225 #
00226 #  char masc_value (1 byte)
00227 #  time_t last_weapon_recycle (4 bytes)
00228 #  char sensor[2] (2 bytes, 2-char string)
00229 #  byte fire_adjustment (1 byte)
00230 #  int cargo_weight (4 bytes)
00231 #  short lateral (2 bytes)
00232 #  short num_seen (2 bytes)
00233 #  int lastrndu (4 bytes)
00234 #  int rnd (4 bytes) (30 4bytes)
00235 #  int last_ds_msg (4 bytes)
00236 #  int boom_start (4 bytes)
00237 #  int maxfuel (4 bytes)
00238 #  int lastused (4 bytes)
00239 
00240 #  int cocoon (4 bytes)
00241 #  int commconv (4 bytes)
00242 #  int commconv_last (4 bytes)
00243 #  int onumsinks (4 bytes)
00244 #  int disabled_hs (4 bytes)
00245 #  int autopilot_num (4 bytes)
00246 #  char aim_type (4 bytes)
00247 #  int heatboom_last (4 bytes)
00248 #  char vis_mod (4 bytes)
00249 #  int sspin (4 bytes)
00250 #  int can_see (4 bytes)
00251 #  short lx (2 bytes)
00252 #  short ly (2 bytes)
00253 #  int row (4 bytes)
00254 #  int rcw (4 bytes)
00255 #  float rspd (4 bytes)
00256 #  int erat (4 bytes)
00257 #  int per (4 bytes)
00258 #  int wxf (4 bytes)
00259 #  char chargetimer (1 byte)
00260 #  char chargedist (1 byte)
00261 #  short mech_prefs (2 bytes)
00262 #  int last_startup (4 bytes)
00263 #  int specialsstatus (4 bytes)
00264 #  int tankcritstatus (4 bytes)
00265 #  int specials2 (4 bytes)
00266 #  int unused[7] (28 bytes, 7-list of ints)
00267 # <-- end of mech_rd (280 bytes)
00268 # 
00269 # Is a grand total of 1548 real bytes,
00270 # 1752 with byte alignment, and 1768 with sub-struct alignment
00271 
00272 
class MECHObject(HCodeObject):


Field Documentation

hcodedb::HCodeObject::data

Reimplemented in hcodedb::MECHObject.

Definition at line 106 of file hcodedb.py.

hcodedb::HCodeObject::key

Reimplemented in hcodedb::MECHObject, and hcodedb::MAPObject.

Definition at line 103 of file hcodedb.py.

hcodedb::HCodeObject::size

Definition at line 105 of file hcodedb.py.

hcodedb::HCodeObject::type

Reimplemented in hcodedb::MECHObject, and hcodedb::MAPObject.

Definition at line 104 of file hcodedb.py.


The documentation for this class was generated from the following file:
Generated on Mon May 28 04:25:49 2007 for BattletechMUX by  doxygen 1.4.7