Permalink
Browse files

remove unnecessary dependancies on video.h

  • Loading branch information...
1 parent 6888330 commit 43aa7fdb94b0c6a658f3df0ff02bcf2a038e0aa5 @bradallred bradallred committed Jun 16, 2013
View
@@ -53,10 +53,8 @@ Animation::Animation(int count)
Animation::~Animation(void)
{
- Video *video = core->GetVideoDriver();
-
for (unsigned int i = 0; i < indicesCount; i++) {
- video->FreeSprite( frames[i] );
+ frames[i]->release();
}
free(frames);
}
@@ -221,7 +219,7 @@ void Animation::MirrorAnimation()
for (size_t i = 0; i < indicesCount; i++) {
Sprite2D * tmp = frames[i];
frames[i] = video->MirrorSpriteHorizontal( tmp, true );
- video->FreeSprite(tmp);
+ tmp->release();
}
// flip animArea horizontally as well
@@ -235,7 +233,7 @@ void Animation::MirrorAnimationVert()
for (size_t i = 0; i < indicesCount; i++) {
Sprite2D * tmp = frames[i];
frames[i] = video->MirrorSpriteVertical( tmp, true );
- video->FreeSprite(tmp);
+ tmp->release();
}
// flip animArea vertically as well
@@ -24,7 +24,6 @@
#include "Interface.h"
#include "Sprite2D.h"
-#include "Video.h"
namespace GemRB {
@@ -39,7 +38,7 @@ AnimationFactory::AnimationFactory(const char* ResRef)
AnimationFactory::~AnimationFactory(void)
{
for (unsigned int i = 0; i < frames.size(); i++) {
- core->GetVideoDriver()->FreeSprite( frames[i] );
+ frames[i]->release();
}
if (FLTable)
free( FLTable);
@@ -30,7 +30,6 @@
#include "Interface.h"
#include "Map.h"
#include "Palette.h"
-#include "Video.h"
namespace GemRB {
@@ -26,8 +26,6 @@
#include "GameData.h"
#include "GlobalTimer.h"
#include "Interface.h"
-#include "Palette.h" /* needed only for paperdoll palettes */
-#include "Video.h" /* needed only for paperdoll palettes */
#include "GUI/Button.h"
namespace GemRB {
@@ -21,7 +21,6 @@
#include "ImageFactory.h"
#include "Interface.h"
-#include "Video.h"
namespace GemRB {
@@ -33,7 +32,7 @@ ImageFactory::ImageFactory(const char* ResRef, Sprite2D* bitmap_)
ImageFactory::~ImageFactory(void)
{
- core->GetVideoDriver()->FreeSprite( bitmap );
+ bitmap->release();
}
Sprite2D* ImageFactory::GetSprite2D() const
View
@@ -24,7 +24,6 @@
#include "ImageFactory.h"
#include "Interface.h"
-#include "Video.h"
namespace GemRB {
@@ -55,7 +54,7 @@ Bitmap* ImageMgr::GetBitmap()
}
}
- core->GetVideoDriver()->FreeSprite(spr);
+ spr->release();
return data;
}
@@ -74,7 +73,7 @@ Image* ImageMgr::GetImage()
}
}
- core->GetVideoDriver()->FreeSprite(spr);
+ spr->release();
return data;
}
@@ -33,7 +33,6 @@
#include "SaveGameMgr.h"
#include "Sprite2D.h"
#include "TableMgr.h"
-#include "Video.h"
#include "GUI/GameControl.h"
#include "Scriptable/Actor.h"
#include "System/FileStream.h"
@@ -33,7 +33,6 @@
#include "Spell.h"
#include "SpriteCover.h"
#include "TileMap.h"
-#include "Video.h"
#include "GameScript/GSUtils.h"
#include "GUI/GameControl.h"
#include "Scriptable/InfoPoint.h"
@@ -34,7 +34,6 @@
#include "Spell.h"
#include "SpriteCover.h"
#include "TileMap.h"
-#include "Video.h"
#include "GameScript/GSUtils.h"
#include "GUI/GameControl.h"
#include "System/StringBuffer.h"
View
@@ -23,7 +23,6 @@
#include "win32def.h"
#include "Interface.h"
-#include "Video.h"
namespace GemRB {
@@ -37,7 +37,6 @@
#include "PluginMgr.h"
#include "ProjectileServer.h"
#include "TileMapMgr.h"
-#include "Video.h"
#include "GameScript/GameScript.h"
#include "Scriptable/Container.h"
#include "Scriptable/Door.h"

0 comments on commit 43aa7fd

Please sign in to comment.