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
Robin Eklind
b0ca8138bd common: use stringer and string2enum tools to convert back and forth between enum and string (#107) 2019-11-10 01:22:36 -05:00
Tim Sarbin
3555578c0e
Added support for all object layers. (#127) 2019-11-09 23:37:02 -05:00
Robin Eklind
09e713b1cb common: generate atlas in y rather than x direction (#126)
This lets us generate atlases that are more "square"ish,
and thus less likely to hit the graphics card boundaries
for texture dimensions.

Fixes #121.
2019-11-09 23:33:09 -05:00
Tim Sarbin
c51e464676
More sprite optimizations (#120) 2019-11-09 01:13:49 -05:00
Tim Sarbin
7859b69da6
Performance Enhancements (#118)
* More optimizations. Fixed button rendering issue.
2019-11-08 16:50:33 -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
d04f07606b common: use inc closure to handle indices of SoundEntry props (#109) 2019-11-07 23:33:10 -05:00
ndechiara
ae619db363 Load Armor.txt (#105) 2019-11-07 20:51:15 -05:00
Ziemas
5260fb7df7 Adjust animation speed calculation. (#100)
Not entirely sure how correct this is, but it's an improvement.
2019-11-07 17:27:21 -05:00
Robin Eklind
eaeaf5adb9 fix build, rename Common to common (#99)
NTFS life
2019-11-06 23:50:20 -05:00
Tim Sarbin
e433c758e9
Lowercased all of the packages (#96) 2019-11-06 22:12:15 -05:00