Helbreath In 800x600
ok i done simple 800*600 mode (only client side) and i got about 30-40 fps (80-100 in 640/480). Any1 fixed that? I know how to fix that but i dont have best results (no mouse cursor, many crashes).
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
Jaap changed hb to 800*600 and then to 1024*768 long ago for testing purpose, far before HB2.tester wrote: Just 800x600 has been done a long time ago, in the early hb2 days.
Good job Daniel I would say
(Btw this is no advertising,I hope, since its not up)
Prove
Cheers Tester
Anyways, HB2 will never ever have more than 40 - 45 peoples online, even with all the good features they added. HB gameplay is not the same any longer, peoples won't play it and it's gonna fall down again...
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
On the area offside 640x480, no.tester wrote: Are fishes, minerals etc working?
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
I just said he did it before. Nothing more nothing lessdiuuude wrote:Jaap changed hb to 800*600 and then to 1024*768 long ago for testing purpose, far before HB2.tester wrote: Just 800x600 has been done a long time ago, in the early hb2 days.
Good job Daniel I would say
(Btw this is no advertising,I hope, since its not up)
Prove
Cheers Tester
Anyways, HB2 will never ever have more than 40 - 45 peoples online, even with all the good features they added. HB gameplay is not the same any longer, peoples won't play it and it's gonna fall down again...

And HB2 is still getting more new things.
And euhm Aryes, any ideas about hbunited being up

Cant wait to play like the good old times altough it wont be the same anymore
Cheers Tester
I support a woman's right to choose<br><br>- In the Mouth?<br>- In the Ass ?<br>- In the Vagina?<br>- Between the Tits?
Hum... maybe i'm dumb but i really miss the point having 800*600 hb if objects are shown only in the original 640*480 screen...
HB is already laggy enough in 640*480, and i think it'll be unplayable with more than 50 pplz online with 800*600. Server load will be increased a lot
HB is already laggy enough in 640*480, and i think it'll be unplayable with more than 50 pplz online with 800*600. Server load will be increased a lot

<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
That' s what I'll try to fix: show monsters and objects on the whole screen. And yes, server load will be raised around 25%, but I'll take a look around it and the fps, there is always a way around.diuuude wrote: Hum... maybe i'm dumb but i really miss the point having 800*600 hb if objects are shown only in the original 640*480 screen...
HB is already laggy enough in 640*480, and i think it'll be unplayable with more than 50 pplz online with 800*600. Server load will be increased a lot![]()
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
Thank you for asking, but no estimated time, I'm working alone on the files when I have free time, but check our forumtester wrote: Aryes, any ideas about hbunited being up
Cant wait to play like the good old times altough it wont be the same anymore

====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
The point is the objects can be fixed, but might require some work.diuuude wrote: Hum... maybe i'm dumb but i really miss the point having 800*600 hb if objects are shown only in the original 640*480 screen...
HB is already laggy enough in 640*480, and i think it'll be unplayable with more than 50 pplz online with 800*600. Server load will be increased a lot![]()
And about the lag, I also think it might be a good idea to reduce lag in all the ways possible, if you know more good ways please share

I support a woman's right to choose<br><br>- In the Mouth?<br>- In the Ass ?<br>- In the Vagina?<br>- Between the Tits?
With a powerful machine you can host around 200 players with a bit of lag (we've did it once with hb underground), so if we get around 25% extra load, we can afford the number of players that servers usually have (50+) with no problem. I don't think that server load would be much of a problem nowadays... Unless we go back to old times when servers usually had 200+ players.
About the client fps, if we remove all the crappy checks and work with pointers like drajwer already said, we can raise the fps counter a bit. At the moment, i get around 50~60 fps at 800x600.
About the client fps, if we remove all the crappy checks and work with pointers like drajwer already said, we can raise the fps counter a bit. At the moment, i get around 50~60 fps at 800x600.
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
In mine, monster outside the 640x480 screen only appear while moving. When they stop they just disappear... :SAryes wrote: The monsters all over the screen is the only problem i have now, I'll look into it tomorrow, everything else is working fine and running smooth.
I've tried changing alot of variables which could fix this but it never fixes it!
Here is what I did while debugging:
Player A and B are on the same screen.
Player B moves 1 tile anywhere on the screen as long as it stays in the 640x480 screen.
Player A recieves a MSGID_EVENT_MOTION from the HG telling the ObjectID ( since it's a player, the ObjectID is increased by 30000, thus being 30001).
Player B moves 1 tile away from the 640x480 screen ( making him disappear ).
Player A recieves a MSGID_EVENT_MOTION from the HG but this time, the ObjectID is 1 instead of 30001 ( therefore, making the client not set the character location to outside the screen ).
So... this is a bug from the HG. It doesn't not add 30000 when you're moving out of the screen ( quite weird ).
But indeed, this is not only what we have to fix to make it show monsters outside the 640x480.
We also have to set these to correct values:
Code: Select all
int _tmp_iMoveLocX[9][41] = {
// 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},
// 1 NORTH
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18,19,
20,21,22,-1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0},
//2
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18,19,
20,21,22,22,22,22,22,22,22,22,
22,22,22,22,22,22,22,22,-1},
//3 EAST
{22,22,22,22,22,22,22,22,22,22,
22,22,22,22,22,22,22,22,-1,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0},
//4
{22,22,22,22,22,22,22,22,22,22,
22,22,22,22,22,22,22,22,21,20,19,18,
17,16,15,14,13,12,11,10,9,8,
7,6,5,4,3,2,1,0,-1},
//5 SOUTh
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18,19,
20,-1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
//6
{0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,2,3,4,
5,6,7,8,9,10,11,12,13,14,
15,16,17,18,19,20,-1},
//7 WEST
{0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,-1,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
//8
{0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,2,3,4,
5,6,7,8,9,10,11,12,13,14,
15,16,17,18,19,20,-1}
};
int _tmp_iMoveLocY[9][41] = {
// 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},
//1 NORTH
{0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,-1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0},
//2
{0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,-1},
//3 EAST
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,-1,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0},
//4
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,17,17,17,17,
17,17,17,17,17,17,17,17,17,17,
17,17,17,17,17,17,-1},
//5 SOUTH
{15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,
15,-1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
//6
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,-1},
//7 WEST
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,-1,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
// 8
{15,14,13,12,11,10,9,8,7,6,
5,4,3,2,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,-1}
};

And there's still ALOT more to fix. Be sure to fix all this shit though. I'm working on it atm.
<img src='http://ic1.deviantart.com/fs11/i/2006/1 ... leroth.gif' border='0' alt='user posted image' />
Here's most of what I did ( still bugged, but may be usefull ):
A > in the beginning of a line means replacing the same code by the next code.
A > in the beginning of a line means replacing the same code by the next code.
Code: Select all
/********************************************************************
created: 2006/04/26 18:10
filename: D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp
author: Cleroth
purpose: Change the game resolution from 640x480 to 800x600. A good coder can basicly skip
most of this snippet by not replacing the values he/she sees it's not right to change it.
*********************************************************************/
Replace all 640 by 800 in DXC_ddraw.cpp, Game.cpp, Sprite.cpp and Wmain.cpp
////////////////////////////////////////////////////////////////////////////
Replace all 480 by 600 in DXC_ddraw.cpp, Game.cpp, Sprite.cpp and Wmain.cpp EXCEPT this:
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(18189): EnableDialogBox(21, 0, 480, 0);
////////////////////////////////////////////////////////////////////////////
Replace all 320 by 400 in DXC_ddraw.cpp, Game.cpp and Wmain.cpp EXCEPT these:
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(136): char _cURLName[320];
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(173): memset(&_cURLName,0,320);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(3460): MakeTileSpr( "maptiles4", 320, 10, TRUE);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(17205): if ((msX >= sX + 240) && (msX <= sX + 260) && (msY >= sY + 40) && (msY <= sY + 320)) {
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(17221): if ((msX >= sX + 240) && (msX <= sX + 260) && (msY >= sY + 40) && (msY <= sY + 320)) {
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(17237): if ((msX >= sX + 240) && (msX <= sX + 260) && (msY >= sY + 40) && (msY <= sY + 320)) {
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(17273): if ((msX >= sX + 240) && (msX <= sX + 260) && (msY >= sY + 40) && (msY <= sY + 320)) {
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(19961): if ((msX >= sX + 240) && (msX <= sX + 260) && (msY >= sY + 40) && (msY <= sY + 320)) {
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(20193): if ((msX >= sX + 240) && (msX <= sX + 260) && (msY >= sY + 40) && (msY <= sY + 320)) {
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(21245): else if( iLoc > 320 ) iLoc = 10;
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(28434): PutAlignedString(98, 357, 320 +15, UPDATE_SCREEN_ON_SELECT_CHARACTER3);//"¿£ÅÍ۸¦ ´©¸£°Å³ª Ä¿¼·Î Ŭ¸¯Çصµ"
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(28448): PutAlignedString(98, 357, 320 +15, UPDATE_SCREEN_ON_SELECT_CHARACTER9);//"30·¹º§ ÀÌ»óÀÇ Ä³¸¯Å͸¦ Áö¿ï·Á¸é ¿î¿µÀÚ¿¡°Ô"
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(28484): PutAlignedString(98, 357, 320 +15, UPDATE_SCREEN_ON_SELECT_CHARACTER17);//"»ó´ÜÀÇ New Character ¹öưÀ» ´·¯ »õ·Î¿î"
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(28491): PutAlignedString(98, 357, 320 +15, UPDATE_SCREEN_ON_SELECT_CHARACTER22);//"ij¸¯Å͸¦ »èÁ¦ÇϰíÀÚ ÇÑ´Ù¸é ij¸¯Å͸¦"
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(28498): PutAlignedString(98, 357, 320 +15, UPDATE_SCREEN_ON_SELECT_CHARACTER27);//"Delete Character¹öưÀ» ´·¯ ¼±ÅõÈ"
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(31904): pMI->AddRect(197, 320, 197 + DEF_BTNSZX, 320 + DEF_BTNSZY);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(31905): pMI->AddRect(370, 320, 370 + DEF_BTNSZX, 320 + DEF_BTNSZY);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(32108): m_pSprite[DEF_SPRID_INTERFACE_ND_BUTTON]->PutSpriteFast(197, 320, 21, dwTime);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(32109): else m_pSprite[DEF_SPRID_INTERFACE_ND_BUTTON]->PutSpriteFast(197, 320, 20, dwTime);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(32112): m_pSprite[DEF_SPRID_INTERFACE_ND_BUTTON]->PutSpriteFast(370, 320, 17, dwTime);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(32113): else m_pSprite[DEF_SPRID_INTERFACE_ND_BUTTON]->PutSpriteFast(370, 320, 16, dwTime);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(32171): if ((msX >= 197) && (msX <= 197 + DEF_BTNSZX) && (msY >= 320) && (msY <= 320 + DEF_BTNSZY)) m_cCurFocus = 5;
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(32172): if ((msX >= 370) && (msX <= 370 + DEF_BTNSZX) && (msY >= 320) && (msY <= 320 + DEF_BTNSZY)) m_cCurFocus = 6;
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(36144): if ((msX >= sX + 230) && (msX <= sX + 260) && (msY >= sY + 40) && (msY <= sY + 320)) {
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(39861): if ((msX >= sX + 240) && (msX <= sX + 260) && (msY >= sY + 30) && (msY <= sY + 320)) {
////////////////////////////////////////////////////////////////////////////
Replace all 240 by 300 in DXC_ddraw.cpp and Wmain.cpp.
In Game.cpp ONLY replace these:
m_DInput.m_sY = 240;
sAbsY = abs(240 - (sY - m_sViewPointY)); ( several times )
m_pSprite[DEF_SPRID_MOUSECURSOR]->PutSpriteFast(G_point.x - (cx-400), G_point.y - (cy-240), m_stMCursor.sCursorFrame, dwTime);
////////////////////////////////////////////////////////////////////////////
Replace all 639 by 799 in DXC_ddraw.cpp, DXC_dinput.cpp and Game.cpp
////////////////////////////////////////////////////////////////////////////
Replace all 479 by 599 in DXC_ddraw.cpp, DXC_dinput.cpp and Game.cpp EXCEPT:
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(3481): MakeTileSpr( "Tile479-488", 479, 10, TRUE); // Alastor
////////////////////////////////////////////////////////////////////////////
Replace all 427 by 547 in Game.cpp and Sprite.cpp EXCEPT:
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(26654): StartInputString(427, 84, 11, cName);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(26657): StartInputString(427, 106, 11, cPassword);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(26660): StartInputString(427, 129, 11, cConfirm);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(26686): PutString2(427, 84, cName, 100,200,100);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(26687): else PutString2(427, 84, cName, 200,100,100);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(26691): PutString(427, 106, cPassword, RGB(100,200,100), TRUE, 1);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(26692): else PutString(427, 106, cPassword, RGB(200,100,100), TRUE, 1);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(26697): PutString(427, 129, cConfirm, RGB(100,200,100), TRUE, 1);
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(26698): else PutString(427, 129, cConfirm, RGB(200,100,100), TRUE, 1);
////////////////////////////////////////////////////////////////////////////
Replace all 213 by 273 in Game.cpp.
////////////////////////////////////////////////////////////////////////////
Replace all 414 by 534 in Game.cpp EXCEPT:
D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp(22372): if((m_bAresden == FALSE) && (m_pCharList[m_cCurFocus-1]->m_sSex == 2)) iReqHeroItemID = 414;
////////////////////////////////////////////////////////////////////////////
To fix the IconPanel add 120 to all ( except some, up to you to find, just think a little;) ) values related to Y ( height ) in DrawDialogBox_IconPannel, DlgBoxClick_IconPannel and DrawDialogBox_GaugePannel.
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL]->PutTransSprite(368, 439, 3, m_dwCurTime);
wsprintf(G_cTxt, "%d", m_iSuperAttackLeft);
PutString_SprFont2(380, 454, G_cTxt, 220, 200, 200);
}
}
else {
if (m_iSuperAttackLeft > 0) {
wsprintf(G_cTxt, "%d", m_iSuperAttackLeft);
PutString_SprFont2(380, 454, G_cTxt, 10, 10, 10);
}
>
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL]->PutTransSprite(368, 559, 3, m_dwCurTime);
wsprintf(G_cTxt, "%d", m_iSuperAttackLeft);
PutString_SprFont2(380, 574, G_cTxt, 220, 200, 200);
}
}
else {
if (m_iSuperAttackLeft > 0) {
wsprintf(G_cTxt, "%d", m_iSuperAttackLeft);
PutString_SprFont2(380, 574, G_cTxt, 10, 10, 10);
}
/********************************************************************
created: 2006/04/26 20:50
filename: D:\Clerophy\Work\Helbreath\Snoopy\Client\Game.cpp
author: Cleroth
purpose: Fixing the viewport to center the character position.
*********************************************************************/
m_sViewDstX = (indexX*32) - 288 - 32;
m_sViewDstY = (indexY*32) - 224;
>
m_sViewDstX = (indexX*32) - 288 - 32-32-32;
m_sViewDstY = (indexY*32) - 224-32-32;
////////////////////////////////////////////////////////////////////////////
m_sViewDstX = m_sViewPointX = (sX+4+5)*32;
m_sViewDstY = m_sViewPointY = (sY+5+5)*32;
>
m_sViewDstX = m_sViewPointX = (sX+7)*32;
m_sViewDstY = m_sViewPointY = (sY+8)*32;
////////////////////////////////////////////////////////////////////////////
_ReadMapData(sX + 4 + 5, sY + 5 + 5, cp);
>
_ReadMapData(sX + 4 + 5 - 2, sY + 5 + 5 - 2, cp);
////////////////////////////////////////////////////////////////////////////
m_sViewDstX = m_sViewPointX = (m_sPlayerX-10)*32;
m_sViewDstY = m_sViewPointY = (m_sPlayerY-7)*32;
>2
m_sViewDstX = m_sViewPointX = (m_sPlayerX-12)*32;
m_sViewDstY = m_sViewPointY = (m_sPlayerY-9)*32;
////////////////////////////////////////////////////////////////////////////
sAbsX = abs(((m_sViewPointX / 32) + 10) - dX);
sAbsY = abs(((m_sViewPointY / 32) + 7) - dY);
>
sAbsX = abs(((m_sViewPointX / 32) + 12) - dX);
sAbsY = abs(((m_sViewPointY / 32) + 9) - dY);
////////////////////////////////////////////////////////////////////////////
sAbsX = abs(((m_sViewPointX / 32) + 10) - sX);
sAbsY = abs(((m_sViewPointY / 32) + 7) - sY);
>
sAbsX = abs(((m_sViewPointX / 32) + 12) - sX);
sAbsY = abs(((m_sViewPointY / 32) + 9) - sY);
////////////////////////////////////////////////////////////////////////////
sAbsX = abs(((m_sViewPointX / 32) + 10) - m_pEffectList[i]->m_dX);
sAbsY = abs(((m_sViewPointY / 32) + 7) - m_pEffectList[i]->m_dY);
>*
sAbsX = abs(((m_sViewPointX / 32) + 12) - m_pEffectList[i]->m_dX);
sAbsY = abs(((m_sViewPointY / 32) + 9) - m_pEffectList[i]->m_dY);
////////////////////////////////////////////////////////////////////////////
void CMapData::ShiftMapData(char cDir)
{
int ix, iy;
for (iy = 0; iy < MAPDATASIZEY; iy++)
for (ix = 0; ix < MAPDATASIZEX; ix++)
m_pTmpData[ix][iy].Clear();
switch (cDir) {
case 1:
for (iy = 0; iy < 15; iy++)
for (ix = 0; ix < 21; ix++)
memcpy(&m_pTmpData[4+5+ix][6+5+iy], &m_pData[4+5+ix][5+5+iy], sizeof(class CTile));
m_sPivotY--;
break;
case 2:
for (iy = 0; iy < 15; iy++)
for (ix = 0; ix < 20; ix++)
memcpy(&m_pTmpData[4+5+ix][6+5+iy], &m_pData[5+5+ix][5+5+iy], sizeof(class CTile));
m_sPivotX++;
m_sPivotY--;
break;
case 3:
for (iy = 0; iy < 16; iy++)
for (ix = 0; ix < 20; ix++)
memcpy(&m_pTmpData[4+5+ix][5+5+iy], &m_pData[5+5+ix][5+5+iy], sizeof(class CTile));
m_sPivotX++;
break;
case 4:
for (iy = 0; iy < 15; iy++)
for (ix = 0; ix < 20; ix++)
memcpy(&m_pTmpData[4+5+ix][5+5+iy], &m_pData[5+5+ix][6+5+iy], sizeof(class CTile));
m_sPivotX++;
m_sPivotY++;
break;
case 5:
for (iy = 0; iy < 15; iy++)
for (ix = 0; ix < 21; ix++)
memcpy(&m_pTmpData[4+5+ix][5+5+iy], &m_pData[4+5+ix][6+5+iy], sizeof(class CTile));
m_sPivotY++;
break;
case 6:
for (iy = 0; iy < 15; iy++)
for (ix = 0; ix < 20; ix++)
memcpy(&m_pTmpData[5+5+ix][5+5+iy], &m_pData[4+5+ix][6+5+iy], sizeof(class CTile));
m_sPivotX--;
m_sPivotY++;
break;
case 7:
for (iy = 0; iy < 16; iy++)
for (ix = 0; ix < 20; ix++)
memcpy(&m_pTmpData[5+5+ix][5+5+iy], &m_pData[4+5+ix][5+5+iy], sizeof(class CTile));
m_sPivotX--;
break;
case 8:
for (iy = 0; iy < 15; iy++)
for (ix = 0; ix < 20; ix++)
memcpy(&m_pTmpData[5+5+ix][6+5+iy], &m_pData[4+5+ix][5+5+iy], sizeof(class CTile));
m_sPivotX--;
m_sPivotY--;
break;
}
memcpy(&m_pData[0][0], &m_pTmpData[0][0], sizeof(m_pData));
}
>
void CMapData::ShiftMapData(char cDir)
{
int ix, iy;
for (iy = 0; iy < MAPDATASIZEY; iy++)
for (ix = 0; ix < MAPDATASIZEX; ix++)
m_pTmpData[ix][iy].Clear();
switch (cDir) {
case 1:
for (ix = 0; ix < 26; ix++)
for (iy = 0; iy < 19; iy++)
memcpy(&m_pTmpData[4+5-2+ix][6+5-2+iy], &m_pData[4+5-2+ix][5+5-2+iy], sizeof(class CTile));
m_sPivotY--;
break;
case 2:
for (ix = 0; ix < 25; ix++)
for (iy = 0; iy < 19; iy++)
memcpy(&m_pTmpData[4+5-2+ix][6+5-2+iy], &m_pData[5+5-2+ix][5+5-2+iy], sizeof(class CTile));
m_sPivotX++;
m_sPivotY--;
break;
case 3:
for (ix = 0; ix < 25; ix++)
for (iy = 0; iy < 20; iy++)
memcpy(&m_pTmpData[4+5-2+ix][5+5-2+iy], &m_pData[5+5-2+ix][5+5-2+iy], sizeof(class CTile));
m_sPivotX++;
break;
case 4:
for (ix = 0; ix < 25; ix++)
for (iy = 0; iy < 19; iy++)
memcpy(&m_pTmpData[4+5-2+ix][5+5-2+iy], &m_pData[5+5-2+ix][6+5-2+iy], sizeof(class CTile));
m_sPivotX++;
m_sPivotY++;
break;
case 5:
for (ix = 0; ix < 26; ix++)
for (iy = 0; iy < 19; iy++)
memcpy(&m_pTmpData[4+5-2+ix][5+5-2+iy], &m_pData[4+5-2+ix][6+5-2+iy], sizeof(class CTile));
m_sPivotY++;
break;
case 6:
for (ix = 0; ix < 25; ix++)
for (iy = 0; iy < 19; iy++)
memcpy(&m_pTmpData[5+5-2+ix][5+5-2+iy], &m_pData[4+5-2+ix][6+5-2+iy], sizeof(class CTile));
m_sPivotX--;
m_sPivotY++;
break;
case 7:
for (ix = 0; ix < 25; ix++)
for (iy = 0; iy < 20; iy++)
memcpy(&m_pTmpData[5+5-2+ix][5+5-2+iy], &m_pData[4+5-2+ix][5+5-2+iy], sizeof(class CTile));
m_sPivotX--;
break;
case 8:
for (ix = 0; ix < 25; ix++)
for (iy = 0; iy < 19; iy++)
memcpy(&m_pTmpData[5+5-2+ix][6+5-2+iy], &m_pData[4+5-2+ix][5+5-2+iy], sizeof(class CTile));
m_sPivotX--;
m_sPivotY--;
break;
}
memcpy(&m_pData[0][0], &m_pTmpData[0][0], sizeof(m_pData));
}
/********************************************************************
created: 2006/04/26 22:08
filename: D:\Clerophy\Work\Helbreath\Mob World\Server Source\Game.cpp
author: Cleroth
purpose: Fix the panning. ( HG )
*********************************************************************/
sp = (short *)cp;
*sp = (short)(dX - 10);
cp += 2;
sp = (short *)cp;
*sp = (short)(dY - 7);
cp += 2;
>2
sp = (short *)cp;
*sp = (short)(dX - 12);
cp += 2;
sp = (short *)cp;
*sp = (short)(dY - 9);
cp += 2;
////////////////////////////////////////////////////////////////////////////
for (iy = 0; iy < 16; iy++)
for (ix = 0; ix < 21; ix++) {
>
for (iy = 0; iy < 20; iy++)
for (ix = 0; ix < 25; ix++) {
////////////////////////////////////////////////////////////////////////////
int _tmp_iMoveLocX[9][37] = {
// 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},
// 1
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18,19,
20,-1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
//2
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18,19,
20,20,20,20,20,20,20,20,20,20,
20,20,20,20,20,20,-1},
//3
{20,20,20,20,20,20,20,20,20,20,
20,20,20,20,20,20,-1,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
//4
{20,20,20,20,20,20,20,20,20,20,
20,20,20,20,20,20,19,18,17,16,
15,14,13,12,11,10,9,8,7,6,
5,4,3,2,1,0,-1},
//5
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18,19,
20,-1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
//6
{0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,2,3,4,
5,6,7,8,9,10,11,12,13,14,
15,16,17,18,19,20,-1},
//7
{0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,-1,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
//8
{0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,2,3,4,
5,6,7,8,9,10,11,12,13,14,
15,16,17,18,19,20,-1}
};
int _tmp_iMoveLocY[9][37] = {
// 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},
//1
{0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,-1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
//2
{0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,-1},
//3
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,-1,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
//4
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,-1},
//5
{15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,
15,-1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
//6
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,-1},
//7
{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,-1,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0},
// 8
{15,14,13,12,11,10,9,8,7,6,
5,4,3,2,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,-1}
};
>
<img src='http://ic1.deviantart.com/fs11/i/2006/1 ... leroth.gif' border='0' alt='user posted image' />
O__________________o
great
great
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
I've messed a bit with _tmp_iMoveLocX and _tmp_iMoveLocY too, btw shouldn't it be [9][46] (25x19 ~ 800x600)?
I have the same problem as you, objects appear on the screen when you move, but stop appearing when you stop too...
Last night i was able to make it work when you walk to east side. But when you walk to other ways, it doesn't work. I should be in the right path i guess.
By the way, been hard to find you online at msn
I have the same problem as you, objects appear on the screen when you move, but stop appearing when you stop too...
Last night i was able to make it work when you walk to east side. But when you walk to other ways, it doesn't work. I should be in the right path i guess.
By the way, been hard to find you online at msn
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
Fixed the resolution, it is working now, you can walk to wherever you want and the objects are shown as always. The list of modifications is big, i'll try to make the list and post it tomorrow.

====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
"Pts Morto" this had Alkon Server
Pts Morto, in Alkon Server = "DOWN"
Pts Morto, in Alkon Server = "DOWN"
<img src='http://personales.ciudad.com.ar/KaoZureS/firma.jpg' border='0' alt='user posted image' />