mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +00:00
Das Konzept der Schleife macht den Code lesbarer. Dies ist keine
funktionale Änderung
This commit is contained in:
parent
a43af52578
commit
d6eabc3ccf
1 changed files with 14 additions and 100 deletions
|
@ -265,109 +265,23 @@ Huff1Decompress(cblock_t in) {
|
|||
while (count) {
|
||||
inbyte = *input++;
|
||||
|
||||
if (nodenum < 256) {
|
||||
hnodes = hnodesbase + (nodenum << 9);
|
||||
*out_p++ = nodenum;
|
||||
int i = 0;
|
||||
|
||||
if (!--count)
|
||||
break;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (nodenum < 256) {
|
||||
hnodes = hnodesbase + (nodenum << 9);
|
||||
*out_p++ = nodenum;
|
||||
|
||||
if (!--count)
|
||||
break;
|
||||
|
||||
nodenum = cin.numhnodes1[nodenum];
|
||||
}
|
||||
|
||||
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
|
||||
inbyte >>= 1;
|
||||
|
||||
nodenum = cin.numhnodes1[nodenum];
|
||||
}
|
||||
|
||||
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
|
||||
inbyte >>= 1;
|
||||
|
||||
if (nodenum < 256) {
|
||||
hnodes = hnodesbase + (nodenum << 9);
|
||||
*out_p++ = nodenum;
|
||||
|
||||
if (!--count)
|
||||
break;
|
||||
|
||||
nodenum = cin.numhnodes1[nodenum];
|
||||
}
|
||||
|
||||
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
|
||||
inbyte >>= 1;
|
||||
|
||||
if (nodenum < 256) {
|
||||
hnodes = hnodesbase + (nodenum << 9);
|
||||
*out_p++ = nodenum;
|
||||
|
||||
if (!--count)
|
||||
break;
|
||||
|
||||
nodenum = cin.numhnodes1[nodenum];
|
||||
}
|
||||
|
||||
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
|
||||
inbyte >>= 1;
|
||||
|
||||
if (nodenum < 256) {
|
||||
hnodes = hnodesbase + (nodenum << 9);
|
||||
*out_p++ = nodenum;
|
||||
|
||||
if (!--count)
|
||||
break;
|
||||
|
||||
nodenum = cin.numhnodes1[nodenum];
|
||||
}
|
||||
|
||||
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
|
||||
inbyte >>= 1;
|
||||
|
||||
if (nodenum < 256) {
|
||||
hnodes = hnodesbase + (nodenum << 9);
|
||||
*out_p++ = nodenum;
|
||||
|
||||
if (!--count)
|
||||
break;
|
||||
|
||||
nodenum = cin.numhnodes1[nodenum];
|
||||
}
|
||||
|
||||
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
|
||||
inbyte >>= 1;
|
||||
|
||||
if (nodenum < 256) {
|
||||
hnodes = hnodesbase + (nodenum << 9);
|
||||
*out_p++ = nodenum;
|
||||
|
||||
if (!--count)
|
||||
break;
|
||||
|
||||
nodenum = cin.numhnodes1[nodenum];
|
||||
}
|
||||
|
||||
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
|
||||
inbyte >>= 1;
|
||||
|
||||
if (nodenum < 256) {
|
||||
hnodes = hnodesbase + (nodenum << 9);
|
||||
*out_p++ = nodenum;
|
||||
|
||||
if (!--count)
|
||||
break;
|
||||
|
||||
nodenum = cin.numhnodes1[nodenum];
|
||||
}
|
||||
|
||||
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
|
||||
inbyte >>= 1;
|
||||
|
||||
if (nodenum < 256) {
|
||||
hnodes = hnodesbase + (nodenum << 9);
|
||||
*out_p++ = nodenum;
|
||||
|
||||
if (!--count)
|
||||
break;
|
||||
|
||||
nodenum = cin.numhnodes1[nodenum];
|
||||
}
|
||||
|
||||
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
|
||||
inbyte >>= 1;
|
||||
}
|
||||
|
||||
if (input - in.data != in.count && input - in.data != in.count + 1) {
|
||||
|
|
Loading…
Reference in a new issue