galaxyhaxz
42c9076ce5
Sync with nightly ( #302 )
8 years ago
Dennis Duda
2f7f7d055e
Switched all remaining uses of `UINT64` to `unsigned __int64` to make it compilable on <=VC5
8 years ago
Anders Jenbo
146cd9fe8c
Change UINT64 to __int64
8 years ago
galaxyhaxz
34938876e0
A few name corrections ( #203 )
8 years ago
Dennis Duda
9c69ae0ee5
Fixed `NUM_INVLOC` in struct definition
8 years ago
Anders Jenbo
44b1349529
Clean up CheckMonsterHit
8 years ago
galaxyhaxz
7e50e6f1d5
Fix invalid "unusable" spells ( #198 )
8 years ago
galaxyhaxz
170d7ba53a
Fix timed messages in multiplayer ( #196 )
8 years ago
Dennis Duda
e8b53791d3
`DrawInv` is now binary exact.
8 years ago
galaxyhaxz
0efe4c27b6
Fix TSyncHeader and sync.cpp ( #192 )
8 years ago
galaxyhaxz
2a377ea876
Fix some struct names and lighting ( #190 )
8 years ago
galaxyhaxz
13126a90d6
Fix garbage structs, data in setmaps ( #189 )
8 years ago
galaxyhaxz
d6b26636d5
Fix PlayerStruct level size
...
Note that both these fields are 25 bytes in Hellfire, so NUMLEVELS was used on both
8 years ago
galaxyhaxz
f4d1dea559
Organized struct file
...
Note that code will not change, should make it easier to read now
8 years ago
Dennis Duda
cf81adbd47
Minor adjustments to `InitLevelMonsters` and `AddMonsterType`
8 years ago
Dennis Duda
07b5dc3939
Cleaned up `inv_update_rem_item`, `RemoveInvItem`, `RemoveSpdBarItem`, `CheckInvItem`, `CheckInvScrn`, `CheckItemStats`
...
All relatively simple and/or use code from other functions already cleaned up. Now binary exact except for the small codegen differences outlined in https://github.com/diasurgical/devil-nightly/issues/15
8 years ago
Dennis Duda
a061f6d6f0
Cleaned up `CheckInvSwap` (0x3B6 → 0x390, orig: 0x373)
...
Pretty close to the original binary except for the first loop, which generates differently. (TODO comment added) There are also some questionable double address calculations, which hopfully clear up when the loop is fixed as well.
Also added enums `inv_body_loc` and `inv_xy_slot` to clean up a lot of magic numbers.
8 years ago
Dennis Duda
2f25466ed6
Cleaned up `CheckInvSwap`
...
Now binary exact except for the usual `xor; inc` vs `push 1; pop` switch.
Updated the type of `_iIdentified` to `BOOL` as well (since every write to it actually is 0 or 1).
8 years ago
galaxyhaxz
8381807e90
Fix data type in gendung ( #183 )
8 years ago
Dennis Duda
05d2cbadb2
Added missing PlayerStruct change
8 years ago
Dennis Duda
4ae7211fa0
Cleaned up `CreatePlayer`.
...
This is now as close as it gets without switching to enum types/parameters everywhere, so the compiler can optimize all accesses/checks accordingly. This is especially noticeable in the way the code for the switch is generated (line 775). In the original binary you can see it does weird stuff if c is not one of the classes' enum value (probably due to optimization since the switch should be exhaustive).
I've tried switching the type of c to _ui_classes, also removing the UI_NUM_CLASSES value to see if that'd be enough to let it generate the optimized code, but nope, seems like we need to change it all at once. Currently, _pClass is a char, but an enum value would fit there as well, size-wise (alignment).
That's also why I'm guessing there had to be another enum for player classes, without the UI_NUM_CLASSES value...
8 years ago
Dennis Duda
e7065a0b02
Added `plr_class` enum, moving the define `NUM_CLASSES` into it.
8 years ago
Dennis Duda
5eae298035
Cleaned up `CalcPlrItemVals`
8 years ago
galaxyhaxz
5ed2336e90
Fix types of animation data ( #176 )
8 years ago
Dennis Duda
0603e3e042
Cleaned up InitMonsterGFX, InitMonster, MonstPlace
8 years ago
Dennis Duda
be231d1190
Added description for `trans_file`.
8 years ago
Dennis Duda
df44956a78
Cleaned up InitMonsterTRN.
...
Including changed types used by that function.
8 years ago
galaxyhaxz
fa64b2148d
Add defines [W.I.P] ( #160 )
8 years ago
galaxyhaxz
775ae59e18
Fix function signatures and others ( #158 )
...
Fix InitObjects, themes.cpp, names
8 years ago
galaxyhaxz
f50dab25ba
Several fixes for storm/msgcmd ( #146 )
8 years ago
galaxyhaxz
0f7a448b73
Update structs.h
8 years ago
Dennis Duda
153495d82d
Rewrote GetManaAmount to result in the same decompiled code as Diablo ( #135 )
...
* Rewrote GetManaAmount to result in the same decompiled code as the original function.
Fixed the type of `PlayerStruct->pClass`. Thank you @galaxyhaxz for all the help getting into it :)
* Renamed everything back to their original names
8 years ago
galaxyhaxz
7d06ca540c
Fix dpiece_defs, clean up LoadLvlGFX ( #105 )
...
Thanks to @MadHed , implements #102
8 years ago
Adam Heinermann
87ca6557c3
Changed _oBreak and _oSelFlag to char ( #95 )
...
* Changed _oBreak and _oSelFlag to char
8 years ago
galaxyhaxz
403d9bdada
Fix struct size ThemeStruct
8 years ago
galaxyhaxz
57e19cf1c0
Fix zhar quest, monster squelching, golem ( #75 )
8 years ago
galaxyhaxz
d28ae62576
Add note for future reference
8 years ago
galaxyhaxz
02ca1300af
Update structs.h
8 years ago
galaxyhaxz
94a5f173d3
Fix for linux
8 years ago
galaxyhaxz
b2f9ed8781
Temporary sign change, fix in future
8 years ago
mewmew
f5f76f8b8a
Fix build on Linux
8 years ago
galaxyhaxz
b1ee40f6e7
Revert "Add preliminary support for compiling on Linux"
8 years ago
mewmew
20fdbf8aa2
Fix compile errors on Linux
...
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]
8 years ago
galaxyhaxz
8060b9b92b
Add files via upload
8 years ago