ASYLUM: Shifted some files around, and moved all the resource-related classes into resource.h
git-svn-id: http://asylumengine.googlecode.com/svn/trunk@50 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
This commit is contained in:
parent
fe791aaae2
commit
00c0efeae6
8 changed files with 23 additions and 117 deletions
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include "asylum/asylum.h"
|
#include "asylum/asylum.h"
|
||||||
#include "asylum/screen.h"
|
#include "asylum/screen.h"
|
||||||
#include "asylum/resources/video.h"
|
#include "asylum/video.h"
|
||||||
|
|
||||||
namespace Asylum {
|
namespace Asylum {
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#define ASYLUM_GRAPHICBUNDLE_H_
|
#define ASYLUM_GRAPHICBUNDLE_H_
|
||||||
|
|
||||||
#include "asylum/bundles/bundle.h"
|
#include "asylum/bundles/bundle.h"
|
||||||
#include "asylum/resources/graphic.h"
|
|
||||||
|
|
||||||
namespace Asylum {
|
namespace Asylum {
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,14 @@ namespace Asylum {
|
||||||
|
|
||||||
class Resource {
|
class Resource {
|
||||||
public:
|
public:
|
||||||
Resource();
|
Resource() : size(0), offset(0), initialized(false) {}
|
||||||
virtual ~Resource(){}
|
virtual ~Resource(){}
|
||||||
|
|
||||||
int save(Common::String filename);
|
void save(Common::String filename) {
|
||||||
|
FILE *fd = fopen(filename.c_str(), "wb+");
|
||||||
|
fwrite(data, size, 1, fd);
|
||||||
|
fclose(fd);
|
||||||
|
}
|
||||||
|
|
||||||
Common::String type;
|
Common::String type;
|
||||||
uint32 size;
|
uint32 size;
|
||||||
|
@ -41,6 +45,21 @@ public:
|
||||||
|
|
||||||
}; // end of class Resource
|
}; // end of class Resource
|
||||||
|
|
||||||
|
class GraphicResource: public Resource {
|
||||||
|
public:
|
||||||
|
GraphicResource() {}
|
||||||
|
~GraphicResource() {}
|
||||||
|
|
||||||
|
uint32 size;
|
||||||
|
uint32 flag;
|
||||||
|
uint16 x;
|
||||||
|
uint16 y;
|
||||||
|
uint16 width;
|
||||||
|
uint16 height;
|
||||||
|
|
||||||
|
}; // end of class GraphicResource
|
||||||
|
|
||||||
|
|
||||||
} // end of namespace Asylum
|
} // end of namespace Asylum
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -1,26 +0,0 @@
|
||||||
/* ScummVM - Graphic Adventure Engine
|
|
||||||
*
|
|
||||||
* ScummVM is the legal property of its developers, whose names
|
|
||||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
||||||
* file distributed with this source distribution.
|
|
||||||
*
|
|
||||||
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "asylum/resources/graphic.h"
|
|
||||||
|
|
||||||
namespace Asylum {
|
|
||||||
|
|
||||||
} // end of namespace Asylum
|
|
|
@ -1,45 +0,0 @@
|
||||||
/* ScummVM - Graphic Adventure Engine
|
|
||||||
*
|
|
||||||
* ScummVM is the legal property of its developers, whose names
|
|
||||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
||||||
* file distributed with this source distribution.
|
|
||||||
*
|
|
||||||
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef ASYLUM_GRAPHICRESOURCE_H_
|
|
||||||
#define ASYLUM_GRAPHICRESOURCE_H_
|
|
||||||
|
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
namespace Asylum {
|
|
||||||
|
|
||||||
class GraphicResource: public Resource {
|
|
||||||
public:
|
|
||||||
GraphicResource() {}
|
|
||||||
~GraphicResource() {}
|
|
||||||
|
|
||||||
uint32 size;
|
|
||||||
uint32 flag;
|
|
||||||
uint16 x;
|
|
||||||
uint16 y;
|
|
||||||
uint16 width;
|
|
||||||
uint16 height;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
} // end of namespace Asylum
|
|
||||||
|
|
||||||
#endif /* GRAPHICRESOURCE_H_ */
|
|
|
@ -1,41 +0,0 @@
|
||||||
/* ScummVM - Graphic Adventure Engine
|
|
||||||
*
|
|
||||||
* ScummVM is the legal property of its developers, whose names
|
|
||||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
||||||
* file distributed with this source distribution.
|
|
||||||
*
|
|
||||||
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "asylum/resources/resource.h"
|
|
||||||
|
|
||||||
namespace Asylum {
|
|
||||||
|
|
||||||
Resource::Resource() {
|
|
||||||
size = 0;
|
|
||||||
offset = 0;
|
|
||||||
initialized = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Resource::save(Common::String filename) {
|
|
||||||
FILE *fd;
|
|
||||||
fd = fopen(filename.c_str(), "wb+");
|
|
||||||
fwrite(data, size, 1, fd);
|
|
||||||
fclose(fd);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // end of namespace Asylum
|
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "asylum/resources/video.h"
|
#include "asylum/video.h"
|
||||||
|
|
||||||
namespace Asylum {
|
namespace Asylum {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue