Scrub Exile/Avernum/Nethergate graphics

- New space-filling forcecage (possibly not finalized)
- New appearance for pushable stone block
- New red slime monster graphic by ADoS
- Six new item graphics by ADoS
- New bookshelf terrain by ADoS
This commit is contained in:
2015-07-23 21:36:22 -04:00
parent f2f7455d5a
commit 5332270cd8
19 changed files with 53 additions and 51 deletions

View File

@@ -404,6 +404,8 @@ void cItem::append(legacy::item_record_type& old){
graphic_num += 850;
else if(graphic_num == 59) // duplicate mushroom graphic
graphic_num = 74;
else if(graphic_num == 17) // gauntlets moved to tinyobj
graphic_num = 133;
else if(graphic_num >= 45) // small graphics were moved up to make a bit more room for new large graphics
graphic_num += 10;
abil_data[0] = old.ability_strength;

View File

@@ -301,6 +301,7 @@ void cTerrain::append(legacy::terrain_type_type& old){
obj_size.y = 1;
break;
case 247:
picture = 210;
obj_num = 3;
obj_pos.x = 0;
obj_pos.y = 0;
@@ -308,6 +309,7 @@ void cTerrain::append(legacy::terrain_type_type& old){
obj_size.y = 2;
break;
case 248:
picture = 211;
obj_num = 3;
obj_pos.x = 1;
obj_pos.y = 0;
@@ -315,6 +317,7 @@ void cTerrain::append(legacy::terrain_type_type& old){
obj_size.y = 2;
break;
case 249:
picture = 212;
obj_num = 3;
obj_pos.x = 0;
obj_pos.y = 1;
@@ -322,6 +325,7 @@ void cTerrain::append(legacy::terrain_type_type& old){
obj_size.y = 2;
break;
case 250:
picture = 213;
obj_num = 3;
obj_pos.x = 1;
obj_pos.y = 1;
@@ -357,11 +361,26 @@ void cTerrain::append(legacy::terrain_type_type& old){
case 216:
case 218: case 219: case 220: case 221:
case 222: case 223: case 224: case 225:
picture = 215;
picture = 216;
break;
case 233:
picture = 137;
break;
case 213:
picture = 214;
break;
case 214:
picture = 215;
break;
case 246:
picture = 209;
break;
case 251:
picture = 207;
break;
case 252:
picture = 208;
break;
};
if(picture < 1000) map_pic = picture;
else map_pic = NO_PIC;

View File

@@ -509,12 +509,16 @@ std::shared_ptr<sf::Texture> cPict::getSheet(eSheetType type, size_t n) {
case NUM_SHEET_TYPES:
break;
case SHEET_TER:
if(n >= NUM_TER_SHEETS)
return nullptr;
sout << "ter" << n + 1;
break;
case SHEET_TER_ANIM:
sout << "teranim";
break;
case SHEET_MONST:
if(n >= NUM_MONST_SHEETS)
return nullptr;
sout << "monst" << n + 1;
break;
case SHEET_DLOG:
@@ -612,6 +616,7 @@ void cPict::draw(){
void cPict::drawPresetTer(short num, rectangle to_rect){
std::shared_ptr<sf::Texture> from_gw = getSheet(SHEET_TER, num / 50);
if(!from_gw) return;
num = num % 50;
rectangle from_rect = calc_rect(num % 10, num / 10);
if(to_rect.right - to_rect.left > 28)
@@ -648,6 +653,7 @@ static rectangle calcDefMonstRect(short i, short animFrame){
void cPict::drawPresetMonstSm(short num, rectangle to_rect){
short m_start_pic = m_pic_index[num].i;
std::shared_ptr<sf::Texture> from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
if(!from_gw) return;
m_start_pic = m_start_pic % 20;
rectangle from_rect = calcDefMonstRect(m_start_pic, animFrame);
to_rect.right = to_rect.left + 28;
@@ -663,12 +669,14 @@ void cPict::drawPresetMonstWide(short num, rectangle to_rect){
short m_start_pic = m_pic_index[num].i;
std::shared_ptr<sf::Texture> from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
if(!from_gw) return;
rectangle from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
small_monst_rect.offset(to_rect.left,to_rect.top + 7);
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);
m_start_pic = m_pic_index[num].i + 1;
from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
if(!from_gw) return;
from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
small_monst_rect.offset(14,0);
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);
@@ -682,12 +690,14 @@ void cPict::drawPresetMonstTall(short num, rectangle to_rect){
short m_start_pic = m_pic_index[num].i;
std::shared_ptr<sf::Texture> from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
if(!from_gw) return;
rectangle from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
small_monst_rect.offset(to_rect.left + 7,to_rect.top);
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);
m_start_pic = m_pic_index[num].i + 1;
from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
if(!from_gw) return;
from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
small_monst_rect.offset(0,18);
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);
@@ -701,24 +711,28 @@ void cPict::drawPresetMonstLg(short num, rectangle to_rect){
short m_start_pic = m_pic_index[num].i;
std::shared_ptr<sf::Texture> from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
if(!from_gw) return;
rectangle from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
small_monst_rect.offset(to_rect.left,to_rect.top);
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);
m_start_pic = m_pic_index[num].i + 1;
from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
if(!from_gw) return;
from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
small_monst_rect.offset(14,0);
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);
m_start_pic = m_pic_index[num].i + 2;
from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
if(!from_gw) return;
from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
small_monst_rect.offset(-14,18);
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);
m_start_pic = m_pic_index[num].i + 3;
from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
if(!from_gw) return;
from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
small_monst_rect.offset(14,0);
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);

View File

@@ -347,12 +347,12 @@ void run_startup_g() {
void load_graphics(){
int i;
for(i = 0; i < 11; i++){
for(i = 0; i < NUM_MONST_SHEETS; i++){
std::ostringstream sout;
sout << "monst" << i + 1;
monst_gworld[i].loadFromImage(*ResMgr::get<ImageRsrc>(sout.str()));
}
for(i = 0; i < 7; i++){
for(i = 0; i < NUM_TER_SHEETS; i++){
std::ostringstream sout;
sout << "ter" << i + 1;
terrain_gworld[i].loadFromImage(*ResMgr::get<ImageRsrc>(sout.str()));

View File

@@ -161,12 +161,12 @@ pic_num_t choose_graphic(short cur_choice,ePicType g_type,cDialog* parent) {
size_t total_pics = 0;
cPictChoice* pic_dlg = nullptr;
switch(g_type + PIC_PRESET) {
case PIC_TER: total_pics = 859; break;
case PIC_TER_ANIM: total_pics = 20; break;
case PIC_TER: total_pics = 246; break;
case PIC_TER_ANIM: total_pics = 16; break;
case PIC_DLOG: total_pics = 44; break;
case PIC_TALK: total_pics = 84; break;
case PIC_SCEN: total_pics = 30; break;
case PIC_ITEM: case PIC_TINY_ITEM: total_pics = 135; break;
case PIC_ITEM: case PIC_TINY_ITEM: total_pics = 134; break;
// TODO: Include small monster graphics in the PC pic picker
case PIC_PC: total_pics = 36; break;
case PIC_FIELD: all_pics = field_pics; break;

View File

@@ -733,15 +733,6 @@ extern const std::vector<m_pic_index_t> m_pic_index = {
{196, 1, 1},
{197, 1, 1},
{198, 1, 1},
{0, 1, 1},
{45, 1, 1},
{199, 1, 1},
{200, 1, 1},
{201, 1, 1},
{202, 1, 1},
{203, 1, 1},
//180
{204, 1, 1},
};
// TODO: Put these classes in a header?

View File

@@ -21,8 +21,8 @@
namespace fs = boost::filesystem;
#define LINES_IN_TEXT_WIN 11
#define NUM_TER_SHEETS 19
#define NUM_MONST_SHEETS 11
#define NUM_TER_SHEETS 5
#define NUM_MONST_SHEETS 10
struct m_pic_index_t {
unsigned char i, x, y;