Commit graph

168 commits

Author SHA1 Message Date
Anders Jenbo
3b04f67194 🔥 Remove a chunk of miniwin types 2021-04-29 23:04:56 +02:00
obligaron
16b3b38908 Move NewPlrAnim logic to AnimationInfo
Adjust SetNewAnimation-Parameter Names to Class Member

Adjust NewPlrAnim-Parameter Names to SetNewAnimation-Parameter Names
2021-04-29 04:33:51 +02:00
obligaron
1de46a8495 Rename member variables 2021-04-29 04:33:51 +02:00
obligaron
0b5183f63e Introduce AnimationInfo
Update AnimationInfo.DelayLen comment
2021-04-29 04:33:51 +02:00
Vladimir Olteanu
bea21a5e20 Replace LOAD_LE32 & LOAD_BE32 with signedness- and endian-agnostic equivalents 2021-04-28 20:11:51 +02:00
Anders Jenbo
b69d18f12d 🌐 Enable translation of all remaning strings 2021-04-25 21:32:41 +02:00
obligaron
239a43cc1c
Remove "AnimWidth2" expect for missiles (#1680) 2021-04-25 13:32:33 +02:00
Anders Jenbo
2bd13451a1 ♻️Apply point positioning to all remaning entities 2021-04-25 01:25:48 +02:00
Anders Jenbo
98cd435fba ♻️ Apply point types to missiles 2021-04-24 21:41:04 +02:00
Anders Jenbo
efbe8a8338 ♻️ add possition points to monsters 2021-04-24 20:29:52 +02:00
Anders Jenbo
7912e510f0 🎨 Clean up overuse of SDL types 2021-04-24 17:07:07 +02:00
Anders Jenbo
275404029e ♻️Cleanup player temp variables 2021-04-24 17:07:07 +02:00
Anders Jenbo
a5f062b747 🎨 Use stdint instead of SDL types 2021-04-24 05:17:59 +02:00
Anders Jenbo
e4cfad3196 ♻️Use points instead of individual fileds for player structure 2021-04-24 04:46:08 +02:00
Anders Jenbo
1e3ed903be 🎨 strip redundant else 2021-04-22 00:39:48 +02:00
Anders Jenbo
97d7171123 🔥 Get rid of _ptargx/y 2021-04-21 03:55:27 +02:00
Anders Jenbo
373f28736f 🎨 Acceptable parts of modernize-* 2021-04-19 22:42:19 +02:00
Anders Jenbo
c89bd9c001 🚨 Fix remaning warnings for clang and gcc 2021-04-19 02:44:39 +02:00
Anders Jenbo
5fdb9ce459 🎨 Format code 2021-04-19 00:37:33 +02:00
Anders Jenbo
946ff5b0fa ♻️Performe static casts when load save game data 2021-04-18 23:27:21 +02:00
Anders Jenbo
61d15e23db 🎨 Apply direction enum to monsters and relations
Missiles _mimfnum is being used for a lot more then just directions and
can also be a 16 degree direction so can't apply enum verbs and
restricitons to it in most cases. This in turns also affects SetMissDir
and some other functions that have to stay int.
2021-04-18 23:13:03 +02:00
Gleb Mazovetskiy
2c924e1ab1 🐞 pfile: Fix stale tables after leaving a game
In multiplayer, the hash and block tables are kept around between the
saves (presumably to improve performance).

When leaving the game, they should be cleared.

Clearing of the tables is handled by `Archive::Close` in `mpqapi.cpp`.

After 135f5e03c7,
which moved the archive closing inside `pfile_write_hero`, the tables
were no longer cleared on `pfile_flush_W` (because the archive was
already closed when it was called).

To fix the issue, this commit adds a `clear_tables` argument
to `pfile_write_hero` and removes the `pfile_flush_W` method.

Bug reported and root cause found by @Eider-McDuck:

> Example to reproduce: Have 2 vanilla savegames, join a game with the first,
> then leave, then join a game with the second, then drop an item on the floor.
2021-04-16 15:50:13 +02:00
Anders Jenbo
997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo
f450d6a125 🚚 Move defines to there proper files 2021-04-16 01:04:54 +02:00
qndel
2677cc14dc fix loading golem 2021-04-14 19:28:20 +02:00
Juliano Leal Goncalves
28ad9d43c5 🎨 Rename 'plr_class' enum to 'HeroClass'
Members were renamed as well for readability.
2021-04-12 20:00:53 +02:00
Juliano Leal Goncalves
7d95bfed39 ♻️ Convert 'plr_class' to a scoped enumeration 2021-04-12 20:00:53 +02:00
Gleb Mazovetskiy
135f5e03c7 Only write to the file once when saving 2021-04-12 10:44:36 +02:00
Stephen C. Wills
a80aa286d3
Fixed data type of quest _qmsg in save files. (#1475) 2021-04-11 09:39:46 +02:00
Anders Jenbo
e7ae8ddd04 🚚 Move all enums to there respective headers 2021-04-10 16:30:00 +02:00
Anders Jenbo
2732aea1b2 ♻️ Use GameInfo instead of individual globals 2021-04-10 07:30:12 +02:00
Anders Jenbo
61244c4d93 ♻️ Rearange and apply more enums 2021-04-10 05:24:01 +02:00
Anders Jenbo
20186e0370 🎨 Replace TRUE/FALSE with true/false
fix


Fix


fix
2021-04-09 15:13:02 +02:00
Anders Jenbo
93d42b62b8 ♻️ Change BOOL to bool 2021-04-09 15:13:02 +02:00
Gleb Mazovetskiy
cc75b7a948 loadsave: Fix off-by-one in RemoveEmptyLevelItems
Refs #1367
2021-04-09 07:28:51 +02:00
qndel
7a9aaed4b4 proper heroitems size 2021-04-08 22:10:32 +02:00
Gleb Mazovetskiy
7fd79c5c40 SaveLoad/Helper: Rename member fields 2021-04-08 21:51:55 +02:00
Anders Jenbo
bfb3c11c2b 🎨 Change namespace to devilution 2021-04-06 15:21:25 +02:00
Anders Jenbo
630e507f63 🚚 Apply namespace 2021-04-06 15:21:25 +02:00
Anders Jenbo
6f1498d315 🚚 Move structures to there respective headers 2021-04-06 12:41:00 +02:00
Juliano Leal Goncalves
9021f8daa5 ♻️ Pluralize global 'item' array variable 2021-04-06 11:45:28 +02:00
Anders Jenbo
28bb003601 🐛 use exact size of save format struct 2021-04-06 05:34:21 +02:00
Anders Jenbo
bba73ea20f Handle mixed item origins in multiplayer 2021-04-01 14:52:44 +02:00
Anders Jenbo
c221cdfeb1 🐛 Correct sinage on level load/save 2021-04-01 06:43:33 +02:00
Anders Jenbo
a69a76941e ♻️ Clean up InitCutscene 2021-03-24 21:50:19 +01:00
Anders Jenbo
8f09cc3034 [diablo] 🐛 Correct spelling of Sorcerer
Fixes #1074
2021-03-21 12:18:10 +01:00
Anders Jenbo
17803d5923 ♻️ Apply proper types to PlayerStruct 2021-03-14 15:38:23 +01:00
Anders Jenbo
def2253386 ♻️ Move monster.h related structs and enums and apply propper types 2021-03-11 03:36:32 +01:00
Anders Jenbo
d6ec6395e0 ♻️ change QuestTalkData in to an array of _speech_id
This gets rid of casting QuestTalkData to DWORD/int in various parts of
the code.
2021-03-11 01:40:13 +01:00
alanbirtles
d0c675b426 fix #1155 2021-03-10 20:50:21 +01:00