project-navigation
Personal tools

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 - criusmac

Pages: 1 ... 3 4 [5] 6 7 ... 12
61
FAQ / Re: Trunk - usehomedir
« on: October 04, 2009, 06:57:36 pm »
Well, personally, if I were making the changes, I would make it so that you could change the directory via the command line, like in 2.2.1.

But, this may be since I don't know what a NSIS installer is, and I just download the whole package and go from there.

So, I guess this would be a choice made from ignorance. Still, since I found the revision the changes were made in, we could technically just undo that revision directly, and make sure it behaves in the way it once did...

Or I could just code up a new patch after testing it myself based on the diffs. Probably better if I do it this way.

It still leaves the question, why did tlh2000 remove it in the first place? There is no why in the comments, and the search feature in the forum is too terrible to find any postings about it. (I've tried several times now to find out why, but it isn't working).

62
FAQ / Re: Trunk - usehomedir
« on: October 04, 2009, 06:47:11 pm »
It looks like the changes were very specifically done to remove this ability from the dev version. So, I hesitate on changing it back. Here is the entry and diff that caused it...

Revision 23122 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 28 12:07:25 2009 UTC (7 months ago) by tlh2000
File length: 40095 byte(s)
Diff to previous 23105

* removed cvars fs_usehomedir and fs_basedir
* small cleanup




Code: [Select]
*** ufoai/trunk/src/common/files.c 2009/02/28 10:07:23 23105
--- ufoai/trunk/src/common/files.c 2009/02/28 12:07:25 23122
***************
*** 33,42 ****
  #include "../shared/typedefs.h"
  #include "../shared/parse.h"
 
- #ifdef COMPILE_UFO
- static cvar_t *fs_basedir;
- #endif
-
  /** counter for opened files - used to check against missing close calls */
  static int fs_openedFiles;
 
--- 33,38 ----
***************
*** 831,852 ****
  static void FS_InitCommandsAndCvars (void)
  {
  const cmdList_t *commands;
- cvar_t* fs_usehomedir;
 
  for (commands = fs_commands; commands->name; commands++)
  Cmd_AddCommand(commands->name, commands->function, commands->description);
- fs_usehomedir = Cvar_Get("fs_usehomedir", "1", CVAR_ARCHIVE, "Use the homedir to store files like savegames and screenshots");
-
- /* basedir <path> */
- /* allows the game to run from outside the data tree */
- fs_basedir = Cvar_Get("fs_basedir", ".", CVAR_NOSET, "Allows the game to run from outside the data tree");
-
- /* start up with base by default */
- FS_AddGameDirectory(va("%s/" BASEDIRNAME, fs_basedir->string));
-
- /* then add a '.ufoai/VERSION/base' directory in home directory by default */
- if (fs_usehomedir->integer)
- FS_AddHomeAsGameDirectory(BASEDIRNAME);
  }
  #endif
 
--- 827,835 ----
***************
*** 864,874 ****
  FS_AddGameDirectory(PKGDATADIR"/"BASEDIRNAME);
  #endif
 
- #ifdef COMPILE_UFO
- FS_InitCommandsAndCvars();
- #elif COMPILE_MAP
  FS_AddGameDirectory("./" BASEDIRNAME);
  FS_AddHomeAsGameDirectory(BASEDIRNAME);
  #endif
 
  /* any set gamedirs will be freed up to here */
--- 847,857 ----
  FS_AddGameDirectory(PKGDATADIR"/"BASEDIRNAME);
  #endif
 
  FS_AddGameDirectory("./" BASEDIRNAME);
  FS_AddHomeAsGameDirectory(BASEDIRNAME);
+
+ #ifdef COMPILE_UFO
+ FS_InitCommandsAndCvars();
  #endif
 
  /* any set gamedirs will be freed up to here */

63
FAQ / Re: Trunk - usehomedir
« on: October 04, 2009, 05:51:45 pm »
Ok, since there's been no responses or offers to look into it:

Would you like me to research this and change the code back in the dev version so that you can set the homedir/basedir as before? Like how the stable version used to do?

<edit> I'm going to start then while I wait for a response. Shouldn't take long, this looks really easy.

64
Discussion / Re: Thanks for playing single player.
« on: October 04, 2009, 01:04:50 pm »
I prefer the stable versions myself.

I find dev builds tend to have bugs and crashes which hurt the gaming experience and fun.

65
FAQ / Re: Trunk - usehomedir
« on: September 28, 2009, 09:32:36 pm »
If I had to venture a guess, and from a quick look in the source code, I'd say the reason is because:

(v2.2.1)
Code: [Select]
void FS_InitFilesystem (void)
{
cvar_t* fs_usehomedir;
const cmdList_t *commands;

Com_Printf("\n---- filesystem initialization -----\n");

for (commands = fs_commands; commands->name; commands++)
Cmd_AddCommand(commands->name, commands->function, commands->description);
fs_usehomedir = Cvar_Get("fs_usehomedir", "1", CVAR_ARCHIVE, "Use the homedir to store files like savegames and screenshots");

/* basedir <path> */
/* allows the game to run from outside the data tree */
fs_basedir = Cvar_Get("fs_basedir", ".", CVAR_NOSET, "Allows the game to run from outside the data tree");

/* start up with base by default */
FS_AddGameDirectory(va("%s/" BASEDIRNAME, fs_basedir->string));

/* then add a '.ufoai/base' directory in home directory by default */
if (fs_usehomedir->integer)
FS_AddHomeAsGameDirectory(BASEDIRNAME);

/* any set gamedirs will be freed up to here */
fs_base_searchpaths = fs_searchpaths;

/* check for game override */
fs_gamedir = Cvar_Get("fs_gamedir", "", CVAR_LATCH | CVAR_SERVERINFO, "If you want to start a mod not located in "BASEDIRNAME);
if (fs_gamedir->string[0])
FS_SetGamedir(fs_gamedir->string);
}

got changed to

(v2.3 dev)
Code: [Select]
void FS_InitFilesystem (qboolean writeToHomeDir)
{
Com_Printf("\n---- filesystem initialization -----\n");

#ifdef PKGDATADIR
/* add the system search path */
FS_AddGameDirectory(PKGLIBDIR"/"BASEDIRNAME);
FS_AddGameDirectory(PKGDATADIR"/"BASEDIRNAME);
#endif

if (writeToHomeDir) {
FS_AddGameDirectory("./" BASEDIRNAME);
FS_AddHomeAsGameDirectory(BASEDIRNAME);
} else {
FS_AddHomeAsGameDirectory(BASEDIRNAME);
FS_AddGameDirectory("./" BASEDIRNAME);
}

#ifdef COMPILE_UFO
FS_InitCommandsAndCvars();
#endif

Com_Printf("using %s for writing\n", FS_Gamedir());
}

But this is just a quick guess that took no more than 3 minutes to find... So, it's hardly researched...

66
Tactics / Re: studing ufo parts
« on: September 28, 2009, 12:41:42 pm »
Final Release? What's that?

Seriously though, I have never seen a Final Release on an open source game before... Even if all the developers die unexpectedly or something.

67
Coding / Re: "LUA driven AI" items in TODO
« on: September 26, 2009, 07:45:12 pm »
LUA driven AI would be really nice to have, but to me at least, such a thing would be unrealistically tough.

I doubt it's done since I don't see posts in the forum from people saying they've improved the AI any.

I am suspecting LUA driven AI means to code the AI in LUA (very C like scripting language) and make it actually work.

Right now, all the AI I've seen is in a file called g_ai.c, and judging by the function names, the main AI is handled by AI_ActorThink().

Well, anyway, I'm just stating things is a different way if anything you read was unclear... But since I don't actually know anything about this, maybe it's a bad idea for me to answer...

68
FAQ / Re: UGVs
« on: September 26, 2009, 04:01:04 pm »
UVGs are not available in 2.2.1.

UVGs are not available in the latest development version either.

If you want to know the currents of what is to come, please refer to:

http://ufoai.ninex.info/wiki/index.php/UGVs for UVGs.
http://ufoai.ninex.info/wiki/index.php/UGV_Equipment for UVG Equipment.

69
Tactics / Re: Tactics in 2.3
« on: September 24, 2009, 12:32:01 am »
Wow, is it that bad? I think game balancing will fix it eventually.

For example, it is planned to not have aliens able to easily see your soldiers. Visibility will be introduced.
Also, armor will be made much more effective so you can't die from 1 hit anymore.

So, for now, I expect it'll be really deadly, armor like in X-Com, and X-Com 2.. But eventually it'll be more like armor in X-Com 3.
And visibility will be introduced so you can't be spotted from across the map.

70
Coding / Re: [q] about stable v2.2.1: research code
« on: September 23, 2009, 12:31:14 pm »
He's not talking about the latest revision.

He's talking about the stable v2.2.1: research code.

This function originally was used to ensure that we looted all the items needed to be able to properly buy and sell things. It was called from cl_market.c "BS_BuyType_f" which was the init function for the buy and sell menu list. There was a todo on the call asking if it was even needed. I'm guessing not since in the latest revision, the function does not exist.

However, in v2.2.1, yes, the function is called, and yes, actually did nothing since it returns immediately on the first if statement.

I've noticed the developers tend to ignore anything older than the latest revision here in regards to the code. I recommend to play the ancient stable v2.2.1 if you just want to enjoy the game, but to not look at its code unless it is the latest revision of code. This is probably why Geever just looked at only the latest revision, and ... not much else. He is right though, just not verbose.

71
Feature Requests / Re: Licensing
« on: September 21, 2009, 04:46:12 am »
UFO: AI is built entirely in C. Not C++. There isn't an object anywhere in the source code.

72
Newbie Coding / Re: Resources for learning C or C++
« on: September 18, 2009, 08:01:11 am »
My favourite books for learning C and C++ were the dummies books.

C for Dummies
C++ for dummies

They are really great books that are easy to read and understand. I've noticed a lot of job interview questions seem to be answerable by the various explanations and examples in these books.

73
Newbie Coding / Coding standards for if else blocks
« on: September 18, 2009, 07:54:21 am »
.

74
Newbie Coding / Re: Undefined Reference
« on: September 18, 2009, 07:28:11 am »
Well, in the end, I had to just update everything. $5 isn't enough to worry about yet. So everything is updated and reverted.

This still leaves me with my original problem. A bunch of linked list undefined references.

Linking dynamic library: ..\..\base\game.dll
.objs\game\src\game\g_actor.o: In function `G_ActorDamage':C:/cprogs/UFOAI-2.3-dev/src/game/g_actor.c:202: undefined reference to `LIST_AddPointer'
.objs\game\src\game\g_actor.o: In function `G_ActorTreat':C:/cprogs/UFOAI-2.3-dev/src/game/g_actor.c:319: undefined reference to `LIST_GetByIdx

From what I can tell, the suggestion was to create my own linked list not using any of the undefined referenced code... Or, in other words, copy and paste all the linked list functions to the dll. If this is still what you want, I can go ahead and do that.

75
Newbie Coding / Re: Undefined Reference
« on: September 18, 2009, 06:52:30 am »
The red exclamation mark just means it thinks I modified the file, and it merged the new changes in.

And no, I don't need to checkout SVN to empty folder, and I won't get errors. I can say this since I just did this. Not a single error, just every file got merged instead of reverted.

Pages: 1 ... 3 4 [5] 6 7 ... 12