1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-14 08:16:06 -05:00
Commit Graph

582 Commits

Author SHA1 Message Date
Tim Sarbin
f2b1bdfba4
More package cleanup. (#130) 2019-11-10 08:51:02 -05:00
q3cpma
7370e12b53 Improve run.sh: (#129)
* POSIX sh
* simpler distro detection
* don't create functions for stuff used only once
* add Gentoo (portage) support
* handle other distros gracefully
* ask before stealthily installing Go
* compile even when Go is already installed
2019-11-10 07:47:55 -05:00
Tim Sarbin
b41f7f4dab
Restructured everything. (#128) 2019-11-10 03:36:53 -05:00
liberodark
46e163bc38 Create run.sh (#83)
* Create run.sh
2019-11-10 01:32:59 -05:00
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
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
ed88d0e00d
Test updates. MPQ file name changes. (#119)
* Modified path logic to hopefully fix some issues
2019-11-08 19:52: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
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
Robin Eklind
d04f07606b common: use inc closure to handle indices of SoundEntry props (#109) 2019-11-07 23:33:10 -05:00
Robin Eklind
e26946bd35 readme: remove https:// scheme from go get command (#110) 2019-11-07 23:32:30 -05:00
ndechiara
ae619db363 Load Armor.txt (#105) 2019-11-07 20:51:15 -05:00
Robin Eklind
1511a897f9 mpq: implement GetFileList (#102) 2019-11-07 17:35:25 -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
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
Tim Sarbin
da4ffba9c1
Map stitching and render upates (#95)
* Added region stitching and modified the rendering loops.
2019-11-06 21:25:09 -05:00
Tim Sarbin
01a48d8720
Added object support (#93)
* Fixed LevelTypes load
* Update ResourcePaths.go
* Added DCC loading support
* Added animation data. Fixed bitshift version compile issue.
* Fixed another go build error
* Initial support for object rendering
2019-11-06 18:25:19 -05:00
Tim Sarbin
2ec5dd2d85
Fixed another older go version build error (#92)
* Fixed another go build error
2019-11-05 23:03:41 -05:00
Tim Sarbin
68c55b41d0
Added animation data loading and fix build error (#91)
* Fixed LevelTypes load
* Update ResourcePaths.go
* Added DCC loading support
* Added animation data. Fixed bitshift version compile issue.
2019-11-05 23:00:44 -05:00
Tim Sarbin
26a9d1e8b1
Added DCC loading support (#89)
* Fixed LevelTypes load
* Update ResourcePaths.go
* Added DCC loading support
2019-11-05 22:23:48 -05:00
Robin Eklind
ab7d19197e run goimports to format all Go source files of the project (#88)
Actual command run:
    find . -type f -name '*.go' | xargs -I '{}' goimports -w '{}'
2019-11-05 20:46:52 -05:00
Robin Eklind
4a24fc0b8c de-normalize file name before searching in MPQ (#87)
This was actually fixed by @essial.
Fixes #86.
2019-11-05 18:29:02 -05:00
Tim Sarbin
c84698400b
Forgot to commit resource paths (#85)
* Fixed LevelTypes load
* Update ResourcePaths.go
2019-11-04 18:10:34 -05:00
Tim Sarbin
c32c24739e
Fixed LevelTypes load (#84) 2019-11-04 17:39:59 -05:00
Tim Sarbin
18ec052133
Delete OpenDiablo2.exe 2019-11-04 07:55:58 -05:00
liberodark
1d05925ce7 Update .gitignore (#82)
Remove OpenDiablo2.exe from source control.
2019-11-04 07:55:40 -05:00
ndechiara
98d9e61a64 add Weapons.txt load (#81) 2019-11-03 22:56:26 -05:00
ndechiara
07b0724575 Fix MPQ load, add Missiles.txt load, switch LvlPrest.bin to LvlPrest.txt, fix sound loading (#80)
* fix mpqs, add missiles.txt, fix lvlprest
* fix sound loading issue
2019-11-03 22:03:22 -05:00
ndechiara
46a60398d4 Load Objects.txt (#68)
* Missiles Parsing

* Missiles.txt lookup table and  fixes

* lost work

* Replaced old repo path with org path.

* Added editorconfig. Fixed line endings to LF.

* Fixed travis build badge path

* Added level warp data

* Added object type data load

* Load objects.txt

New Common class, Objects.go will load all of the object records in objects.txt
2019-11-03 11:04:58 -05:00
Tim Sarbin
1afd86005e
Changes necessary for migration to org account (#67)
* Replaced old repo path with org path.

* Added editorconfig. Fixed line endings to LF.

* Fixed travis build badge path
2019-11-02 17:38:39 -04:00
Tim Sarbin
039a96a077 Delete ResourceHacker.ini 2019-11-02 16:29:06 -04:00
Tim Sarbin
be2b9c6390 Final modification for builds 2019-11-02 16:25:24 -04:00
Tim Sarbin
4be6252654 Update .travis.yml 2019-11-02 16:19:14 -04:00
Tim Sarbin
fc8191c812 More build updates. Added build info to game. 2019-11-02 16:15:16 -04:00
Tim Sarbin
33db9b1a7b Updated readme. More travis.yml 2019-11-02 15:10:04 -04:00
Tim Sarbin
e15cea98c6 Update .travis.yml 2019-11-02 15:04:23 -04:00
Tim Sarbin
8130aac0f6 Updated readme. More CI stuff. 2019-11-02 14:58:03 -04:00
Tim Sarbin
267fe9b615 CI updates 2019-11-02 14:38:47 -04:00