Technical support > Mac

Getting Started (Mac OS X

<< < (3/3)

alexis:
Yes, the menus are working.
I can launch a game, and the interface (geoscape, bases, equipment, etc.) seems to work.

I have compiled some few maps and I have launched africa04d from the console. Then I got this error:
ERROR: Grid_CheckForbidden: unknown forbidden-size: 0
In fact, when I read static qboolean Grid_CheckForbidden in cmodel.c, I don't understand the following line:
forbidden_size = *(p + 1);
because there is a test y == (*p)[1] two lines later, "y" can't be the same as "forbidden_size"...

I have launched UFOAI with Shark, the profiling tool from Apple. On my machine, the most time-consuming functions called during the geoscape display are S_RawSamples (4.6%), Q_strncmp (3.6%), ShortSwap (1.5%), and R_FindImage (1.4%).  NB: Q_strncmp is simply a call to strncmp: you should #define or inline it, or directly call strncmp...

How can I use rsync instead of recomputing all maps? (btw: are maps byte-order independant?)
I tried this:
sudo rsync -avz rsync://mattn.ninex.info/ufo base/maps/
@ERROR: Unknown module 'ufo'

Mattn:
rsync is currently not working, please try to download the mappack from http://mattn.ninex.info - it's up-to-date right now.

Mattn:
maps are working on every plattform, they are all stored in little endian and converted at run time. just the checksum may differ if you compile the maps on different architectures - because they are using floating points, which of course differ from plattform to plattform. but using the mappack is safe

i will look into the grid_checkforbidden thing tomorrow

S_RawSamples is called from the sound renderer thread, btw.

alexis:
I can confirm that forbidden_size is badly handled in Grid_CheckForbidden: if I replace switch(forbidden_size) with switch(1) (which is the expected value), it works.

I have tested a map, and there is still two big problems (that were already there on 2.1):
- the mouse can't access some cells (I saw this on levels bigger than 1, but this is not the case for all the cells of such levels). In fact, the blue or green box isn't displayed on those cells, but soldiers and aliens can go there.
- soldiers and aliens can see thru walls, so aliens spend their reacting time to shoot on walls in direction of the soldiers, and sometimes kill themselves this way.

I have launched UFOAI in debug mode and I think I have found something concerning the first bug. Consider this part of code in CL_ActorMouseTrace:

   restingLevel = Grid_Fall(&clMap, testPos, fieldSize);
   /* hack to prevent cursor from getting stuck on the top of an invisible
      playerclip surface (in most cases anyway) */
   PosToVec(testPos, pA);
   VectorCopy(pA, pB);
   pA[2] += UNIT_HEIGHT;
   pB[2] -= UNIT_HEIGHT;
   CM_TestLineDM(pA, pB, pC);
   VecToPos(pC, testPos);
   restingLevel = min(restingLevel, Grid_Fall(&clMap, testPos, fieldSize));

When the bug occurs, the ending restingLevel value is 0 (the first Grid_Fall call returns 3, which is correct). This explains why no cursor box is displayed. I don't have the time to look further, but I hope this can help.

Navigation

[0] Message Index

[*] Previous page

Go to full version