Solved OpenDiablo2 engine port

nunotex

Member

Reaction score: 11
Messages: 54

Hello,

I'm a big fan of Diablo I and Diablo II/LoD Blizzard games.

We have devilutionX on ports and this engine works very good for Diablo I.

I've found OpenDiablo2 engine and I'm trying to get it to work on FreeBSD for Diablo II/LoD.

This project uses go and I've started to compile:


Help is welcome.

Thanks,

Nuno Teixeira
 
OP
nunotex

nunotex

Member

Reaction score: 11
Messages: 54

Can you try again to compile this? Your issue got fixed :)
Hello,

No it's not. I get same error:
Code:
../../go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4/glfw/src/linux_joystick.c:137:23: error: expected ';' after expression
fatal error: too many errors emitted, stopping now [-ferror-limit=]
I did:
Code:
git clone https://github.com/OpenDiablo2/OpenDiablo2
cd OpenDiablo2
go get -d
go run .
Can you test it please?

Thanks
 

Alexander88207

Active Member

Reaction score: 85
Messages: 167

Code:
go run .
# github.com/go-gl/glfw/v3.3/glfw
In file included from ../go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4/native_linbsd.go:10:
In file included from ../go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4/glfw/include/GLFW/glfw3native.h:114:
In file included from /usr/local/include/GL/glx.h:32:
/usr/local/include/GL/gl.h:61:11: warning: 'GLAPIENTRY' macro redefined [-Wmacro-redefined]
../go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4/glfw/include/GLFW/glfw3.h:5863:10: note: previous definition is here
main.go:26: OpenDiablo2 - Open source Diablo 2 engine
d2config.go:42: loading configuration file from /home/Alexander/.config/OpenDiablo2/config.json...
d2config.go:42: loading configuration file from /tmp/go-build421189126/b001/exe/config.json...
d2config.go:64: failed to load configuration file, saving default configuration...
d2config.go:74: saving configuration file to /home/Alexander/.config/OpenDiablo2/config.json...
lstat C:/Program Files (x86)/Diablo II/Patch_D2.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2exp.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2xmusic.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2xtalk.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2xvideo.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2data.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2char.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2music.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2sfx.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2video.mpq: no such file or directory
lstat C:/Program Files (x86)/Diablo II/d2speech.mpq: no such file or directory
asset_manager.go:159: error loading file stream /data/global/excel/LvlTypes.txt (file not found: /data/global/excel/LvlTypes.txt)
panic: file not found: /data/global/excel/LvlTypes.txt

goroutine 1 [running, locked to thread]:
main.main()
    /home/Alexander/OpenDiablo2/main.go:40 +0x413
exit status 2
$
I currently have no Diablo 2 copy here.

Go still seems to fetch the old glfw where the freebsd fix is not included. I had to replace the files in /usr/home/$USER/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4 with these from github.
 
OP
nunotex

nunotex

Member

Reaction score: 11
Messages: 54

Hello!

I did like you said and got same results as you. Maybe a "go" bug?

Good news is that I own original Diablo II/LoD cds but I don't have a cd-rom to extract those files, but I will find a way :)

Thank you very much,

Nuno
 

Alexander88207

Active Member

Reaction score: 85
Messages: 167

I have created an installation script to install Diablo 2 with LoD from blizzards online installer in Wine some months ago. They are in games/homura. So if you still have the both CD keys it should be fine. Dont worry, you can access the files after installation.
 
OP
nunotex

nunotex

Member

Reaction score: 11
Messages: 54

I have created an installation script to install Diablo 2 with LoD from blizzards online installer in Wine some months ago. They are in games/homura. So if you still have the both CD keys it should be fine. Dont worry, you can access the files after installation.
Hi!

I tested Homura in the past without success to run D2/LoD until today. It runs very good, thanks for your great work :)

Related to OpenDiablo2, it almost running (almost):

https://github.com/OpenDiablo2/OpenDiablo2/issues/775

Nuno
 

Alexander88207

Active Member

Reaction score: 85
Messages: 167

Alexander88207

Active Member

Reaction score: 85
Messages: 167

Runs fine :)



Summary for all who also want to try it:

The following packages i had to install: pkgconf, go and glfw

1.
git clone https://github.com/OpenDiablo2/OpenDiablo2
cd OpenDiablo2
go get -d

2.
Replace the files in /usr/home/$USER/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4 with the newer glfw from github.

3. Download and install Diablo 2 with LoD with games/homura or alone with emulators/i386-wine-devel

4. Run go run . This will create a config where we have set the path for MPQ files first. It is needed to rename patch_d2.mpq to Patch_D2.mpq.

5. Run go run . again and the game should run too now :)
 
OP
nunotex

nunotex

Member

Reaction score: 11
Messages: 54

Hello,

Thanks very much for helping me testing OD2. I'm very happy that it runs on FreeBSD!

I will start to do some work on a port and get all dependencies toguether, etc.

I will try to know why Go doesn't fetch glfw correctly.
 
OP
nunotex

nunotex

Member

Reaction score: 11
Messages: 54

2.
Replace the files in /usr/home/$USER/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200222043503-6f7a984d4dc4 with the newer glfw from github.
I forgot to say that when I've done the port I have to "force" fetch glfw tag that included FBSD fix:
Code:
GH_TUPLE=    \
            go-gl:glfw:5321531:go_gl_glfw_glfw/vendor/github.com/go-gl/glfw
It worked like a charm!

TY!
 
Top