ptitSeb / ctp2

Civ: CTP2 (Call to Power 2) port to Linux, Pandora and Pyra. Status: Working
30 stars 2 forks source link

missing file? "BuildingRecord.h" #4

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi Ptit, I found this issue on compiling:

FeatRecord.cpp:23:10: error fatal: BuildingRecord.h: No existe el fichero o el directorio

include "BuildingRecord.h"

I've searched and there is no BuildingRecord.h on ctp2/ctp2_code/gs/newdb

ptitSeb commented 5 years ago

This file is generated by ctpdb (that is built by the makefile...) relaunch make without any "-jX", just one time. If you have no error, this file should be generated (along with other...)

ghost commented 5 years ago

yeah, the configure tool didn't warn me than i haven't sdl_image-dev, now its passing. if it finishes successfully I will close the issue, thanks as always.

I could suggest you a project to port? I could't achieve to make it work but I will get it eventually I mean, its cs 1.5... the guy deserve our attention I think. just a thought. don't know if we could use xash3d with his implementation.

https://sourceforge.net/p/freecs-1-5/code/ci/master/tree/

this another its much more difficult. but maybe you find out how to... it should run out of the box even on pandora.

https://github.com/thibmo/kam_remake/tree/Linux-native-game-client

ptitSeb commented 5 years ago

FreeCS? Bah, I can give that a try (but I'm not into multiplayer fps, or multiplayer games in general, but I do love FPS).

KaM I have already built it. it crash for now on the Pandora, but I think it's a pandora specific crash (because X11 is 16bpp on the Pandora, not 32bpp). I have debugged it yet.

ghost commented 5 years ago

My goodness. You are always 100 miles ahed of anyone... Where is that git repo so I could try it on rpi? I assume than it should compile on armv7 too..

ptitSeb commented 5 years ago

I haven't forked it.. Maybe I'll do it later. In the mean time:

Here the diff I used: kam_pandora.diff You will also need arm.inc inside src/ext/pascalscript/Source

(Some of the changes I've done are because I used an fpc compile < 3.0, and also because my fpc didn't like to divide with Min(XX,YYY), but that should build with up-to-date fpc too).

ghost commented 5 years ago

mmmm... it crash on executing. I think than its something related to armhf arch packages/platform. I cleaned it and rebuilt, but it crashes anyway. I could try to compile from source gtk2 and pango.. should I?

I haven't forked it.. Maybe I'll do it later. In the mean time:

Here` the diff I used: kam_pandora.diff You will also need arm.inc inside src/ext/pascalscript/Source

(Some of the changes I've done are because I used an fpc compile < 3.0, and also because my fpc didn't like to divide with Min(XX,YYY), but that should build with up-to-date fpc too).>

You know how much I admire you, dont you? This game... running on arm its a dream coming true. I will focus on KaM remake right now. Wich repo did you use? the official or some fork? Ive tried the fork of thibmo because it has a linux branch. I'd tried before with lazarus IDE with no success at all. so, fpc < 3.0 . good.

pi@pi:~/Desktop/ctp2/ctp2_code $ ./ctp2
Messagebox(appstr.txt Error): Unable to open appstr.txt. Terminating app.

Continue?

(process:1879): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(process:1879): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:1879): Gtk-CRITICAL **: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:1879): GLib-GObject-CRITICAL **: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:1879): Gtk-CRITICAL **: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:1879): GLib-GObject-CRITICAL **: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:1879): Gtk-WARNING **: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window

(process:1879): Gdk-CRITICAL **: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:1879): Pango-CRITICAL **: pango_context_set_font_description: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_context_set_base_dir: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_context_set_language: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_new: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_text: assertion 'layout != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_attributes: assertion 'layout != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_alignment: assertion 'layout != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_width: assertion 'layout != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_get_extents: assertion 'layout != NULL' failed

(process:1879): Gtk-CRITICAL **: IA__gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:1879): Gtk-CRITICAL **: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:1879): Gtk-CRITICAL **: IA__gtk_icon_size_lookup_for_settings: assertion 'GTK_IS_SETTINGS (settings)' failed

(process:1879): Gtk-WARNING **: Invalid icon size 6

(process:1879): Gtk-CRITICAL **: IA__gtk_icon_theme_load_icon: assertion 'GTK_IS_ICON_THEME (icon_theme)' failed

(process:1879): Gtk-WARNING **: Error loading theme icon 'dialog-error' for stock: 

(process:1879): Gtk-CRITICAL **: IA__gtk_icon_size_lookup_for_settings: assertion 'GTK_IS_SETTINGS (settings)' failed

(process:1879): Gtk-WARNING **: /build/gtk+2.0-NDmKM6/gtk+2.0-2.24.31/gtk/gtkstyle.c:2358: invalid icon size '6'

(process:1879): Gtk-CRITICAL **: IA__gtk_style_render_icon: assertion 'pixbuf != NULL' failed

(process:1879): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(process:1879): Gdk-CRITICAL **: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:1879): Pango-CRITICAL **: pango_context_set_font_description: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_context_set_base_dir: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_context_set_language: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_new: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_text: assertion 'layout != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_alignment: assertion 'layout != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_wrap: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_width: assertion 'layout != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_get_extents: assertion 'layout != NULL' failed

(process:1879): Gdk-CRITICAL **: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:1879): Pango-CRITICAL **: pango_context_set_font_description: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_context_set_base_dir: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_context_set_language: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_new: assertion 'context != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_text: assertion 'layout != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_get_extents: assertion 'layout != NULL' failed

(process:1879): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(process:1879): Gdk-CRITICAL **: IA__gdk_screen_get_width: assertion 'GDK_IS_SCREEN (screen)' failed

(process:1879): Pango-CRITICAL **: pango_layout_set_width: assertion 'layout != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_get_extents: assertion 'layout != NULL' failed

(process:1879): Pango-CRITICAL **: pango_layout_get_line_count: assertion 'layout != NULL' failed
Excepción de coma flotante
ptitSeb commented 5 years ago

For ctp2, did you install the data, using the README.md as a guide (because it should not show you the "XXX.txt file missing" dialog...)?

For KaM, I used this one: https://github.com/reyandme/kam_remake.git

ghost commented 5 years ago

so, it was a bit tricky setup it because i need to instal msfont to launch the game and some of my ctp2 game files where corrupted. i solve it, the games launchs... but

pi@pi:~/Desktop/Call To Power 2/ctp2_program/ctp $ ./ctp2
Mouse PeepEvents failed: 
Mouse PeepEvents failed: 
Mouse PeepEvents failed: 
Mouse PeepEvents failed: 
Violación de segmento

its a shame than gdb its not working properly on my raspbian setup, every time ive tried it says "corrupted stack" ... maybe because I use a different gcc than the repo....don't know. I will compile binutils-gdb just to be sure if thats not the problem..

offtopic: there its a very good french game remake on development on github. one of my favourites of all time, lba 2. https://github.com/agrande/lba2remake it will take some time, but looks really promising.

meanwhile ... for some reason I couldn't apply the patch

pi@pi:~/Desktop/kam_remake $ git apply kam_pandora.diff
kam_pandora.diff:1732: trailing whitespace.
  public
kam_pandora.diff:1734: trailing whitespace.
  private
kam_pandora.diff:1743: trailing whitespace.
//  Result := SysUtils.CharInSet(Key, ['0'..'9']);
kam_pandora.diff:1744: trailing whitespace.
  if Key in ['0'..'9'] then
kam_pandora.diff:1745: trailing whitespace.
     Result := true
error: patch failed: src/navmesh/KM_NavMeshGenerator.pas:4
error: src/navmesh/KM_NavMeshGenerator.pas: patch does not apply
ptitSeb commented 5 years ago

For ctp2: I have never seen that error. Strange. You can try to use this repo: https://github.com/civctp2/civctp2 It's basically the new official version. My changes are in there, so it should build the same way. Maybe you SDL2 issue are fixed there?

For KaM, strange. Maybe the CR/LF got converted when I upload the file (so maybe some dos2unix kam_pandora.diff is needed)? You can also try using patch, with patch -p1 -N < kam_pandora.diff

Ah, lba2 remake? Nice :)

ghost commented 5 years ago

Hope I figured out why its crashing sdl. maybe its related to latest sdl (the one I have). I am trying the other ctp2 repo, if any happens I will move the question there. the patch its not working. maybe I should wait to your repo. if you suggest something more I will listen as always. many thanks to port this game.

pi@pi:~/Desktop/kam_remake $ patch -p1 -N < kam_pandora.diff
patching file KaM_Remake.inc
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file KaM_Remake.inc.rej
patching file KaM_Remake.lpi
Reversed (or previously applied) patch detected!  Skipping patch.
34 out of 34 hunks ignored -- saving rejects to file KaM_Remake.lpi.rej
patching file src/KM_Controls.pas
Reversed (or previously applied) patch detected!  Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file src/KM_Controls.pas.rej
patching file src/KM_FormMain.pas
Reversed (or previously applied) patch detected!  Skipping patch.
6 out of 6 hunks ignored -- saving rejects to file src/KM_FormMain.pas.rej
patching file src/KM_Main.pas
Reversed (or previously applied) patch detected!  Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file src/KM_Main.pas.rej
patching file src/KM_Sound.pas
Reversed (or previously applied) patch detected!  Skipping patch.
4 out of 4 hunks ignored -- saving rejects to file src/KM_Sound.pas.rej
patching file src/KM_Viewport.pas
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/KM_Viewport.pas.rej
patching file src/ai/KM_AIMayorBalance.pas
Reversed (or previously applied) patch detected!  Skipping patch.
5 out of 5 hunks ignored -- saving rejects to file src/ai/KM_AIMayorBalance.pas.rej
patching file src/game/KM_Game.pas
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/game/KM_Game.pas.rej
patching file src/game/KM_GameApp.pas
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/game/KM_GameApp.pas.rej
patching file src/gui/KM_InterfaceGame.pas
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/gui/KM_InterfaceGame.pas.rej
patching file src/gui/pages_maped/terrain/KM_GUIMapEdTerrainBrushes.pas
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/gui/pages_maped/terrain/KM_GUIMapEdTerrainBrushes.pas.rej
patching file src/gui/pages_maped/terrain/KM_GUIMapEdTerrainHeights.pas
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/gui/pages_maped/terrain/KM_GUIMapEdTerrainHeights.pas.rej
patching file src/gui/pages_menu/KM_GUIMenuLobby.pas
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/gui/pages_menu/KM_GUIMenuLobby.pas.rej
patching file src/gui/pages_menu/KM_GUIMenuMapEditor.pas
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/gui/pages_menu/KM_GUIMenuMapEditor.pas.rej
patching file src/navmesh/KM_NavMeshGenerator.pas
Hunk #1 FAILED at 4 (different line endings).
Hunk #2 FAILED at 71 (different line endings).
Hunk #3 FAILED at 146 (different line endings).
Hunk #4 FAILED at 332 (different line endings).
Hunk #5 FAILED at 374 (different line endings).
Hunk #6 FAILED at 387 (different line endings).
Hunk #7 FAILED at 468 (different line endings).
Hunk #8 FAILED at 480 (different line endings).
Hunk #9 FAILED at 533 (different line endings).
Hunk #10 FAILED at 600 (different line endings).
Hunk #11 FAILED at 991 (different line endings).
11 out of 11 hunks FAILED -- saving rejects to file src/navmesh/KM_NavMeshGenerator.pas.rej
patching file src/res/KM_ResFonts.pas
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/res/KM_ResFonts.pas.rej
patching file src/terrain/KM_RandomMapGenerator.pas
Reversed (or previously applied) patch detected!  Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file src/terrain/KM_RandomMapGenerator.pas.rej
patching file src/utils/KM_CommonUtils.pas
Reversed (or previously applied) patch detected!  Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file src/utils/KM_CommonUtils.pas.rej
patching file src/utils/KM_Utils.pas
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/utils/KM_Utils.pas.rej
ghost commented 5 years ago

Meanwhile ive tested et legacy , my goodness, it performs extremly great on thepi... I had to experiment a bit with the build script because it was meant to use the legacy driver. https://youtu.be/Ae5B0Tz9FC4 :):)

I coulnt join internet games, there is an 2.60b armhf patch for linux than I am lacking to do that? I need to investigate a bit

ptitSeb commented 5 years ago

Yes, Q3 Engine based games are always a win (but I'm still not much into multiplayer fps...)

ghost commented 5 years ago

Please, let me know when you upload your kam remake repo (and please do that). I could wait whatever it takes! I will leave this open for that. Thanks as always.

ptitSeb commented 5 years ago

I started: https://github.com/ptitSeb/kam_remake But it's not ready yet.

ghost commented 5 years ago

Hi Ptit! ive recently compiled the original repo and the problem remains. just if you have any idea of what could happening.. this time I get a few more information on where its the problem (before the mouse peep events):

ui/aui_common/aui_movie.cpp L640: SDL mouse code is missing here!

weird, dont you think? it will be solved eventually, the dev is thinking to move to sdl2

offtopic: this project seems difficult. but hey, looks lovely https://github.com/yardteam/rrr3d

thanks as always

ptitSeb commented 5 years ago

What's your issue with SDL/Mouse, I don't remember the error message you got.

(that rrr3d project, is it functionnal? I see it's Windows only for now, but is it complete alread?)

ghost commented 5 years ago

Yes. It was finished log time ago. And its windows only for now, but maybe wine apis (arm) could be used??

https://youtu.be/yiFOhqPEI6g

ptitSeb commented 5 years ago

Yeah, sure Winemaker can help. But is the status of the Data, because that github seems to be only code?

ghost commented 5 years ago

Mmm.. Its down from steam a long time ago because of licence infringement. Dont know if it was activision or blizzard, but they are torrents on iggames. Its everywhere on internet.

https://igg-games.com/motor-658815286-rock-free-download.html

ghost commented 5 years ago

They change the name to motor rock thinking than that would bypass any licence infrignment... Very bad for them. At least they release the source code after that. No, there is no more warnings on civ ctp2 than mouse peep event failed several times and seg fault after that. I think than its not related to any missing file, just sdl. Dont know why it no produce the same seg fault on pandora. The difference from your aui_movie.cpp its than here they add that warning. But maybe its releted to other cpp like aui_sdlmouse.cpp. thanks anyway!

ghost commented 5 years ago

Another more interesting and easy port could be ikemen go, an open source mugen clone. Its a famous fighting engine with thousands of mods, like hyper dragon ball z for example. Ive tried this repo and it compiles ... I get a segfault when the fight starts... https://github.com/Windblade-GR01/Ikemen_GO

ghost commented 5 years ago

Great news!! armhf/arm64 lwjgl3 support! dont know if arm6 too https://github.com/LWJGL/lwjgl3/issues/206

check my last videos! :) pushing the pi to his limits!! duke nukem HRP https://www.youtube.com/watch?v=L7xt5GIEeqY&t=16s bloodCM HRP https://www.youtube.com/watch?v=Iw3mVfKm5Ls system shock https://www.youtube.com/watch?v=7IG1KU_zAO8&t=154s

ptitSeb commented 5 years ago

I have already built lwjdl3 on the Pandora (and ran Mincraft 1.12+). I already have running DukeNukem / BloodCM and SystemShock too. I also have running BloodGDX build on the Pandora :p

ghost commented 5 years ago

yeah I know that (about eduke and bloodcm)!! the difference is the "HRP". it demans a lot of vram anyway. and Ive seen your comments on SS! ohh, didnt know of BloodGDX on arm! that would be great on the pi! The Nblood version has some regressions on rpi3 because os glad (the same happens on latest eduke32) what are you doing right now, mainly?

I didnt try your WIP KaM repo, you used fpc with what parameters and target project file??... never compilated anything related to pascal before.

ghost commented 5 years ago

Hi ptit! any progress with KaM remake?? could you give me a little guide of how to compile it with fpc?? Now I have an rockpi4 from radxa, so I will move to that platform now...but i want to test my beloved knights and merchants on the rpi3 before.

check my latest tests on Raspberry pi 3!

0 A.D. >> 12 gigs of compiled source code folder ...it crash eventually because of lack of enough vram https://www.youtube.com/watch?v=oDHvfvnvurU&t=245s Planescape Torment , you already have it on pandora https://www.youtube.com/watch?v=1OuB9gJJwY4&t=41s
Counter Strike 1.6!! (with the help os xash!) https://www.youtube.com/watch?v=UE2ptkcXRVQ&t=719s Half-life , already done by you on the pandora https://www.youtube.com/watch?v=UCQpptJnOI8&t=690s Open Morrowind , I have some memory leaking problem (I think... but this game pushes so hard the hard anyway) https://www.youtube.com/watch?v=qFwffkbGTag&t=171s Diablo I (devilutionx) https://www.youtube.com/watch?v=6RjanHapim4&t=57s

ptitSeb commented 5 years ago

A rockpi4? Oh RK3399, nice. You will probably need gl4es for most of the games ;)

0 A.D. : this one is really heavy yes. I have an old build that somehow start on the Pandora, but then crash. The Pandora is really underpowered for this one anyway.

Counter Strike 1.6 I have it also on the Pandora image But I'm not much into multiplayer-only fps.

OpenMorrowind I also have a build on the Pandora, but it's super slow (like 2 fps outdoor). I need to check the Android version, with the "unsafe graphics optimisation" and all, maybe I can jump to 4 fps... (the Pandora is only a single core 1GHz ARM cpu, 512MB of RAM and with a quite weak 200Mhz SGX graphics, so much weaker than a RPi3, still I may have to recheck , because you get some 20fps outdoor, so it's not so bad)

Diablo, there is a build for some year already on the Pandora, along with Diablo 2, Starcraft and even Jazz Jackrabbit. It direct static recompilation from Notaz. It works superbly, but it's tied to a specific game version. I'm not even sure it works with latest GOG release of Diablo (but it worked fine with the original CD version). Looking at devilutionx, it seems to work perfectly, I may try some build of it later.

About KaM, I had trouble with the steam data, it was always missing some file. I now have the GoG version of it, but I have yet to try extract and setup the data. For the how to build, fpc is not enough, you need Lazarus also (Lazarus is the opensource equivalent of Borland Delphi). With Lazarus, simply open the KaM_remake.lpi project and build it for the GUI.

ghost commented 5 years ago

I will use your gl4es indeed. I have tons of things to do. Ok. I will try it with laz. Thank you ptit. Couls you open the issue tracker on that repo so I could continue there??

ptitSeb commented 5 years ago

It's ok, you can create issues on kam_remake repo now.