#include "Deeangband.h"
#include "CreatureTemplate.h"
+BOOST_CLASS_VERSION(Authority, 1);
+
namespace Deeangband
{
#include "stdafx.h"
#include "Deeangband.h"
+class Color;
+BOOST_CLASS_VERSION(Color, 1);
+
namespace Deeangband
{
int Color::GetAlpha(void);
};
-
-}
\ No newline at end of file
+}
#include "SavingTable.h"
#include "Species.h"
-BOOST_CLASS_VERSION(Creature, 1);
namespace Deeangband
{
+ /*
+ template<> struct version<Deeangband::Creature>
+{
+ typedef mpl::int_<10> type;
+ typedef mpl::integral_c_tag tag;
+ BOOST_STATIC_CONSTANT(int, value = version::type::value);
+ BOOST_MPL_ASSERT((boost::mpl::less<boost::mpl::int_<10>, boost::mpl::int_<256>>));
+}; */
+
+
/*!
* @class Creature
* @brief \83N\83\8a\81[\83`\83\83\81[\82Ì\83N\83\89\83X
{
if(version >= 0)
{
- archive & BOOST_SERIALIZATION_NVP(name);
+ archive & boost::serialization::make_nvp("Name", name);
archive & BOOST_SERIALIZATION_NVP(currentHp);
archive & BOOST_SERIALIZATION_NVP(maxHp);
archive & BOOST_SERIALIZATION_NVP(hpTable);
};
-}
\ No newline at end of file
+}
+
+//BOOST_CLASS_EXPORT_GUID(Deeangband::Creature, "Deeang_Creature");
+BOOST_CLASS_VERSION(Deeangband::Creature, 1);
GameWorld *GameElement::GetGameWorld();
};
-}
\ No newline at end of file
+}
SDL_FillRect(windowSurface, &rect, SDL_MapRGBA(windowSurface->format, 50, 20, 10, 255));
SDL_BlitSurface(titleSurface, &title, windowSurface, &title);
- if(viewFloorPtr) drawFloor(viewFloorPtr, 0, 0, 20, 20);
+ if(viewFloorPtr) drawFloor(gameWorld, viewFloorPtr, 0, 0, 20, 20);
if(viewCreaturePtr) drawCreatureStatus(viewCreaturePtr);
SDL_UpdateWindowSurface(window);
return GAME_COMMAND_REDRAW;
}
- void GameSurfaceSDL::drawFloor(Floor *floorPtr, int x, int y, int w, int h)
+ void GameSurfaceSDL::drawFloor(GameWorld *gameWorld, Floor *floorPtr, int x, int y, int w, int h)
{
SDL_Surface *windowSurface = SDL_GetWindowSurface(window);
SDL_Rect symbolRect = {0, 0, 30, 30};
class GameSurfaceSDL : public GameSurface
{
private:
+
+ GameWorld *gameWorld;
Creature *viewCreaturePtr;
Floor *viewFloorPtr;
* @param h \95\\8e¦\82Ì\83}\83X\8d\82\82³
* @return \82È\82µ
*/
- void drawFloor(Floor *floorPtr, int x, int y, int w, int h);
+ void drawFloor(GameWorld *gameWorld, Floor *floorPtr, int x, int y, int w, int h);
public:
std::ifstream ifs("HFOko.xml");
boost::archive::xml_iarchive ia(ifs);
ia >> BOOST_SERIALIZATION_NVP(*creatureList[0]);
- //creatureList[0]->XMLSave("HFOko.xml");
+ creatureList[0]->XMLSave("HFOko3.xml");
}
#include <ctime>
#include <cassert>
#include <fstream>
+#include <boost/serialization/export.hpp>
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/version.hpp>
#include <boost/serialization/map.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/list.hpp>
+#include <boost/serialization/assume_abstract.hpp>
#include <boost/archive/xml_oarchive.hpp>
#include <boost/archive/xml_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>