Subversion Repositories eduke32

Rev

Rev 8474 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5327 hendricks2 1
 
2
#include "compat.h"
3
#include "build.h"
4
 
5
#include "names.h"
6
#include "common_game.h"
7
 
8
static const char *defaultgrpfilename = "stuff.dat";
9
static const char *defaultdeffilename = "kenbuild.def";
10
 
11
const char *G_DefaultGrpFile(void)
12
{
13
    return defaultgrpfilename;
14
}
15
const char *G_GrpFile(void)
16
{
17
    return defaultgrpfilename;
18
}
19
 
20
const char *G_DefaultDefFile(void)
21
{
22
    return defaultdeffilename;
23
}
24
const char *G_DefFile(void)
25
{
26
    return defaultdeffilename;
27
}
28
 
8473 hendricks2 29
static void Ken_InitMultiPsky()
5327 hendricks2 30
{
31
    // default
7540 hendricks2 32
    psky_t * const defaultsky = tileSetupSky(DEFAULTPSKY);
5327 hendricks2 33
    defaultsky->lognumtiles = 1;
34
    defaultsky->horizfrac = 65536;
35
 
36
    // DAYSKY
7540 hendricks2 37
    psky_t * const daysky = tileSetupSky(DAYSKY);
5327 hendricks2 38
    daysky->lognumtiles = 1;
39
    daysky->horizfrac = 65536;
40
 
41
    // NIGHTSKY
7540 hendricks2 42
    psky_t * const nightsky = tileSetupSky(NIGHTSKY);
5327 hendricks2 43
    nightsky->lognumtiles = 3;
44
    nightsky->horizfrac = 65536;
45
}
8473 hendricks2 46
 
47
void Ken_PostStartupWindow()
48
{
49
    Ken_InitMultiPsky();
50
 
51
    size_t i;
52
    char tempbuf[256];
53
 
54
    for (i=0; i<256; i++) tempbuf[i] = i;
55
 
56
    for (i=0; i<32; i++) tempbuf[i+192] = i+128; //green->red
57
    paletteMakeLookupTable(1,tempbuf,0,0,0,1);
58
    for (i=0; i<32; i++) tempbuf[i+192] = i+32; //green->blue
59
    paletteMakeLookupTable(2,tempbuf,0,0,0,1);
60
    for (i=0; i<32; i++) tempbuf[i+192] = i+224; //green->pink
61
    paletteMakeLookupTable(3,tempbuf,0,0,0,1);
62
    for (i=0; i<32; i++) tempbuf[i+192] = i+64; //green->brown
63
    paletteMakeLookupTable(4,tempbuf,0,0,0,1);
64
    for (i=0; i<32; i++) tempbuf[i+192] = i+96;
65
    paletteMakeLookupTable(5,tempbuf,0,0,0,1);
66
    for (i=0; i<32; i++) tempbuf[i+192] = i+160;
67
    paletteMakeLookupTable(6,tempbuf,0,0,0,1);
68
    for (i=0; i<32; i++) tempbuf[i+192] = i+192;
69
    paletteMakeLookupTable(7,tempbuf,0,0,0,1);
70
 
71
    for (i=0; i<256; i++)
72
        tempbuf[i] = ((i+32)&255);  //remap colors for screwy palette sectors
73
    paletteMakeLookupTable(16,tempbuf,0,0,0,1);
74
 
75
    for (i=0; i<256; i++) tempbuf[i] = i;
76
    paletteMakeLookupTable(17,tempbuf,96,96,96,1);
77
 
78
    for (i=0; i<256; i++) tempbuf[i] = i; //(i&31)+32;
79
    paletteMakeLookupTable(18,tempbuf,32,32,192,1);
80
}
8474 hendricks2 81
 
8475 hendricks2 82
int32_t voxid_PLAYER = -1, voxid_BROWNMONSTER = -1;
83
 
8474 hendricks2 84
void Ken_LoadVoxels()
85
{
86
    if (!qloadkvx(nextvoxid,"voxel000.kvx"))
8475 hendricks2 87
        voxid_PLAYER = nextvoxid++;
8474 hendricks2 88
    if (!qloadkvx(nextvoxid,"voxel001.kvx"))
8475 hendricks2 89
        voxid_BROWNMONSTER = nextvoxid++;
8474 hendricks2 90
}