[Add] Just a few more comments. :/

This commit is contained in:
Allanis 2013-07-01 19:49:13 +01:00
parent 7a03a6f377
commit 9dc797a8a3

View File

@ -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++;
} }