On 1/23/07, Gerard Krol <[EMAIL PROTECTED]> wrote:
A little review based on only reading wz28b.patch, not applying it:
## line 59: MAX_OAINFO_OBJS is a strange name, whether you added it or it
was already in, this needs to be clear. Example:
- BASE_OBJECT *psObj[DROID_MAXWEAPS];
+ BASE_OBJECT *psObj[MAX_OAINFO_OBJS];
## PRI_SLOT could just as easily be called PRIMARY_SLOT
## line 135: Can someone explain how you can get a reminder after devision
by 1? (should be %2)
+ //Random direction(left or right 30 degree's)
+ if (rand()%1 == 0)
+ {
+ angle += 30;
+ if (angle >= 360)
+ {
+ angle -= 360;
+ }
+ }
+ else
+ {
+ angle -= 30;
+ if (angle < 0)
+ {
+ angle += 360;
+ }
+ }
yes it should be rand()%2 my bad.
Also, why not write: angle = (angle-30)%360;
% is still slower than one compare and one '+=' in asm I think
## line 184 + 285 + 989
+ /* Watermelon:if I am a multi-turret droid */
Just use the for loop, will act the same as the if when
psDroid->numWeaps==1
I'll take a look
## line 334: another scary name
+ DROID_OACTION_INFO oaInfo = {{NULL}};
it stands for droid order action shared info(BASE_OBJECT(s) used in ai
functions in action.c and order.c),it's a struct with number of
DROID_OAINFO_OBJS BASE_OBJECT pointers.
## line 613: no need to add more commented out code to svn
## line 1748: why is it a factory anyway?
+ //skips rearm field,since
it doesnt have assembly point
it builds jet(a hybrid of factory and rearm pad) and 'link' the built jet to
the airfield 'magically',and the jet will be placed on the 'slots' with
facing defined in structure functions.txt,I tested with trucks,it looked
hilarious(trucks parked on airfield with different facing),but it's sorta
working...
## line 2306: this is getting out of hand... anyone got a better idea?
+ //Watermelon orderX3,orderY3 for more complicated order...
I wanted to change it to 2D point struct,but I gave up after seeing some
script function uses them directly
## line 2541 + 5737: OMG... there has to be a better way...
## line 2665: I suggest we stop supporting compilers that don't support
slotsX[MAX_REARM_SLOTS]
+ //Watermelon: 8 = MAX_REARM_SLOTS
+ UWORD slotsX[8];
yes I know the super long sscanf is a bit retarded...but it's just hard to
read txt data efficiently without using such structs...
## line 2693: make that ~0
+ SDWORD numMags; //Watermelon:number of
magzines negative 1(-1) = infinite
why set the HO bit when the value is read from txt's?
## line 2701: You need to add a GAME_SAVE_V35 I'm afraid
+// Watermelon:added aDefaultRearm
#define GAME_SAVE_V34
## line 2742: ??? It's probably how pumpkin did it, but isn't there a
better way?
+#define STRUCTURE_SAVE_V24 \
+ OBJECT_SAVE_V20; \
I have no intention to make it back compatible(since tons of changes make it
impossible to load old save games properly),so I
modified GAME_SAVE_V34 directly.
## line 3154: please explain the necessity of [i*5+4]
+
psSaveStruct->RunwaysInfo[i*5+4] = psRearmField->runways[i].facing;
RunwaysInfo is a packed struct in a UWORD array,it has the following
properties:
X0(runway start grid offset X)
Y0(runway start grid offset Y)
X1(runway end grid offset X)
Y1(runway end grid offset Y)
facing(the ideal facing when performing take-off on runway)
for every i increment,the array is increased by 5,the 'i*5+offset' is used
to copy the value from the psRearmField properly.
## line 3366: call it like this?: #define ONLY_SAME_TYPE_FACTORY_IN_LIST
TRUE
+#define SEPARATE_LIST_TEST 1
that would be a better name,though it's a bit long imo.
## line 4237: Happy with being included in WZ?
+BOOL recvHappyJet(NETMSG *pMsg)
Looks like a lot of hard work, good job.
- Gerard
Thanks
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev