Remove map and text bar patterns, move dither patterns to separate sheet
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<led name='led5' top='114' left='8' width='180'>Rough dark grey stone</led>
|
||||
<led name='led6' top='129' left='8' width='180'>Black stone / Basalt</led>
|
||||
<led name='led7' top='144' left='8' width='180'>White stone / Chalk</led>
|
||||
<led name='led8' top='159' left='8' width='180'>Text bar pattern</led>
|
||||
<led name='led8' top='159' left='8' width='180'>Light grey stone</led>
|
||||
<led name='led9' top='174' left='8' width='180'>Wood mosaic / parquet floor</led>
|
||||
<led name='led10' top='189' left='8' width='180'>Dark / petrified wood</led>
|
||||
<led name='led11' top='204' left='8' width='180'>Medium stone / Granite</led>
|
||||
@@ -21,8 +21,8 @@
|
||||
<led name='led13' top='69' left='216' width='180'>Grey marble</led>
|
||||
<led name='led14' top='84' left='216' width='180'>Mosaic tiles</led>
|
||||
<led name='led15' top='99' left='216' width='180'>Veined rock / Marble</led>
|
||||
<led name='led16' top='114' left='216' width='180'>Pitted / Laye#088 stone</led>
|
||||
<led name='led17' top='129' left='216' width='180'>Light grey stone</led>
|
||||
<led name='led16' top='114' left='216' width='180'>Pitted / Cracked stone</led>
|
||||
<led name='led17' top='129' left='216' width='180'>Light grey stone with highlights</led>
|
||||
<led name='led18' top='144' left='216' width='180'>White marble</led>
|
||||
<led name='led19' top='159' left='216' width='180'>Reddish-grey texture</led>
|
||||
<led name='led20' top='174' left='216' width='180'>Light wood grain</led>
|
||||
|
BIN
rsrc/graphics.exd/mac/bwpats.png
Normal file
BIN
rsrc/graphics.exd/mac/bwpats.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 100 B |
Binary file not shown.
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 124 KiB |
@@ -54,7 +54,6 @@ extern std::shared_ptr<cButton> done_btn, help_btn;
|
||||
extern sf::Texture bg_gworld;
|
||||
extern rectangle sbar_rect,item_sbar_rect,shop_sbar_rect,startup_top;
|
||||
extern rectangle talk_area_rect, word_place_rect;
|
||||
extern tessel_ref_t map_pat[];
|
||||
extern location store_anim_ul;
|
||||
extern long register_flag;
|
||||
extern long ed_flag,ed_key;
|
||||
|
@@ -51,37 +51,6 @@ extern sf::RenderTexture map_gworld;
|
||||
extern sf::Texture small_ter_gworld;
|
||||
// In the 0..65535 range, this colour was {65535,65535,52428}
|
||||
sf::Color parchment = {255,255,205};
|
||||
extern tessel_ref_t map_pat[];
|
||||
|
||||
// TODO: Add blue cave graphics to these arrays?
|
||||
unsigned char map_pats[256] = {
|
||||
1,1,2,2,2,7,7,7,7,7, ////
|
||||
7,7,7,7,7,7,7,7,3,3,
|
||||
3,3,3,3,3,3,3,3,3,3,
|
||||
3,3,5,5,5,5,5,5,5,5,
|
||||
5,5,5,5,5,5,4,4,4,4,
|
||||
4,4,4,4,4,4,4,4,4,0, // 50
|
||||
0,0,0,0,0,0,0,24,24,24,
|
||||
16,16,25,25,0,0,0,0,18,8,
|
||||
8,9,2,15,15,10,10,10,6,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
19,0,0,0,0,0,0,0,0,0, // 100
|
||||
23,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,11,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,12,0,0, // 150
|
||||
0,0,0,13,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,18,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0, // 200
|
||||
0,0,0,0,0,17,17,0,17,17,
|
||||
17,17,17,17,17,17,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0};// 250
|
||||
unsigned char anim_map_pats[18] = {14,0,0,0,22, 0,0,21,20,21, 20,0,0,0,0, 0,0,0};
|
||||
|
||||
long pause_dummy;
|
||||
|
||||
@@ -1502,22 +1471,13 @@ void draw_map(bool need_refresh) {
|
||||
custom_from = calc_rect(pic % 10, pic / 10);
|
||||
rect_draw_some_item(*src_gw, custom_from, map_gworld, draw_rect);
|
||||
}
|
||||
} else switch(pic >= 960 ? anim_map_pats[pic - 960] : map_pats[pic]) {
|
||||
case 0: case 10: case 11:
|
||||
if(univ.scenario.ter_types[what_ter].picture < 960)
|
||||
ter_temp_from.offset(12 * (univ.scenario.ter_types[what_ter].picture % 20),
|
||||
12 * (univ.scenario.ter_types[what_ter].picture / 20));
|
||||
else ter_temp_from.offset(12 * 20,
|
||||
12 * (univ.scenario.ter_types[what_ter].picture - 960));
|
||||
rect_draw_some_item(small_ter_gworld,ter_temp_from,map_gworld,draw_rect);
|
||||
break;
|
||||
|
||||
default:
|
||||
if(((pic >= 960) ? anim_map_pats[pic - 960] : map_pats[pic]) < 30) {
|
||||
tileImage(map_gworld, draw_rect,map_pat[((pic >= 960) ? anim_map_pats[pic - 960] : map_pats[pic]) - 1]);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
if(univ.scenario.ter_types[what_ter].picture < 960)
|
||||
ter_temp_from.offset(12 * (univ.scenario.ter_types[what_ter].picture % 20),
|
||||
12 * (univ.scenario.ter_types[what_ter].picture / 20));
|
||||
else ter_temp_from.offset(12 * 20,
|
||||
12 * (univ.scenario.ter_types[what_ter].picture - 960));
|
||||
rect_draw_some_item(small_ter_gworld,ter_temp_from,map_gworld,draw_rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -80,7 +80,6 @@ sf::Texture missiles_gworld;
|
||||
sf::Texture status_gworld;
|
||||
sf::Texture pc_gworld;
|
||||
const sf::Color hilite_colour = {0xff, 0x00, 0x80, 0x40};
|
||||
extern tessel_ref_t map_pat[];
|
||||
|
||||
// begin new stuff
|
||||
rectangle blue_button_from = {120,235,134,251};
|
||||
@@ -98,31 +97,6 @@ rectangle terrain_rect = {0,0,340,272};
|
||||
std::string current_string[2];
|
||||
extern rectangle terrain_rects[256];
|
||||
|
||||
short map_pats[220] = {50,50,1,1,1,6,6,6,6,6,
|
||||
6,6,6,6,6,6,6,6,2,2,
|
||||
2,2,2,2,2,2,2,2,2,2,
|
||||
2,2,4,4,4,4,4,4,4,4,
|
||||
4,4,4,4,4,4,3,3,3,3,
|
||||
3,3,3,3,3,3,3,3,3,0, // 50
|
||||
0,0,0,0,0,0,0,23,23,23,
|
||||
15,15,50,50,0,0,0,0,0,7,
|
||||
7,8,8,14,14,9,9,9,5,5,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
18,18,0,0,0,0,0,0,0,0, // 100
|
||||
22,22,0,0,0,0,0,0,0,0,
|
||||
0,0,0,10,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,11,0,0, // 150
|
||||
0,0,0,12,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0, // 200
|
||||
0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
|
||||
unsigned char small_what_drawn[64][64];
|
||||
extern bool small_any_drawn;
|
||||
|
||||
@@ -1225,46 +1199,23 @@ void draw_one_tiny_terrain_spot (short i,short j,ter_num_t terrain_to_draw,short
|
||||
from_rect = calc_rect(picture_wanted % 10, picture_wanted / 10);
|
||||
}
|
||||
rect_draw_some_item(*source_gworld, from_rect, ter_draw_gworld, dest_rect);
|
||||
} else switch(picture_wanted) {
|
||||
|
||||
case 0: case 1: case 73: case 72:
|
||||
tileImage(ter_draw_gworld, dest_rect,map_pat[0]);
|
||||
break;
|
||||
case 2: case 3: case 4:
|
||||
tileImage(ter_draw_gworld, dest_rect,map_pat[1]);
|
||||
break;
|
||||
|
||||
default:
|
||||
if((picture_wanted < 170) && (map_pats[picture_wanted] > 0)) {
|
||||
tileImage(ter_draw_gworld, dest_rect,map_pat[map_pats[picture_wanted]]);
|
||||
}
|
||||
else if(picture_wanted >= 1000) {
|
||||
sf::Texture* from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(picture_wanted % 1000);
|
||||
from_rect.right = from_rect.left + 12;
|
||||
from_rect.bottom = from_rect.top + 12;
|
||||
picture_wanted /= 1000; picture_wanted--;
|
||||
from_rect.offset((picture_wanted / 3) * 12, (picture_wanted % 3) * 12);
|
||||
rect_draw_some_item(*from_gw, from_rect, ter_draw_gworld, dest_rect);
|
||||
}
|
||||
else if(picture_wanted >= 960) {
|
||||
picture_wanted -= 960;
|
||||
if(picture_wanted == 0) tileImage(ter_draw_gworld, dest_rect,map_pat[13]);
|
||||
else if(picture_wanted == 4) tileImage(ter_draw_gworld, dest_rect,map_pat[21]);
|
||||
else if(picture_wanted == 7) tileImage(ter_draw_gworld, dest_rect,map_pat[20]);
|
||||
else if(picture_wanted == 8) tileImage(ter_draw_gworld, dest_rect,map_pat[19]);
|
||||
else if(picture_wanted == 9) tileImage(ter_draw_gworld, dest_rect,map_pat[20]);
|
||||
else if(picture_wanted == 10) tileImage(ter_draw_gworld, dest_rect,map_pat[19]);
|
||||
else {
|
||||
from_rect.offset(12 * 20, (picture_wanted - 960) * 12);
|
||||
rect_draw_some_item(small_ter_gworld, from_rect, ter_draw_gworld, dest_rect);
|
||||
}
|
||||
}
|
||||
else {
|
||||
from_rect.offset((picture_wanted % 20) * 12,(picture_wanted / 20) * 12);
|
||||
rect_draw_some_item(small_ter_gworld, from_rect, ter_draw_gworld, dest_rect);
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
if(picture_wanted >= 1000) {
|
||||
sf::Texture* from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(picture_wanted % 1000);
|
||||
from_rect.right = from_rect.left + 12;
|
||||
from_rect.bottom = from_rect.top + 12;
|
||||
picture_wanted /= 1000; picture_wanted--;
|
||||
from_rect.offset((picture_wanted / 3) * 12, (picture_wanted % 3) * 12);
|
||||
rect_draw_some_item(*from_gw, from_rect, ter_draw_gworld, dest_rect);
|
||||
} else if(picture_wanted >= 960) {
|
||||
picture_wanted -= 960;
|
||||
from_rect.offset(12 * 20, (picture_wanted - 960) * 12);
|
||||
rect_draw_some_item(small_ter_gworld, from_rect, ter_draw_gworld, dest_rect);
|
||||
} else {
|
||||
from_rect.offset((picture_wanted % 20) * 12,(picture_wanted / 20) * 12);
|
||||
rect_draw_some_item(small_ter_gworld, from_rect, ter_draw_gworld, dest_rect);
|
||||
}
|
||||
}
|
||||
if(mouse_spot.x >= 0 && mouse_spot.y >= 0) {
|
||||
location where_draw(i,j);
|
||||
|
@@ -127,7 +127,7 @@ short choose_background(short cur_choice, cDialog* parent) {
|
||||
to = {0x00, 0x00, 0x80};
|
||||
else if(which == 11)
|
||||
to = {0xC0, 0x40, 0xFF};
|
||||
else if(which <= 5 || which == 7 || which == 9 || which == 15)
|
||||
else if(which <= 5 || which == 9 || which == 15)
|
||||
to = sf::Color::White;
|
||||
bg_dlg["title"].setColour(to);
|
||||
for(int i = 0; i < 21; i++)
|
||||
|
@@ -31,12 +31,9 @@
|
||||
using boost::math::constants::pi;
|
||||
|
||||
rectangle bg_rects[21];
|
||||
rectangle map_pat_rects[30];
|
||||
rectangle bw_rects[6];
|
||||
tessel_ref_t bg[21];
|
||||
tessel_ref_t map_pat[30];
|
||||
tessel_ref_t bw_pats[6];
|
||||
sf::Texture bg_gworld;
|
||||
sf::Texture bg_gworld, bw_gworld;
|
||||
bool use_win_graphics = false;
|
||||
sf::Shader maskShader;
|
||||
extern fs::path progDir;
|
||||
@@ -109,41 +106,17 @@ void init_graph_tool(){
|
||||
}
|
||||
rectangle tmp_rect = bg_rects[19];
|
||||
tmp_rect.offset(0, 64);
|
||||
bg_rects[0] = bg_rects[1] = bg_rects[18] = map_pat_rects[7] = tmp_rect;
|
||||
bg_rects[0] = bg_rects[1] = bg_rects[18] = bg_rects[7] = tmp_rect;
|
||||
bg_rects[0].right -= 32;
|
||||
bg_rects[0].bottom -= 32;
|
||||
bg_rects[1].left += 32;
|
||||
bg_rects[1].bottom -= 32;
|
||||
bg_rects[18].right -= 32;
|
||||
bg_rects[18].top += 32;
|
||||
map_pat_rects[7].left += 32;
|
||||
map_pat_rects[7].top += 32;
|
||||
tmp_rect.offset(0, 64);
|
||||
map_pat_rects[8] = map_pat_rects[23] = map_pat_rects[26] = tmp_rect;
|
||||
map_pat_rects[8].right -= 32;
|
||||
map_pat_rects[8].bottom -= 32;
|
||||
map_pat_rects[23].left += 32;
|
||||
map_pat_rects[23].right -= 16;
|
||||
map_pat_rects[23].bottom -= 32;
|
||||
map_pat_rects[26].left += 32 + 16;
|
||||
map_pat_rects[26].bottom -= 32;
|
||||
tmp_rect.offset(0, 64);
|
||||
bg_rects[7] = tmp_rect;
|
||||
bg_rects[7].bottom = bg_rects[7].top + 16;
|
||||
tmp_rect.offset(0, -32);
|
||||
tmp_rect.right = tmp_rect.left + 8;
|
||||
tmp_rect.bottom = tmp_rect.top + 8;
|
||||
for(i = 0; i < 26; i++){
|
||||
map_pat_rects[map_i[i]] = tmp_rect;
|
||||
map_pat_rects[map_i[i]].offset(8 * (i % 8),8 * (i / 8));
|
||||
// Note: 8 * (i / 8) != i, despite appearances, due to integer rounding
|
||||
}
|
||||
tmp_rect = map_pat_rects[29];
|
||||
for(i = 0; i < 6; i++) {
|
||||
tmp_rect.offset(8, 0);
|
||||
bw_rects[i] = tmp_rect;
|
||||
}
|
||||
bg_rects[7].left += 32;
|
||||
bg_rects[7].top += 32;
|
||||
bg_gworld.loadFromImage(*ResMgr::get<ImageRsrc>("pixpats"));
|
||||
bw_gworld.loadFromImage(*ResMgr::get<ImageRsrc>("bwpats"));
|
||||
register_main_patterns();
|
||||
}
|
||||
|
||||
@@ -1036,14 +1009,13 @@ void flushTessels(sf::Texture& alteredImg) {
|
||||
}
|
||||
|
||||
static void register_main_patterns() {
|
||||
for(int i = 0; i < 30; i++) {
|
||||
if(i < 21) {
|
||||
if(i < 6) {
|
||||
bw_pats[i] = prepareForTiling(bg_gworld, bw_rects[i]);
|
||||
}
|
||||
bg[i] = prepareForTiling(bg_gworld, bg_rects[i]);
|
||||
rectangle bw_rect = {0,0,8,8};
|
||||
for(int i = 0; i < 21; i++) {
|
||||
if(i < 6) {
|
||||
bw_pats[i] = prepareForTiling(bw_gworld, bw_rect);
|
||||
bw_rect.offset(8,0);
|
||||
}
|
||||
map_pat[i] = prepareForTiling(bg_gworld, map_pat_rects[i]);
|
||||
bg[i] = prepareForTiling(bg_gworld, bg_rects[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user