File: cmap_edit.h

package info (click to toggle)
craft 3.5-10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,000 kB
  • ctags: 1,602
  • sloc: cpp: 3,794; makefile: 2,319; ansic: 857; sh: 385
file content (94 lines) | stat: -rw-r--r-- 1,917 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#ifndef cmap_edit_h
#define cmap_edit_h

#include "bool.h"
#include "win.h"
#include "buttons.h"
#include "dial.h"
#include "objects.h"

#define max_map_dx 800
#define max_map_dy 800



class cmap_edit
  {public :

   bool   changed;
   win    *map_win;
   win    *color_table;
   win    *picture;
   win    *cmd_win;
   button *bquit;
   button *bsplit;
   button *bload;
   button *bsave;
   button *bsaveas;
   button *bimport;
   button *bresize;
   button *brotate;
   button *brotateh;
   button *bflip;
   button *breplace;
   button *boverlay;
   button *bpaste;
   button *bleft;
   button *bright;
   button *bup;
   button *bdown;
   dial   *d_mark;
   int    fg_color;
   int    bg_color;
   int    t_color;
   int    last_x;
   int    last_y;
   int    last_color;

   int    pixel_dx;
   int    pixel_dy;

   int    xcross;
   int    ycross;

   bool   is_mark;
   bool   d_is_mark;

   char   name [128];
   int    dx;
   int    dy;
   int    map  [max_map_dx][max_map_dy];
   bool   omap [5][5];

   cmap_edit      (char name []);
   cmap_edit      ();
   ~cmap_edit     ();

   void load      ();
   void save      ();
   void save_as   (char new_name []);
   void save_as   (char name [], int x0, int y0, int sdx, int sdy);
   void flip_ud   ();
   void flip_lr   ();
   void rotate_r  ();
   void rotate_rh ();
   void rotate    (int orig [max_map_dx][max_map_dy],
                   int rot  [max_map_dx][max_map_dy],
                   int x0,
                   int y0,
                   int x1, 
                   int y1);
   void recolor   (int n);
   void colorize  (int ddx, int ddy, int c, int n);
   void colorize  (int ddx, int ddy);
   void edit      (bool &was_quit);
   void overlay   (char name []);
   void paste     (char name [], int x, int y);

   void split     (int sdx, int sdy, char name [], int no);

   void set_to_ppm (char map_name [], char ppm_name []);
  
 };

#endif