Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 111566 | Differences between
and this patch

Collapse All | Expand All

(-)engine/rendergl.cpp (+1 lines)
Lines 117-122 Link Here
117
Texture *textureload(char *name, int rot, bool clamp, bool mipit, bool msg)
117
Texture *textureload(char *name, int rot, bool clamp, bool mipit, bool msg)
118
{
118
{
119
    string rname, tname;
119
    string rname, tname;
120
    name = addfullpath(name);
120
    strcpy_s(tname, name);
121
    strcpy_s(tname, name);
121
    strcpy_s(rname, path(tname));
122
    strcpy_s(rname, path(tname));
122
    if(rot) { sprintf_sd(rnum)("_%d", rot); strcat_s(rname, rnum); };
123
    if(rot) { sprintf_sd(rnum)("_%d", rot); strcat_s(rname, rnum); };
(-)shared/tools.cpp (+11 lines)
Lines 5-12 Link Here
5
5
6
///////////////////////// misc tools ///////////////////////
6
///////////////////////// misc tools ///////////////////////
7
7
8
char *addfullpath(char *s) {
9
    static char ret[256];      // choose a reasonable max buffer size
10
    if (s[0] == '/') { return s; }
11
        int slen = strlen(s);
12
        memset(ret, 0x00, 256);
13
        memcpy(ret, GAMES_DATADIR, GAMES_DATADIR_LEN);
14
        memcpy(ret+GAMES_DATADIR_LEN, s, slen);
15
        return ret;
16
    }
17
8
char *path(char *s)
18
char *path(char *s)
9
{
19
{
20
    s = addfullpath(s);
10
    for(char *t = s; t = strpbrk(t, "/\\"); *t++ = PATHDIV);
21
    for(char *t = s; t = strpbrk(t, "/\\"); *t++ = PATHDIV);
11
    return s;
22
    return s;
12
};
23
};
(-)shared/tools.h (+1 lines)
Lines 115-120 Link Here
115
#endif
115
#endif
116
116
117
117
118
extern char *addfullpath(char *s);
118
extern char *path(char *s);
119
extern char *path(char *s);
119
extern char *loadfile(char *fn, int *size);
120
extern char *loadfile(char *fn, int *size);
120
extern void endianswap(void *, int, int);
121
extern void endianswap(void *, int, int);

Return to bug 111566