Subversion Repositories eduke32

Rev

Rev 8471 | Rev 8474 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5327 hendricks2 1
// "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
2
// Ken Silverman's official web site: "http://www.advsys.net/ken"
3
// See the included license file "BUILDLIC.TXT" for license info.
4
//
5
// This file has been modified from Ken Silverman's original release
6
// by Jonathon Fowler (jf@jonof.id.au)
7
 
8
#include "compat.h"
9
#include "build.h"
10
#include "editor.h"
11
#include "pragmas.h"
12
#include "baselayer.h"
13
#include "names.h"
14
#include "osd.h"
15
#include "cache1d.h"
16
#include "common.h"
17
#include "m32script.h"
18
 
19
#include "common_game.h"
20
 
8456 hendricks2 21
const char *AppProperName = "EKenBuild Editor";
7537 hendricks2 22
const char *AppTechnicalName = "ekenbuild-editor";
5327 hendricks2 23
 
24
#if defined(_WIN32)
7537 hendricks2 25
#define DEFAULT_GAME_EXEC "ekenbuild.exe"
26
#define DEFAULT_GAME_LOCAL_EXEC "ekenbuild.exe"
5327 hendricks2 27
#else
7537 hendricks2 28
#define DEFAULT_GAME_EXEC "ekenbuild"
29
#define DEFAULT_GAME_LOCAL_EXEC "./ekenbuild"
5327 hendricks2 30
#endif
31
 
32
const char *DefaultGameExec = DEFAULT_GAME_EXEC;
33
const char *DefaultGameLocalExec = DEFAULT_GAME_LOCAL_EXEC;
34
 
7537 hendricks2 35
#define SETUPFILENAME "ekenbuild-editor.cfg"
5327 hendricks2 36
const char *defaultsetupfilename = SETUPFILENAME;
37
char setupfilename[BMAX_PATH] = SETUPFILENAME;
38
 
39
static char tempbuf[256];
40
 
41
#define NUMOPTIONS 9
42
char option[NUMOPTIONS] = {0,0,0,0,0,0,1,0,0};
43
unsigned char default_buildkeys[NUMBUILDKEYS] =
44
{
45
    0xc8,0xd0,0xcb,0xcd,0x2a,0x9d,0x1d,0x39,
46
    0x1e,0x2c,0xd1,0xc9,0x33,0x34,
8460 hendricks2 47
    0x9c,0x1c,0xd,0xc,0xf,0x29
5327 hendricks2 48
};
49
 
50
 
51
 
52
 
53
 
54
//static int hang = 0;
55
//static int rollangle = 0;
56
 
57
//Detecting 2D / 3D mode:
58
//   qsetmode is 200 in 3D mode
59
//   qsetmode is 350/480 in 2D mode
60
//
61
//You can read these variables when F5-F8 is pressed in 3D mode only:
62
//
63
//   If (searchstat == 0)  WALL        searchsector=sector, searchwall=wall
64
//   If (searchstat == 1)  CEILING     searchsector=sector
65
//   If (searchstat == 2)  FLOOR       searchsector=sector
66
//   If (searchstat == 3)  SPRITE      searchsector=sector, searchwall=sprite
67
//   If (searchstat == 4)  MASKED WALL searchsector=sector, searchwall=wall
68
//
69
//   searchsector is the sector of the selected item for all 5 searchstat's
70
//
71
//   searchwall is undefined if searchstat is 1 or 2
72
//   searchwall is the wall if searchstat = 0 or 4
73
//   searchwall is the sprite if searchstat = 3 (Yeah, I know - it says wall,
74
//                                      but trust me, it's the sprite number)
75
 
76
int averagefps;
77
#define AVERAGEFRAMES 32
78
static unsigned int frameval[AVERAGEFRAMES];
79
static int framecnt = 0;
80
 
81
 
82
const char *ExtGetVer(void)
83
{
84
    return s_buildRev;
85
}
86
 
5552 hendricks2 87
int32_t ExtPreInit(int32_t argc,char const * const * argv)
5327 hendricks2 88
{
89
    UNREFERENCED_PARAMETER(argc);
90
    UNREFERENCED_PARAMETER(argv);
91
 
7537 hendricks2 92
    OSD_SetLogFile("ekenbuild-editor.log");
8333 hendricks2 93
    char tempbuf[256];
94
    snprintf(tempbuf, ARRAY_SIZE(tempbuf), "%s %s", AppProperName, s_buildRev);
95
    OSD_SetVersion(tempbuf, 10,0);
8457 hendricks2 96
    buildprintf("%s\n", tempbuf);
6142 hendricks2 97
    PrintBuildInfo();
5327 hendricks2 98
 
99
    return 0;
100
}
101
 
102
int32_t ExtInit(void)
103
{
104
    int rv = 0;
105
 
106
    /*printf("------------------------------------------------------------------------------\n");
107
    printf("   BUILD.EXE copyright(c) 1996 by Ken Silverman.  You are granted the\n");
108
    printf("   right to use this software for your personal use only.  This is a\n");
109
    printf("   special version to be used with \"Happy Fun KenBuild\" and may not work\n");
110
    printf("   properly with other Build engine games.  Please refer to license.doc\n");
111
    printf("   for distribution rights\n");
112
    printf("------------------------------------------------------------------------------\n");
113
    getch();
114
    */
115
 
8333 hendricks2 116
    OSD_SetParameters(0,2, 0,0, 4,0, 0, 0, 0); // TODO
117
 
5327 hendricks2 118
    bpp = 8;
119
    if (loadsetup(setupfilename) < 0) buildputs("Configuration file not found, using defaults.\n"), rv = 1;
120
    Bmemcpy(buildkeys, default_buildkeys, NUMBUILDKEYS);   //Trick to make build use setup.dat keys
121
    if (option[4] > 0) option[4] = 0;
122
 
123
    kensplayerheight = 32;
124
    zmode = 0;
125
 
8458 hendricks2 126
    wm_msgbox("Pre-Release Software Warning", "%s is not ready for public use. Proceed with caution!", AppProperName);
127
 
5327 hendricks2 128
#ifdef _WIN32
129
//  allowtaskswitching(0);
130
#endif
131
    return rv;
132
}
133
 
134
int32_t ExtPostStartupWindow(void)
135
{
136
    initgroupfile(G_GrpFile());
137
 
7540 hendricks2 138
    if (engineInit())
5327 hendricks2 139
    {
140
        initprintf("There was a problem initializing the engine.\n");
141
        return -1;
142
    }
143
 
8473 hendricks2 144
    Ken_PostStartupWindow();
5327 hendricks2 145
 
146
    tiletovox[PLAYER] = nextvoxid++;
147
    tiletovox[BROWNMONSTER] = nextvoxid++;
148
 
149
    return 0;
150
}
151
 
5345 hendricks2 152
void ExtPostInit(void)
153
{
7540 hendricks2 154
    palettePostLoadLookups();
5345 hendricks2 155
}
156
 
5327 hendricks2 157
void ExtUnInit(void)
158
{
159
    uninitgroupfile();
160
    writesetup(setupfilename);
161
}
162
 
163
//static int daviewingrange, daaspect, horizval1, horizval2;
164
void ExtPreCheckKeys(void)
165
{
166
    int /*cosang, sinang, dx, dy, mindx,*/ i, j, k;
167
 
168
    if (keystatus[0x3e])  //F4 - screen re-size
169
    {
170
        keystatus[0x3e] = 0;
171
 
172
        //cycle through all vesa modes, then screen-buffer mode
173
        if (keystatus[0x2a]|keystatus[0x36])
174
        {
7540 hendricks2 175
            videoSetGameMode(!fullscreen, xdim, ydim, bpp, upscalefactor);
5327 hendricks2 176
        }
177
        else
178
        {
179
 
180
            //cycle through all modes
181
            j=-1;
182
 
183
            // work out a mask to select the mode
184
            for (i=0; i<validmodecnt; i++)
185
                if ((validmode[i].xdim == xdim) &&
186
                    (validmode[i].ydim == ydim) &&
187
                    (validmode[i].fs == fullscreen) &&
188
                    (validmode[i].bpp == bpp))
189
                { j=i; break; }
190
 
191
            for (k=0; k<validmodecnt; k++)
192
                if (validmode[k].fs == fullscreen && validmode[k].bpp == bpp) break;
193
 
194
            if (j==-1) j=k;
195
            else
196
            {
197
                j++;
198
                if (j==validmodecnt) j=k;
199
            }
7540 hendricks2 200
            videoSetGameMode(fullscreen, validmode[j].xdim, validmode[j].ydim, bpp, upscalefactor);
5327 hendricks2 201
        }
202
    }
203
 
204
    if (keystatus[buildkeys[BK_MODE2D_3D]])  // Enter
205
    {
206
        getmessageleng = 0;
207
        getmessagetimeoff = 0;
208
    }
209
 
210
    if (getmessageleng > 0)
211
    {
212
        if (!in3dmode())
213
            printmessage16("%s", getmessage);
214
        if (totalclock > getmessagetimeoff)
215
            getmessageleng = 0;
216
    }
217
 
218
#if 0
219
    if (keystatus[0x2a]|keystatus[0x36])
220
    {
221
        if (keystatus[0xcf]) hang = max(hang-1,-182);
222
        if (keystatus[0xc7]) hang = min(hang+1,182);
223
    }
224
    else
225
    {
226
        if (keystatus[0xcf]) hang = max(hang-8,-182);
227
        if (keystatus[0xc7]) hang = min(hang+8,182);
228
    }
229
    if (keystatus[0x4c]) { hang = 0; horiz = 100; }
230
    if (hang != 0)
231
    {
232
        walock[4094] = 255;
233
 
234
        // JBF 20031117: scale each dimension by a factor of 1.2, and work out
235
        // the aspect of the screen. Anywhere you see 'i' below was the value
236
        // '200' before I changed it. NOTE: This whole trick crashes in resolutions
237
        // above 800x600. I'm not sure why, and fixing it is not something I intend
238
        // to do in a real big hurry.
239
        dx = (xdim + (xdim >> 3) + (xdim >> 4) + (xdim >> 6)) & (~7);
240
        dy = (ydim + (ydim >> 3) + (ydim >> 4) + (ydim >> 6)) & (~7);
241
        i = scale(320,ydim,xdim);
242
 
8250 hendricks2 243
        if (waloff[4094] == 0) g_cache.allocateBlock(&waloff[4094],/*240L*384L*/ dx*dy,&walock[4094]);
7540 hendricks2 244
        renderSetTarget(4094,/*240L,384L*/ dy,dx);
5327 hendricks2 245
 
246
        cosang = sintable[(hang+512)&2047];
247
        sinang = sintable[hang&2047];
248
 
249
        dx = dmulscale1(320,cosang,i,sinang); mindx = dx;
250
        dy = dmulscale1(-i,cosang,320,sinang);
251
        horizval1 = dy*(320>>1)/dx-1;
252
 
253
        dx = dmulscale1(320,cosang,-i,sinang); mindx = min(dx,mindx);
254
        dy = dmulscale1(i,cosang,320,sinang);
255
        horizval2 = dy*(320>>1)/dx+1;
256
 
6256 hendricks2 257
        daviewingrange = divscale30(xdim>>1, mindx-16);
5327 hendricks2 258
        daaspect = scale(daviewingrange,scale(320,tilesiz[4094].x,tilesiz[4094].y),horizval2+6-horizval1);
7540 hendricks2 259
        renderSetAspect(daviewingrange,scale(daaspect,ydim*320,xdim*i));
5327 hendricks2 260
        horiz = 100-divscale15(horizval1+horizval2,daviewingrange);
261
    }
262
#endif
263
}
264
 
265
#define MAXVOXMIPS 5
266
extern intptr_t voxoff[][MAXVOXMIPS];
8455 hendricks2 267
void ExtAnalyzeSprites(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura, int32_t smoothr)
5327 hendricks2 268
{
269
    int i, *longptr;
6001 hendricks2 270
    uspritetype *tspr;
5327 hendricks2 271
 
272
    UNREFERENCED_PARAMETER(ourx);
273
    UNREFERENCED_PARAMETER(oury);
8455 hendricks2 274
    UNREFERENCED_PARAMETER(ourz);
5327 hendricks2 275
    UNREFERENCED_PARAMETER(oura);
276
    UNREFERENCED_PARAMETER(smoothr);
277
 
278
    for (i=0,tspr=&tsprite[0]; i<spritesortcnt; i++,tspr++)
279
    {
280
        if (usevoxels && tiletovox[tspr->picnum] >= 0)
281
        {
282
            switch (tspr->picnum)
283
            {
284
            case PLAYER:
285
                if (!voxoff[tiletovox[PLAYER]][0])
286
                {
287
                    if (qloadkvx(tiletovox[PLAYER],"voxel000.kvx"))
288
                    {
289
                        tiletovox[PLAYER] = -1;
290
                        break;
291
                    }
292
                }
293
                //tspr->cstat |= 48; tspr->picnum = tiletovox[tspr->picnum];
294
                longptr = (int *)voxoff[tiletovox[PLAYER]][0];
295
                tspr->xrepeat = scale(tspr->xrepeat,56,longptr[2]);
296
                tspr->yrepeat = scale(tspr->yrepeat,56,longptr[2]);
297
                tspr->shade -= 6;
298
                break;
299
            case BROWNMONSTER:
300
                if (!voxoff[tiletovox[BROWNMONSTER]][0])
301
                {
302
                    if (qloadkvx(tiletovox[BROWNMONSTER],"voxel001.kvx"))
303
                    {
304
                        tiletovox[BROWNMONSTER] = -1;
305
                        break;
306
                    }
307
                }
308
                //tspr->cstat |= 48; tspr->picnum = tiletovox[tspr->picnum];
309
                break;
310
            }
311
        }
312
 
313
        tspr->shade += 6;
314
        if (sector[tspr->sectnum].ceilingstat&1)
315
            tspr->shade += sector[tspr->sectnum].ceilingshade;
316
        else
317
            tspr->shade += sector[tspr->sectnum].floorshade;
318
    }
319
}
320
 
321
void ExtCheckKeys(void)
322
{
323
    int i; //, p, y, dx, dy, cosang, sinang, bufplc, tsizy, tsizyup15;
324
    int j;
325
 
326
    if (qsetmode == 200)    //In 3D mode
327
    {
328
#if 0
329
        if (hang != 0)
330
        {
331
            bufplc = waloff[4094]+(mulscale16(horiz-100,xdimenscale)+(tilesiz[4094].x>>1))*tilesiz[4094].y;
7540 hendricks2 332
            renderRestoreTarget();
5327 hendricks2 333
            cosang = sintable[(hang+512)&2047];
334
            sinang = sintable[hang&2047];
335
            dx = dmulscale1(xdim,cosang,ydim,sinang);
336
            dy = dmulscale1(-ydim,cosang,xdim,sinang);
337
 
7540 hendricks2 338
            videoBeginDrawing();
5327 hendricks2 339
            tsizy = tilesiz[4094].y;
340
            tsizyup15 = (tsizy<<15);
341
            dx = mulscale14(dx,daviewingrange);
342
            dy = mulscale14(dy,daaspect);
343
            sinang = mulscale14(sinang,daviewingrange);
344
            cosang = mulscale14(cosang,daaspect);
5984 hendricks2 345
            p = ylookup[windowxy1.y]+frameplace+windowxy2.x+1;
346
            for (y=windowxy1.y; y<=windowxy2.y; y++)
5327 hendricks2 347
            {
348
                i = divscale16(tsizyup15,dx);
349
                stretchhline(0,(xdim>>1)*i+tsizyup15,xdim>>2,i,mulscale32(i,dy)*tsizy+bufplc,p);
350
                dx -= sinang; dy += cosang; p += ylookup[1];
351
            }
352
            walock[4094] = 1;
353
 
354
            Bsprintf(tempbuf,"%d",(hang*180)>>10);
355
            printext256(0L,8L,31,-1,tempbuf,1);
7540 hendricks2 356
            videoEndDrawing();
5327 hendricks2 357
        }
358
#endif
7540 hendricks2 359
        if (keystatus[0xa]) renderSetAspect(viewingrange+(viewingrange>>8),yxaspect+(yxaspect>>8));
360
        if (keystatus[0xb]) renderSetAspect(viewingrange-(viewingrange>>8),yxaspect-(yxaspect>>8));
361
        if (keystatus[0xc]) renderSetAspect(viewingrange,yxaspect-(yxaspect>>8));
362
        if (keystatus[0xd]) renderSetAspect(viewingrange,yxaspect+(yxaspect>>8));
363
        //if (keystatus[0x38]) renderSetRollAngle(rollangle+=((keystatus[0x2a]|keystatus[0x36])*6+2));
364
        //if (keystatus[0xb8]) renderSetRollAngle(rollangle-=((keystatus[0x2a]|keystatus[0x36])*6+2));
365
        //if (keystatus[0x1d]|keystatus[0x9d]) renderSetRollAngle(rollangle=0);
5327 hendricks2 366
 
7540 hendricks2 367
        videoBeginDrawing();
5327 hendricks2 368
 
369
        i = frameval[framecnt&(AVERAGEFRAMES-1)];
7540 hendricks2 370
        j = frameval[framecnt&(AVERAGEFRAMES-1)] = timerGetTicks(); framecnt++;
5735 hendricks2 371
        if (i != j) averagefps = (averagefps*3 + (AVERAGEFRAMES*1000)/(j-i))>>2;
5327 hendricks2 372
        Bsprintf((char *)tempbuf,"%d",averagefps);
373
        printext256(0L,0L,31,-1,(char *)tempbuf,1);
374
 
7540 hendricks2 375
        videoEndDrawing();
5327 hendricks2 376
        editinput();
377
    }
378
    else
379
    {
380
    }
381
}
382
 
383
void ExtCleanUp(void)
384
{
385
}
386
 
387
void ExtPreLoadMap(void)
388
{
389
}
390
 
391
 
392
void ExtSetupMapFilename(const char *mapname)
393
{
394
    UNREFERENCED_PARAMETER(mapname);
395
}
396
 
397
void ExtLoadMap(const char *mapname)
398
{
399
    UNREFERENCED_PARAMETER(mapname);
400
}
401
 
402
int32_t ExtPreSaveMap(void)
403
{
404
    return 0;
405
}
406
 
407
void ExtSaveMap(const char *mapname)
408
{
409
    UNREFERENCED_PARAMETER(mapname);
410
}
411
 
412
const char *ExtGetSectorCaption(short sectnum)
413
{
414
    if ((sector[sectnum].lotag|sector[sectnum].hitag) == 0)
415
    {
416
        tempbuf[0] = 0;
417
    }
418
    else
419
    {
420
        Bsprintf((char *)tempbuf,"%hu,%hu",(unsigned short)sector[sectnum].hitag,
421
                 (unsigned short)sector[sectnum].lotag);
422
    }
423
    return (char *)tempbuf;
424
}
425
 
426
const char *ExtGetWallCaption(short wallnum)
427
{
428
    if ((wall[wallnum].lotag|wall[wallnum].hitag) == 0)
429
    {
430
        tempbuf[0] = 0;
431
    }
432
    else
433
    {
434
        Bsprintf((char *)tempbuf,"%hu,%hu",(unsigned short)wall[wallnum].hitag,
435
                 (unsigned short)wall[wallnum].lotag);
436
    }
437
    return (char *)tempbuf;
438
}
439
 
440
const char *ExtGetSpriteCaption(short spritenum)
441
{
442
    if ((sprite[spritenum].lotag|sprite[spritenum].hitag) == 0)
443
    {
444
        tempbuf[0] = 0;
445
    }
446
    else
447
    {
448
        Bsprintf((char *)tempbuf,"%hu,%hu",(unsigned short)sprite[spritenum].hitag,
449
                 (unsigned short)sprite[spritenum].lotag);
450
    }
451
    return (char *)tempbuf;
452
}
453
 
454
//printext16 parameters:
455
//printext16(int xpos, int ypos, short col, short backcol,
456
//           char name[82], char fontsize)
457
//  xpos 0-639   (top left)
458
//  ypos 0-479   (top left)
459
//  col 0-15
460
//  backcol 0-15, -1 is transparent background
461
//  name
462
//  fontsize 0=8*8, 1=3*5
463
 
7540 hendricks2 464
//editorDraw2dLine parameters:
465
// editorDraw2dLine(int x1, int y1, int x2, int y2, char col)
5327 hendricks2 466
//  x1, x2  0-639
467
//  y1, y2  0-143  (status bar is 144 high, origin is top-left of STATUS BAR)
468
//  col     0-15
469
 
470
void ExtShowSectorData(short sectnum)   //F5
471
{
472
    int i;
473
    if (qsetmode == 200)    //In 3D mode
474
    {
475
    }
476
    else
477
    {
7540 hendricks2 478
        videoBeginDrawing();
5327 hendricks2 479
        clearmidstatbar16();             //Clear middle of status bar
480
 
481
        Bsprintf((char *)tempbuf,"Sector %d",sectnum);
482
        printext16(8,ydim16+32,11,-1,(char *)tempbuf,0);
483
 
484
        printext16(8,ydim16+48,11,-1,"8*8 font: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789",0);
485
        printext16(8,ydim16+56,11,-1,"3*5 font: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789",1);
486
 
487
        i=ydim16; ydim16=ydim;
7540 hendricks2 488
        editorDraw2dLine(320,i+68,344,i+80,4);       //Draw house
489
        editorDraw2dLine(344,i+80,344,i+116,4);
490
        editorDraw2dLine(344,i+116,296,i+116,4);
491
        editorDraw2dLine(296,i+116,296,i+80,4);
492
        editorDraw2dLine(296,i+80,320,i+68,4);
5327 hendricks2 493
        ydim16=i;
7540 hendricks2 494
        videoEndDrawing();
5327 hendricks2 495
    }
496
}
497
 
498
void ExtShowWallData(short wallnum)       //F6
499
{
500
    if (qsetmode == 200)    //In 3D mode
501
    {
502
    }
503
    else
504
    {
7540 hendricks2 505
        videoBeginDrawing();
5327 hendricks2 506
        clearmidstatbar16();             //Clear middle of status bar
507
 
508
        Bsprintf((char *)tempbuf,"Wall %d",wallnum);
509
        printext16(8,ydim16+32,11,-1,(char *)tempbuf,0);
7540 hendricks2 510
        videoEndDrawing();
5327 hendricks2 511
    }
512
}
513
 
514
void ExtShowSpriteData(short spritenum)   //F6
515
{
516
    if (qsetmode == 200)    //In 3D mode
517
    {
518
    }
519
    else
520
    {
7540 hendricks2 521
        videoBeginDrawing();
5327 hendricks2 522
        clearmidstatbar16();             //Clear middle of status bar
523
 
524
        Bsprintf((char *)tempbuf,"Sprite %d",spritenum);
525
        printext16(8,ydim16+32,11,-1,(char *)tempbuf,0);
7540 hendricks2 526
        videoEndDrawing();
5327 hendricks2 527
    }
528
}
529
 
530
void ExtEditSectorData(short sectnum)    //F7
531
{
532
    short nickdata;
533
 
534
    if (qsetmode == 200)    //In 3D mode
535
    {
536
        //Ceiling
537
        if (searchstat == 1)
538
            sector[searchsector].ceilingpicnum++;   //Just a stupid example
539
 
540
        //Floor
541
        if (searchstat == 2)
542
            sector[searchsector].floorshade++;      //Just a stupid example
543
    }
544
    else                    //In 2D mode
545
    {
546
        Bsprintf((char *)tempbuf,"Sector (%d) Nick's variable: ",sectnum);
547
        nickdata = 0;
548
        nickdata = getnumber16((char *)tempbuf,nickdata,65536L,0);
549
 
550
        printmessage16(" ");              //Clear message box (top right of status bar)
551
        ExtShowSectorData(sectnum);
552
    }
553
}
554
 
555
void ExtEditWallData(short wallnum)       //F8
556
{
557
    short nickdata;
558
 
559
    if (qsetmode == 200)    //In 3D mode
560
    {
561
    }
562
    else
563
    {
564
        Bsprintf((char *)tempbuf,"Wall (%d) Nick's variable: ",wallnum);
565
        nickdata = 0;
566
        nickdata = getnumber16((char *)tempbuf,nickdata,65536L,0);
567
 
568
        printmessage16(" ");              //Clear message box (top right of status bar)
569
        ExtShowWallData(wallnum);
570
    }
571
}
572
 
573
void ExtEditSpriteData(short spritenum)   //F8
574
{
575
    short nickdata;
576
 
577
    if (qsetmode == 200)    //In 3D mode
578
    {
579
    }
580
    else
581
    {
582
        Bsprintf((char *)tempbuf,"Sprite (%d) Nick's variable: ",spritenum);
583
        nickdata = 0;
584
        nickdata = getnumber16((char *)tempbuf,nickdata,65536L,0);
585
        printmessage16(" ");
586
 
587
        printmessage16(" ");              //Clear message box (top right of status bar)
588
        ExtShowSpriteData(spritenum);
589
    }
590
}
591
 
592
void faketimerhandler(void)
593
{
8250 hendricks2 594
    timerUpdateClock();
5327 hendricks2 595
}
596
 
597
void M32RunScript(const char *s) { UNREFERENCED_PARAMETER(s); }
598
void G_Polymer_UnInit(void) { }
599
void SetGamePalette(int32_t j) { UNREFERENCED_PARAMETER(j); }
600
 
601
int32_t AmbienceToggle, MixRate, ParentalLock;
602
 
603
int32_t taglab_linktags(int32_t spritep, int32_t num)
604
{
605
    int32_t link = 0;
606
 
607
    g_iReturnVar = link;
608
    VM_OnEvent(EVENT_LINKTAGS, spritep ? num : -1);
609
    link = g_iReturnVar;
610
 
611
    return link;
612
}
613
 
614
int32_t taglab_getnextfreetag(int32_t *duetoptr)
615
{
616
    int32_t i, nextfreetag=1;
617
    int32_t obj = -1;
618
 
619
    for (i=0; i<MAXSPRITES; i++)
620
    {
621
        int32_t tag;
622
 
623
        if (sprite[i].statnum == MAXSTATUS)
624
            continue;
625
 
626
        tag = select_sprite_tag(i);
627
 
628
        if (tag != INT32_MIN && nextfreetag <= tag)
629
        {
630
            nextfreetag = tag+1;
631
            obj = 32768 + i;
632
        }
633
    }
634
 
635
    for (i=0; i<numwalls; i++)
636
    {
637
        int32_t lt = taglab_linktags(0, i);
638
 
639
        if ((lt&1) && nextfreetag <= wall[i].lotag)
640
            nextfreetag = wall[i].lotag+1, obj = i;
641
        if ((lt&2) && nextfreetag <= wall[i].hitag)
642
            nextfreetag = wall[i].hitag+1, obj = i;
643
    }
644
 
645
    if (duetoptr != NULL)
646
        *duetoptr = obj;
647
 
648
    if (nextfreetag < 32768)
649
        return nextfreetag;
650
 
651
    return 0;
652
}
653
 
654
int32_t S_InvalidSound(int32_t num) {
655
    UNREFERENCED_PARAMETER(num); return 1;
656
};
657
int32_t S_CheckSoundPlaying(int32_t i, int32_t num) {
658
    UNREFERENCED_PARAMETER(i); UNREFERENCED_PARAMETER(num); return 0;
659
};
660
int32_t S_SoundsPlaying(int32_t i) {
661
    UNREFERENCED_PARAMETER(i); return -1;
662
}
663
int32_t S_SoundFlags(int32_t num) {
664
    UNREFERENCED_PARAMETER(num); return 0;
665
};
666
int32_t A_PlaySound(uint32_t num, int32_t i) {
667
    UNREFERENCED_PARAMETER(num); UNREFERENCED_PARAMETER(i); return 0;
668
};
669
void S_StopSound(int32_t num) {
670
    UNREFERENCED_PARAMETER(num);
671
};
5989 hendricks2 672
void S_StopAllSounds(void) { }
5327 hendricks2 673
 
674
//Just thought you might want my getnumber16 code
675
/*
676
getnumber16(char namestart[80], short num, int maxnumber)
677
{
678
    char buffer[80];
679
    int j, k, n, danum, oldnum;
680
 
681
    danum = (int)num;
682
    oldnum = danum;
683
    while ((keystatus[0x1c] != 2) && (keystatus[0x1] == 0))  //Enter, ESC
684
    {
685
        sprintf(&buffer,"%s%ld_ ",namestart,danum);
686
        printmessage16(buffer);
687
 
688
        for(j=2;j<=11;j++)                //Scan numbers 0-9
689
            if (keystatus[j] > 0)
690
            {
691
                keystatus[j] = 0;
692
                k = j-1;
693
                if (k == 10) k = 0;
694
                n = (danum*10)+k;
695
                if (n < maxnumber) danum = n;
696
            }
697
        if (keystatus[0xe] > 0)    // backspace
698
        {
699
            danum /= 10;
700
            keystatus[0xe] = 0;
701
        }
702
        if (keystatus[0x1c] == 1)   //L. enter
703
        {
704
            oldnum = danum;
705
            keystatus[0x1c] = 2;
706
            asksave = 1;
707
        }
708
    }
709
    keystatus[0x1c] = 0;
710
    keystatus[0x1] = 0;
711
    return((short)oldnum);
712
}
713
*/
714
 
715
/*
716
 * vim:ts=4:
717
 */