Fix several more warnings
- As a side-effect, weapons with key skills other than the conventional three (edged, bashing, pole) are now fully supported (though the scenario editor UI doesn't yet support them)
This commit is contained in:
@@ -330,7 +330,6 @@ void win_draw_string(sf::RenderTarget& dest_window,rectangle dest_rect,std::stri
|
||||
if(mode == eTextMode::WRAP) {
|
||||
moveTo = location(dest_rect.left + 1 + adjust_x, dest_rect.top + 1 + adjust_y + 9);
|
||||
for(i = 0; text_len(i) != text_len(i + 1) && i < str_len;i++) {
|
||||
int iLen = text_len(i), lineLen = text_len(last_line_break);
|
||||
if(((text_len(i) - text_len(last_line_break) > (dest_rect.width() - 6))
|
||||
&& (last_word_break >= last_line_break)) || (str[i] == '|')) {
|
||||
if(str[i] == '|') {
|
||||
|
@@ -41,58 +41,6 @@ void port_town(legacy::town_record_type* dummy_town_ptr){
|
||||
|
||||
}
|
||||
|
||||
static void port_dummy_t_d(short size,char *buffer) {
|
||||
short i;
|
||||
legacy::big_tr_type *d1;
|
||||
legacy::ave_tr_type *d2;
|
||||
legacy::tiny_tr_type *d3;
|
||||
|
||||
if(cur_scen_is_mac != mac_is_intel)
|
||||
return;
|
||||
|
||||
switch(size) {
|
||||
case 0:
|
||||
d1 = (legacy::big_tr_type *) buffer;
|
||||
for(i =0 ; i < 16; i++)
|
||||
flip_rect(&d1->room_rect[i]);
|
||||
for(i =0 ; i < 60; i++) {
|
||||
flip_short(&d1->creatures[i].spec1);
|
||||
flip_short(&d1->creatures[i].spec2);
|
||||
flip_short(&d1->creatures[i].monster_time);
|
||||
flip_short(&d1->creatures[i].personality);
|
||||
flip_short(&d1->creatures[i].special_on_kill);
|
||||
flip_short(&d1->creatures[i].facial_pic);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
d2 = (legacy::ave_tr_type *) buffer;
|
||||
for(i =0 ; i < 16; i++)
|
||||
flip_rect(&d2->room_rect[i]);
|
||||
for(i =0 ; i < 40; i++) {
|
||||
flip_short(&d2->creatures[i].spec1);
|
||||
flip_short(&d2->creatures[i].spec2);
|
||||
flip_short(&d2->creatures[i].monster_time);
|
||||
flip_short(&d2->creatures[i].personality);
|
||||
flip_short(&d2->creatures[i].special_on_kill);
|
||||
flip_short(&d2->creatures[i].facial_pic);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
d3 = (legacy::tiny_tr_type *) buffer;
|
||||
for(i =0 ; i < 16; i++)
|
||||
flip_rect(&d3->room_rect[i]);
|
||||
for(i =0 ; i < 30; i++) {
|
||||
flip_short(&d3->creatures[i].spec1);
|
||||
flip_short(&d3->creatures[i].spec2);
|
||||
flip_short(&d3->creatures[i].monster_time);
|
||||
flip_short(&d3->creatures[i].personality);
|
||||
flip_short(&d3->creatures[i].special_on_kill);
|
||||
flip_short(&d3->creatures[i].facial_pic);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void port_talk_nodes(legacy::talking_record_type* dummy_talk_ptr) {
|
||||
short i;
|
||||
|
||||
|
@@ -82,11 +82,11 @@ SpecialParser::SpecialParser() {
|
||||
|
||||
#undef _
|
||||
|
||||
auto SpecialParser::on_error(const Rule::scanner_t& scan, spirit::parser_error<eParseError, Iter> error) -> ErrStatus {
|
||||
auto SpecialParser::on_error(const Rule::scanner_t&, spirit::parser_error<eParseError, Iter>) -> ErrStatus {
|
||||
return ErrStatus(ErrStatus::fail);
|
||||
}
|
||||
|
||||
void init_specials_parse() {
|
||||
static void init_specials_parse() {
|
||||
opcode.add((*eSpecType::NONE).opcode().c_str(), eSpecType::NONE);
|
||||
// Fill in all the opcodes and check for missing types.
|
||||
// There's really no need to check all the way to the max of the underlying type.
|
||||
|
Reference in New Issue
Block a user