Commit Graph
12 Commits
Author SHA1 Message Date
ephphatha 5f6e5ae9fb Refactor iterator parsing to allow more reuse 2023-08-29 15:17:54 +02:00
ephphathaandGleb Mazovetskiy 32c3316743 Load experience data from file
Also added an iterator based API, though it's not useful for this use-case. Might be nice in the future?

The field/record iterators is single-pass input iterators with shared state.
To avoid rescanning fields unnecessarily parseInt currently can only be called once, it would be possible to make these iterators bidirectional with a bit of extra state (holding onto the start pointer)

Co-authored-by: Gleb Mazovetskiy <[email protected]>
2023-08-24 05:46:44 +02:00
ephphatha 996841e82e Restore level 50 experience cap from Diablo 2023-08-24 05:46:44 +02:00
ephphatha e6890cc5cc Move MaxCharacterLevel to playerdat and add helpers for the various uses 2023-08-24 05:46:44 +02:00
ephphatha d92d152576 Use unsigned type for character levels 2023-08-24 05:46:44 +02:00
ephphatha 486f5ca3e8 Replace ExpLvlsTbl global with helper function 2023-08-24 05:46:44 +02:00
Gleb Mazovetskiy 4187a34896 Fix -Wshift-negative-value 2023-07-13 04:23:25 +01:00
Eric Robinson a2af3b5942 Refactor CreatePlayer() (#6288) 2023-07-10 02:28:02 +02:00
Gleb Mazovetskiy 4fa3732526 Add missing <cstdint> includes
Done with the following script:

```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
  v = File.read(path)
  next if !v.include?("uint32_t") || v.include?("cstdint")

  lines = v.lines
  line_num = if lines[2].start_with?(" *")
    lines.index { |l| l.start_with?(" */") } + 3
  else
    3
  end

  lines.insert(line_num, "#include <cstdint>\n")

  File.write(path, lines.join(""))
end
```

then fixed-up manually
2023-05-10 13:50:12 +01:00
staphen b62acb088d Fix width of Monk bow animation 2023-05-06 17:56:09 +02:00
DakkJaniels 24bb409086 Remove extra entry in experience level table and cap experience at level 50 requirement (#5782) 2023-04-18 03:10:14 +02:00
Eric Robinson f75f66d54b Add playerdat (#5763) 2023-02-10 12:56:28 +00:00