MCPcopy Create free account
hub / github.com/assaultcube/AC / edittex

Function edittex

source/src/editing.cpp:940–957  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

938}
939
940void edittex(int *type, int *dir)
941{
942 EDITSEL("edittex");
943 if(*type < 0 || *type > 3) return;
944 if(*type != lasttype) { tofronttex(); lasttype = *type; }
945 int atype = *type == 3 ? 1 : *type;
946 int i = curedittex[atype];
947 i = i < 0 ? 0 : i + *dir;
948 curedittex[atype] = i = min(max(i, 0), 255);
949 int t = lasttex = hdr.texlists[atype][i];
950 loopv(sels)
951 {
952 edittexxy(*type, t, sels[i]);
953 addmsg(SV_EDITXY, "ri7", EDITXY_TEX, sels[i].x, sels[i].y, sels[i].xs, sels[i].ys, *type, t, 0);
954 }
955 unsavededits++;
956 lastedittex = lastmillis;
957}
958COMMAND(edittex, "ii");
959
960void settex(int *texture, int *type)

Callers

nothing calls this directly

Calls 3

tofronttexFunction · 0.85
minFunction · 0.85
maxFunction · 0.85

Tested by

no test coverage detected