mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-06 21:46:29 +03:00
Keep it working on the map editor, maps can now be saved, i'll implement the loading next.
Changed a little bit how to load from memory packs. Fixed some minor bugs on the UI. And many things that i can't remember, i forgot to make a commit yesterday.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "cgameobjectshape.hpp"
|
||||
#include "../graphics/cshapegroupmanager.hpp"
|
||||
|
||||
namespace EE { namespace Gaming {
|
||||
|
||||
@@ -18,23 +19,7 @@ Uint32 cGameObjectShape::Type() const {
|
||||
|
||||
void cGameObjectShape::Draw() {
|
||||
if ( NULL != mShape ) {
|
||||
Uint8 Both = 0;
|
||||
EE_RENDERTYPE Render = RN_NORMAL;
|
||||
|
||||
if ( mFlags & GObjFlags::GAMEOBJECT_MIRRORED ) {
|
||||
Render = RN_MIRROR;
|
||||
Both |= 1 << RN_MIRROR;
|
||||
}
|
||||
|
||||
if ( mFlags & GObjFlags::GAMEOBJECT_FLIPED ) {
|
||||
Render = RN_FLIP;
|
||||
Both |= 1 << RN_FLIP;
|
||||
}
|
||||
|
||||
if ( ( Both & RN_MIRROR ) && ( Both & RN_FLIP ) )
|
||||
Render = RN_FLIPMIRROR;
|
||||
|
||||
mShape->Draw( mPos.x, mPos.y, eeColorA(), 0.f, 1.f, ALPHA_NORMAL, Render );
|
||||
mShape->Draw( mPos.x, mPos.y, eeColorA(), 0.f, 1.f, ALPHA_NORMAL, RenderTypeFromFlags() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +30,13 @@ eeVector2f cGameObjectShape::Pos() const {
|
||||
return mPos;
|
||||
}
|
||||
|
||||
eeSize cGameObjectShape::Size() {
|
||||
if ( NULL != mShape )
|
||||
return mShape->RealSize();
|
||||
|
||||
return eeSize();
|
||||
}
|
||||
|
||||
void cGameObjectShape::Pos( eeVector2f pos ) {
|
||||
mPos = pos;
|
||||
}
|
||||
@@ -57,4 +49,12 @@ void cGameObjectShape::Shape( cShape * shape ) {
|
||||
mShape = shape;
|
||||
}
|
||||
|
||||
Uint32 cGameObjectShape::DataId() {
|
||||
return mShape->Id();
|
||||
}
|
||||
|
||||
void cGameObjectShape::DataId( Uint32 Id ) {
|
||||
Shape( cShapeGroupManager::instance()->GetShapeById( Id ) );
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user