Subversion Repositories eduke32

Rev

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