Searches thru all ships for a specific name, returns -1 if not found or index of ship with name
| 227 | // Searches thru all ships for a specific name, returns -1 if not found |
| 228 | // or index of ship with name |
| 229 | int FindShipName(const char *name) { |
| 230 | int i; |
| 231 | |
| 232 | ASSERT(name != NULL); |
| 233 | |
| 234 | for (i = 0; i < MAX_SHIPS; i++) |
| 235 | if (Ships[i].used && !stricmp(name, Ships[i].name)) |
| 236 | return i; |
| 237 | |
| 238 | return -1; |
| 239 | } |
| 240 | |
| 241 | int LoadShipImage(const char *filename) { |
| 242 | int img_handle; |
no outgoing calls
no test coverage detected