Re: graphics options

#3
Hola quería saber si me podrías echar una manito con esto,

Pude hacer que anduviera el code pero porque fui remplazando de distintos src partes que logre hacer andar, bien el tema ahora es que solo pude hacer andar uno y los demás me están haciendo crashear el cliente por el echo de que no están o no se como hacerlo a lo del sprite remplazo

Así es como esta el code que encontré en un src:
iNext += 1;
if ((msX >= sX + 20) && (msX <= sX + 220) && (msY >= sY + iNext * 17 + 45) && (msY <= sY + iNext * 17 + 59))
{
PutString2(sX + 25, sY + iNext * 17 + 45, "Show Emblems", 255, 255, 255);
}
else PutString2(sX + 25, sY + iNext * 17 + 45, "Show Emblems", 128, 128, 128);

if (m_bShowEmblems) PutString2(sX + 180, sY + iNext * 17 + 45, "ON", 64, 255, 64);
else PutString2(sX + 180, sY + iNext * 17 + 45, "OFF", 255, 64, 64);
////////
Así es como hice andar el code de

//BigItem Groundon
iNext += 1;
if ((msX >= sX + 20) && (msX <= sX + 220) && (msY >= sY + iNext * 17 + 45) && (msY <= sY + iNext * 17 + 59))
{
PutString2(sX + 25, sY + iNext * 17 + 45, "Big Items", 255, 255, 255);
}
else PutString2(sX + 25, sY + iNext * 17 + 45, "Big Items", 128, 128, 128);

if (bChangeBigItems) PutString2(sX + 180, sY + iNext * 17 + 45, "ON", 64, 255, 64);
else PutString2(sX + 180, sY + iNext * 17 + 45, "OFF", 255, 64, 64);

El tema es que ahora quiero hacer lo mismo con los arboles Off, los techos Off y varios sprites, ya que muchos server actuales lo tienen para que los player no se compliquen y tengan mas comodidad.
Tengo los sprites que quiero poner, pero no se si tengo que agregarlos con nuevos nombres al src del cliente para que los lea o solo teniendo los sprites en la carpeta ya los tomara, desde ya muchas gracias y dejo unas fotos

https://ibb.co/hLa2ro
https://ibb.co/h3bWj8

Re: graphics options

#4
You will need to change a few things. Either you want the game config to save the config you have put, or not. If there is no save, everything your player restart client will need to put the game config again.

You will need to code a function to update the sprites whenever you do any changes in Game Config. You can code the function on how the client load the sprites in the beginning of the client loads sprite.

This is an example.

item-ground-big.pak is actually item-pack.pak renamed.

The UpdateSprites() function is called when u click the bChangeBigItems.

void CGame::UpdateSprites()
{
if (bChangeBigItems)
{
MakeSprite( "item-ground-big", DEF_SPRID_ITEMGROUND_PIVOTPOINT+1, 19, FALSE);
m_hPakFile = CreateFile("sprites\\item-ground-big.pak", GENERIC_READ, NULL, NULL, OPEN_EXISTING, NULL, NULL);
if( m_hPakFile != INVALID_HANDLE_VALUE )
{
m_pSprite[DEF_SPRID_ITEMGROUND_PIVOTPOINT+20] = new class CSprite(m_hPakFile, &m_DDraw, "item-ground-big", 17, FALSE);
m_pSprite[DEF_SPRID_ITEMGROUND_PIVOTPOINT+21] = new class CSprite(m_hPakFile, &m_DDraw, "item-ground-big", 18, FALSE);
m_pSprite[DEF_SPRID_ITEMGROUND_PIVOTPOINT+22] = new class CSprite(m_hPakFile, &m_DDraw, "item-ground-big", 19, FALSE);
m_pSprite[DEF_SPRID_ITEMGROUND_PIVOTPOINT+23] = new class CSprite(m_hPakFile, &m_DDraw, "item-ground-big", 20, FALSE);
CloseHandle(m_hPakFile);
}
}
else
{
MakeSprite( "item-ground", DEF_SPRID_ITEMGROUND_PIVOTPOINT+1, 19, FALSE);
m_hPakFile = CreateFile("sprites\\item-ground.pak", GENERIC_READ, NULL, NULL, OPEN_EXISTING, NULL, NULL);
if( m_hPakFile != INVALID_HANDLE_VALUE )
{ m_pSprite[DEF_SPRID_ITEMGROUND_PIVOTPOINT+20] = new class CSprite(m_hPakFile, &m_DDraw, "item-ground", 17, FALSE);
m_pSprite[DEF_SPRID_ITEMGROUND_PIVOTPOINT+21] = new class CSprite(m_hPakFile, &m_DDraw, "item-ground", 18, FALSE);
m_pSprite[DEF_SPRID_ITEMGROUND_PIVOTPOINT+22] = new class CSprite(m_hPakFile, &m_DDraw, "item-ground", 19, FALSE);
m_pSprite[DEF_SPRID_ITEMGROUND_PIVOTPOINT+23] = new class CSprite(m_hPakFile, &m_DDraw, "item-ground", 20, FALSE);
CloseHandle(m_hPakFile);
}
}
}
LifeX

www.hblegends.net

Who is online

Users browsing this forum: No registered users and 1 guest