00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "RopeDecor.h"
00010
00011 #include "Cube.h"
00012
00013 #include "View.h"
00014
00015 #include "SDL_gfxPrimitives.h"
00016
00017
00018 RopeDecor::RopeDecor(const Cube *model1, const Cube *model2,
00019 const V2 &shift1, const V2 &shift2)
00020 : m_shift1(shift1), m_shift2(shift2)
00021 {
00022 m_model1 = model1;
00023 m_model2 = model2;
00024 }
00025
00026
00027
00028
00029 void
00030 RopeDecor::drawOnScreen(const View *view, SDL_Surface *screen)
00031 {
00032 V2 loc1 = view->getScreenPos(m_model1).plus(m_shift1);
00033 V2 loc2 = view->getScreenPos(m_model2).plus(m_shift2);
00034
00035
00036 Uint32 colorRGBA = 0x30404eff;
00037 lineColor(screen, loc1.getX(), loc1.getY(),
00038 loc2.getX(), loc2.getY(), colorRGBA);
00039 }
00040