mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
naprawa defHandlera (nie powinien już robić tych idiotycznych przesunięć)
naprawa PCX konwertera (powinien już zawsze dobrze działać)
This commit is contained in:
parent
d3c8ef7809
commit
b894cd8d10
BIN
CDefHandler.cpp
BIN
CDefHandler.cpp
Binary file not shown.
@ -39,7 +39,7 @@ void CPCXConv::fromFile(std::string path)
|
||||
void CPCXConv::saveBMP(std::string path)
|
||||
{
|
||||
std::ofstream os;
|
||||
os.open(path.c_str());
|
||||
os.open(path.c_str(), std::ios::binary);
|
||||
os.write((char*)bmp,bmps);
|
||||
os.close();
|
||||
}
|
||||
@ -76,7 +76,7 @@ void CPCXConv::convert()
|
||||
bh.y=maxy;
|
||||
add=(int)(4*(((float)1)-(((float)maxx/(float)4)-((int)((float)maxx/(float)4)))));
|
||||
if (add==4)
|
||||
add=2;
|
||||
add=0;
|
||||
if (format==Epcxformat::PCX8B)
|
||||
{
|
||||
bh._c1=0x436;
|
||||
|
18
CMT.cpp
18
CMT.cpp
@ -26,6 +26,7 @@
|
||||
#include "CMusicHandler.h"
|
||||
#include "CSemiLodHandler.h"
|
||||
#include "CLodHandler.h"
|
||||
#include "CDefHandler.h"
|
||||
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
|
||||
# include <fcntl.h>
|
||||
# include <io.h>
|
||||
@ -269,11 +270,20 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
//CLodHandler * clod = new CLodHandler;
|
||||
//clod->loadLod("h3abp_bm.lod");
|
||||
|
||||
CLodHandler * test = new CLodHandler;
|
||||
test->init(std::string("h3abp_bm.lod"));
|
||||
//CLodHandler * test = new CLodHandler;
|
||||
//test->init(std::string("h3abp_bm.lod"));
|
||||
|
||||
CLodHandler * bitmapLod = new CLodHandler;
|
||||
test->init(std::string("newH3sprite.lod"));
|
||||
CDefHandler * tdef = new CDefHandler;
|
||||
tdef->openDef(std::string("H3sprite.lod\\IOKAY.DEF"));
|
||||
tdef->getSprite(0);
|
||||
|
||||
//CLodHandler * bitmapLod = new CLodHandler;
|
||||
//bitmapLod->init(std::string("newH3bitmap.lod"));
|
||||
|
||||
CPCXConv * tconv = new CPCXConv;
|
||||
tconv->fromFile(std::string("newh3bitmap\\ADOPBPNL.PCX"));
|
||||
tconv->convert();
|
||||
tconv->saveBMP(std::string("tesciczekConva.bmp"));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////// lod testing end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user