Please login or register.

Login with username, password and session length
Advanced search  


This forum provides RSS feed. To query recent posts use this url. More...

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - HCDaniel

Pages: 1 ... 9 10 [11] 12
WME Lite / Re: Any Linux developers out there?
« on: June 01, 2013, 08:32:55 PM »
Thanks for all the explanations, it'll take a while until I have understood and ported everything to Android/Linux. You'll see the progress in the wmelite fork anyway ;)

The pull requests I meant are for the original wme (wme1), I have one request and one more to come. Once this is all sorted out I would remove the fork.

WME Lite / Re: Any Linux developers out there?
« on: June 01, 2013, 05:08:14 PM »
Ok so here now a bunch of questions about platform dependent stuff which I do not understand:

what are the effects of setting "m_TouchInterface"  and "m_ConstrainedMemory"?

what do "ShowStatusLine" and "HideStatusLine" script commands do?

CBRenderSDL::Flip() and CBRenderSDL::SetViewport(int left, int top, int right, int bottom)
what kind of IOS or SDL "bug" is the workaround for?

what is the IOS specific tweak to BASS?

CBPlatform::Initialize(CBGame* inGame, int argc, char* argv[])
what's the event watch, and why would I want it?

CBPlatform::HandleEvent(SDL_Event* event)
what does the IOS specific code do?

I don't get at all what CSXStore class is for

For the rest it is clear to me what is meant, so I can implement the Linux/Android part. BTW I would like to add my changes of the regular WME to WME lite. I have one pull request for you and one more to come. Could you have a look?

There's one thing (maybe specific to Android) which could be added somehow, if possible. Android can show an "Options" or "Menu" key if the App is set up appropriately. This could be used to display a menu or options window in wmelite (like in regular WME a window can be shown which overlays the game). Is that something that can be done?

WME Lite / Re: Any Linux developers out there?
« on: June 01, 2013, 03:48:09 PM »
Ok, didn't know that SDL has its own defines, so I will use them.

I found quite some places in the code where platform dependent stuff is going on, so I was wondering whether you considered creating an OS abstraction layer to ease porting? I'm personally mainly interested in Linux and Android, so I'm also fine with just checking all the #defines, just wondering whether you want to collect all OS dependent stuff in one central place?

Now I understand where the device types come from. In Android I can probably ask for screen size and density - so maybe I can make a decision based on that. There are a lot of devices, and sometimes you cannot tell whether it is a phone or a tablet  :-\

I'll continue with asking you for platform-dependent functions that I do not understand, once I encounter them ;D

WME Lite / Re: Any Linux developers out there?
« on: June 01, 2013, 03:05:57 PM »
I have just checked where platform specific code is used in wmelite. I found these defines

   cat $i | grep "__WIN32__";
   cat $i | grep "__MACOSX__";
   cat $i | grep "__IPHONEOS__";
   cat $i | grep "_MSC_VER";
   cat $i | grep "__APPLE__";
   cat $i | grep "__IPHONE__";
   cat $i | grep "__OBJC__";

which indicate that some platform specific stuff is going on. I can check the corresponding files, and maybe add a "LINUX" or "ANDROID" define where applicable, once I am sure about the actual implementation. What makes me wonder though are the different defines for Apple platforms. Is there any reason for that, or shall I just ignore the different labels and carry on?

As for the Game::GetDeviceType() call, I currently don't know how to implement it properly. I need to check whether Android actually has such a distinction. The game I tested runs fine on an old Samsung phone (probably 4''), as well as Googles Nexus 7 and an older Acer tablet (10''), so is there any need to distinguish between phone and tablet?

WME Lite / Re: Any Linux developers out there?
« on: June 01, 2013, 12:31:43 PM »
Thanks for the pointer. I found that there no viewport translation happens, which was strange. The real problem was from my point of view that the query for possible resolutions was #ifdef __IPHONEOS__ only, so I added a define for android. Voila - fullscreen graphics and proper coordinates :) So while there's probably still a lot of work to do, I'm glad that wme lite seems to start looking interesting on Android now.

WME Lite / Re: Any Linux developers out there?
« on: June 01, 2013, 10:11:10 AM »
Ok, so I can take a look at the various defines soon. A similar mechanism to ask the app to save its state exists in Android as well, so I think this could be implemented in a similar way.

Meanwhile I did some more tweaks so that true type font rendering works. The correct way to fix this will be to add proper search paths. The only remaining major issue is now the touch offset. The game screen is aligned to the left bottom of the display, but the y-offset of the touch event is somehow added twice, so that the cursor is located always below the point where the touch happened. Do you have any idea what might cause this?

WME Lite / Re: Any Linux developers out there?
« on: May 31, 2013, 08:18:54 PM »
For the moment I have hardcoded "/mnt/sdcard" so that I can at least test how wmelite works on Android. Graphics output and sound work, font display is currently broken (might be due to the pretty old libfreetype that I am currently including) and touch input has a strange offset (it currently shows the mouse pointer some 50 pixels below where I touch), so I can walk around in the demo but not use anything or talk to the person.

In order to fill out the platform-dependent sections, are the two places you mentioned all that I should check? Or should I just grep the sources for all #ifdefs?

WME Lite / Re: Any Linux developers out there?
« on: May 29, 2013, 06:09:38 PM »
In Android, main() is not the starting point of an app. If you want to run native code, this has to be done via the Java-Native-Interface. So even in the case of WME which itself does not contain any Java, a small Java skeleton app is provided by SDL2 in order to let it run.

Furthermore I assume that any way to fetch the packages with the game data will be done in the Java domain, before WME is started (unless they are <50MB and they can be bundled with the app). In case of fetching via Google Play, there are libraries distributed by Google for that purpose.

In either way, the Java part of the app knows the path to the game packages, and could supply it to WME. I thought that the easiest (and maybe most platform independent) way is to add a cmdline switch for that. It could be useful for Windows and Linux where you have a command line (maybe Mac OS as well), and on Android it is supplied by the Java skeleton app.

Agreed, anything that is possible in Java is also possible to do in C, but it is more difficult to achieve and certainly not platform-independent.

I hope this clarifies a bit.

WME Lite / Re: Any Linux developers out there?
« on: May 29, 2013, 04:27:03 PM »
Ok, so for the moment I hardcoded "/mnt/sdcard/" so that I could at least run the demo project.

Android has several ways to supply resources, but once you hit the 50MB limit you can no longer ship it as one package (at least when installing via the play store). For that, Google has introduced "expansion files" which will be downloaded when you install the app.

Long story short, in the end your Java app wrapper knows where your files are supposed to be, so you need to get that information to WME. How about adding this to the arguments of main() in some way?

WME Lite / Re: Any Linux developers out there?
« on: May 29, 2013, 10:25:21 AM »
Hi Mnemonic,

how does WME lite search for the game packages? In Android, I cannot simply add them to the "current" directory, so I would have to specify a dedicated path. I would want to supply this as an argument to WME's main(), so how can I do that?

WME Lite / Re: Any Linux developers out there?
« on: May 27, 2013, 06:13:51 PM »
Hi Mnemonic,

thanks for the hints. With exceptions enabled, the STL target and the boost-for-android headers I can now compile all source files for Android. Now I need to find appropriate references (and time) to generate libfreetype and libfreeimage for Android. Then I can see whether it'll link :) And finally I will have to check how to glue SDL to WME of course, on Android there's no main().

WME Lite / Re: Any Linux developers out there?
« on: May 26, 2013, 09:52:00 PM »
Android is more difficult. SDL exists (and compiles), BASS exists. What's missing are freetype, freeimage and boost libs, which have to be provided for that platform.

I tried to compile as much as possible of WME lite for Android (without linking), just by providing the necessary include files. The freetype and freeimage headers are ok, but the boost headers don't work. I'll check the error message in detail soon. EDIT: Looks like Android does not understand "std::runtime_error"?

Furthermore, Android native C++ code does not like (or not support at all, I'm not sure) C++ exceptions (maybe because it's too difficult to pass them to Java in case the exception is not caught in native code). So the compilation of SXString.cpp fails. I haven't checked the code whether it is possible to live without the use of exceptions in WME lite, if just for the Android platform.

Mnemonic, what's your opinion about C++ exceptions, and do you think you can get rid of the boost library anytime soon?

WME Lite / Re: Any Linux developers out there?
« on: May 26, 2013, 05:01:42 PM »
Hi Mnemonic,

I tried it the quick and dirty way, WME lite compiles for Linux (tested on Ubuntu 12.04 32 bit).

The compiler emits a lot of warnings. The one warning about "typedef ignored" I cannot silence without a source code change, so can you please apply commit 27cf77c from the forked version if it does not break the other builds?

Then there are a lot of warnings about using string literals which are passed to functions that do not define the character sequence as "const" - these I can switch off easily. I don't think you want to go through the painful process of fixing that ;)

Some more warnings appear that NULL is assigned to a non-pointer type - I switched them off as well. These would probably be easier to fix (and there's only a couple of them), but I don't know whether it is worth the effort.

The rest of warnings is here:
Code: [Select]
./BGame.cpp:4758:7: Warnung: mehrere Token am Ende der Direktive #else [standardmäßig aktiviert]
./BGame.cpp: In Elementfunktion »virtual HRESULT CBGame::ScCallMethod(CScScript*, CScStack*, CScStack*, char*)«:
./BGame.cpp:2088:32: Warnung: Format »%x« erwartet Argumenttyp »unsigned int«, aber Argument 3 hat Typ »crc {aka long unsigned int}« [-Wformat]
just FYI. Nothing serious I would say.

I tested the sample game, I could play it but it segfaulted on exit. I'll see whether that is in WME or one of the libraries.

WME Lite / Re: Any Linux developers out there?
« on: May 25, 2013, 11:57:37 AM »
Hi Mnemonic,

I can give this a try when I'm finished pushing all my WME1 changes to you. I'm not too good at creating Makefiles or "./configure" scripts, but usually I get stuff to compile sooner or later :) So if nobody else steps up who has more experience in creating a proper Linux source package and handling dependencies in the right way, I can take a look.

Just checked out the sources and compiled the WME executable  :)

Just for curiosity, what was the motivation behind the license change to MIT license?

Are you interested in patches for WME1?

Pages: 1 ... 9 10 [11] 12

Page created in 0.031 seconds with 19 queries.