mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-27 14:22:33 +00:00
fix sw alias model skin loading
This commit is contained in:
parent
6be99353a1
commit
630b1e7a4f
1 changed files with 7 additions and 6 deletions
|
@ -113,9 +113,10 @@ Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype, int *pskinindex)
|
||||||
skinsize = pheader->mdl.skinwidth * pheader->mdl.skinheight;
|
skinsize = pheader->mdl.skinwidth * pheader->mdl.skinheight;
|
||||||
pskindesc = Hunk_AllocName (numskins * sizeof (maliasskindesc_t), loadname);
|
pskindesc = Hunk_AllocName (numskins * sizeof (maliasskindesc_t), loadname);
|
||||||
|
|
||||||
pheader->skindesc = (byte *) pskindesc - (byte *) pheader;
|
*pskinindex = (byte *) pskindesc - (byte *) pheader;
|
||||||
|
|
||||||
for (snum = 0; snum < numskins; snum++) {
|
for (snum = 0; snum < numskins; snum++) {
|
||||||
|
pskindesc[snum].type = pskintype->type;
|
||||||
if (pskintype->type == ALIAS_SKIN_SINGLE) {
|
if (pskintype->type == ALIAS_SKIN_SINGLE) {
|
||||||
skin = (byte *) (pskintype + 1);
|
skin = (byte *) (pskintype + 1);
|
||||||
skin =
|
skin =
|
||||||
|
@ -129,12 +130,11 @@ Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype, int *pskinindex)
|
||||||
paliasskingroup = Hunk_AllocName (t, loadname);
|
paliasskingroup = Hunk_AllocName (t, loadname);
|
||||||
paliasskingroup->numskins = groupskins;
|
paliasskingroup->numskins = groupskins;
|
||||||
|
|
||||||
*pskinindex = (byte *) paliasskingroup - (byte *) pheader;
|
pskindesc[snum].skin = (byte *) paliasskingroup - (byte *) pheader;
|
||||||
|
|
||||||
pinskinintervals = (daliasskininterval_t *) (pinskingroup + 1);
|
pinskinintervals = (daliasskininterval_t *) (pinskingroup + 1);
|
||||||
poutskinintervals =
|
poutskinintervals = Hunk_AllocName (groupskins * sizeof (float),
|
||||||
|
loadname);
|
||||||
Hunk_AllocName (groupskins * sizeof (float), loadname);
|
|
||||||
paliasskingroup->intervals =
|
paliasskingroup->intervals =
|
||||||
(byte *) poutskinintervals - (byte *) pheader;
|
(byte *) poutskinintervals - (byte *) pheader;
|
||||||
for (gnum = 0; gnum < groupskins; gnum++) {
|
for (gnum = 0; gnum < groupskins; gnum++) {
|
||||||
|
@ -150,9 +150,10 @@ Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype, int *pskinindex)
|
||||||
skin = (byte *) pskintype;
|
skin = (byte *) pskintype;
|
||||||
|
|
||||||
for (gnum = 0; gnum < groupskins; gnum++) {
|
for (gnum = 0; gnum < groupskins; gnum++) {
|
||||||
|
paliasskingroup->skindescs[gnum].type = ALIAS_SKIN_SINGLE;
|
||||||
skin =
|
skin =
|
||||||
Mod_LoadSkin (skin, skinsize,
|
Mod_LoadSkin (skin, skinsize,
|
||||||
&paliasskingroup->skindescs[snum].skin, snum,
|
&paliasskingroup->skindescs[gnum].skin, snum,
|
||||||
gnum);
|
gnum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue