#ifndef _global_h # include "global.h" #endif #ifndef _object_h # include "object.h" #endif #ifndef _graph_h # include "graph.h" #endif #ifndef _pball_h # include "pball.h" #endif double world_x, world_y; int max_x, max_y; double w2n; int wall_click = 0; void Inside( Vec2 *v ) { double x=v->X(); double y=v->Y(); if (x<0) x=0; if (x>max_x) x=max_x; if (y<0) y=0; if (y>max_y) y=max_y; *v = Vec2(x,y); } static const int MAX_BG = 7; static const int MAX_BALL = 15; static const int MAX_SHADE = 3; static const int MAX_STAT = 128; int nbg_cols=0; static const char *bg_col[MAX_BG]; unsigned long bg_pix[MAX_BG]; // aus Planes zusammengesetzt static unsigned long bg_mask; // alle bg-Planes int nball_cols=1; static const char *ball_col[MAX_BALL] = { "Background-Dummy" }; unsigned long ball_pix[MAX_BALL]; // allokierte Pixel static unsigned long ball_mask; int nball_ids =0; ColorId ball_ids[MAX_BALL]; // für Bälle verteilte Farb-Ids int nstat_cols =0; static const char *stat_col[MAX_STAT]; unsigned long stat_pix[MAX_STAT]; // Static-Colors (unter Cursor) static int nshade_cols=0; static const char *shade_col[MAX_SHADE]; static int m[MAX_SHADE], d[MAX_SHADE]; // Anteil Original : Schatten static unsigned long shade_pix[MAX_SHADE]; // aus Planes zusammengesetzt static unsigned long shade_mask; // alle Shade-Planes static const char *cursor_col=0; static unsigned long cursor_mask; // Cursor-Plane void InitColors() { nbg_cols = 0; nball_cols = 1; nstat_cols = 0; nball_ids = 0; nshade_cols= 0; } unsigned long GetAllocatedPixel( const char *colorname ) { int i; for (i=0;i>COLOR_BITS); } } if (col&BG_MASK) return bg_pix[ (int)(col&COLOR_MASK) ]; else return ball_pix[ (int)(col&COLOR_MASK) ]; } ColorId AddBgColor( const char *colorname ) { for (int i=0;i