src/interface/interface.cpp File Reference

#include "interface.h"
#include "mouse.h"
#include <iostream>
#include <SDL.h>
#include <sstream>
#include "../game/game_loop.h"
#include "../game/game_mode.h"
#include "../game/time.h"
#include "../graphic/colors.h"
#include "../graphic/video.h"
#include "../graphic/font.h"
#include "../include/app.h"
#include "../map/camera.h"
#include "../map/map.h"
#include "../team/teams_list.h"
#include "../team/macro.h"
#include "../tool/debug.h"
#include "../tool/string_tools.h"
#include "../tool/i18n.h"
#include "../tool/resource_manager.h"
#include "../weapon/weapons_list.h"

Include dependency graph for interface.cpp:

Go to the source code of this file.

Functions

const Point2i BORDER_POSITION (5, 5)
void AbsoluteDraw (const Surface &s, Point2i pos)
void HideGameInterface ()
void ShowGameInterface ()

Variables

WeaponStrengthBar weapon_strength_bar
const uint MARGIN = 10


Function Documentation

void AbsoluteDraw ( const Surface s,
Point2i  pos 
)

Definition at line 407 of file interface.cpp.

00408 {
00409   Rectanglei rectSurface(pos, s.GetSize());
00410 
00411   if( !rectSurface.Intersect(camera) )
00412     return;
00413 
00414   world.ToRedrawOnMap(rectSurface);
00415 
00416   rectSurface.Clip( camera );
00417 
00418   Rectanglei rectSource(rectSurface.GetPosition() - pos, rectSurface.GetSize());
00419   Point2i ptDest = rectSurface.GetPosition() - camera.GetPosition();
00420 
00421   AppWormux::GetInstance()->video.window.Blit(s, rectSource, ptDest);
00422 }

Here is the call graph for this function:

Here is the caller graph for this function:

const Point2i BORDER_POSITION ( ,
 
)

Here is the caller graph for this function:

void HideGameInterface (  ) 

Definition at line 424 of file interface.cpp.

00425 {
00426   if(Interface::GetInstance()->GetWeaponsMenu().IsDisplayed()) return;
00427   Mouse::GetInstance()->Hide();
00428   Interface::GetInstance()->Hide();
00429 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ShowGameInterface (  ) 

Definition at line 431 of file interface.cpp.

00432 {
00433   Mouse::GetInstance()->Show();
00434   Interface::GetInstance()->Show();
00435 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const uint MARGIN = 10

Definition at line 48 of file interface.cpp.

WeaponStrengthBar weapon_strength_bar

Definition at line 44 of file interface.cpp.


Generated on Mon Jan 1 13:19:43 2007 for Wormux by  doxygen 1.4.7