Dennis Duda
d45a175064
Fixed `CreatePlayer` to now be binary exact!
8 years ago
Dennis Duda
4120348056
Switched all pre-increments to post-increments, added some spacing
8 years ago
Anders Jenbo
e750efcfce
Clean up NextPlrLevel
8 years ago
Anders Jenbo
2e383d6810
Minor clean ups for player.cpp
8 years ago
Dennis Duda
0b29cbb97b
Reverted `MAX_PLRS` to raw literal without unsigned annotation
8 years ago
Dennis Duda
565a4b8bce
Flipped back the leveltype check
...
:S
8 years ago
Dennis Duda
9e18f07d5b
Cleaned up the if branches further, removed `pAnims` var so that register and instruction generation comes very close
8 years ago
Anders Jenbo
cd99c0b800
Clean up player.cpp SetPlrAnims
8 years ago
Dennis Duda
9770783f41
Cleaned up `CreatePlayer` to be only one instruction off!
...
The devilution code generates one additional `cdq` instruction, the rest is perfect...
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
Anders Jenbo
71c4c71796
Clean up player NewPlrAnim and ClearPlrPVars
8 years ago
galaxyhaxz
5ed2336e90
Fix types of animation data ( #176 )
8 years ago
galaxyhaxz
5ff8756116
Fix junk ( #174 )
8 years ago
galaxyhaxz
0a3503dd55
Fix operating objects from top (sarcophagus)
8 years ago
Dennis Duda
0603e3e042
Cleaned up InitMonsterGFX, InitMonster, MonstPlace
8 years ago
galaxyhaxz
fa64b2148d
Add defines [W.I.P] ( #160 )
8 years ago
galaxyhaxz
a08be06427
Fix decompilation in player pathing
...
Doesn't fix any bugs sadly, the code still generates the same :(
8 years ago
galaxyhaxz
a336c38226
Fix random(idx,v) calls ( #157 )
8 years ago
Dennis Duda
0200a2abba
Refactored spells.cpp ( #147 )
...
Finished refactoring spells.cpp, modifying other files only as needed.
Some functions are 99% binary exact now, like PlacePlayer, for example.
Added notes/TODOs for places with remaining discrepancies.
8 years ago
galaxyhaxz
f50dab25ba
Several fixes for storm/msgcmd ( #146 )
8 years ago
Stephan Unverwerth
c8af0523ac
refactor leveltype to use macros ( #103 )
8 years ago
Adam Heinermann
87ca6557c3
Changed _oBreak and _oSelFlag to char ( #95 )
...
* Changed _oBreak and _oSelFlag to char
8 years ago
galaxyhaxz
49a6f4f9fc
Add include guards, prepare for XRef ( #28 )
...
Add definitions, other junk.
8 years ago
galaxyhaxz
7ee880f968
Fixed typos
8 years ago
galaxyhaxz
bb01c6f084
Remove the "fear factor" ( #21 )
...
Snakes, spiders, Demons, what scares you?
8 years ago
galaxyhaxz
0dac197965
Update player.cpp
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
dde68ff89e
Add files via upload
8 years ago