Выкладываю здесь чтобы не потялялось
Модератор: t800
#if defined(__FreeBSD__) || defined (__MINGW32__) || defined (__MINGW64__)
size_t reslen = iconv(cd, &inbuf, &inbytesleft, &outbuf1, &outbytesleft);
#else
size_t reslen = iconv(cd, const_cast<char**>(&inbuf), &inbytesleft, &outbuf1, &outbytesleft);
#endif
#if defined(__FreeBSD__) || defined (__MINGW32__) || defined (__MINGW64__)
// size_t reslen = iconv(cd, &inbuf, &inbytesleft, &outbuf1, &outbytesleft);
//#else
size_t reslen = iconv(cd, const_cast<char**>(&inbuf), &inbytesleft, &outbuf1, &outbytesleft);
#endif
TARGET := fheroes2
MAKE := make
all:
$(MAKE) -C src WITH_AI=simple WITHOUT_AUDIOCD=1 WITHOUT_NETWORK=1 WITHOUT_EDITOR=1 WITH_ICONS=1
@cp src/dist/$(TARGET) .
clean:
$(MAKE) -C src clean
description = _("The %{building} produces %{monster}.");
StringReplace(description, "%{building}", Castle::GetStringBuilding(building, castle.GetRace()));
StringReplace(description, "%{monster}", StringLower(Monster(castle.GetRace(), building).GetMultiName()));
description = _("The %{building} produces %{monster}.");
StringReplace(description, "%{building}", Castle::GetStringBuilding(building, castle.GetRace()));
// StringReplace(description, "%{monster}", StringLower(Monster(castle.GetRace(), building).GetMultiName()));
StringReplace(description, "%{monster}", Monster(castle.GetRace(), building).GetMultiName());
cd /mingw/home/fheroes2/
ls
make
Примечание: Если в первый раз после разархивирования исходников из архива make ругнется по поводу gc++ 4.6 и что-то такое надо дать команду
- Код: Выделить всё
make clean
И после этого опять запустить
- Код: Выделить всё
make
И все должно собраться
void Battle::Interface::RedrawActionLightningBoltSpell(Unit & target)
{
// FIX: LightningBolt draw
RedrawTroopWithFrameAnimation(target, ICN::SPARKS, M82::FromSpell(Spell::LIGHTNINGBOLT), true);
}
void Battle::Interface::RedrawActionChainLightningSpell(const TargetsInfo & targets)
{
// FIX: ChainLightning draw
//AGG::PlaySound(targets.size() > 1 ? M82::CHAINLTE : M82::LIGHTBLT);
for(TargetsInfo::const_iterator
it = targets.begin(); it != targets.end(); ++it)
RedrawTroopWithFrameAnimation(*(it->defender), ICN::SPARKS, M82::FromSpell(Spell::LIGHTNINGBOLT), true);
}
void Battle::Interface::RedrawActionColdRaySpell(Unit & target)
{
Display & display = Display::Get();
Cursor & cursor = Cursor::Get();
LocalEvent & le = LocalEvent::Get();
const int icn = ICN::COLDRAY;
u32 frame = 0;
Point pt_from, pt_to;
const HeroBase* current_commander = arena.GetCurrentCommander();
if(current_commander == opponent1->GetHero())
{
const Rect & pos1 = opponent1->GetArea();
pt_from = Point(pos1.x + pos1.w, pos1.y + pos1.h / 2);
const Rect & pos2 = target.GetRectPosition();
pt_to = Point(pos2.x, pos2.y);
}
else
{
const Rect & pos = opponent2->GetArea();
pt_from = Point(pos.x, pos.y + pos.h / 2);
const Rect & pos2 = target.GetRectPosition();
pt_to = Point(pos2.x + pos2.w, pos2.y);
}
const u32 dx = std::abs(pt_from.x - pt_to.x);
const u32 dy = std::abs(pt_from.y - pt_to.y);
const u32 step = (dx > dy ? dx / AGG::GetICNCount(icn) : dy / AGG::GetICNCount(icn));
const Points points = GetLinePoints(pt_from, pt_to, step);
Points::const_iterator pnt = points.begin();
cursor.SetThemes(Cursor::WAR_NONE);
AGG::PlaySound(M82::COLDRAY);
while(le.HandleEvents() && frame < AGG::GetICNCount(icn) && pnt != points.end())
{
CheckGlobalEvents(le);
if(Battle::AnimateInfrequentDelay(Game::BATTLE_SPELL_DELAY))
{
cursor.Hide();
const Sprite & sprite = AGG::GetICN(icn, frame);
sprite.Blit((*pnt).x - sprite.w() / 2, (*pnt).y - sprite.h() / 2);
cursor.Show();
display.Flip();
++frame;
++pnt;
}
}
RedrawTroopWithFrameAnimation(target, ICN::ICECLOUD, M82::UNKNOWN, true);
}
Вернуться в Герои Меча и Магии
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1