.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   YaPB (http://forums.bots-united.com/forumdisplay.php?f=55)
-   -   YaPB Android Port (http://forums.bots-united.com/showthread.php?t=10003)

jeefo 18-12-2015 12:33

Re: YaPB ARM Port
 
Replace function SineCosine in corelib.h

Code:

  static inline void SineCosine (float rad, float *sin, float *cos)
  {
#if defined (_WIN32) && defined (_MSC_VER)
      __asm
      {
        fld dword ptr[rad]
        fsincos
        mov ebx, [cos]
        fstp dword ptr[ebx]
        mov ebx, [sin]
        fstp dword ptr[ebx]
      }
#elif defined (__linux__) || defined (GCC) || defined (__APPLE__)
      register double _cos, _sin;
      __asm __volatile__ ("fsincos" : "=t" (_cos), "=u" (_sin) : "0" (rad));

      *cos = _cos;
      *sin = _sin;
#else
      *sin = sinf (rad);
      *cos = cosf (rad);
#endif
  }

with:

Code:

  static inline void SineCosine (float rad, float *sin, float *cos)
  {
      *sin = sinf (rad);
      *cos = cosf (rad);
  }


jeefo 18-12-2015 12:36

Re: YaPB ARM Port
 
1 Attachment(s)
You're also need working with CSDM sources, they're not in git, as i'm currently not going to add complete support for this mod.

openglhk 18-12-2015 14:31

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66392)
Replace function SineCosine in corelib.h

Code:

  static inline void SineCosine (float rad, float *sin, float *cos)
  {
#if defined (_WIN32) && defined (_MSC_VER)
      __asm
      {
        fld dword ptr[rad]
        fsincos
        mov ebx, [cos]
        fstp dword ptr[ebx]
        mov ebx, [sin]
        fstp dword ptr[ebx]
      }
#elif defined (__linux__) || defined (GCC) || defined (__APPLE__)
      register double _cos, _sin;
      __asm __volatile__ ("fsincos" : "=t" (_cos), "=u" (_sin) : "0" (rad));

      *cos = _cos;
      *sin = _sin;
#else
      *sin = sinf (rad);
      *cos = cosf (rad);
#endif
  }

with:

Code:

  static inline void SineCosine (float rad, float *sin, float *cos)
  {
      *sin = sinf (rad);
      *cos = cosf (rad);
  }


Thanks, compile successful after i remove that fsincos - x86 instruction :sweatdrop:
But seems that xash3D build all *.so library into the apk package. :ph34r:

It is necessary to compile mp_dll? or just replaced by yapb.so?

jeefo 18-12-2015 20:13

Re: YaPB ARM Port
 
Quote:

Originally Posted by openglhk (Post 66394)
Thanks, compile successful after i remove that fsincos - x86 instruction :sweatdrop:
But seems that xash3D build all *.so library into the apk package. :ph34r:

It is necessary to compile mp_dll? or just replaced by yapb.so?

i don't know actually how xash on android loads gamedll and how it's called. for the normal scenario xash should load yapb binary, and yapb binary will load gamedll binary creating somewhat bridge between xash and gamedll.

any tut on how to build for android?

RoboCop 19-12-2015 00:54

Re: YaPB ARM Port
 
Post not required but unable to delete

openglhk 19-12-2015 02:31

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66395)
i don't know actually how xash on android loads gamedll and how it's called. for the normal scenario xash should load yapb binary, and yapb binary will load gamedll binary creating somewhat bridge between xash and gamedll.

any tut on how to build for android?

if yapb binary is a bridge, xash3d (ARM arch) should not able to load x86 .dll/.so:shifty:

yapb source code here: https://github.com/jeefo/yapb/blob/m...face.cpp#L3043

i build the xash3d for android from the below sources: :flowers:

https://github.com/SDLash3D/xash3d-android-project

openglhk 20-12-2015 07:54

Re: YaPB ARM Port
 
Quote:

Originally Posted by openglhk (Post 66398)
if yapb binary is a bridge, xash3d (ARM arch) should not able to load x86 .dll/.so:shifty:

yapb source code here: https://github.com/jeefo/yapb/blob/m...face.cpp#L3043

i build the xash3d for android from the below sources: :flowers:

https://github.com/SDLash3D/xash3d-android-project

CSDM source code: https://github.com/mittorn/csdm
CSDM android build: https://github.com/mittorn/csdm-android

update: i'm trying to modify inferface.cpp :phone:

jeefo 20-12-2015 12:24

Re: YaPB ARM Port
 
I will build csdm with yapb for android next week. Just need to setup build env.

openglhk 21-12-2015 02:08

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66401)
I will build csdm with yapb for android next week. Just need to setup build env.

:punk:awesome!

jeefo 21-12-2015 22:42

Re: YaPB ARM Port
 
OMG! POD-Bots on my phone! :)

But.. Not yet playable, as they doesn't support the CSDM mod completely. Will work a little more, to a playable state.

https://yapb.jeefo.net/tmp/screen.jpg
https://yapb.jeefo.net/tmp/screen1.jpg
https://yapb.jeefo.net/tmp/screen2.jpg


All times are GMT +2. The time now is 15:20.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.