# Balazar
# Copyright (C) 2003-2005 Jean-Baptiste LAMY
#
# This program 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; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

import cerealizer, tofu, soya, soya.cerealizer4soya
import balazar.globdef, balazar.base, balazar.building, balazar.character, balazar.controller, balazar.echassian, balazar.hero, balazar.item, balazar.level, balazar.morkul, balazar.npc, balazar.trap, balazar.vegetation, balazar.weather, balazar.wiseman, balazar.game_interface, balazar.player

cerealizer.register_class(balazar.base.DecorativeEntity)
cerealizer.register_class(balazar.base.Discutable)
cerealizer.register_class(balazar.base.EjectedBody)
cerealizer.register_class(balazar.base.Entity)
cerealizer.register_class(balazar.base.HurtedBody)
cerealizer.register_class(balazar.base.Photographiable)
cerealizer.register_class(balazar.base.SensitiveFloor)
cerealizer.register_class(balazar.base.SmallHurtedBody)
cerealizer.register_class(balazar.base.Strikeable)
cerealizer.register_class(balazar.base.Terraformer)
cerealizer.register_class(balazar.building.Altar)
cerealizer.register_class(balazar.building.Building)
cerealizer.register_class(balazar.building.Farm)
cerealizer.register_class(balazar.building.Market)
cerealizer.register_class(balazar.building.MovingVigie)
cerealizer.register_class(balazar.building.RotatingVigie)
cerealizer.register_class(balazar.building.Tower)
cerealizer.register_class(balazar.building.Temple)
cerealizer.register_class(balazar.building.Vigie)
cerealizer.register_class(balazar.character.Action)
cerealizer.register_class(balazar.character.AddState)
cerealizer.register_class(balazar.character.Blood)
cerealizer.register_class(balazar.character.Character)
cerealizer.register_class(balazar.character.Eclat)
cerealizer.register_class(balazar.character.FallingItem)
cerealizer.register_class(balazar.character.FightAction)
cerealizer.register_class(balazar.character.HealEffect)
cerealizer.register_class(balazar.character.ItemAction)
cerealizer.register_class(balazar.character.ItemState)
cerealizer.register_class(balazar.character.NewItemState)
cerealizer.register_class(balazar.character.SoundState)
cerealizer.register_class(balazar.character.State)
cerealizer.register_class(balazar.character.Step)
cerealizer.register_class(balazar.character.ValueState)
cerealizer.register_class(balazar.controller.StackController)
cerealizer.register_class(balazar.echassian.AIController)
cerealizer.register_class(balazar.echassian.Echassian)
cerealizer.register_class(balazar.hero.Balazar)
cerealizer.register_class(balazar.hero.Hero)
cerealizer.register_class(balazar.item.Axe)
cerealizer.register_class(balazar.item.Camera)
cerealizer.register_class(balazar.item.CursedSword)
cerealizer.register_class(balazar.item.EquipableItem)
cerealizer.register_class(balazar.item.Food)
cerealizer.register_class(balazar.item.HalfVisibleAxe)
cerealizer.register_class(balazar.item.Item)
cerealizer.register_class(balazar.item.Key)
cerealizer.register_class(balazar.item.KillRay)
cerealizer.register_class(balazar.item.KillerEffect)
cerealizer.register_class(balazar.item.Knife)
cerealizer.register_class(balazar.item.LeftHandHorizontalItem)
cerealizer.register_class(balazar.item.LeftHandItem)
cerealizer.register_class(balazar.item.Map)
cerealizer.register_class(balazar.item.MorkulKillerKnife)
cerealizer.register_class(balazar.item.MushroomFood)
cerealizer.register_class(balazar.item.OldMushroomFood)
cerealizer.register_class(balazar.item.Photo)
cerealizer.register_class(balazar.item.PomponScepter)
cerealizer.register_class(balazar.item.RightHandItem)
cerealizer.register_class(balazar.item.Scepter)
cerealizer.register_class(balazar.item.TelekinesyCursedItem)
cerealizer.register_class(balazar.item.TuryleSword)
cerealizer.register_class(balazar.item.UseableItem)
cerealizer.register_class(balazar.item.Weapon)
cerealizer.register_class(balazar.level.Bridge)
cerealizer.register_class(balazar.level.Country)
cerealizer.register_class(balazar.level.Level)
cerealizer.register_class(balazar.morkul.Morkul)
cerealizer.register_class(balazar.morkul.MorkulAIController)
cerealizer.register_class(balazar.morkul.MorkulChief)
cerealizer.register_class(balazar.morkul.MorkulChiefWithScepter)
cerealizer.register_class(balazar.npc.AIController)
cerealizer.register_class(balazar.npc.Monster)
cerealizer.register_class(balazar.npc.NPC)
cerealizer.register_class(balazar.trap.Chest)
cerealizer.register_class(balazar.trap.FallingVigie)
cerealizer.register_class(balazar.trap.Gloom)
cerealizer.register_class(balazar.trap.Grid)
cerealizer.register_class(balazar.trap.GridOpener)
cerealizer.register_class(balazar.trap.LifeAltar)
cerealizer.register_class(balazar.trap.ManualGridOpener)
cerealizer.register_class(balazar.trap.MiamGrid)
cerealizer.register_class(balazar.trap.NoMonsterGrid)
cerealizer.register_class(balazar.trap.OpenableTrap)
cerealizer.register_class(balazar.trap.TrapState)
cerealizer.register_class(balazar.trap.TrappedTile)
cerealizer.register_class(balazar.trap.RotatingBridgeTile)
cerealizer.register_class(balazar.trap.Mill)
cerealizer.register_class(balazar.vegetation.Fasme)
cerealizer.register_class(balazar.vegetation.GiantMushroom)
cerealizer.register_class(balazar.vegetation.HurtState)
cerealizer.register_class(balazar.vegetation.Mushroom)
cerealizer.register_class(balazar.vegetation.PlantElement)
cerealizer.register_class(balazar.vegetation.SpcState)
cerealizer.register_class(balazar.vegetation.Spore)
cerealizer.register_class(balazar.vegetation.TreasureTreePompon)
cerealizer.register_class(balazar.vegetation.TreePompon)
cerealizer.register_class(balazar.vegetation.Vegetal)
cerealizer.register_class(balazar.vegetation.VegetalAction)
cerealizer.register_class(balazar.vegetation.VegetalState)
cerealizer.register_class(balazar.weather.Rain)
cerealizer.register_class(balazar.weather.Snow)
cerealizer.register_class(balazar.weather.StarSprite)
cerealizer.register_class(balazar.weather.SunSprite)
cerealizer.register_class(balazar.weather.WeatherAgent)
cerealizer.register_class(balazar.weather.WeatherAtmosphere)
cerealizer.register_class(balazar.weather.WeatherState)
cerealizer.register_class(balazar.wiseman.Wiseman)
cerealizer.register_class(balazar.wiseman.AIController)


# Increase the maximum size of a transfered file
import tofu.client
tofu.client.MAX_LENGTH = 1000000


tofu.enable_pickle    (1, 0)
tofu.enable_cerealizer(0, 1)

soya.tofu4soya.init(
  balazar.game_interface.GameInterface,
  balazar.player.Player,
  balazar.level.Level,
  balazar.character.Action,
  balazar.character.State,
  balazar.character.Character,
  )
