MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / FetchFlagsTask_Add

Function FetchFlagsTask_Add

src/LWeb.c:665–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663}
664
665void FetchFlagsTask_Add(const struct ServerInfo* server) {
666 int i;
667 for (i = 0; i < flagsCount; i++)
668 {
669 if (flags[i].country[0] != server->country[0]) continue;
670 if (flags[i].country[1] != server->country[1]) continue;
671 /* flag is already or will be downloaded */
672 return;
673 }
674 FetchFlagsTask_Ensure();
675
676 Bitmap_Init(flags[flagsCount].bmp, 0, 0, NULL);
677 flags[flagsCount].country[0] = server->country[0];
678 flags[flagsCount].country[1] = server->country[1];
679 flags[flagsCount].meta = NULL;
680
681 flagsCount++;
682 FetchFlagsTask_DownloadNext();
683}
684
685struct Flag* Flags_Get(const struct ServerInfo* server) {
686 int i;

Callers 1

Calls 2

FetchFlagsTask_EnsureFunction · 0.85

Tested by

no test coverage detected