Jump to content

Home

razorace


stubert

Recommended Posts

  • Replies 53
  • Created
  • Last Reply

why bother? all ensi is pineing over is a few admin commands that nobody cares about, the rest are lines copies right from ojp, et, osp..

 

 

i was just hoping you'd take advantage of the things i spent the builk of my time on, weapon adjusters, scoreboard and rewards, moveable hud, unlagged (which ensi copied and i spent a week straight debugging), threads with the in-game file installations, **** like that.

 

later on i'll show you how to make file transfers work smoothly and do up some nice howtos

 

 

and yea, ensi is supposed to understand that we forked it and that he has no buisness telling me what to do with my fork than i do with his.

 

 

and i hate admin mods, their ghey.

Link to comment
Share on other sites

why bother? all ensi is pineing over is a few admin commands that nobody cares about, the rest are lines copies right from ojp, et, osp..

 

 

i was just hoping you'd take advantage of the things i spent the builk of my time on, weapon adjusters, scoreboard and rewards, moveable hud, unlagged (which ensi copied and i spent a week straight debugging), threads with the in-game file installations, **** like that.

 

later on i'll show you how to make file transfers work smoothly and do up some nice howtos

 

 

and yea, ensi is supposed to understand that we forked it and that he has no buisness telling me what to do with my fork than i do with his.

 

 

and i hate admin mods, their ghey.

 

uhm no go ahead and think all i did was steal or barrow but your wrong there.

 

also using pthread in windows is very lagged and is mem consuming according to slider.

 

Kurgan: as for whats listed above has nothing to do with red slushie ;D

 

i really dont care if u have the code,,, its still quite buggy anyway.

Link to comment
Share on other sites

it does :x but slider told me its a mem hog.

 

yes on windows, it is probably better to use the native thread function..

Indeed phtread on windows is a port of phtread linux code in order to provide the same headers for each function than the linux api.

But in background it uses the native windows api library..

In my URL redirect for autodownload in JA+2.4Beta1, i uses the windows native api for the windows version.

 

But sure on linux and mac, i use pthread.

But i prefer having 2 different codes for each plateform.

It is probably more optimized.

Moreover some feature in pthread available in linux and mac plateform are not available in the windows port of pthread..

Using the native thread api for windows, i have much more options and feature....

 

moreover the thread needed code for uRL redirect autodownload is very simple. So it is very easy to have a linux, mac version based on pthread or even directly just some fork(), and a windows version based on the native windows api..

Link to comment
Share on other sites

the only things i didn't port correctly yet on MAC OS X is the path of the base folder

 

it is in ~/Library/Application data/Jedi Academy/ or something like that...

 

and i didn't found yet how to point directly to this path when i write a file using fwrite and fopen...

using this path doesn't work because it does not read the ~/ and does not understand it as /users/yourUserName...

 

I would have probably a mean in C/C++ to know the name of the user which starting the jedi academy.app programm on MAC....

 

or perhaps on mac os x, the game is storing the path of base in a cvar?

or perhaps there is a subroutine syscall on the mac port of the game to know the real path /Users/username/Library/........./base

Link to comment
Share on other sites

yes or perhaps i can use the syscall file function of Jedi academt to write a file instead of using fwrite...

 

the problem is that i don't know where goes the file writen by those syscall function on MAC os X

 

if it does not go in ~/Libraty/appliction support/jedi academy/base

 

the pk3 will not be loaded

Link to comment
Share on other sites

*shrug* seems like an interesting feature but I'm not sure it would be worth the time commitment. The only people that regular use OJP run it in server-only mode so spending the time to port/debug this sort of code seems like time that could be better spent on gameplay features.

Link to comment
Share on other sites

int FileCopy( const char *src, const char *dst )

{

  #define BUFSZ 16000



  char            *buf[bUFSZ];

  FILE            *fi;

  FILE            *fo;

  unsigned        amount;

  unsigned        written;

  int             result;



 // buf = new char;



  fi = fopen( src, "rb" );

  fo = fopen( dst, "wb" );



  result = COPY_OK;

  if  ((fi == NULL) || (fo == NULL) )

   {

     result = COPY_ERROR;

     if (fi != NULL) fclose(fi);

     if (fo != NULL) fclose(fo);

   }



  if (result == COPY_OK)

   {

     do

     {

        amount = fread( buf, sizeof(char), BUFSZ, fi );

        if (amount)

        {

           written = fwrite( buf, sizeof(char), amount, fo );

           if (written != amount)

           {

           result = COPY_ERROR; // out of disk space or some other disk err?

           }

        }

     } // when amount read is < BUFSZ, copy is done

    while ((result == COPY_OK) && (amount == BUFSZ));

        fclose(fi);



    fclose(fo);

  }

  //delete [] buf;

  return(result);

}

 

 

you have control over the path with this

Link to comment
Share on other sites

yes i know what fo = fopen( dst, "wb" ); does

 

i already use it for the win32 version

 

the pb is that on mac the dst path is ~/Library/........./base which points to /Users/USERNAME_onMAC_OS_X/Library/................/base

 

fopen( "/Users/USERNAME_onMAC_OS_X/Library/................/base/test.pk3"

, "wb" ); will WORK

 

 

fopen( "~/Library/................/base/test.pk3"

, "wb" ); will NOT WORK

 

so i need on mac os X to know the user starting the JediAcademy.app application which is absolutly not in the same folders like for the windows game...

 

OR as i said, perhaps using the trap syscall fs_write functions will give on mac os x a better result as the main client programm will make the work to write the files in the good folder...

I think it will give a try to this method for mac ox x....

 

on windows i used fwrite because i can like that write the pk3 in base folder...

I am pratically sure that the base engine syscall fs_write will write the file in the fs_game folder which is not what i want...

Link to comment
Share on other sites

thats cool slider, you were on vacation?

heu no it was for work

 

can u tell me redsaurus what is the value of fs_homepath?

 

is it /Users/Redsaurus/Library/Application SUpport/Jedi Academy/ ?

 

then inside there is base and all other mod folders like japlus ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...