[Release] Resizeable Inventory

05/01/2018 20:13 mcoocr#1
Hi folks,

today i'm releasing what i've worked on for the last few days -> an resizeable inventory for Flyff!

[Only registered and activated users can see links. Click Here To Register...]

So far i've seen this system on only one server, which is also the reason why i've decided to recode this because it's such a huge improvement for Flyff's interface which actually every server should provide.

Although this requires a bunch of modifications through various files (including resources). Therefore you may be faster by diffing the files to your own source rather than inserting the snippets below manually.

If you prefer merging the snippets into your source / resource, and i really recommend you to do so, you can grab the snippets (including the base source for diff) from here (password = "mcoocr"): [Only registered and activated users can see links. Click Here To Register...]


Also note i've coded this on a clean V15 base, you may need to add your custom or additional inventory controls (like perin counter, etc.)... to make this more comprehensible i've added the checkbox controls from __SYS_280514 (hide / show CS items) as an example to show how this could be done.

In case you modified the original inventory size (for example if you use perin counters, etc.) make sure you adjust the size at AdjustMinRect() call to the new one.


Monstrous spoiler warning!




Done! :pimp:

PS: i'm entirely sure there are better or smarter ways to handle the custom textures for the grid / weapon / armor background rendering rather than the way i actually implemented it (didn't wasted much time on this), feel free to leave comments or improve this on your own.


Greetings ~mcoocr
05/01/2018 20:30 xuejizhixiaozhi#2
Can you help theme upload it to mega?
05/01/2018 21:01 mcoocr#3
Quote:
Originally Posted by xuejizhixiaozhi View Post
Can you help theme upload it to mega?
The theme folder is also included in the source.zip from Mega.
05/01/2018 21:24 Kinami#4
An actual, good quality, useful release?

What year is it?

Good Job
05/02/2018 01:28 klangun#5
wow... thanks for the release
05/03/2018 04:05 xuejizhixiaozhi#6
Can you share your resources? The cherry trees in your game are very nice! Can I share it?
05/03/2018 11:01 Marc~#7
Quote:
Originally Posted by xuejizhixiaozhi View Post
Can you share your resources? The cherry trees in your game are very nice! Can I share it?
He's just missing the textures for the trees lol.



Good job looks really usable. :^)
05/03/2018 18:49 KingKeesie#8
Im getting compile error
Quote:
d:\Own V15\New\Resource\Source\Source\_Interface\WndField .h(220): error C2864: 'nGridTexSize' : only const static integral data members can be initialized inside a class or struct
Error on const int nGridTexSize = 32; // texturesize grid anyone can help me out? thx
05/04/2018 02:47 yazuka21#9
Wow ! You really did a great release this Year ! This is very useful for every 168 Slot users. Thanks thanks.
05/04/2018 03:05 AnimuNazi#10
more slots nice !
05/04/2018 07:32 Rhea03#11
how about the extended slot if you want to expand the inventory?
05/04/2018 11:49 accelerated#12
Quote:
Originally Posted by KingKeesie View Post
Im getting compile error

Error on const int nGridTexSize = 32; // texturesize grid anyone can help me out? thx
static const int nGridTexSize = 32; // texturesize grid <-----try that one.
05/04/2018 12:57 KingKeesie#13
Quote:
Originally Posted by accelerated View Post
static const int nGridTexSize = 32; // texturesize grid <-----try that one.
after i tried this i get error
Code:
D:\Own V15\New\Resource\Source\Source\_Interface\WndField.cpp(873): error C3861: 'refreshItemRects': identifier not found, even with argument-dependent lookup
inside this void
Code:
void CWndQueryEquip::OnInitialUpdate()
{
	CWndNeuz::OnInitialUpdate();

	m_bLButtonDownRot = FALSE;
	m_fRot = 0.0f;
	
	refreshItemRects();
	
	MoveParentCenter();
}
It's working now but i get this error Theme\Default\InvGrid13.bmp not found the InvGrid13.bmp wasnt at theme.zip ?
05/04/2018 14:40 mcoocr#14
Quote:
Originally Posted by KingKeesie View Post
after i tried this i get error
Code:
D:\Own V15\New\Resource\Source\Source\_Interface\WndField.cpp(873): error C3861: 'refreshItemRects': identifier not found, even with argument-dependent lookup
inside this void
Code:
void CWndQueryEquip::OnInitialUpdate()
{
	CWndNeuz::OnInitialUpdate();

	m_bLButtonDownRot = FALSE;
	m_fRot = 0.0f;
	
	refreshItemRects();
	
	MoveParentCenter();
}
It's working now but i get this error Theme\Default\InvGrid13.bmp not found the InvGrid13.bmp wasnt at theme.zip ?
Replace this:
Code:
#ifdef _INVENTORY_RESIZEABLE
    for(int i = 1; ; i++)
    {
        CTexture *ptex = NULL;
        char tmp[32] = { 0 };
with this:
Code:
#ifdef _INVENTORY_RESIZEABLE
    for(int i = 1; i <= 12; i++)
    {
        CTexture *ptex = NULL;
        char tmp[32] = { 0 };
Initially i've implemented a second way to render the grid (with 3 bitmaps), which is the reason why i didn't limited the loop right there.

Another option is to check if the file exists before calling AddTexture, but the way iv'e mentioned above is easier.
05/04/2018 14:47 KingKeesie#15
Quote:
Originally Posted by mcoocr View Post
Replace this:
Code:
#ifdef _INVENTORY_RESIZEABLE
    for(int i = 1; ; i++)
    {
        CTexture *ptex = NULL;
        char tmp[32] = { 0 };
with this:
Code:
#ifdef _INVENTORY_RESIZEABLE
    for(int i = 1; i <= 12; i++)
    {
        CTexture *ptex = NULL;
        char tmp[32] = { 0 };
Initially i've implemented a second way to render the grid (with 3 bitmaps), which is the reason why i didn't limited the loop right there.

Another option is to check if the file exists before calling AddTexture, but the way iv'e mentioned above is easier.
Thanks