Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

subworld.cpp

Go to the documentation of this file.
00001 #include "application.h"
00002 #include "graphics.h"
00003 #include "background.h"
00004 #include "subworld.h"
00005 
00006 SubWorld::SubWorld(Graphics &G) : GD(G)
00007 {
00008         background = new Background(DATAFILE("images/temp.jpg"), GD);
00009 }
00010 
00011 SubWorld::~SubWorld()
00012 {
00013         if (background)
00014                 delete background;
00015 }
00016 
00017 void SubWorld::ScreenToSubWorld(float &x, float &y) 
00018 {
00019         x = x + background->GetX();
00020         y = y + background->GetY();
00021 }
00022 
00023 void SubWorld::SubWorldToScreen(float &x, float &y)
00024 {
00025         x = x - background->GetX();
00026         y = y - background->GetY();
00027 }
00028 

Generated on Sun Dec 8 12:02:20 2002 for nnc by doxygen1.3-rc1