Subversion Repositories eduke32

Rev

Rev 8475 | Rev 8477 | 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
    return 0;
147
}
148
 
5345 hendricks2 149
void ExtPostInit(void)
150
{
8474 hendricks2 151
    Ken_LoadVoxels();
7540 hendricks2 152
    palettePostLoadLookups();
5345 hendricks2 153
}
154
 
5327 hendricks2 155
void ExtUnInit(void)
156
{
157
    uninitgroupfile();
158
    writesetup(setupfilename);
159
}
160
 
161
//static int daviewingrange, daaspect, horizval1, horizval2;
162
void ExtPreCheckKeys(void)
163
{
164
    int /*cosang, sinang, dx, dy, mindx,*/ i, j, k;
165
 
166
    if (keystatus[0x3e])  //F4 - screen re-size
167
    {
168
        keystatus[0x3e] = 0;
169
 
170
        //cycle through all vesa modes, then screen-buffer mode
171
        if (keystatus[0x2a]|keystatus[0x36])
172
        {
7540 hendricks2 173
            videoSetGameMode(!fullscreen, xdim, ydim, bpp, upscalefactor);
5327 hendricks2 174
        }
175
        else
176
        {
177
 
178
            //cycle through all modes
179
            j=-1;
180
 
181
            // work out a mask to select the mode
182
            for (i=0; i<validmodecnt; i++)
183
                if ((validmode[i].xdim == xdim) &&
184
                    (validmode[i].ydim == ydim) &&
185
                    (validmode[i].fs == fullscreen) &&
186
                    (validmode[i].bpp == bpp))
187
                { j=i; break; }
188
 
189
            for (k=0; k<validmodecnt; k++)
190
                if (validmode[k].fs == fullscreen && validmode[k].bpp == bpp) break;
191
 
192
            if (j==-1) j=k;
193
            else
194
            {
195
                j++;
196
                if (j==validmodecnt) j=k;
197
            }
7540 hendricks2 198
            videoSetGameMode(fullscreen, validmode[j].xdim, validmode[j].ydim, bpp, upscalefactor);
5327 hendricks2 199
        }
200
    }
201
 
202
    if (keystatus[buildkeys[BK_MODE2D_3D]])  // Enter
203
    {
204
        getmessageleng = 0;
205
        getmessagetimeoff = 0;
206
    }
207
 
208
    if (getmessageleng > 0)
209
    {
210
        if (!in3dmode())
211
            printmessage16("%s", getmessage);
212
        if (totalclock > getmessagetimeoff)
213
            getmessageleng = 0;
214
    }
215
 
216
#if 0
217
    if (keystatus[0x2a]|keystatus[0x36])
218
    {
219
        if (keystatus[0xcf]) hang = max(hang-1,-182);
220
        if (keystatus[0xc7]) hang = min(hang+1,182);
221
    }
222
    else
223
    {
224
        if (keystatus[0xcf]) hang = max(hang-8,-182);
225
        if (keystatus[0xc7]) hang = min(hang+8,182);
226
    }
227
    if (keystatus[0x4c]) { hang = 0; horiz = 100; }
228
    if (hang != 0)
229
    {
230
        walock[4094] = 255;
231
 
232
        // JBF 20031117: scale each dimension by a factor of 1.2, and work out
233
        // the aspect of the screen. Anywhere you see 'i' below was the value
234
        // '200' before I changed it. NOTE: This whole trick crashes in resolutions
235
        // above 800x600. I'm not sure why, and fixing it is not something I intend
236
        // to do in a real big hurry.
237
        dx = (xdim + (xdim >> 3) + (xdim >> 4) + (xdim >> 6)) & (~7);
238
        dy = (ydim + (ydim >> 3) + (ydim >> 4) + (ydim >> 6)) & (~7);
239
        i = scale(320,ydim,xdim);
240
 
8250 hendricks2 241
        if (waloff[4094] == 0) g_cache.allocateBlock(&waloff[4094],/*240L*384L*/ dx*dy,&walock[4094]);
7540 hendricks2 242
        renderSetTarget(4094,/*240L,384L*/ dy,dx);
5327 hendricks2 243
 
244
        cosang = sintable[(hang+512)&2047];
245
        sinang = sintable[hang&2047];
246
 
247
        dx = dmulscale1(320,cosang,i,sinang); mindx = dx;
248
        dy = dmulscale1(-i,cosang,320,sinang);
249
        horizval1 = dy*(320>>1)/dx-1;
250
 
251
        dx = dmulscale1(320,cosang,-i,sinang); mindx = min(dx,mindx);
252
        dy = dmulscale1(i,cosang,320,sinang);
253
        horizval2 = dy*(320>>1)/dx+1;
254
 
6256 hendricks2 255
        daviewingrange = divscale30(xdim>>1, mindx-16);
5327 hendricks2 256
        daaspect = scale(daviewingrange,scale(320,tilesiz[4094].x,tilesiz[4094].y),horizval2+6-horizval1);
7540 hendricks2 257
        renderSetAspect(daviewingrange,scale(daaspect,ydim*320,xdim*i));
5327 hendricks2 258
        horiz = 100-divscale15(horizval1+horizval2,daviewingrange);
259
    }
260
#endif
261
}
262
 
8455 hendricks2 263
void ExtAnalyzeSprites(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura, int32_t smoothr)
5327 hendricks2 264
{
265
    int i, *longptr;
6001 hendricks2 266
    uspritetype *tspr;
5327 hendricks2 267
 
268
    UNREFERENCED_PARAMETER(ourx);
269
    UNREFERENCED_PARAMETER(oury);
8455 hendricks2 270
    UNREFERENCED_PARAMETER(ourz);
5327 hendricks2 271
    UNREFERENCED_PARAMETER(oura);
272
    UNREFERENCED_PARAMETER(smoothr);
273
 
274
    for (i=0,tspr=&tsprite[0]; i<spritesortcnt; i++,tspr++)
275
    {
8475 hendricks2 276
        if (usevoxels)
5327 hendricks2 277
        {
278
            switch (tspr->picnum)
279
            {
280
            case PLAYER:
8475 hendricks2 281
                if (voxid_PLAYER == -1)
282
                    break;
283
 
284
                tspr->cstat |= 48;
285
                tspr->picnum = voxid_PLAYER;
286
 
287
                longptr = (int32_t *)voxoff[voxid_PLAYER][0];
5327 hendricks2 288
                tspr->xrepeat = scale(tspr->xrepeat,56,longptr[2]);
289
                tspr->yrepeat = scale(tspr->yrepeat,56,longptr[2]);
290
                tspr->shade -= 6;
291
                break;
292
            case BROWNMONSTER:
8475 hendricks2 293
                if (voxid_BROWNMONSTER == -1)
294
                    break;
295
 
296
                tspr->cstat |= 48;
297
                tspr->picnum = voxid_BROWNMONSTER;
5327 hendricks2 298
                break;
299
            }
300
        }
301
 
302
        tspr->shade += 6;
303
        if (sector[tspr->sectnum].ceilingstat&1)
304
            tspr->shade += sector[tspr->sectnum].ceilingshade;
305
        else
306
            tspr->shade += sector[tspr->sectnum].floorshade;
307
    }
308
}
309
 
310
void ExtCheckKeys(void)
311
{
312
    int i; //, p, y, dx, dy, cosang, sinang, bufplc, tsizy, tsizyup15;
313
    int j;
314
 
8476 hendricks2 315
    if (in3dmode())
5327 hendricks2 316
    {
317
#if 0
318
        if (hang != 0)
319
        {
320
            bufplc = waloff[4094]+(mulscale16(horiz-100,xdimenscale)+(tilesiz[4094].x>>1))*tilesiz[4094].y;
7540 hendricks2 321
            renderRestoreTarget();
5327 hendricks2 322
            cosang = sintable[(hang+512)&2047];
323
            sinang = sintable[hang&2047];
324
            dx = dmulscale1(xdim,cosang,ydim,sinang);
325
            dy = dmulscale1(-ydim,cosang,xdim,sinang);
326
 
7540 hendricks2 327
            videoBeginDrawing();
5327 hendricks2 328
            tsizy = tilesiz[4094].y;
329
            tsizyup15 = (tsizy<<15);
330
            dx = mulscale14(dx,daviewingrange);
331
            dy = mulscale14(dy,daaspect);
332
            sinang = mulscale14(sinang,daviewingrange);
333
            cosang = mulscale14(cosang,daaspect);
5984 hendricks2 334
            p = ylookup[windowxy1.y]+frameplace+windowxy2.x+1;
335
            for (y=windowxy1.y; y<=windowxy2.y; y++)
5327 hendricks2 336
            {
337
                i = divscale16(tsizyup15,dx);
338
                stretchhline(0,(xdim>>1)*i+tsizyup15,xdim>>2,i,mulscale32(i,dy)*tsizy+bufplc,p);
339
                dx -= sinang; dy += cosang; p += ylookup[1];
340
            }
341
            walock[4094] = 1;
342
 
343
            Bsprintf(tempbuf,"%d",(hang*180)>>10);
344
            printext256(0L,8L,31,-1,tempbuf,1);
7540 hendricks2 345
            videoEndDrawing();
5327 hendricks2 346
        }
347
#endif
7540 hendricks2 348
        if (keystatus[0xa]) renderSetAspect(viewingrange+(viewingrange>>8),yxaspect+(yxaspect>>8));
349
        if (keystatus[0xb]) renderSetAspect(viewingrange-(viewingrange>>8),yxaspect-(yxaspect>>8));
350
        if (keystatus[0xc]) renderSetAspect(viewingrange,yxaspect-(yxaspect>>8));
351
        if (keystatus[0xd]) renderSetAspect(viewingrange,yxaspect+(yxaspect>>8));
352
        //if (keystatus[0x38]) renderSetRollAngle(rollangle+=((keystatus[0x2a]|keystatus[0x36])*6+2));
353
        //if (keystatus[0xb8]) renderSetRollAngle(rollangle-=((keystatus[0x2a]|keystatus[0x36])*6+2));
354
        //if (keystatus[0x1d]|keystatus[0x9d]) renderSetRollAngle(rollangle=0);
5327 hendricks2 355
 
7540 hendricks2 356
        videoBeginDrawing();
5327 hendricks2 357
 
358
        i = frameval[framecnt&(AVERAGEFRAMES-1)];
7540 hendricks2 359
        j = frameval[framecnt&(AVERAGEFRAMES-1)] = timerGetTicks(); framecnt++;
5735 hendricks2 360
        if (i != j) averagefps = (averagefps*3 + (AVERAGEFRAMES*1000)/(j-i))>>2;
5327 hendricks2 361
        Bsprintf((char *)tempbuf,"%d",averagefps);
362
        printext256(0L,0L,31,-1,(char *)tempbuf,1);
363
 
7540 hendricks2 364
        videoEndDrawing();
5327 hendricks2 365
        editinput();
366
    }
367
    else
368
    {
369
    }
370
}
371
 
372
void ExtCleanUp(void)
373
{
374
}
375
 
376
void ExtPreLoadMap(void)
377
{
378
}
379
 
380
 
381
void ExtSetupMapFilename(const char *mapname)
382
{
383
    UNREFERENCED_PARAMETER(mapname);
384
}
385
 
386
void ExtLoadMap(const char *mapname)
387
{
388
    UNREFERENCED_PARAMETER(mapname);
389
}
390
 
391
int32_t ExtPreSaveMap(void)
392
{
393
    return 0;
394
}
395
 
396
void ExtSaveMap(const char *mapname)
397
{
398
    UNREFERENCED_PARAMETER(mapname);
399
}
400
 
401
const char *ExtGetSectorCaption(short sectnum)
402
{
403
    if ((sector[sectnum].lotag|sector[sectnum].hitag) == 0)
404
    {
405
        tempbuf[0] = 0;
406
    }
407
    else
408
    {
409
        Bsprintf((char *)tempbuf,"%hu,%hu",(unsigned short)sector[sectnum].hitag,
410
                 (unsigned short)sector[sectnum].lotag);
411
    }
412
    return (char *)tempbuf;
413
}
414
 
415
const char *ExtGetWallCaption(short wallnum)
416
{
417
    if ((wall[wallnum].lotag|wall[wallnum].hitag) == 0)
418
    {
419
        tempbuf[0] = 0;
420
    }
421
    else
422
    {
423
        Bsprintf((char *)tempbuf,"%hu,%hu",(unsigned short)wall[wallnum].hitag,
424
                 (unsigned short)wall[wallnum].lotag);
425
    }
426
    return (char *)tempbuf;
427
}
428
 
429
const char *ExtGetSpriteCaption(short spritenum)
430
{
431
    if ((sprite[spritenum].lotag|sprite[spritenum].hitag) == 0)
432
    {
433
        tempbuf[0] = 0;
434
    }
435
    else
436
    {
437
        Bsprintf((char *)tempbuf,"%hu,%hu",(unsigned short)sprite[spritenum].hitag,
438
                 (unsigned short)sprite[spritenum].lotag);
439
    }
440
    return (char *)tempbuf;
441
}
442
 
443
//printext16 parameters:
444
//printext16(int xpos, int ypos, short col, short backcol,
445
//           char name[82], char fontsize)
446
//  xpos 0-639   (top left)
447
//  ypos 0-479   (top left)
448
//  col 0-15
449
//  backcol 0-15, -1 is transparent background
450
//  name
451
//  fontsize 0=8*8, 1=3*5
452
 
7540 hendricks2 453
//editorDraw2dLine parameters:
454
// editorDraw2dLine(int x1, int y1, int x2, int y2, char col)
5327 hendricks2 455
//  x1, x2  0-639
456
//  y1, y2  0-143  (status bar is 144 high, origin is top-left of STATUS BAR)
457
//  col     0-15
458
 
459
void ExtShowSectorData(short sectnum)   //F5
460
{
461
    int i;
8476 hendricks2 462
    if (in3dmode())
5327 hendricks2 463
    {
464
    }
465
    else
466
    {
7540 hendricks2 467
        videoBeginDrawing();
5327 hendricks2 468
        clearmidstatbar16();             //Clear middle of status bar
469
 
470
        Bsprintf((char *)tempbuf,"Sector %d",sectnum);
471
        printext16(8,ydim16+32,11,-1,(char *)tempbuf,0);
472
 
473
        printext16(8,ydim16+48,11,-1,"8*8 font: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789",0);
474
        printext16(8,ydim16+56,11,-1,"3*5 font: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789",1);
475
 
476
        i=ydim16; ydim16=ydim;
7540 hendricks2 477
        editorDraw2dLine(320,i+68,344,i+80,4);       //Draw house
478
        editorDraw2dLine(344,i+80,344,i+116,4);
479
        editorDraw2dLine(344,i+116,296,i+116,4);
480
        editorDraw2dLine(296,i+116,296,i+80,4);
481
        editorDraw2dLine(296,i+80,320,i+68,4);
5327 hendricks2 482
        ydim16=i;
7540 hendricks2 483
        videoEndDrawing();
5327 hendricks2 484
    }
485
}
486
 
487
void ExtShowWallData(short wallnum)       //F6
488
{
8476 hendricks2 489
    if (in3dmode())
5327 hendricks2 490
    {
491
    }
492
    else
493
    {
7540 hendricks2 494
        videoBeginDrawing();
5327 hendricks2 495
        clearmidstatbar16();             //Clear middle of status bar
496
 
497
        Bsprintf((char *)tempbuf,"Wall %d",wallnum);
498
        printext16(8,ydim16+32,11,-1,(char *)tempbuf,0);
7540 hendricks2 499
        videoEndDrawing();
5327 hendricks2 500
    }
501
}
502
 
503
void ExtShowSpriteData(short spritenum)   //F6
504
{
8476 hendricks2 505
    if (in3dmode())
5327 hendricks2 506
    {
507
    }
508
    else
509
    {
7540 hendricks2 510
        videoBeginDrawing();
5327 hendricks2 511
        clearmidstatbar16();             //Clear middle of status bar
512
 
513
        Bsprintf((char *)tempbuf,"Sprite %d",spritenum);
514
        printext16(8,ydim16+32,11,-1,(char *)tempbuf,0);
7540 hendricks2 515
        videoEndDrawing();
5327 hendricks2 516
    }
517
}
518
 
519
void ExtEditSectorData(short sectnum)    //F7
520
{
521
    short nickdata;
522
 
8476 hendricks2 523
    if (in3dmode())
5327 hendricks2 524
    {
525
        //Ceiling
526
        if (searchstat == 1)
527
            sector[searchsector].ceilingpicnum++;   //Just a stupid example
528
 
529
        //Floor
530
        if (searchstat == 2)
531
            sector[searchsector].floorshade++;      //Just a stupid example
532
    }
533
    else                    //In 2D mode
534
    {
535
        Bsprintf((char *)tempbuf,"Sector (%d) Nick's variable: ",sectnum);
536
        nickdata = 0;
537
        nickdata = getnumber16((char *)tempbuf,nickdata,65536L,0);
538
 
539
        printmessage16(" ");              //Clear message box (top right of status bar)
540
        ExtShowSectorData(sectnum);
541
    }
542
}
543
 
544
void ExtEditWallData(short wallnum)       //F8
545
{
546
    short nickdata;
547
 
8476 hendricks2 548
    if (in3dmode())
5327 hendricks2 549
    {
550
    }
551
    else
552
    {
553
        Bsprintf((char *)tempbuf,"Wall (%d) Nick's variable: ",wallnum);
554
        nickdata = 0;
555
        nickdata = getnumber16((char *)tempbuf,nickdata,65536L,0);
556
 
557
        printmessage16(" ");              //Clear message box (top right of status bar)
558
        ExtShowWallData(wallnum);
559
    }
560
}
561
 
562
void ExtEditSpriteData(short spritenum)   //F8
563
{
564
    short nickdata;
565
 
8476 hendricks2 566
    if (in3dmode())
5327 hendricks2 567
    {
568
    }
569
    else
570
    {
571
        Bsprintf((char *)tempbuf,"Sprite (%d) Nick's variable: ",spritenum);
572
        nickdata = 0;
573
        nickdata = getnumber16((char *)tempbuf,nickdata,65536L,0);
574
        printmessage16(" ");
575
 
576
        printmessage16(" ");              //Clear message box (top right of status bar)
577
        ExtShowSpriteData(spritenum);
578
    }
579
}
580
 
581
void faketimerhandler(void)
582
{
8250 hendricks2 583
    timerUpdateClock();
5327 hendricks2 584
}
585
 
586
void M32RunScript(const char *s) { UNREFERENCED_PARAMETER(s); }
587
void G_Polymer_UnInit(void) { }
588
void SetGamePalette(int32_t j) { UNREFERENCED_PARAMETER(j); }
589
 
590
int32_t AmbienceToggle, MixRate, ParentalLock;
591
 
592
int32_t taglab_linktags(int32_t spritep, int32_t num)
593
{
594
    int32_t link = 0;
595
 
596
    g_iReturnVar = link;
597
    VM_OnEvent(EVENT_LINKTAGS, spritep ? num : -1);
598
    link = g_iReturnVar;
599
 
600
    return link;
601
}
602
 
603
int32_t taglab_getnextfreetag(int32_t *duetoptr)
604
{
605
    int32_t i, nextfreetag=1;
606
    int32_t obj = -1;
607
 
608
    for (i=0; i<MAXSPRITES; i++)
609
    {
610
        int32_t tag;
611
 
612
        if (sprite[i].statnum == MAXSTATUS)
613
            continue;
614
 
615
        tag = select_sprite_tag(i);
616
 
617
        if (tag != INT32_MIN && nextfreetag <= tag)
618
        {
619
            nextfreetag = tag+1;
620
            obj = 32768 + i;
621
        }
622
    }
623
 
624
    for (i=0; i<numwalls; i++)
625
    {
626
        int32_t lt = taglab_linktags(0, i);
627
 
628
        if ((lt&1) && nextfreetag <= wall[i].lotag)
629
            nextfreetag = wall[i].lotag+1, obj = i;
630
        if ((lt&2) && nextfreetag <= wall[i].hitag)
631
            nextfreetag = wall[i].hitag+1, obj = i;
632
    }
633
 
634
    if (duetoptr != NULL)
635
        *duetoptr = obj;
636
 
637
    if (nextfreetag < 32768)
638
        return nextfreetag;
639
 
640
    return 0;
641
}
642
 
643
int32_t S_InvalidSound(int32_t num) {
644
    UNREFERENCED_PARAMETER(num); return 1;
645
};
646
int32_t S_CheckSoundPlaying(int32_t i, int32_t num) {
647
    UNREFERENCED_PARAMETER(i); UNREFERENCED_PARAMETER(num); return 0;
648
};
649
int32_t S_SoundsPlaying(int32_t i) {
650
    UNREFERENCED_PARAMETER(i); return -1;
651
}
652
int32_t S_SoundFlags(int32_t num) {
653
    UNREFERENCED_PARAMETER(num); return 0;
654
};
655
int32_t A_PlaySound(uint32_t num, int32_t i) {
656
    UNREFERENCED_PARAMETER(num); UNREFERENCED_PARAMETER(i); return 0;
657
};
658
void S_StopSound(int32_t num) {
659
    UNREFERENCED_PARAMETER(num);
660
};
5989 hendricks2 661
void S_StopAllSounds(void) { }
5327 hendricks2 662
 
663
//Just thought you might want my getnumber16 code
664
/*
665
getnumber16(char namestart[80], short num, int maxnumber)
666
{
667
    char buffer[80];
668
    int j, k, n, danum, oldnum;
669
 
670
    danum = (int)num;
671
    oldnum = danum;
672
    while ((keystatus[0x1c] != 2) && (keystatus[0x1] == 0))  //Enter, ESC
673
    {
674
        sprintf(&buffer,"%s%ld_ ",namestart,danum);
675
        printmessage16(buffer);
676
 
677
        for(j=2;j<=11;j++)                //Scan numbers 0-9
678
            if (keystatus[j] > 0)
679
            {
680
                keystatus[j] = 0;
681
                k = j-1;
682
                if (k == 10) k = 0;
683
                n = (danum*10)+k;
684
                if (n < maxnumber) danum = n;
685
            }
686
        if (keystatus[0xe] > 0)    // backspace
687
        {
688
            danum /= 10;
689
            keystatus[0xe] = 0;
690
        }
691
        if (keystatus[0x1c] == 1)   //L. enter
692
        {
693
            oldnum = danum;
694
            keystatus[0x1c] = 2;
695
            asksave = 1;
696
        }
697
    }
698
    keystatus[0x1c] = 0;
699
    keystatus[0x1] = 0;
700
    return((short)oldnum);
701
}
702
*/
703
 
704
/*
705
 * vim:ts=4:
706
 */