Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add preliminary support for compiling on Linux #2

Merged
3 commits merged into from
Jun 8, 2018
Merged

Add preliminary support for compiling on Linux #2

3 commits merged into from
Jun 8, 2018

Conversation

mewmew
Copy link
Contributor

@mewmew mewmew commented Jun 7, 2018

Works mostly. Can start a new game, walk around in town, enter the Cathedral and kill monsters.

What does not work currently is in game menus. It is possible to open the main menu by pressing ESC, but after that up and down arrows do not work and it does not respond to mouse actions. This is most likely because diabloui.dll has not been linked correctly.

mewmew added 3 commits June 7, 2018 22:44
Source/../types.h:35:10: fatal error: DiabloUI/_diabloui.h: No such file or directory
 #include "DiabloUI/_diabloui.h"

---

Source/../Source/init.h:43:109: error: fastcall and stdcall attributes are not compatible
 LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

---

Source/missiles.cpp:915:27: error: unable to find numeric literal operator ‘operator""i64’
  *(_QWORD *)&Dirs[0][2] = 0i64;

---

Source/world.cpp:38:1: error: narrowing conversion of ‘3937053354’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing]

---

Source/lighting.cpp:429:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned char’ inside { } [-Wnarrowing]

---

Source/objects.cpp:5459:62: error: unable to find numeric literal operator ‘operator""i64’
      while ( !(plr[v53]._pMemSpells[1] & ((unsigned __int64)(1i64 << v60) >> 32) | plr[v53]._pMemSpells[0] & (unsigned int)(1i64 << v60)) );

---

Source/control.cpp:488:9: error: unable to find numeric literal operator ‘operator""i64’
   v26 = 1i64;

---

Source/objects.cpp:243:1: error: narrowing conversion of ‘255’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]

---

Source/gamemenu.cpp:22:1: error: narrowing conversion of ‘2147483648’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing]

---

Source/sound.cpp:41:88: error: narrowing conversion of ‘240’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing]

---

Source/quests.cpp:46:1: error: narrowing conversion of ‘255’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]

---

Source/player.cpp:4666:8: error: unable to find numeric literal operator ‘operator""i64’
  v14 = 0i64;

---

Source/init.cpp:546:109: error: fastcall and stdcall attributes are not compatible
 LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

---

Source/items.cpp:114:1: error: narrowing conversion of ‘(item_effect_type)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing]

---

Source/items.cpp:307:1: error: narrowing conversion of ‘(unique_base_item)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing]

---

Source/items.cpp:854:8: error: unable to find numeric literal operator ‘operator""i64’
  v37 = 0i64;

---

Source/items.cpp:471:1: error: narrowing conversion of ‘(item_equip_type)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing]
* add aliases for storm exports to handle __stdcall calling convention on Linux
* mark external functions as extern "C"
@ghost ghost merged commit 4910d30 into diasurgical:master Jun 8, 2018
@fearedbliss
Copy link
Contributor

This is awesome. Thanks.

@ghost
Copy link

ghost commented Jun 8, 2018

Thanks for taking the time to do this. I'm going to take a break for awhile from working on Devilution.

Edit: See merged request #4

I found out the reason menus are now broke is because of this change:

struct TMenuItem
	unsigned int dwFlags;

The menus will work just fine if you change it back to a signed integer.

@mewmew
Copy link
Contributor Author

mewmew commented Jun 8, 2018

Ah ok. I'll update and send a new PR.

@mewmew
Copy link
Contributor Author

mewmew commented Jun 8, 2018

Thanks for taking the time to do this. I'm going to take a break for awhile from working on Devilution.

You most definitely deserve a break :) Andrew, would you consider adding @fearedbliss and myself as contributors to the repo? That way we can continue to commit changes without bothering you too much during your down time.

Have a great summer!

Cheers,
/u

@fearedbliss
Copy link
Contributor

No need to add me on here, I only mod d2 and I'm trying to not mod d2 that much anynore as well.

qndel referenced this pull request in qndel/Infernity Aug 9, 2018
nomdenom pushed a commit to nomdenom/devilution that referenced this pull request Sep 13, 2018
mewmew pushed a commit that referenced this pull request Oct 1, 2018
* clean GetSaveDirectory and pfile_read_hero
clean pfile_open_save_archive
clean pfile_archive_contains_game
clean pfile_get_player_class
clean pfile_get_file_name
clean GetTempSaveNames
clean GetPermSaveNames
clean pfile_update
clean pfile_init_save_directory
clean pfile_write_hero
clean pfile_open_archive
clean pfile_flush_W

* add stub for mpqapi_update_multi_creation_time
mewmew pushed a commit that referenced this pull request Mar 14, 2019
* CheckIfTrig bin exact

* CheckIfTrig bin exact suggestion #1

Co-Authored-By: qndel <stefan551@o2.pl>

* CheckIfTrig bin exact suggestion #2

Co-Authored-By: qndel <stefan551@o2.pl>
AJenbo added a commit that referenced this pull request Mar 19, 2019
Co-Authored-By: qndel <stefan551@o2.pl>
AJenbo pushed a commit that referenced this pull request Oct 11, 2020
This pull request was closed.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants