Anders Jenbo
3a0e40597b
Clean up InitPlayer
8 years ago
Anders Jenbo
e42cee1bb5
Clean up AddPlrExperience
8 years ago
Dennis Duda
c614acd242
Changed `PFILE_ALL` to `PFILE_NONDEATH` to not be misleading
8 years ago
Dennis Duda
6097ed3f65
LoadPlrGFX is now binary exact.
8 years ago
Anders Jenbo
6e50ec5337
Work on LoadPlrGFX
8 years ago
galaxyhaxz
38b498ac4b
Add 'const' to data to match original binary ( #200 )
8 years ago
Dennis Duda
244ad84766
Removed unused variable
8 years ago
Anders Jenbo
43adc136c6
Clean up FreePlayerGFX
8 years ago
Anders Jenbo
d7383deda0
Clean up code style in player.cpp
8 years ago
Anders Jenbo
9fe38c5805
Clean up 7 functions in player.cpp
...
SetPlayerOld PlrHitObj PlrDeathModeOK CheckCheatStats ClrPlrPath and
SyncInitPlr are now bin exact
Further clean up ShieldDur
8 years ago
Dennis Duda
dcc7c8bb2f
Moved the now const globals under the rdata comment.
8 years ago
Anders Jenbo
ac616d054e
Clean up InitPlrGFXMem
8 years ago
Anders Jenbo
71a627ae8b
Clean up GetPlrGFXSize
8 years ago
Anders Jenbo
44b1349529
Clean up CheckMonsterHit
8 years ago
Anders Jenbo
fd4b1f4246
Clean up 6 small functions in player.cpp
...
SetPlayerHitPoints, SetPlrStr, SetPlrMag, SetPlrDex, SetPlrVit and
InitDungMsgs are now bin exact
8 years ago
Dennis Duda
53955c120c
ModifyPlrDex and ModifyPlrVit are now binary exact
8 years ago
Anders Jenbo
f066410d44
Clean up ModifyPlrVit
8 years ago
Anders Jenbo
8525142fa8
Clean up ModifyPlrDex
8 years ago
galaxyhaxz
503e5c1440
Names from DX SDK ( #197 )
8 years ago
Anders Jenbo
5b1aa609fc
Clean up InitMultiView
8 years ago
Anders Jenbo
31637532c9
Redefine nSolidTable as BYTE
...
Cleans PosOkMissile, CheckNoSolid, SolidLoc and LineClear
8 years ago
Anders Jenbo
0900211d4a
Clean up PM_DoWalk2 && PM_DoWalk3
8 years ago
Anders Jenbo
e0fca69c63
Clean up PM_DoStand and PM_DoWalk
8 years ago
Dennis Duda
6f81657988
Cleaned up the first few branches a bit more [readability]
8 years ago
Dennis Duda
e9d8931567
Now binary exact!
8 years ago
Anders Jenbo
4bd4a3f432
Clean up PM_DoRangeAttack
8 years ago
Anders Jenbo
5b3baf7508
Clean up PM_DoSpell
8 years ago
Anders Jenbo
f0dec0b96c
Clean up ShieldDur && ShieldDur
8 years ago
Anders Jenbo
ad1e782fe9
Clean up InitPlayerGFX
8 years ago
Anders Jenbo
26a1135757
Clean up AddPlrMonstExper
8 years ago
Dennis Duda
ad8f018e98
SetPlayerGPtrs is now binary exact!
8 years ago
Anders Jenbo
2be0ef7a2c
Clean up player_init_cl2_hdrs()
8 years ago
galaxyhaxz
56d57d61c5
Update player.cpp
8 years ago
galaxyhaxz
3b90e56429
Update player.cpp
8 years ago
Dennis Duda
f5a4d0a2ec
Reordered assignments in `NewPlrAnim` to be closer to the beta. Still binary exact with the new compiler
8 years ago
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