Skip to content

Commit

Permalink
Item Select / Template Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NovFR committed Apr 11, 2021
1 parent 1ec89d4 commit f15823d
Show file tree
Hide file tree
Showing 17 changed files with 733 additions and 164 deletions.
Binary file modified Binaries/GlEd.exe
Binary file not shown.
Binary file modified Binaries/Locales/en-US.db
Binary file not shown.
Binary file modified Binaries/Locales/fr-FR.db
Binary file not shown.
28 changes: 14 additions & 14 deletions Source/GlEd.depend
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# depslib dependency file v1.0
1618064879 source:f:\programmation\sources\jeux\divinity original sin ii\resources\application.rc
1618157228 source:f:\programmation\sources\jeux\divinity original sin ii\resources\application.rc
"_Global.h"
"_Version.h"

Expand All @@ -16,9 +16,9 @@
<stdio.h>
<DbgHelp.h>

1617590887 f:\programmation\sources\jeux\divinity original sin ii\includes\_version.h
1618102541 f:\programmation\sources\jeux\divinity original sin ii\includes\_version.h

1617932581 source:f:\programmation\sources\jeux\divinity original sin ii\sources\application.c
1618158933 source:f:\programmation\sources\jeux\divinity original sin ii\sources\application.c
"Application.h"
"Game.h"
"Menus.h"
Expand All @@ -36,7 +36,7 @@
1593072788 f:\programmation\sources\jeux\divinity original sin ii\sources\libs\sqlite3\includes\sqlite3.h
<stdarg.h>

1618065681 f:\programmation\sources\jeux\divinity original sin ii\includes\locale.h
1618158931 f:\programmation\sources\jeux\divinity original sin ii\includes\locale.h
"Lists.h"

1616266490 f:\programmation\sources\jeux\divinity original sin ii\includes\lists.h
Expand All @@ -55,7 +55,7 @@
1617979431 f:\programmation\sources\jeux\divinity original sin ii\includes\xmltree.h
"Dialogs.h"

1618066080 f:\programmation\sources\jeux\divinity original sin ii\includes\game.h
1618156222 f:\programmation\sources\jeux\divinity original sin ii\includes\game.h
"XML.h"
"Menus.h"

Expand Down Expand Up @@ -137,7 +137,7 @@
"Menus.h"
"Requests.h"

1618065994 f:\programmation\sources\jeux\divinity original sin ii\includes\gameedit.h
1618160705 f:\programmation\sources\jeux\divinity original sin ii\includes\gameedit.h
"Game.h"

1618062223 f:\programmation\sources\jeux\divinity original sin ii\includes\dialogs.h
Expand Down Expand Up @@ -193,15 +193,15 @@
"Texts.h"
"Locale.h"

1618065729 source:f:\programmation\sources\jeux\divinity original sin ii\sources\game\game_display.c
1618156240 source:f:\programmation\sources\jeux\divinity original sin ii\sources\game\game_display.c
"Application.h"
"Locale.h"
"Texts.h"
"Game.h"
"Utils.h"
"Dialogs.h"

1618096221 source:f:\programmation\sources\jeux\divinity original sin ii\sources\game\game_divine.c
1618148712 source:f:\programmation\sources\jeux\divinity original sin ii\sources\game\game_divine.c
"Application.h"
"Locale.h"
"Texts.h"
Expand All @@ -220,7 +220,7 @@
1616266466 f:\programmation\sources\jeux\divinity original sin ii\includes\lastfiles.h
"Menus.h"

1618065335 source:f:\programmation\sources\jeux\divinity original sin ii\sources\game\game_edit.c
1618148276 source:f:\programmation\sources\jeux\divinity original sin ii\sources\game\game_edit.c
"Application.h"
"GameEdit.h"
"Locale.h"
Expand All @@ -240,7 +240,7 @@
"Utils.h"
"Requests.h"

1618066080 source:f:\programmation\sources\jeux\divinity original sin ii\sources\game\game_manager.c
1618156608 source:f:\programmation\sources\jeux\divinity original sin ii\sources\game\game_manager.c
"Application.h"
"Locale.h"
"Texts.h"
Expand Down Expand Up @@ -372,7 +372,7 @@
"Requests.h"
"Utils.h"

1617967146 source:f:\programmation\sources\jeux\divinity original sin ii\sources\windows\windows_windows.c
1618156222 source:f:\programmation\sources\jeux\divinity original sin ii\sources\windows\windows_windows.c
"Application.h"
"About.h"
"Texts.h"
Expand Down Expand Up @@ -533,10 +533,10 @@
"Game.h"
"Texts.h"

1618065980 source:f:\programmation\sources\jeux\divinity original sin ii\sources\game\edit\game_edit_items.c
1618160675 source:f:\programmation\sources\jeux\divinity original sin ii\sources\game\edit\game_edit_items.c
"Application.h"
"GameEdit.h"
"XML.h"
"Texts.h"
"Utils.h"
"Requests.h"
"Texts.h"

110 changes: 55 additions & 55 deletions Source/GlEd.layout

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Source/GlEd.workspace.layout
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<CodeBlocks_workspace_layout_file>
<FileVersion major="1" minor="0" />
<ActiveProject path="GlEd.cbp" />
<PreferredTarget name="Debug" />
</CodeBlocks_workspace_layout_file>
11 changes: 7 additions & 4 deletions Source/Includes/Game.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,22 +304,25 @@ typedef struct GAMEDATAPARSER {
// «»»» Gestion «««««««««««««««««««««««««««««««««««««««««««««««««««««««««»

int Game_CreateLayout(void);
int Game_CreateInventoryGroups(HWND);
int Game_CreateButton(HWND,int,int,int,int,WCHAR *,UINT,HWND *,UINT);
void Game_Resize(void);

void Game_InventoryMenu(HWND,UINT);
int CALLBACK Game_ItemsListSort(LPARAM,LPARAM,LPARAM);

void Game_Setup(DOS2CHARACTER *,BOOL,BOOL);
int Game_BuildPlayers(void);
void Game_ReleasePlayers(void);
int Game_BuildPlayers(NODE *,BOOL);
void Game_ReleasePlayers(NODE *,BOOL);
DOS2INVENTORY* Game_BuildInventory(DOS2ITEM *,XML_ATTR *,NODE *);
UINT Game_GetInventoryItemsCount(XML_NODE *,WCHAR *);
void Game_ReleaseInventory(DOS2INVENTORY *);
void Game_ReleaseItem(DOS2ITEM *);
void Game_ReleaseDisplayNames(void);
void Game_CharacterChanged(BOOL);
void Game_BuildItemsList(DOS2CHARACTER *,HWND);
void Game_UpdateButtons(void);
void Game_SaveTopIndex(void);
void Game_SaveTopIndex(DOS2CHARACTER *,HWND);

void Game_Lock(DWORD);
UINT Game_GetLevelFromExp(UINT);
Expand Down Expand Up @@ -352,7 +355,7 @@ int Game_PaintStat(HDC,HWND,RECT *,UINT,WCHAR *,UINT);
void Game_PaintValue(HDC,LONG,HWND,WCHAR *,WCHAR *,UINT);

void Game_PaintButton(DRAWITEMSTRUCT *);
void Game_PaintBag(DRAWITEMSTRUCT *);
void Game_PaintBag(DOS2CHARACTER *,DRAWITEMSTRUCT *);
void Game_PaintIcon(HDC,WCHAR *,UINT,RECT *,int,BOOL,BOOL);

// «»»» Fenêtre des attributs «««««««««««««««««««««««««««««««««««««««««««»
Expand Down
16 changes: 16 additions & 0 deletions Source/Includes/GameEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ enum {
// ¤¤¤ ¤¤¤ //
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ //

//--- Sélection d'un objet ---

typedef struct GAMEITEMSELECT {
HWND hwndParent;
NODE players;
DOS2ITEM* pItem;
DOS2CHARACTER* pdcCurrent;
} GAMEITEMSELECT;

//--- Edition d'une valeur ---

typedef struct GAMEEDITVALUE {
Expand Down Expand Up @@ -357,6 +366,7 @@ typedef struct GAMEEDITITEMCONTEXT {
NODE nodeBoosters;
NODE nodeBonuses;
GAMEEDITRUNE runes[3];
GAMEITEMSELECT select;
} GAMEEDITITEMCONTEXT;

typedef struct GAMEEDITBONUSCONTEXT {
Expand Down Expand Up @@ -592,6 +602,12 @@ GAMEDATASKILL* Game_SkillsGetById(WCHAR *,NODE *);

// «»»» Objets ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««»

DOS2ITEM* Game_ItemSelect(HWND);
INT_PTR CALLBACK Game_ItemSelectProc(HWND,UINT,WPARAM,LPARAM);
void Game_ItemCharacterChanged(HWND,GAMEITEMSELECT *);
void Game_ItemChanged(HWND,GAMEITEMSELECT *);
void Game_ItemMenu(HWND,HWND,UINT,GAMEITEMSELECT *);

int Game_ItemTemplateCheck(DOS2ITEM *,WCHAR *,UINT);
int Game_ItemTemplateMsg(HWND,int);

Expand Down
3 changes: 3 additions & 0 deletions Source/Includes/Locale.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ enum {
LOCALE(IDM_INVBACKPACKCLOSEALL), \
LOCALE(IDM_INVALL), \
LOCALE(IDM_INVSYNCHROALL), \
LOCALE(IDM_INVSELECT), \
LOCALE(IDM_CANCEL), \
LOCALE(IDM_LIST_SELECTED), \
LOCALE(IDM_LIST_EXPAND), \
Expand Down Expand Up @@ -224,6 +225,7 @@ enum {
LOCALE(TEXT_DIALOG_TITLE_SKILLS), \
LOCALE(TEXT_DIALOG_TITLE_TEMPLATE), \
LOCALE(TEXT_DIALOG_TITLE_OWNERSHIP), \
LOCALE(TEXT_DIALOG_TITLE_ITEMSELECT), \
LOCALE(TEXT_DIALOG_INFO_SETVALUE), \
LOCALE(TEXT_DIALOG_INFO_NAME), \
LOCALE(TEXT_DIALOG_INFO_AMOUNT), \
Expand All @@ -244,6 +246,7 @@ enum {
LOCALE(TEXT_DIALOG_OBJECT_ORIGINALTEMPLATE), \
LOCALE(TEXT_DIALOG_OBJECT_CURRENTTEMPLATE), \
LOCALE(TEXT_DIALOG_OBJECT_TEMPLATETYPE), \
LOCALE(TEXT_DIALOG_OBJECT_RESETTEMPLATE), \
LOCALE(TEXT_DIALOG_OBJECT_COPYTEMPLATE), \
LOCALE(TEXT_DIALOG_OBJECT_SELECTTEMPLATE), \
LOCALE(TEXT_DIALOG_OBJECT_OWNERSHIP), \
Expand Down
19 changes: 17 additions & 2 deletions Source/Resources/Application.rc
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,20 @@ FONT 8, L"MS Shell Dlg"
PUSHBUTTON L"", IDCANCEL, 324, 276, 64, 16
}

//--- Sélection d'objet ---

1300 DIALOGEX 0, 0, 380, 392
STYLE DS_MODALFRAME|WS_BORDER|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_SHELLFONT
CLASS L"GlEdDialog32"
FONT 8, L"MS Shell Dlg"
{
COMBOBOX 200, 4, 4, 372, 200, WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|CBS_DROPDOWNLIST|CBS_OWNERDRAWFIXED
CONTROL L"", 300, L"SysListView32", WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|LVS_REPORT|LVS_SINGLESEL|LVS_NOCOLUMNHEADER|LVS_SHOWSELALWAYS|LVS_OWNERDRAWFIXED, 4, 24, 372, 344, WS_EX_CLIENTEDGE

CONTROL L"", 301, L"STATIC", WS_CHILD|WS_VISIBLE|SS_OWNERDRAW, 4, 372, 234, 16, WS_EX_CLIENTEDGE
DEFPUSHBUTTON L"", IDOK, 244, 372, 64, 16, WS_DISABLED
PUSHBUTTON L"", IDCANCEL, 312, 372, 64, 16
}

// «»»» Modification des objets «««««««««««««««««««««««««««««««««««««««««»

Expand Down Expand Up @@ -758,8 +772,9 @@ FONT 8, L"MS Shell Dlg"
EDITTEXT 302, 178, 76, 30, 12, ES_NUMBER
CONTROL L"", 303, L"STATIC", WS_CHILD|WS_VISIBLE|SS_OWNERDRAW, 12, 76, 160, 12

PUSHBUTTON L"", 304, 178, 92, 200, 14
PUSHBUTTON L"", 305, 178, 110, 200, 14
PUSHBUTTON L"", 304, 178, 92, 200, 14, WS_DISABLED
PUSHBUTTON L"", 305, 178, 108, 200, 14
PUSHBUTTON L"", 306, 178, 124, 200, 14
}

//--- Page: Propriété ---
Expand Down
22 changes: 22 additions & 0 deletions Source/Sources/Application.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,28 @@ CUSTOMMENUTEMPLATE InvMenu[] = {

};

CUSTOMMENUTEMPLATE InvSelectMenu[] = {

{ MENU_POPUP, MENU_INVENTORY },
{ MENU_ITEM, IDM_INVSELECTED, MFS_GRAYED, 0, 0, MENU_FLAG_SEPARATOR },
{ MENU_BLANK },
{ MENU_ITEM, IDM_INVSELECT },
{ MENU_BLANK },
{ MENU_ITEM, IDM_INVNODES },
{ MENU_BLANK },
{ MENU_ITEM, IDM_INVBACKPACK, MFS_GRAYED, 0, 0, MENU_FLAG_SEPARATOR },
{ MENU_BLANK },
{ MENU_ITEM, IDM_INVBACKPACKOPEN },
{ MENU_ITEM, IDM_INVBACKPACKCLOSE },
{ MENU_ITEM, IDM_INVBACKPACKCLOSEALL },
{ MENU_BLANK },
{ MENU_SEPARATOR },
{ MENU_ITEM, IDM_CANCEL },
{ MENU_STOP },
{ MENU_STOP }

};

CUSTOMMENUTEMPLATE SkillsListMenu[] = {

{ MENU_POPUP, MENU_LIST },
Expand Down
Loading

0 comments on commit f15823d

Please sign in to comment.