Subversion Repositories eduke32

Rev

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