[Add] Just a few more comments. :/
This commit is contained in:
parent
7a03a6f377
commit
9dc797a8a3
@ -58,15 +58,16 @@ char** ship_getTech(int* n, const int* tech, const int techmax) {
|
|||||||
char** shipnames;
|
char** shipnames;
|
||||||
Ship** ships;
|
Ship** ships;
|
||||||
|
|
||||||
|
/* Get availabble ships for tech. */
|
||||||
ships = malloc(sizeof(Ship*) * ship_nstack);
|
ships = malloc(sizeof(Ship*) * ship_nstack);
|
||||||
num = 0;
|
num = 0;
|
||||||
for(i = 0; i < ship_nstack; i++) {
|
for(i = 0; i < ship_nstack; i++) {
|
||||||
if(ship_stack[i].tech <= tech[0]) {
|
if(ship_stack[i].tech <= tech[0]) { /* Check vs base tech. */
|
||||||
ships[num] = &ship_stack[i];
|
ships[num] = &ship_stack[i];
|
||||||
num++;
|
num++;
|
||||||
} else {
|
} else {
|
||||||
for(j = 0; j < techmax; j++)
|
for(j = 0; j < techmax; j++)
|
||||||
if(tech[j] == ship_stack[i].tech) {
|
if(tech[j] == ship_stack[i].tech) { /* Check vs special tech. */
|
||||||
ships[num] = &ship_stack[i];
|
ships[num] = &ship_stack[i];
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user