Kalebe Alves
0461529176
Move byte from engine.h
5 years ago
Anders Jenbo
8a7ec56d3a
Player by reference part 2
...
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
5 years ago
Anders Jenbo
ad97ebe980
🔥 Remove redundant code from towners.cpp
...
This changes one bavious. Previously walking away from the dead guy
would interupt the "Your death shall be reveanged", the interuption
seamed un natural and the code didn't seam to have been specifically
made for this case (TownCtrlMsg).
Fix several edge cases in quests where the incorrect state could be reached
5 years ago
Gleb Mazovetskiy
2b690137a3
🧹 towners.cpp: Avoid allocations for animOrder
...
There is no need for `animOrder` to be a vector -- it's static data.
We don't have `std::span` yet, so opted for pointer + size.
5 years ago
Anders Jenbo
4c217ec4fc
♻️ Use a vector to more sensibly assign NPC animation cycles
5 years ago
Anders Jenbo
05f8f9524f
♻️ Handle towner talk logic via initialization list instead of switch
5 years ago
Anders Jenbo
6321bf04d5
♻️ Pass player to towner by reference instead of index
5 years ago
Anders Jenbo
f579b2f287
Handle cel/cl2 files as byte arrays
5 years ago
Anders Jenbo
fa0b286693
♻️ Typed file loading
...
Tthis gives us the option to specify what type a file should be loaded
as, avoidng the need to case it and does some automatic checks on the
fitness of the data, while making the process simpler.
If no type is given then the type will be set to std::byte which limit
what operations can be performed on the data.
5 years ago
Vladimir Olteanu
d9a4ff8729
Use std::string_view for towners' names ( #1750 )
5 years ago
Gleb Mazovetskiy
1b8b62a8c2
♻️ Store CEL width with the sprite itself
...
Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.
Implemented for most sprites except towners, missiles, or monsters.
5 years ago
obligaron
239a43cc1c
Remove "AnimWidth2" expect for missiles ( #1680 )
5 years ago
Jmgr
c33182d6de
Modernize deprecated headers
5 years ago
Anders Jenbo
2bd13451a1
♻️ Apply point positioning to all remaning entities
5 years ago
Anders Jenbo
9e307a0d4a
🎨 Rename towner[] to towners[]
5 years ago
Anders Jenbo
5fdb9ce459
🎨 Format code
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Anders Jenbo
f450d6a125
🚚 Move defines to there proper files
5 years ago
Anders Jenbo
e7ae8ddd04
🚚 Move all enums to there respective headers
5 years ago
Gleb Mazovetskiy
ec4da72f9e
Optimize TownerStruct
...
1. Remove unused fields.
2. Optimize used fields for size.
3. Rename `_tVar1` to `_tTalkingToPlayer`.
5 years ago
Anders Jenbo
433edc63ea
♻️ Consistently use pragma once to guard the headers
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
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.
5 years ago
Anders Jenbo
33f0878399
Mark _tAnimOrder as explicitly signed
5 years ago
Anders Jenbo
20916488c5
Revert "Allow for animations of 255 frames"
...
This reverts commit 55b9fc63c2 .
5 years ago
Anders Jenbo
55b9fc63c2
Allow for animations of 255 frames
5 years ago
Anders Jenbo
06b7c78406
Notes of untimly header cleanups
5 years ago
Anders Jenbo
55cd299d75
Reorder towners.cpp
5 years ago
Anders Jenbo
1ba96a6777
Add doxygen description to remaining engine files
6 years ago
Anders Jenbo
7e45f8bcc8
More cleanups
6 years ago
Joel Falcou
c4223d4c29
Per file basis use of extern C
6 years ago
Joel Falcou
64d26a7934
Sanitize use of namespace
...
Wrap individual headers in dvl namespace to prevent
including standard header in another namespace.
6 years ago
Anders Jenbo
c384711a5f
Backport cleanups from hellfire branch
6 years ago
Robin Eklind
27b40436a9
Use pointers instead of references for Devilution exported API
...
With this change, all exported declarations of Devilution are now
compatible with the C-ABI; that is, all declarations of Source/*.h.
This makes it possible to link against DevilutionX from mods written in
other languages than C++, for instance Rust, Go or Python.
Updates #612 .
6 years ago
Anders Jenbo
a7c8750e92
[hellfire] Add QuestTalkData data
6 years ago
galaxyhaxz
80840b4d69
PlrHasItem: change pointer to reference
7 years ago
qndel
a99e2877f0
[hellfire] 6 towners.cpp functions bin exact
7 years ago
qndel
2147b71b25
[hellfire] InitFarmer bin exact ( #1625 )
7 years ago
Anders Jenbo
32a51d17ca
Align function signatures with PSX symbols
...
Using
https://github.com/diasurgical/scalpel/tree/master/psx/_dump_/3/_dump_c_src_/diabpsx/source
as a reference
7 years ago
galaxyhaxz
9bcf71ca38
TalkToTowner + debug
7 years ago
galaxyhaxz
4e01e03711
Cleanup default calling conventions
7 years ago
Anders Jenbo
7a084eebf8
Clean up SetTownerGPtrs
7 years ago
Anders Jenbo
b61290e4b0
Remove file level vars form global scope
7 years ago
Anders Jenbo
574a8b14f0
Clean up InitCows
7 years ago
Anders Jenbo
d4bc8a394c
Init towner ( #569 )
...
* Clean up InitSmith
* Clean up Init<Towner>
7 years ago
Anders Jenbo
cfbe27f3b8
Clean up ( #568 )
...
* Clean up mana checks
* Don't expose static globals
7 years ago
Anders Jenbo
13c5af29ed
clean up towners.cpp ( #496 )
7 years ago
Anders Jenbo
ab3a6208d2
Use "BOOLEAN" instead of "bool"
...
bool is not defined in C
7 years ago
Anders Jenbo
ec2f95bdf2
Format town files
8 years ago