1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-09-05 19:14:14 -04:00
Commit Graph

14 Commits

Author SHA1 Message Date
Robin Eklind
44a6a5672c common: convert objLookupRaw into a struct (#108)
Ain't noone got time for that :)

So, we automated it:

a.sh: script automating the work
a.go: tool to pretty print the parsed ObjectLookups
b.go: output of a.go
c.go: compare before and after rewrite to ensure they are identical

a.go: https://play.golang.org/p/P8G1byhzMtY
b.go: output of `go run a.go`
c:go: https://play.golang.org/p/q8LXBbBhkp5

a.sh contents follows below:

	#!/bin/bash

	# go get golang.org/x/tools/cmd/goimports
	# go get github.com/mewkiz/cmd/sar

	echo -n -e "//+build ignore\n\npackage common\n\nvar ObjectLookups = " > b.go
	go run a.go >> b.go

	sar -i '[A-Za-z_][A-Za-z0-9_]*:[\"][\"],' '' b.go
	sar -i 'Type:1,' 'Type:ObjectTypeCharacter,' b.go
	sar -i 'Type:2,' 'Type:ObjectTypeItem,' b.go
	sar -i 'common.ObjectLookupRecord' 'ObjectLookupRecord' b.go
	goimports -w b.go
2019-11-10 01:29:34 -05:00
Ziemas
948ca1fc1a Check if MPQ file was loaded before reading. (#125)
And if it wasn't then tell the user which one instead of crashing.
2019-11-09 18:57:55 -05:00
Ziemas
4aba58eb28 Vsync and FPS display toggles. (#124)
They now toggle more reliably as well as work globally.
2019-11-09 18:56:45 -05:00
Ziemas
ebff54cfba Use delta time for scene updates. (#123)
* Use delta time when updating scenes.
Delta time is in seconds and capped to 1/10th.
* Show FPS and VSYNC status in the bottom left corner.

Fixes #123
2019-11-09 16:17:01 -05:00
Tim Sarbin
c51e464676
More sprite optimizations (#120) 2019-11-09 01:13:49 -05:00
Tim Sarbin
a105bb390a
More optimizations. Fixed button rendering issue. (#115) 2019-11-08 11:05:51 -05:00
Tim Sarbin
26efc4c05c
Fixed some performance issues with binary reads. Moved config to its own spot. (#112) 2019-11-08 01:37:21 -05:00
Tim Sarbin
920a4f51b0
Initial NPC support (#111)
* Started adding support for NPCs. Added Monstats dictionary.
2019-11-07 23:44:03 -05:00
Robin Eklind
4cd1eae21a core: rename mpq variable to archive to avoid confusion with mpq package (#106)
Follow-up of #96.
2019-11-07 23:36:56 -05:00
ndechiara
ae619db363 Load Armor.txt (#105) 2019-11-07 20:51:15 -05:00
Tim Sarbin
ed237307bd
Fixed MPQ load issue on french localized D2 (#103) 2019-11-07 17:26:36 -05:00
Robin Eklind
eaeaf5adb9 fix build, rename Common to common (#99)
NTFS life
2019-11-06 23:50:20 -05:00
ndechiara
cba1bac6ca Load UniqueItems.txt (fixed formatting) (#98)
* Load UniqueItems.txt
* run go fmt on uniqueitems.go
2019-11-06 23:32:02 -05:00
Tim Sarbin
e433c758e9
Lowercased all of the packages (#96) 2019-11-06 22:12:15 -05:00