[OLD-1] AGS engine Linux port

Started by BigMc, Sun 03/06/2012 19:04:20

Previous topic - Next topic

BigMc

And you used the Windows engine from the link I just posted?

scottchiefbaker

I reran the test... When I use the .exe provided from Wadjet I see rain on the main menu. If I use the acwin.exe nightly (2013-02-07) build you posted I do NOT see rain. Looks like something is wrong with the engine?

Crimson Wizard

#322
Quote from: scottchiefbaker on Fri 08/02/2013 23:14:34
I reran the test... When I use the .exe provided from Wadjet I see rain on the main menu. If I use the acwin.exe nightly (2013-02-07) build you posted I do NOT see rain. Looks like something is wrong with the engine?

Yes, it does.

Is it possible for us to examine the game script and test the compiled beta? This way we will be able to see what game is supposed to do, and what engine does wrong.

Also, I would like to make this clear: does the rain not run only in main menu, on in the rest of the game too?

scottchiefbaker

Wadjet asked me not to post it publicly, so I PMd you the address of where the beta and the SnowRain code is. If anyone else would like to take a look at it PM me.

I didn't check the rain any where other than the main menu.

JJS

I think I know why there is no rain. The engine contains stubs for plugin functions. The snow/rain module uses the same functions as the plugin I think. Probably the stubs override the modules functions.

The code that registers the stubs should be made conditional on whether the plugin is actually loaded. I never got around to do that :/

Check this: https://github.com/adventuregamestudio/ags/blob/master/Engine/plugin/global_plugin.cpp#L419
Commenting out all calls that register snowrain functions should do the trick for now.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

scottchiefbaker

I commented out lines 420 through 441 in plugin/global_plugin.cpp (all the SnowRain stubs) and recompiled. Now I get rain on the main menu, I think that did the trick!

Crimson Wizard

Oh my... that one was simple. Thanks JJS. And I even haven't dled the package fully yet :D.

scottchiefbaker

I think the next thing I'd like to tackle is cleaning up all the warnings on the build process. My OCD doesn't like a non-clean build process :) What are all these errors?

Code: AGS
In file included from ac/drawingsurface.cpp:507:0:
../Engine/script/script_runtime.h:58:13: warning:   initializing argument 2 of ‘bool ccAddExternalFunctionForPlugin(const char*, void*)' [-fpermissive]
ac/drawingsurface.cpp:676:89: warning: invalid conversion from ‘void (*)(ScriptDrawingSurface*, int, int, int, int, int)' to ‘void*' [-fpermissive]


JJS

That warning is because the second parameter is implicitly cast to void* for every call to ccAddExternalFunctionForPlugin(). Generally it is a good idea to reduce the warning count and especially to get the source to compile without compatibility settings (e.g. -fpermissive). In this case it is easy and harmless, some others might be more subtle and indicate an underlying bug. So just explicitly casting everything (which would silence a lot the warnings) is not helpful in the long run.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Sslaxx

Quote from: JJS on Sat 09/02/2013 08:19:29
That warning is because the second parameter is implicitly cast to void* for every call to ccAddExternalFunctionForPlugin(). Generally it is a good idea to reduce the warning count and especially to get the source to compile without compatibility settings (e.g. -fpermissive). In this case it is easy and harmless, some others might be more subtle and indicate an underlying bug. So just explicitly casting everything (which would silence a lot the warnings) is not helpful in the long run.
Are you saying that it'd be better to do the explicit cast with the warnings scottchiefbaker has indicated?
Stuart "Sslaxx" Moore.

Crimson Wizard

No, don't cast everything in program, of course. Every case should be investigated on its own.
In the case of ccAddExternalFunctionForPlugin, this is intended behavior (the function pointer cast to void*, not the warning ;)). It should have expilcit cast (void*) there, something I just forgot to add.

Crimson Wizard

#331
Alright, I pushed a fix for these ccAddExternalFunctionForPlugin calls, because it's my fault and they are just too annoying.

But no worries! There are still loads of warnings, so everyone can participate in their elimination. :)

BTW, JJS, will there be any change to plugin stubs registration?

scottchiefbaker

Wow that is a MUCH cleaner build... I love it. Still more work to go, but that's a great start. Good work!

JJS

Quote from: Crimson Wizard on Sat 09/02/2013 18:46:32BTW, JJS, will there be any change to plugin stubs registration?
I pushed the change. Stubs are now only registered if the game tries to load the plugin and neither the plugin can be loaded nor a built-in plugin is found.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

scottchiefbaker

No git updates since the 8th? Other than perhaps some build clean up, anything else outstanding before we do an official commercial release?

scottchiefbaker

Scratch that, there was an update on the 11th, my git was screwed up. I can't build today though:

Code: AGS
main/version.cpp: In member function ‘void AGS::Engine::Version::MakeString()':
main/version.cpp:66:72: error: cannot pass objects of non-trivially-copyable type ‘class AGS::Common::String' through ‘...'
compilation terminated due to -Wfatal-errors.
make: *** [main/version.o] Error 1

Crimson Wizard

Can't believe I missed that. Fixed.

Other than that, I think I will increase version number. I just want to do this on Saturday, to test a bit more and make sure it does not prevent to load savegames and such.

scottchiefbaker

Looking at cleaning up the build process, what are these errors?

Code: AGS
script/runtimescriptvalue.cpp: In member function ‘bool RuntimeScriptValue::WriteValue(const RuntimeScriptValue&)':
script/runtimescriptvalue.cpp:314:101: warning: cast from ‘char*' to ‘int32_t {aka int}' loses precision [-fpermissive]
script/runtimescriptvalue.cpp:338:58: warning: cast from ‘char*' to ‘int32_t {aka int}' loses precision [-fpermissive]
script/runtimescriptvalue.cpp:357:90: warning: cast from ‘char*' to ‘int32_t {aka int}' loses precision [-fpermissive]
script/runtimescriptvalue.cpp:361:90: warning: cast from ‘char*' to ‘int32_t {aka int}' loses precision [-fpermissive]
script/runtimescriptvalue.cpp:366:80: warning: cast from ‘char*' to ‘int32_t {aka int}' loses precision [-fpermissive]


Crimson Wizard

Quote from: scottchiefbaker on Fri 15/02/2013 19:12:26
Looking at cleaning up the build process, what are these errors?
These are legacy issues, there are pointer types stored as 32-bit ints. I think these parts of code may be removed, because AFAIK they never run anymore.
But I need to check more carefully first.

scottchiefbaker

Can someone review/check-in this patch to alfont.c to clean up the build process a little. It's just some char** to const char** clean up.

http://www.perturb.org/tmp/alfont.patch

SMF spam blocked by CleanTalk