Atrinik Client  4.0
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
minimap.c File Reference
#include <global.h>
#include <region_map.h>

Go to the source code of this file.

Data Structures

struct  minimap_widget
 

Macros

#define MINIMAP_CIRCLE_PADDING(widget)
 

Typedefs

typedef struct minimap_widget minimap_widget_t
 

Enumerations

enum  {
  MINIMAP_TEXTURE_BG, MINIMAP_TEXTURE_MASK, MINIMAP_TEXTURE_BORDER, MINIMAP_TEXTURE_BORDER_ROTATED,
  MINIMAP_TEXTURE_NUM
}
 
enum  minimap_type_t { MINIMAP_TYPE_PREFER_REGION_MAP, MINIMAP_TYPE_REGION_MAP, MINIMAP_TYPE_DYNAMIC, MINIMAP_TYPE_NUM }
 

Functions

static void widget_draw (widgetdata *widget)
 
static int widget_event (widgetdata *widget, SDL_Event *event)
 
static void widget_deinit (widgetdata *widget)
 
static int widget_load (widgetdata *widget, const char *keyword, const char *parameter)
 
static void widget_save (widgetdata *widget, FILE *fp, const char *padding)
 
static void menu_minimap_display_change (widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
 
static void menu_minimap_display (widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
 
static int widget_menu_handle (widgetdata *widget, SDL_Event *event)
 
static void widget_padding (widgetdata *widget, int *x, int *y)
 
void widget_minimap_init (widgetdata *widget)
 

Variables

static const char *const minimap_texture_names [MINIMAP_TEXTURE_NUM]
 
static const char *const minimap_display_modes [MINIMAP_TYPE_NUM]
 

Detailed Description

Implements minimap type widgets.

Author
Alex Tokar

Definition in file minimap.c.

Macro Definition Documentation

#define MINIMAP_CIRCLE_PADDING (   widget)
Value:
(10. * ((double) (widget)->w / \
TEXTURE_CLIENT(minimap_texture_names[MINIMAP_TEXTURE_BG])->w))
static const char *const minimap_texture_names[MINIMAP_TEXTURE_NUM]
Definition: minimap.c:86

Number of pixels from the border to the circle in the minimap texture.

Definition at line 60 of file minimap.c.

Typedef Documentation

Minimap widget sub-structure.

Enumeration Type Documentation

anonymous enum

Textures used by the minimap.

Definition at line 38 of file minimap.c.

Possible minimap display types.

Definition at line 49 of file minimap.c.

Function Documentation

static void widget_deinit ( widgetdata widget)
static

Definition at line 270 of file minimap.c.

static void widget_draw ( widgetdata widget)
static

Definition at line 98 of file minimap.c.

static int widget_event ( widgetdata widget,
SDL_Event *  event 
)
static

Definition at line 246 of file minimap.c.

static int widget_load ( widgetdata widget,
const char *  keyword,
const char *  parameter 
)
static

Definition at line 284 of file minimap.c.

static int widget_menu_handle ( widgetdata widget,
SDL_Event *  event 
)
static

Definition at line 353 of file minimap.c.

static void widget_padding ( widgetdata widget,
int *  x,
int *  y 
)
static

Definition at line 369 of file minimap.c.

static void widget_save ( widgetdata widget,
FILE *  fp,
const char *  padding 
)
static

Definition at line 299 of file minimap.c.

Variable Documentation

const char* const minimap_display_modes[MINIMAP_TYPE_NUM]
static
Initial value:
= {
"Prefer region maps", "Only region maps", "Only dynamic maps"
}

String representations of the display types.

Definition at line 93 of file minimap.c.

const char* const minimap_texture_names[MINIMAP_TEXTURE_NUM]
static
Initial value:
= {
"minimap_bg", "minimap_mask", "minimap_border", "minimap_border_rotated"
}

Texture names to load.

Definition at line 86 of file minimap.c.