]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Remove the NG_MENU additions as it has never really been used.
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 3 Dec 2007 15:04:04 +0000 (15:04 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 3 Dec 2007 15:04:04 +0000 (15:04 +0000)
Remove unused code from progs.h.
Add gecko qc builtins (only for the menu right now).
They are untested though.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7760 d7cf8633-e32d-0410-b094-e92efae38249

menu.c
mvm_cmds.c
progs.h
progsvm.h
prvm_cmds.c
prvm_cmds.h
prvm_edict.c

diff --git a/menu.c b/menu.c
index 1ab12b6ac22b3d2ff9346f6ea37cb20f971db66c..fb55bd75b00e7404812b70eb97a5d9d603a31593 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -5015,10 +5015,6 @@ static char *m_required_func[] = {
 "m_shutdown",
 };
 
-#ifdef NG_MENU
-static qboolean m_displayed;
-#endif
-
 static int m_numrequiredfunc = sizeof(m_required_func) / sizeof(char*);
 
 void MR_SetRouting (qboolean forceold);
@@ -5087,15 +5083,7 @@ void MP_ToggleMenu_f (void)
        PRVM_Begin;
        PRVM_SetProg(PRVM_MENUPROG);
 
-#ifdef NG_MENU
-       m_displayed = !m_displayed;
-       if( m_displayed )
-               PRVM_ExecuteProgram(prog->funcoffsets.m_display,"m_display() required");
-       else
-               PRVM_ExecuteProgram(prog->funcoffsets.m_hide,"m_hide() required");
-#else
        PRVM_ExecuteProgram(prog->funcoffsets.m_toggle,"m_toggle() required");
-#endif
 
        PRVM_End;
 }
@@ -5151,10 +5139,6 @@ void MP_Init (void)
        // note: OP_STATE is not supported by menu qc, we don't even try to detect
        // it here
 
-#ifdef NG_MENU
-       m_displayed = false;
-#endif
-
        // call the prog init
        PRVM_ExecuteProgram(prog->funcoffsets.m_init,"m_init() required");
 
index 87f5fc6e02c2108f18ff23b73ceaa2947283cd1f..834e838360e3cf13c7623c6f1c1c839c670c9a65 100644 (file)
@@ -771,631 +771,639 @@ static void VM_M_copyentity (void)
 }
 
 prvm_builtin_t vm_m_builtins[] = {
-NULL,                                          //   #0 NULL function (not callable)
-VM_checkextension,                     //   #1
-VM_error,                                      //   #2
-VM_objerror,                           //   #3
-VM_print,                                      //   #4
-VM_bprint,                                     //   #5
-VM_sprint,                                     //   #6
-VM_centerprint,                                //   #7
-VM_normalize,                          //   #8
-VM_vlen,                                       //   #9
-VM_vectoyaw,                           //  #10
-VM_vectoangles,                                //  #11
-VM_random,                                     //  #12
-VM_localcmd,                           //  #13
-VM_cvar,                                       //  #14
-VM_cvar_set,                           //  #15
-VM_dprint,                                     //  #16
-VM_ftos,                                       //  #17
-VM_fabs,                                       //  #18
-VM_vtos,                                       //  #19
-VM_etos,                                       //  #20
-VM_stof,                                       //  #21
-VM_spawn,                                      //  #22
-VM_remove,                                     //  #23
-VM_find,                                       //  #24
-VM_findfloat,                          //  #25
-VM_findchain,                          //  #26
-VM_findchainfloat,                     //  #27
-VM_precache_file,                      //  #28
-VM_precache_sound,                     //  #29
-VM_coredump,                           //  #30
-VM_traceon,                                    //  #31
-VM_traceoff,                           //  #32
-VM_eprint,                                     //  #33
-VM_rint,                                       //  #34
-VM_floor,                                      //  #35
-VM_ceil,                                       //  #36
-VM_nextent,                                    //  #37
-VM_sin,                                                //  #38
-VM_cos,                                                //  #39
-VM_sqrt,                                       //  #40
-VM_randomvec,                          //  #41
-VM_registercvar,                       //  #42
-VM_min,                                                //  #43
-VM_max,                                                //  #44
-VM_bound,                                      //  #45
-VM_pow,                                                //  #46
-VM_M_copyentity,                       //  #47
-VM_fopen,                                      //  #48
-VM_fclose,                                     //  #49
-VM_fgets,                                      //  #50
-VM_fputs,                                      //  #51
-VM_strlen,                                     //  #52
-VM_strcat,                                     //  #53
-VM_substring,                          //  #54
-VM_stov,                                       //  #55
-VM_strzone,                                    //  #56
-VM_strunzone,                          //  #57
-VM_tokenize,                           //  #58
-VM_argv,                                       //  #59
-VM_isserver,                           //  #60
-VM_clientcount,                                //  #61
-VM_clientstate,                                //  #62
-VM_clcommand,                          //  #63
-VM_changelevel,                                //  #64
-VM_localsound,                         //  #65
-VM_getmousepos,                                //  #66
-VM_gettime,                                    //  #67
-VM_loadfromdata,                       //  #68
-VM_loadfromfile,                       //  #69
-VM_modulo,                                     //  #70
-VM_cvar_string,                                //  #71
-VM_crash,                                      //  #72
-VM_stackdump,                          //  #73
-VM_search_begin,                       //  #74
-VM_search_end,                         //  #75
-VM_search_getsize,                     //  #76
-VM_search_getfilename,         //  #77
-VM_chr,                                                //  #78
-VM_itof,                                       //  #79
-VM_ftoe,                                       //  #80
-VM_itof,                                       //  #81 isString
-VM_altstr_count,                       //  #82
-VM_altstr_prepare,                     //  #83
-VM_altstr_get,                         //  #84
-VM_altstr_set,                         //  #85
-VM_altstr_ins,                         //  #86
-VM_findflags,                          //  #87
-VM_findchainflags,                     //  #88
-VM_cvar_defstring,                     //  #89
-NULL,                                          //  #90
-NULL,                                          //  #91
-NULL,                                          //  #92
-NULL,                                          //  #93
-NULL,                                          //  #94
-NULL,                                          //  #95
-NULL,                                          //  #96
-NULL,                                          //  #97
-NULL,                                          //  #98
-NULL,                                          //  #99
-NULL,                                          // #100
-NULL,                                          // #101
-NULL,                                          // #102
-NULL,                                          // #103
-NULL,                                          // #104
-NULL,                                          // #105
-NULL,                                          // #106
-NULL,                                          // #107
-NULL,                                          // #108
-NULL,                                          // #109
-NULL,                                          // #110
-NULL,                                          // #111
-NULL,                                          // #112
-NULL,                                          // #113
-NULL,                                          // #114
-NULL,                                          // #115
-NULL,                                          // #116
-NULL,                                          // #117
-NULL,                                          // #118
-NULL,                                          // #119
-NULL,                                          // #120
-NULL,                                          // #121
-NULL,                                          // #122
-NULL,                                          // #123
-NULL,                                          // #124
-NULL,                                          // #125
-NULL,                                          // #126
-NULL,                                          // #127
-NULL,                                          // #128
-NULL,                                          // #129
-NULL,                                          // #130
-NULL,                                          // #131
-NULL,                                          // #132
-NULL,                                          // #133
-NULL,                                          // #134
-NULL,                                          // #135
-NULL,                                          // #136
-NULL,                                          // #137
-NULL,                                          // #138
-NULL,                                          // #139
-NULL,                                          // #140
-NULL,                                          // #141
-NULL,                                          // #142
-NULL,                                          // #143
-NULL,                                          // #144
-NULL,                                          // #145
-NULL,                                          // #146
-NULL,                                          // #147
-NULL,                                          // #148
-NULL,                                          // #149
-NULL,                                          // #150
-NULL,                                          // #151
-NULL,                                          // #152
-NULL,                                          // #153
-NULL,                                          // #154
-NULL,                                          // #155
-NULL,                                          // #156
-NULL,                                          // #157
-NULL,                                          // #158
-NULL,                                          // #159
-NULL,                                          // #160
-NULL,                                          // #161
-NULL,                                          // #162
-NULL,                                          // #163
-NULL,                                          // #164
-NULL,                                          // #165
-NULL,                                          // #166
-NULL,                                          // #167
-NULL,                                          // #168
-NULL,                                          // #169
-NULL,                                          // #170
-NULL,                                          // #171
-NULL,                                          // #172
-NULL,                                          // #173
-NULL,                                          // #174
-NULL,                                          // #175
-NULL,                                          // #176
-NULL,                                          // #177
-NULL,                                          // #178
-NULL,                                          // #179
-NULL,                                          // #180
-NULL,                                          // #181
-NULL,                                          // #182
-NULL,                                          // #183
-NULL,                                          // #184
-NULL,                                          // #185
-NULL,                                          // #186
-NULL,                                          // #187
-NULL,                                          // #188
-NULL,                                          // #189
-NULL,                                          // #190
-NULL,                                          // #191
-NULL,                                          // #192
-NULL,                                          // #193
-NULL,                                          // #194
-NULL,                                          // #195
-NULL,                                          // #196
-NULL,                                          // #197
-NULL,                                          // #198
-NULL,                                          // #199
-NULL,                                          // #200
-NULL,                                          // #201
-NULL,                                          // #202
-NULL,                                          // #203
-NULL,                                          // #204
-NULL,                                          // #205
-NULL,                                          // #206
-NULL,                                          // #207
-NULL,                                          // #208
-NULL,                                          // #209
-NULL,                                          // #210
-NULL,                                          // #211
-NULL,                                          // #212
-NULL,                                          // #213
-NULL,                                          // #214
-NULL,                                          // #215
-NULL,                                          // #216
-NULL,                                          // #217
-NULL,                                          // #218
-NULL,                                          // #219
-NULL,                                          // #220
-VM_strstrofs,                          // #221 float(string str, string sub[, float startpos]) strstrofs (FTE_STRINGS)
-NULL,                                          // #222
-NULL,                                          // #223
-NULL,                                          // #224
-NULL,                                          // #225
-NULL,                                          // #226
-NULL,                                          // #227
-VM_strncmp,                                    // #228 float(string s1, string s2, float len) strncmp (FTE_STRINGS)
-VM_strncasecmp,                                // #229 float(string s1, string s2) strcasecmp (FTE_STRINGS)
-VM_strncasecmp,                                // #230 float(string s1, string s2, float len) strncasecmp (FTE_STRINGS)
-NULL,                                          // #231
-NULL,                                          // #232
-NULL,                                          // #233
-NULL,                                          // #234
-NULL,                                          // #235
-NULL,                                          // #236
-NULL,                                          // #237
-NULL,                                          // #238
-NULL,                                          // #239
-NULL,                                          // #240
-NULL,                                          // #241
-NULL,                                          // #242
-NULL,                                          // #243
-NULL,                                          // #244
-NULL,                                          // #245
-NULL,                                          // #246
-NULL,                                          // #247
-NULL,                                          // #248
-NULL,                                          // #249
-NULL,                                          // #250
-NULL,                                          // #251
-NULL,                                          // #252
-NULL,                                          // #253
-NULL,                                          // #254
-NULL,                                          // #255
-NULL,                                          // #256
-NULL,                                          // #257
-NULL,                                          // #258
-NULL,                                          // #259
-NULL,                                          // #260
-NULL,                                          // #261
-NULL,                                          // #262
-NULL,                                          // #263
-NULL,                                          // #264
-NULL,                                          // #265
-NULL,                                          // #266
-NULL,                                          // #267
-NULL,                                          // #268
-NULL,                                          // #269
-NULL,                                          // #270
-NULL,                                          // #271
-NULL,                                          // #272
-NULL,                                          // #273
-NULL,                                          // #274
-NULL,                                          // #275
-NULL,                                          // #276
-NULL,                                          // #277
-NULL,                                          // #278
-NULL,                                          // #279
-NULL,                                          // #280
-NULL,                                          // #281
-NULL,                                          // #282
-NULL,                                          // #283
-NULL,                                          // #284
-NULL,                                          // #285
-NULL,                                          // #286
-NULL,                                          // #287
-NULL,                                          // #288
-NULL,                                          // #289
-NULL,                                          // #290
-NULL,                                          // #291
-NULL,                                          // #292
-NULL,                                          // #293
-NULL,                                          // #294
-NULL,                                          // #295
-NULL,                                          // #296
-NULL,                                          // #297
-NULL,                                          // #298
-NULL,                                          // #299
-NULL,                                          // #300
-NULL,                                          // #301
-NULL,                                          // #302
-NULL,                                          // #303
-NULL,                                          // #304
-NULL,                                          // #305
-NULL,                                          // #306
-NULL,                                          // #307
-NULL,                                          // #308
-NULL,                                          // #309
-NULL,                                          // #310
-NULL,                                          // #311
-NULL,                                          // #312
-NULL,                                          // #313
-NULL,                                          // #314
-NULL,                                          // #315
-NULL,                                          // #316
-NULL,                                          // #317
-NULL,                                          // #318
-NULL,                                          // #319
-NULL,                                          // #320
-NULL,                                          // #321
-NULL,                                          // #322
-NULL,                                          // #323
-NULL,                                          // #324
-NULL,                                          // #325
-NULL,                                          // #326
-NULL,                                          // #327
-NULL,                                          // #328
-NULL,                                          // #329
-NULL,                                          // #330
-NULL,                                          // #331
-NULL,                                          // #332
-NULL,                                          // #333
-NULL,                                          // #334
-NULL,                                          // #335
-NULL,                                          // #336
-NULL,                                          // #337
-NULL,                                          // #338
-NULL,                                          // #339
-NULL,                                          // #340
-NULL,                                          // #341
-NULL,                                          // #342
-NULL,                                          // #343
-NULL,                                          // #344
-NULL,                                          // #345
-NULL,                                          // #346
-NULL,                                          // #347
-NULL,                                          // #348
-NULL,                                          // #349
-NULL,                                          // #350
-NULL,                                          // #351
-NULL,                                          // #352
-NULL,                                          // #353
-NULL,                                          // #354
-NULL,                                          // #355
-NULL,                                          // #356
-NULL,                                          // #357
-NULL,                                          // #358
-NULL,                                          // #359
-NULL,                                          // #360
-NULL,                                          // #361
-NULL,                                          // #362
-NULL,                                          // #363
-NULL,                                          // #364
-NULL,                                          // #365
-NULL,                                          // #366
-NULL,                                          // #367
-NULL,                                          // #368
-NULL,                                          // #369
-NULL,                                          // #370
-NULL,                                          // #371
-NULL,                                          // #372
-NULL,                                          // #373
-NULL,                                          // #374
-NULL,                                          // #375
-NULL,                                          // #376
-NULL,                                          // #377
-NULL,                                          // #378
-NULL,                                          // #379
-NULL,                                          // #380
-NULL,                                          // #381
-NULL,                                          // #382
-NULL,                                          // #383
-NULL,                                          // #384
-NULL,                                          // #385
-NULL,                                          // #386
-NULL,                                          // #387
-NULL,                                          // #388
-NULL,                                          // #389
-NULL,                                          // #390
-NULL,                                          // #391
-NULL,                                          // #392
-NULL,                                          // #393
-NULL,                                          // #394
-NULL,                                          // #395
-NULL,                                          // #396
-NULL,                                          // #397
-NULL,                                          // #398
-NULL,                                          // #399
-NULL,                                          // #400
-VM_M_WriteByte,                                // #401
-VM_M_WriteChar,                                // #402
-VM_M_WriteShort,                       // #403
-VM_M_WriteLong,                                // #404
-VM_M_WriteAngle,                       // #405
-VM_M_WriteCoord,                       // #406
-VM_M_WriteString,                      // #407
-VM_M_WriteEntity,                      // #408
-NULL,                                          // #409
-NULL,                                          // #410
-NULL,                                          // #411
-NULL,                                          // #412
-NULL,                                          // #413
-NULL,                                          // #414
-NULL,                                          // #415
-NULL,                                          // #416
-NULL,                                          // #417
-NULL,                                          // #418
-NULL,                                          // #419
-NULL,                                          // #420
-NULL,                                          // #421
-NULL,                                          // #422
-NULL,                                          // #423
-NULL,                                          // #424
-NULL,                                          // #425
-NULL,                                          // #426
-NULL,                                          // #427
-NULL,                                          // #428
-NULL,                                          // #429
-NULL,                                          // #430
-NULL,                                          // #431
-NULL,                                          // #432
-NULL,                                          // #433
-NULL,                                          // #434
-NULL,                                          // #435
-NULL,                                          // #436
-NULL,                                          // #437
-NULL,                                          // #438
-NULL,                                          // #439
-NULL,                                          // #440
-NULL,                                          // #441
-NULL,                                          // #442
-NULL,                                          // #443
-NULL,                                          // #444
-NULL,                                          // #445
-NULL,                                          // #446
-NULL,                                          // #447
-NULL,                                          // #448
-NULL,                                          // #449
-NULL,                                          // #450
-VM_iscachedpic,                                // #451 draw functions...
-VM_precache_pic,                       // #452
-VM_freepic,                                    // #453
-VM_drawcharacter,                      // #454
-VM_drawstring,                         // #455
-VM_drawpic,                                    // #456
-VM_drawfill,                           // #457
-VM_drawsetcliparea,                    // #458
-VM_drawresetcliparea,          // #459
-VM_getimagesize,                       // #460
-VM_cin_open,                           // #461
-VM_cin_close,                          // #462
-VM_cin_setstate,                       // #463
-VM_cin_getstate,                       // #464
-VM_cin_restart,                        // #465
-VM_drawline,                           // #466
-VM_drawcolorcodedstring,       // #467
-VM_stringwidth,                                // #468
-VM_drawsubpic,                 // #469
-NULL,                                          // #470
-VM_asin,                                       // #471 float(float s) VM_asin (DP_QC_ASINACOSATANATAN2TAN)
-VM_acos,                                       // #472 float(float c) VM_acos (DP_QC_ASINACOSATANATAN2TAN)
-VM_atan,                                       // #473 float(float t) VM_atan (DP_QC_ASINACOSATANATAN2TAN)
-VM_atan2,                                      // #474 float(float c, float s) VM_atan2 (DP_QC_ASINACOSATANATAN2TAN)
-VM_tan,                                                // #475 float(float a) VM_tan (DP_QC_ASINACOSATANATAN2TAN)
-VM_strlennocol,                                // #476 float(string s) : DRESK - String Length (not counting color codes) (DP_QC_STRINGCOLORFUNCTIONS)
-VM_strdecolorize,                      // #477 string(string s) : DRESK - Decolorized String (DP_QC_STRINGCOLORFUNCTIONS)
-VM_strftime,                           // #478 string(float uselocaltime, string format, ...) (DP_QC_STRFTIME)
-VM_tokenizebyseparator,                // #479 float(string s) tokenizebyseparator (DP_QC_TOKENIZEBYSEPARATOR)
-VM_strtolower,                         // #480 string(string s) VM_strtolower : DRESK - Return string as lowercase
-VM_strtoupper,                         // #481 string(string s) VM_strtoupper : DRESK - Return string as uppercase
-NULL,                                          // #482
-NULL,                                          // #483
-VM_strreplace,                         // #484 string(string search, string replace, string subject) strreplace (DP_QC_STRREPLACE)
-VM_strireplace,                                // #485 string(string search, string replace, string subject) strireplace (DP_QC_STRREPLACE)
-NULL,                                          // #486
-NULL,                                          // #487
-NULL,                                          // #488
-NULL,                                          // #489
-NULL,                                          // #490
-NULL,                                          // #491
-NULL,                                          // #492
-NULL,                                          // #493
-NULL,                                          // #494
-NULL,                                          // #495
-NULL,                                          // #496
-NULL,                                          // #497
-NULL,                                          // #498
-NULL,                                          // #499
-NULL,                                          // #500
-NULL,                                          // #501
-NULL,                                          // #502
-NULL,                                          // #503
-NULL,                                          // #504
-NULL,                                          // #505
-NULL,                                          // #506
-NULL,                                          // #507
-NULL,                                          // #508
-NULL,                                          // #509
-NULL,                                          // #510
-NULL,                                          // #511
-NULL,                                          // #512
-NULL,                                          // #513
-NULL,                                          // #514
-NULL,                                          // #515
-NULL,                                          // #516
-NULL,                                          // #517
-NULL,                                          // #518
-NULL,                                          // #519
-NULL,                                          // #520
-NULL,                                          // #521
-NULL,                                          // #522
-NULL,                                          // #523
-NULL,                                          // #524
-NULL,                                          // #525
-NULL,                                          // #526
-NULL,                                          // #527
-NULL,                                          // #528
-NULL,                                          // #529
-NULL,                                          // #530
-NULL,                                          // #531
-NULL,                                          // #532
-NULL,                                          // #533
-NULL,                                          // #534
-NULL,                                          // #535
-NULL,                                          // #536
-NULL,                                          // #537
-NULL,                                          // #538
-NULL,                                          // #539
-NULL,                                          // #540
-NULL,                                          // #541
-NULL,                                          // #542
-NULL,                                          // #543
-NULL,                                          // #544
-NULL,                                          // #545
-NULL,                                          // #546
-NULL,                                          // #547
-NULL,                                          // #548
-NULL,                                          // #549
-NULL,                                          // #550
-NULL,                                          // #551
-NULL,                                          // #552
-NULL,                                          // #553
-NULL,                                          // #554
-NULL,                                          // #555
-NULL,                                          // #556
-NULL,                                          // #557
-NULL,                                          // #558
-NULL,                                          // #559
-NULL,                                          // #560
-NULL,                                          // #561
-NULL,                                          // #562
-NULL,                                          // #563
-NULL,                                          // #564
-NULL,                                          // #565
-NULL,                                          // #566
-NULL,                                          // #567
-NULL,                                          // #568
-NULL,                                          // #569
-NULL,                                          // #570
-NULL,                                          // #571
-NULL,                                          // #572
-NULL,                                          // #573
-NULL,                                          // #574
-NULL,                                          // #575
-NULL,                                          // #576
-NULL,                                          // #577
-NULL,                                          // #578
-NULL,                                          // #579
-NULL,                                          // #580
-NULL,                                          // #581
-NULL,                                          // #582
-NULL,                                          // #583
-NULL,                                          // #584
-NULL,                                          // #585
-NULL,                                          // #586
-NULL,                                          // #587
-NULL,                                          // #588
-NULL,                                          // #589
-NULL,                                          // #590
-NULL,                                          // #591
-NULL,                                          // #592
-NULL,                                          // #593
-NULL,                                          // #594
-NULL,                                          // #595
-NULL,                                          // #596
-NULL,                                          // #597
-NULL,                                          // #598
-NULL,                                          // #599
-NULL,                                          // #600
-VM_M_setkeydest,                       // #601 menu functions...
-VM_M_getkeydest,                       // #602
-VM_M_setmousetarget,           // #603
-VM_M_getmousetarget,           // #604
-VM_M_callfunction,                     // #605
-VM_writetofile,                                // #606
-VM_M_isfunction,                       // #607
-VM_M_getresolution,                    // #608
-VM_keynumtostring,                     // #609
-VM_M_findkeysforcommand,       // #610
-VM_M_getserverliststat,                // #611
-VM_M_getserverliststring,      // #612
-VM_parseentitydata,                    // #613
-VM_stringtokeynum,                     // #614
-VM_M_resetserverlistmasks,     // #615
-VM_M_setserverlistmaskstring,// #616
-VM_M_setserverlistmasknumber,// #617
-VM_M_resortserverlist,         // #618
-VM_M_setserverlistsort,                // #619
-VM_M_refreshserverlist,                // #620
-VM_M_getserverlistnumber,      // #621
+NULL,                                                                  //   #0 NULL function (not callable)
+VM_checkextension,                             //   #1
+VM_error,                                                      //   #2
+VM_objerror,                                           //   #3
+VM_print,                                                      //   #4
+VM_bprint,                                                     //   #5
+VM_sprint,                                                     //   #6
+VM_centerprint,                                        //   #7
+VM_normalize,                                          //   #8
+VM_vlen,                                                               //   #9
+VM_vectoyaw,                                           //  #10
+VM_vectoangles,                                        //  #11
+VM_random,                                                     //  #12
+VM_localcmd,                                           //  #13
+VM_cvar,                                                               //  #14
+VM_cvar_set,                                           //  #15
+VM_dprint,                                                     //  #16
+VM_ftos,                                                               //  #17
+VM_fabs,                                                               //  #18
+VM_vtos,                                                               //  #19
+VM_etos,                                                               //  #20
+VM_stof,                                                               //  #21
+VM_spawn,                                                      //  #22
+VM_remove,                                                     //  #23
+VM_find,                                                               //  #24
+VM_findfloat,                                          //  #25
+VM_findchain,                                          //  #26
+VM_findchainfloat,                             //  #27
+VM_precache_file,                                      //  #28
+VM_precache_sound,                             //  #29
+VM_coredump,                                           //  #30
+VM_traceon,                                                    //  #31
+VM_traceoff,                                           //  #32
+VM_eprint,                                                     //  #33
+VM_rint,                                                               //  #34
+VM_floor,                                                      //  #35
+VM_ceil,                                                               //  #36
+VM_nextent,                                                    //  #37
+VM_sin,                                                                //  #38
+VM_cos,                                                                //  #39
+VM_sqrt,                                                               //  #40
+VM_randomvec,                                          //  #41
+VM_registercvar,                                       //  #42
+VM_min,                                                                //  #43
+VM_max,                                                                //  #44
+VM_bound,                                                      //  #45
+VM_pow,                                                                //  #46
+VM_M_copyentity,                                       //  #47
+VM_fopen,                                                      //  #48
+VM_fclose,                                                     //  #49
+VM_fgets,                                                      //  #50
+VM_fputs,                                                      //  #51
+VM_strlen,                                                     //  #52
+VM_strcat,                                                     //  #53
+VM_substring,                                          //  #54
+VM_stov,                                                               //  #55
+VM_strzone,                                                    //  #56
+VM_strunzone,                                          //  #57
+VM_tokenize,                                           //  #58
+VM_argv,                                                               //  #59
+VM_isserver,                                           //  #60
+VM_clientcount,                                        //  #61
+VM_clientstate,                                        //  #62
+VM_clcommand,                                          //  #63
+VM_changelevel,                                        //  #64
+VM_localsound,                                         //  #65
+VM_getmousepos,                                        //  #66
+VM_gettime,                                                    //  #67
+VM_loadfromdata,                                       //  #68
+VM_loadfromfile,                                       //  #69
+VM_modulo,                                                     //  #70
+VM_cvar_string,                                        //  #71
+VM_crash,                                                      //  #72
+VM_stackdump,                                          //  #73
+VM_search_begin,                                       //  #74
+VM_search_end,                                         //  #75
+VM_search_getsize,                             //  #76
+VM_search_getfilename,                 //  #77
+VM_chr,                                                                //  #78
+VM_itof,                                                               //  #79
+VM_ftoe,                                                               //  #80
+VM_itof,                                                               //  #81 isString
+VM_altstr_count,                                       //  #82
+VM_altstr_prepare,                             //  #83
+VM_altstr_get,                                         //  #84
+VM_altstr_set,                                         //  #85
+VM_altstr_ins,                                         //  #86
+VM_findflags,                                          //  #87
+VM_findchainflags,                             //  #88
+VM_cvar_defstring,                             //  #89
+NULL,                                                                  //  #90
+NULL,                                                                  //  #91
+NULL,                                                                  //  #92
+NULL,                                                                  //  #93
+NULL,                                                                  //  #94
+NULL,                                                                  //  #95
+NULL,                                                                  //  #96
+NULL,                                                                  //  #97
+NULL,                                                                  //  #98
+NULL,                                                                  //  #99
+NULL,                                                                  // #100
+NULL,                                                                  // #101
+NULL,                                                                  // #102
+NULL,                                                                  // #103
+NULL,                                                                  // #104
+NULL,                                                                  // #105
+NULL,                                                                  // #106
+NULL,                                                                  // #107
+NULL,                                                                  // #108
+NULL,                                                                  // #109
+NULL,                                                                  // #110
+NULL,                                                                  // #111
+NULL,                                                                  // #112
+NULL,                                                                  // #113
+NULL,                                                                  // #114
+NULL,                                                                  // #115
+NULL,                                                                  // #116
+NULL,                                                                  // #117
+NULL,                                                                  // #118
+NULL,                                                                  // #119
+NULL,                                                                  // #120
+NULL,                                                                  // #121
+NULL,                                                                  // #122
+NULL,                                                                  // #123
+NULL,                                                                  // #124
+NULL,                                                                  // #125
+NULL,                                                                  // #126
+NULL,                                                                  // #127
+NULL,                                                                  // #128
+NULL,                                                                  // #129
+NULL,                                                                  // #130
+NULL,                                                                  // #131
+NULL,                                                                  // #132
+NULL,                                                                  // #133
+NULL,                                                                  // #134
+NULL,                                                                  // #135
+NULL,                                                                  // #136
+NULL,                                                                  // #137
+NULL,                                                                  // #138
+NULL,                                                                  // #139
+NULL,                                                                  // #140
+NULL,                                                                  // #141
+NULL,                                                                  // #142
+NULL,                                                                  // #143
+NULL,                                                                  // #144
+NULL,                                                                  // #145
+NULL,                                                                  // #146
+NULL,                                                                  // #147
+NULL,                                                                  // #148
+NULL,                                                                  // #149
+NULL,                                                                  // #150
+NULL,                                                                  // #151
+NULL,                                                                  // #152
+NULL,                                                                  // #153
+NULL,                                                                  // #154
+NULL,                                                                  // #155
+NULL,                                                                  // #156
+NULL,                                                                  // #157
+NULL,                                                                  // #158
+NULL,                                                                  // #159
+NULL,                                                                  // #160
+NULL,                                                                  // #161
+NULL,                                                                  // #162
+NULL,                                                                  // #163
+NULL,                                                                  // #164
+NULL,                                                                  // #165
+NULL,                                                                  // #166
+NULL,                                                                  // #167
+NULL,                                                                  // #168
+NULL,                                                                  // #169
+NULL,                                                                  // #170
+NULL,                                                                  // #171
+NULL,                                                                  // #172
+NULL,                                                                  // #173
+NULL,                                                                  // #174
+NULL,                                                                  // #175
+NULL,                                                                  // #176
+NULL,                                                                  // #177
+NULL,                                                                  // #178
+NULL,                                                                  // #179
+NULL,                                                                  // #180
+NULL,                                                                  // #181
+NULL,                                                                  // #182
+NULL,                                                                  // #183
+NULL,                                                                  // #184
+NULL,                                                                  // #185
+NULL,                                                                  // #186
+NULL,                                                                  // #187
+NULL,                                                                  // #188
+NULL,                                                                  // #189
+NULL,                                                                  // #190
+NULL,                                                                  // #191
+NULL,                                                                  // #192
+NULL,                                                                  // #193
+NULL,                                                                  // #194
+NULL,                                                                  // #195
+NULL,                                                                  // #196
+NULL,                                                                  // #197
+NULL,                                                                  // #198
+NULL,                                                                  // #199
+NULL,                                                                  // #200
+NULL,                                                                  // #201
+NULL,                                                                  // #202
+NULL,                                                                  // #203
+NULL,                                                                  // #204
+NULL,                                                                  // #205
+NULL,                                                                  // #206
+NULL,                                                                  // #207
+NULL,                                                                  // #208
+NULL,                                                                  // #209
+NULL,                                                                  // #210
+NULL,                                                                  // #211
+NULL,                                                                  // #212
+NULL,                                                                  // #213
+NULL,                                                                  // #214
+NULL,                                                                  // #215
+NULL,                                                                  // #216
+NULL,                                                                  // #217
+NULL,                                                                  // #218
+NULL,                                                                  // #219
+NULL,                                                                  // #220
+VM_strstrofs,                                          // #221 float(string str, string sub[, float startpos]) strstrofs (FTE_STRINGS)
+NULL,                                                                  // #222
+NULL,                                                                  // #223
+NULL,                                                                  // #224
+NULL,                                                                  // #225
+NULL,                                                                  // #226
+NULL,                                                                  // #227
+VM_strncmp,                                                    // #228 float(string s1, string s2, float len) strncmp (FTE_STRINGS)
+VM_strncasecmp,                                        // #229 float(string s1, string s2) strcasecmp (FTE_STRINGS)
+VM_strncasecmp,                                        // #230 float(string s1, string s2, float len) strncasecmp (FTE_STRINGS)
+NULL,                                                                  // #231
+NULL,                                                                  // #232
+NULL,                                                                  // #233
+NULL,                                                                  // #234
+NULL,                                                                  // #235
+NULL,                                                                  // #236
+NULL,                                                                  // #237
+NULL,                                                                  // #238
+NULL,                                                                  // #239
+NULL,                                                                  // #240
+NULL,                                                                  // #241
+NULL,                                                                  // #242
+NULL,                                                                  // #243
+NULL,                                                                  // #244
+NULL,                                                                  // #245
+NULL,                                                                  // #246
+NULL,                                                                  // #247
+NULL,                                                                  // #248
+NULL,                                                                  // #249
+NULL,                                                                  // #250
+NULL,                                                                  // #251
+NULL,                                                                  // #252
+NULL,                                                                  // #253
+NULL,                                                                  // #254
+NULL,                                                                  // #255
+NULL,                                                                  // #256
+NULL,                                                                  // #257
+NULL,                                                                  // #258
+NULL,                                                                  // #259
+NULL,                                                                  // #260
+NULL,                                                                  // #261
+NULL,                                                                  // #262
+NULL,                                                                  // #263
+NULL,                                                                  // #264
+NULL,                                                                  // #265
+NULL,                                                                  // #266
+NULL,                                                                  // #267
+NULL,                                                                  // #268
+NULL,                                                                  // #269
+NULL,                                                                  // #270
+NULL,                                                                  // #271
+NULL,                                                                  // #272
+NULL,                                                                  // #273
+NULL,                                                                  // #274
+NULL,                                                                  // #275
+NULL,                                                                  // #276
+NULL,                                                                  // #277
+NULL,                                                                  // #278
+NULL,                                                                  // #279
+NULL,                                                                  // #280
+NULL,                                                                  // #281
+NULL,                                                                  // #282
+NULL,                                                                  // #283
+NULL,                                                                  // #284
+NULL,                                                                  // #285
+NULL,                                                                  // #286
+NULL,                                                                  // #287
+NULL,                                                                  // #288
+NULL,                                                                  // #289
+NULL,                                                                  // #290
+NULL,                                                                  // #291
+NULL,                                                                  // #292
+NULL,                                                                  // #293
+NULL,                                                                  // #294
+NULL,                                                                  // #295
+NULL,                                                                  // #296
+NULL,                                                                  // #297
+NULL,                                                                  // #298
+NULL,                                                                  // #299
+NULL,                                                                  // #300
+NULL,                                                                  // #301
+NULL,                                                                  // #302
+NULL,                                                                  // #303
+NULL,                                                                  // #304
+NULL,                                                                  // #305
+NULL,                                                                  // #306
+NULL,                                                                  // #307
+NULL,                                                                  // #308
+NULL,                                                                  // #309
+NULL,                                                                  // #310
+NULL,                                                                  // #311
+NULL,                                                                  // #312
+NULL,                                                                  // #313
+NULL,                                                                  // #314
+NULL,                                                                  // #315
+NULL,                                                                  // #316
+NULL,                                                                  // #317
+NULL,                                                                  // #318
+NULL,                                                                  // #319
+NULL,                                                                  // #320
+NULL,                                                                  // #321
+NULL,                                                                  // #322
+NULL,                                                                  // #323
+NULL,                                                                  // #324
+NULL,                                                                  // #325
+NULL,                                                                  // #326
+NULL,                                                                  // #327
+NULL,                                                                  // #328
+NULL,                                                                  // #329
+NULL,                                                                  // #330
+NULL,                                                                  // #331
+NULL,                                                                  // #332
+NULL,                                                                  // #333
+NULL,                                                                  // #334
+NULL,                                                                  // #335
+NULL,                                                                  // #336
+NULL,                                                                  // #337
+NULL,                                                                  // #338
+NULL,                                                                  // #339
+NULL,                                                                  // #340
+NULL,                                                                  // #341
+NULL,                                                                  // #342
+NULL,                                                                  // #343
+NULL,                                                                  // #344
+NULL,                                                                  // #345
+NULL,                                                                  // #346
+NULL,                                                                  // #347
+NULL,                                                                  // #348
+NULL,                                                                  // #349
+NULL,                                                                  // #350
+NULL,                                                                  // #351
+NULL,                                                                  // #352
+NULL,                                                                  // #353
+NULL,                                                                  // #354
+NULL,                                                                  // #355
+NULL,                                                                  // #356
+NULL,                                                                  // #357
+NULL,                                                                  // #358
+NULL,                                                                  // #359
+NULL,                                                                  // #360
+NULL,                                                                  // #361
+NULL,                                                                  // #362
+NULL,                                                                  // #363
+NULL,                                                                  // #364
+NULL,                                                                  // #365
+NULL,                                                                  // #366
+NULL,                                                                  // #367
+NULL,                                                                  // #368
+NULL,                                                                  // #369
+NULL,                                                                  // #370
+NULL,                                                                  // #371
+NULL,                                                                  // #372
+NULL,                                                                  // #373
+NULL,                                                                  // #374
+NULL,                                                                  // #375
+NULL,                                                                  // #376
+NULL,                                                                  // #377
+NULL,                                                                  // #378
+NULL,                                                                  // #379
+NULL,                                                                  // #380
+NULL,                                                                  // #381
+NULL,                                                                  // #382
+NULL,                                                                  // #383
+NULL,                                                                  // #384
+NULL,                                                                  // #385
+NULL,                                                                  // #386
+NULL,                                                                  // #387
+NULL,                                                                  // #388
+NULL,                                                                  // #389
+NULL,                                                                  // #390
+NULL,                                                                  // #391
+NULL,                                                                  // #392
+NULL,                                                                  // #393
+NULL,                                                                  // #394
+NULL,                                                                  // #395
+NULL,                                                                  // #396
+NULL,                                                                  // #397
+NULL,                                                                  // #398
+NULL,                                                                  // #399
+NULL,                                                                  // #400
+VM_M_WriteByte,                                        // #401
+VM_M_WriteChar,                                        // #402
+VM_M_WriteShort,                                       // #403
+VM_M_WriteLong,                                        // #404
+VM_M_WriteAngle,                                       // #405
+VM_M_WriteCoord,                                       // #406
+VM_M_WriteString,                                      // #407
+VM_M_WriteEntity,                                      // #408
+NULL,                                                                  // #409
+NULL,                                                                  // #410
+NULL,                                                                  // #411
+NULL,                                                                  // #412
+NULL,                                                                  // #413
+NULL,                                                                  // #414
+NULL,                                                                  // #415
+NULL,                                                                  // #416
+NULL,                                                                  // #417
+NULL,                                                                  // #418
+NULL,                                                                  // #419
+NULL,                                                                  // #420
+NULL,                                                                  // #421
+NULL,                                                                  // #422
+NULL,                                                                  // #423
+NULL,                                                                  // #424
+NULL,                                                                  // #425
+NULL,                                                                  // #426
+NULL,                                                                  // #427
+NULL,                                                                  // #428
+NULL,                                                                  // #429
+NULL,                                                                  // #430
+NULL,                                                                  // #431
+NULL,                                                                  // #432
+NULL,                                                                  // #433
+NULL,                                                                  // #434
+NULL,                                                                  // #435
+NULL,                                                                  // #436
+NULL,                                                                  // #437
+NULL,                                                                  // #438
+NULL,                                                                  // #439
+NULL,                                                                  // #440
+NULL,                                                                  // #441
+NULL,                                                                  // #442
+NULL,                                                                  // #443
+NULL,                                                                  // #444
+NULL,                                                                  // #445
+NULL,                                                                  // #446
+NULL,                                                                  // #447
+NULL,                                                                  // #448
+NULL,                                                                  // #449
+NULL,                                                                  // #450
+VM_iscachedpic,                                        // #451 draw functions...
+VM_precache_pic,                                       // #452
+VM_freepic,                                                    // #453
+VM_drawcharacter,                                      // #454
+VM_drawstring,                                         // #455
+VM_drawpic,                                                    // #456
+VM_drawfill,                                           // #457
+VM_drawsetcliparea,                            // #458
+VM_drawresetcliparea,                  // #459
+VM_getimagesize,                                       // #460
+VM_cin_open,                                           // #461
+VM_cin_close,                                          // #462
+VM_cin_setstate,                                       // #463
+VM_cin_getstate,                                       // #464
+VM_cin_restart,                                        // #465
+VM_drawline,                                           // #466
+VM_drawcolorcodedstring,               // #467
+VM_stringwidth,                                        // #468
+VM_drawsubpic,                                         // #469
+NULL,                                                                  // #470
+VM_asin,                                                               // #471 float(float s) VM_asin (DP_QC_ASINACOSATANATAN2TAN)
+VM_acos,                                                               // #472 float(float c) VM_acos (DP_QC_ASINACOSATANATAN2TAN)
+VM_atan,                                                               // #473 float(float t) VM_atan (DP_QC_ASINACOSATANATAN2TAN)
+VM_atan2,                                                      // #474 float(float c, float s) VM_atan2 (DP_QC_ASINACOSATANATAN2TAN)
+VM_tan,                                                                // #475 float(float a) VM_tan (DP_QC_ASINACOSATANATAN2TAN)
+VM_strlennocol,                                        // #476 float(string s) : DRESK - String Length (not counting color codes) (DP_QC_STRINGCOLORFUNCTIONS)
+VM_strdecolorize,                                      // #477 string(string s) : DRESK - Decolorized String (DP_QC_STRINGCOLORFUNCTIONS)
+VM_strftime,                                           // #478 string(float uselocaltime, string format, ...) (DP_QC_STRFTIME)
+VM_tokenizebyseparator,                        // #479 float(string s) tokenizebyseparator (DP_QC_TOKENIZEBYSEPARATOR)
+VM_strtolower,                                         // #480 string(string s) VM_strtolower : DRESK - Return string as lowercase
+VM_strtoupper,                                         // #481 string(string s) VM_strtoupper : DRESK - Return string as uppercase
+NULL,                                                                  // #482
+NULL,                                                                  // #483
+VM_strreplace,                                         // #484 string(string search, string replace, string subject) strreplace (DP_QC_STRREPLACE)
+VM_strireplace,                                        // #485 string(string search, string replace, string subject) strireplace (DP_QC_STRREPLACE)
+NULL,                                                                  // #486
+#ifdef SUPPORT_GECKO
+VM_gecko_create,                                       // #487
+VM_gecko_destroy,                                      // #488
+VM_gecko_navigate,                             // #489
+VM_gecko_keyevent,                             // #490
+VM_gecko_movemouse,                            // #491
+#else
+NULL,                                                                  // #487
+NULL,                                                                  // #488
+NULL,                                                                  // #489
+NULL,                                                                  // #490
+NULL,                                                                  // #491
+#endif
+NULL,                                                                  // #492
+NULL,                                                                  // #493
+NULL,                                                                  // #494
+NULL,                                                                  // #495
+NULL,                                                                  // #496
+NULL,                                                                  // #497
+NULL,                                                                  // #498
+NULL,                                                                  // #499
+NULL,                                                                  // #500
+NULL,                                                                  // #501
+NULL,                                                                  // #502
+NULL,                                                                  // #503
+NULL,                                                                  // #504
+NULL,                                                                  // #505
+NULL,                                                                  // #506
+NULL,                                                                  // #507
+NULL,                                                                  // #508
+NULL,                                                                  // #509
+NULL,                                                                  // #510
+NULL,                                                                  // #511
+NULL,                                                                  // #512
+NULL,                                                                  // #513
+NULL,                                                                  // #514
+NULL,                                                                  // #515
+NULL,                                                                  // #516
+NULL,                                                                  // #517
+NULL,                                                                  // #518
+NULL,                                                                  // #519
+NULL,                                                                  // #520
+NULL,                                                                  // #521
+NULL,                                                                  // #522
+NULL,                                                                  // #523
+NULL,                                                                  // #524
+NULL,                                                                  // #525
+NULL,                                                                  // #526
+NULL,                                                                  // #527
+NULL,                                                                  // #528
+NULL,                                                                  // #529
+NULL,                                                                  // #530
+NULL,                                                                  // #531
+NULL,                                                                  // #532
+NULL,                                                                  // #533
+NULL,                                                                  // #534
+NULL,                                                                  // #535
+NULL,                                                                  // #536
+NULL,                                                                  // #537
+NULL,                                                                  // #538
+NULL,                                                                  // #539
+NULL,                                                                  // #540
+NULL,                                                                  // #541
+NULL,                                                                  // #542
+NULL,                                                                  // #543
+NULL,                                                                  // #544
+NULL,                                                                  // #545
+NULL,                                                                  // #546
+NULL,                                                                  // #547
+NULL,                                                                  // #548
+NULL,                                                                  // #549
+NULL,                                                                  // #550
+NULL,                                                                  // #551
+NULL,                                                                  // #552
+NULL,                                                                  // #553
+NULL,                                                                  // #554
+NULL,                                                                  // #555
+NULL,                                                                  // #556
+NULL,                                                                  // #557
+NULL,                                                                  // #558
+NULL,                                                                  // #559
+NULL,                                                                  // #560
+NULL,                                                                  // #561
+NULL,                                                                  // #562
+NULL,                                                                  // #563
+NULL,                                                                  // #564
+NULL,                                                                  // #565
+NULL,                                                                  // #566
+NULL,                                                                  // #567
+NULL,                                                                  // #568
+NULL,                                                                  // #569
+NULL,                                                                  // #570
+NULL,                                                                  // #571
+NULL,                                                                  // #572
+NULL,                                                                  // #573
+NULL,                                                                  // #574
+NULL,                                                                  // #575
+NULL,                                                                  // #576
+NULL,                                                                  // #577
+NULL,                                                                  // #578
+NULL,                                                                  // #579
+NULL,                                                                  // #580
+NULL,                                                                  // #581
+NULL,                                                                  // #582
+NULL,                                                                  // #583
+NULL,                                                                  // #584
+NULL,                                                                  // #585
+NULL,                                                                  // #586
+NULL,                                                                  // #587
+NULL,                                                                  // #588
+NULL,                                                                  // #589
+NULL,                                                                  // #590
+NULL,                                                                  // #591
+NULL,                                                                  // #592
+NULL,                                                                  // #593
+NULL,                                                                  // #594
+NULL,                                                                  // #595
+NULL,                                                                  // #596
+NULL,                                                                  // #597
+NULL,                                                                  // #598
+NULL,                                                                  // #599
+NULL,                                                                  // #600
+VM_M_setkeydest,                                       // #601 menu functions...
+VM_M_getkeydest,                                       // #602
+VM_M_setmousetarget,                           // #603
+VM_M_getmousetarget,                           // #604
+VM_M_callfunction,                             // #605
+VM_writetofile,                                        // #606
+VM_M_isfunction,                                       // #607
+VM_M_getresolution,                            // #608
+VM_keynumtostring,                             // #609
+VM_M_findkeysforcommand,               // #610
+VM_M_getserverliststat,                        // #611
+VM_M_getserverliststring,              // #612
+VM_parseentitydata,                            // #613
+VM_stringtokeynum,                             // #614
+VM_M_resetserverlistmasks,             // #615
+VM_M_setserverlistmaskstring,  // #616
+VM_M_setserverlistmasknumber,  // #617
+VM_M_resortserverlist,                 // #618
+VM_M_setserverlistsort,                        // #619
+VM_M_refreshserverlist,                        // #620
+VM_M_getserverlistnumber,              // #621
 VM_M_getserverlistindexforkey,// #622
-VM_M_addwantedserverlistkey,// #623
-VM_M_getextresponse                    // #624
+VM_M_addwantedserverlistkey,   // #623
+VM_M_getextresponse                            // #624
 };
 
 const int vm_m_numbuiltins = sizeof(vm_m_builtins) / sizeof(prvm_builtin_t);
diff --git a/progs.h b/progs.h
index 1c0fee0cf69196b9429bc60332e4d49d7b23b9d1..695602240e62557d5c71badd9014a763d82e4d84 100644 (file)
--- a/progs.h
+++ b/progs.h
@@ -63,189 +63,3 @@ typedef struct edict_engineprivate_s
 edict_engineprivate_t;
 
 #endif
-
-
-
-
-
-
-//////////////////////////////////
-#if 0
-
-#include "pr_comp.h"                   // defs shared with qcc
-#include "progdefs.h"                  // generated by program cdefs
-
-typedef union eval_s
-{
-       string_t                string;
-       float                   _float;
-       float                   vector[3];
-       func_t                  function;
-       int                             ivector[3];
-       int                             _int;
-       int                             edict;
-} prvm_eval_t;
-
-typedef struct link_s
-{
-       int entitynumber;
-       struct link_s   *prev, *next;
-} link_t;
-
-#define ENTITYGRIDAREAS 16
-
-typedef struct edict_engineprivate_s
-{
-       // true if this edict is unused
-       qboolean free;
-       // sv.time when the object was freed (to prevent early reuse which could
-       // mess up client interpolation or obscure severe QuakeC bugs)
-       float freetime;
-
-       // cached cluster links for quick stationary object visibility checking
-       vec3_t cullmins, cullmaxs;
-       int pvs_numclusters;
-       int pvs_clusterlist[MAX_ENTITYCLUSTERS];
-
-       // physics grid areas this edict is linked into
-       link_t areagrid[ENTITYGRIDAREAS];
-       // since the areagrid can have multiple references to one entity,
-       // we should avoid extensive checking on entities already encountered
-       int areagridmarknumber;
-
-       // PROTOCOL_QUAKE, PROTOCOL_QUAKEDP, PROTOCOL_NEHAHRAMOVIE, PROTOCOL_QUAKEWORLD
-       // baseline values
-       entity_state_t baseline;
-
-       // LordHavoc: gross hack to make floating items still work
-       int suspendedinairflag;
-       // used by PushMove to keep track of where objects were before they were
-       // moved, in case they need to be moved back
-       vec3_t moved_from;
-       vec3_t moved_fromangles;
-}
-edict_engineprivate_t;
-
-// the entire server entity structure
-// NOTE: keep this small!  priv and v are dynamic but this struct is not!
-typedef struct edict_s
-{
-       // engine-private fields (stored in dynamically resized array)
-       edict_engineprivate_t *e;
-       // QuakeC fields (stored in dynamically resized array)
-       entvars_t *v;
-}
-prvm_edict_t;
-
-#define PRVM_EDICTFIELDVALUE(ed, fieldoffset) (fieldoffset ? (prvm_eval_t *)((int *)ed->v + fieldoffset) : NULL)
-
-//============================================================================
-
-extern dprograms_t             *progs;
-extern mfunction_t             *pr_functions;
-extern char                    *pr_strings;
-extern int                             pr_stringssize;
-extern ddef_t                  *pr_globaldefs;
-extern ddef_t                  *pr_fielddefs;
-extern dstatement_t    *pr_statements;
-extern globalvars_t    *pr_global_struct;
-extern float                   *pr_globals;                    // same as pr_global_struct
-
-extern int                             prog->edict_size;       // in bytes
-extern int                             pr_edictareasize; // LordHavoc: for bounds checking
-
-extern int                             pr_maxknownstrings;
-extern int                             pr_numknownstrings;
-extern const char              **pr_knownstrings;
-
-//============================================================================
-
-void PR_Init (void);
-void PR_Shutdown (void);
-
-void PRVM_ExecuteProgram (func_t fnum, const char *errormessage);
-void PR_LoadProgs (const char *progsname);
-
-#define PR_Alloc(buffersize) _PR_Alloc(buffersize, __FILE__, __LINE__)
-#define PR_Free(buffer) _PR_Free(buffer, __FILE__, __LINE__)
-#define PR_FreeAll() _PR_FreeAll(__FILE__, __LINE__)
-void *_PR_Alloc (size_t buffersize, const char *filename, int fileline);
-void _PR_Free (void *buffer, const char *filename, int fileline);
-void _PR_FreeAll (const char *filename, int fileline);
-
-void PR_Profile_f (void);
-
-void PR_PrintState(void);
-void PR_Crash (void);
-
-prvm_edict_t *ED_Alloc (void);
-void ED_Free (prvm_edict_t *ed);
-void ED_ClearEdict (prvm_edict_t *e);
-
-void ED_Print(prvm_edict_t *ed);
-void ED_Write (qfile_t *f, prvm_edict_t *ed);
-const char *ED_ParseEdict (const char *data, prvm_edict_t *ent);
-
-void ED_WriteGlobals (qfile_t *f);
-void ED_ParseGlobals (const char *data);
-
-void ED_LoadFromFile (const char *data);
-
-prvm_edict_t *EDICT_NUM_ERROR(int n, char *filename, int fileline);
-#define PRVM_EDICT_NUM(n) (((unsigned int)(n) < (unsigned int)prog->max_edicts) ? prog->edicts + (n) : EDICT_NUM_ERROR(n, __FILE__, __LINE__))
-
-//int NUM_FOR_EDICT_ERROR(prvm_edict_t *e);
-#define PRVM_NUM_FOR_EDICT(e) ((int)((prvm_edict_t *)(e) - prog->edicts))
-//int PRVM_NUM_FOR_EDICT(prvm_edict_t *e);
-
-#define        PRVM_NEXT_EDICT(e) ((e) + 1)
-
-#define PRVM_EDICT_TO_PROG(e) (PRVM_NUM_FOR_EDICT(e))
-//int PRVM_EDICT_TO_PROG(prvm_edict_t *e);
-#define PRVM_PROG_TO_EDICT(n) (PRVM_EDICT_NUM(n))
-//prvm_edict_t *PRVM_PROG_TO_EDICT(int n);
-
-//============================================================================
-
-#define        PRVM_G_FLOAT(o) (pr_globals[o])
-#define        PRVM_G_INT(o) (*(int *)&pr_globals[o])
-#define        PRVM_G_EDICT(o) (PRVM_PROG_TO_EDICT(*(int *)&pr_globals[o]))
-#define PRVM_G_EDICTNUM(o) PRVM_NUM_FOR_EDICT(PRVM_G_EDICT(o))
-#define        PRVM_G_VECTOR(o) (&pr_globals[o])
-#define        PRVM_G_STRING(o) (PRVM_GetString(*(string_t *)&pr_globals[o]))
-//#define      G_FUNCTION(o) (*(func_t *)&pr_globals[o])
-
-// FIXME: make these go away?
-#define        E_FLOAT(e,o) (((float*)e->v)[o])
-//#define      E_INT(e,o) (((int*)e->v)[o])
-//#define      E_VECTOR(e,o) (&((float*)e->v)[o])
-#define        E_STRING(e,o) (PRVM_GetString(*(string_t *)&((float*)e->v)[o]))
-
-extern int             type_size[8];
-
-typedef void (*builtin_t) (void);
-extern builtin_t *pr_builtins;
-extern int pr_numbuiltins;
-
-extern int             pr_argc;
-
-extern int                     pr_trace;
-extern mfunction_t     *pr_xfunction;
-extern int                     pr_xstatement;
-
-extern unsigned short          pr_crc;
-
-void PR_Execute_ProgsLoaded(void);
-
-void ED_PrintEdicts (void);
-void ED_PrintNum (int ent);
-
-const char *PRVM_GetString(int num);
-int PR_SetQCString(const char *s);
-int PRVM_SetEngineString(const char *s);
-int PRVM_SetTempString(const char *s);
-char *PR_AllocString(int bufferlength);
-void PR_FreeString(char *s);
-
-#endif
-
index e31c2ffadd667620c74a475e98903a706edd81c7..9ec87682397ec7c1630b375ef0f96c54a463d7fc 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -273,9 +273,7 @@ typedef struct prvm_prog_funcoffsets_s
        func_t GameCommand; // any
 
        // menu qc only uses some functions, nothing else
-       func_t m_display; // mqc
        func_t m_draw; // mqc
-       func_t m_hide; // mqc
        func_t m_init; // mqc
        func_t m_keydown; // mqc
        func_t m_keyup; // mqc
@@ -315,7 +313,7 @@ typedef struct prvm_prog_s
        // (simple optimization of the free string search)
        int                                     firstfreeknownstring;
        const char                      **knownstrings;
-       unsigned char                           *knownstrings_freeable;
+       unsigned char           *knownstrings_freeable;
        const char                      ***stringshash;
 
        // all memory allocations related to this vm_prog (code, edicts, strings)
@@ -359,8 +357,8 @@ typedef struct prvm_prog_s
        int                                     reserved_edicts; // [INIT]
 
        prvm_edict_t            *edicts;
-       void                            *edictsfields;
-       void                            *edictprivate;
+       void                                    *edictsfields;
+       void                                    *edictprivate;
 
        // size of the engine private struct
        int                                     edictprivate_size; // [INIT]
@@ -377,7 +375,7 @@ typedef struct prvm_prog_s
        char                            *name; // [INIT]
 
        // flag - used to store general flags like PRVM_GE_SELF, etc.
-       int                                     flag;
+       int                             flag;
 
        char                            *extensionstring; // [INIT]
 
index 33ee342ce4b983fe97c1a3dcdd6a3d97b9958b17..543fd23c4fd13b698b2c6309b8695164b9d10ad0 100644 (file)
@@ -3100,6 +3100,156 @@ void VM_cin_restart( void )
                CL_RestartVideo( video );
 }
 
+#ifdef SUPPORT_GECKO
+static const char *vm_gecko_getfullname( const char *name ) {
+       // FIXME: assert that PRVM_NAME is not empty.. [12/3/2007 Black]
+       return va( "%s/%s", PRVM_NAME, name );
+}
+
+/*
+========================
+VM_gecko_create
+
+float[bool] gecko_create( string name )
+========================
+*/
+void VM_gecko_create( void ) {
+       const char *name;
+       
+       VM_SAFEPARMCOUNT( 1, VM_gecko_create );
+
+       name = PRVM_G_STRING( OFS_PARM0 );
+       VM_CheckEmptyString( name );
+
+       if( !CL_Gecko_CreateBrowser( vm_gecko_getfullname( name ) ) ) {
+               // TODO: error handling [12/3/2007 Black]
+               PRVM_G_FLOAT( OFS_RETURN ) = 0;
+               return;
+       }
+       PRVM_G_FLOAT( OFS_RETURN ) = 1;
+}
+
+/*
+========================
+VM_gecko_destroy
+
+void gecko_destroy( string name )
+========================
+*/
+void VM_gecko_destroy( void ) {
+       const char *name;
+       clgecko_t *instance;
+
+       VM_SAFEPARMCOUNT( 1, VM_gecko_destroy );
+
+       name = PRVM_G_STRING( OFS_PARM0 );
+       VM_CheckEmptyString( name );
+       instance = CL_Gecko_FindBrowser( vm_gecko_getfullname( name ) );
+       if( !instance ) {
+               return;
+       }
+       CL_Gecko_DestroyBrowser( instance );
+}
+
+/*
+========================
+VM_gecko_navigate
+
+void gecko_navigate( string name, string URI )
+========================
+*/
+void VM_gecko_navigate( void ) {
+       const char *name;
+       const char *URI;
+       clgecko_t *instance;
+
+       VM_SAFEPARMCOUNT( 2, VM_gecko_navigate );
+
+       name = PRVM_G_STRING( OFS_PARM0 );
+       URI = PRVM_G_STRING( OFS_PARM1 );
+       VM_CheckEmptyString( name );
+       VM_CheckEmptyString( URI );
+
+   instance = CL_Gecko_FindBrowser( vm_gecko_getfullname( name ) );
+       if( !instance ) {
+               return;
+       }
+       CL_Gecko_NavigateToURI( instance, URI );
+}
+
+/*
+========================
+VM_gecko_keyevent
+
+float[bool] gecko_keyevent( string name, float key, float eventtype ) 
+========================
+*/
+void VM_gecko_keyevent( void ) {
+       const char *name;
+       unsigned int key;
+       clgecko_buttoneventtype_t eventtype;
+       clgecko_t *instance;
+
+       VM_SAFEPARMCOUNT( 3, VM_gecko_keyevent );
+
+       name = PRVM_G_STRING( OFS_PARM0 );
+       VM_CheckEmptyString( name );
+       key = (unsigned int) PRVM_G_FLOAT( OFS_PARM1 );
+       switch( (unsigned int) PRVM_G_FLOAT( OFS_PARM3 ) ) {
+       case 0:
+               eventtype = CLG_BET_DOWN;
+               break;
+       case 1:
+               eventtype = CLG_BET_UP;
+               break;
+       case 2:
+               eventtype = CLG_BET_PRESS;
+               break;
+       case 3:
+               eventtype = CLG_BET_DOUBLECLICK;
+               break;
+       default:
+               // TODO: console printf? [12/3/2007 Black]
+               PRVM_G_FLOAT( OFS_RETURN ) = 0;
+               return;
+       }
+
+       instance = CL_Gecko_FindBrowser( vm_gecko_getfullname( name ) );
+       if( !instance ) {
+               PRVM_G_FLOAT( OFS_RETURN ) = 0;
+               return;
+       }
+
+       PRVM_G_FLOAT( OFS_RETURN ) = (CL_Gecko_Event_Key( instance, key, eventtype ) == true);
+}
+
+/*
+========================
+VM_gecko_movemouse
+
+void gecko_mousemove( string name, float x, float y )
+========================
+*/
+void VM_gecko_movemouse( void ) {
+       const char *name;
+       float x, y;
+       clgecko_t *instance;
+
+       VM_SAFEPARMCOUNT( 3, VM_gecko_movemouse );
+
+       name = PRVM_G_STRING( OFS_PARM0 );
+       VM_CheckEmptyString( name );
+       x = PRVM_G_FLOAT( OFS_PARM1 );
+       y = PRVM_G_FLOAT( OFS_PARM2 );
+       
+       instance = CL_Gecko_FindBrowser( vm_gecko_getfullname( name ) );
+       if( !instance ) {
+               return;
+       }
+       CL_Gecko_Event_CursorMove( instance, x, y );
+}
+#endif
+
 /*
 ==============
 VM_makevectors
@@ -3170,10 +3320,6 @@ void VM_drawline (void)
        DrawQ_Line(width, c1[0], c1[1], c2[0], c2[1], rgb[0], rgb[1], rgb[2], alpha, flags);
 }
 
-
-
-
-
 // float(float number, float quantity) bitshift (EXT_BITSHIFT)
 void VM_bitshift (void)
 {
@@ -3590,9 +3736,9 @@ void VM_buf_copy (void)
 /*
 ========================
 VM_buf_sort
-sort buffer by beginnings of strings (sortpower defaults it's lenght)
+sort buffer by beginnings of strings (cmplength defaults it's length)
 "backward == TRUE" means that sorting goes upside-down
-void buf_sort(float bufhandle, float sortpower, float backward) = #464;
+void buf_sort(float bufhandle, float cmplength, float backward) = #464;
 ========================
 */
 void VM_buf_sort (void)
@@ -3612,6 +3758,7 @@ void VM_buf_sort (void)
                VM_Warning("VM_buf_sort: tried to sort empty buffer %i in %s\n", (int)PRVM_G_FLOAT(OFS_PARM0), PRVM_NAME);
                return;
        }
+       // TODO: please someone rename this to buf_cmplength [12/3/2007 Black]
        buf_sortpower = (int)PRVM_G_FLOAT(OFS_PARM1);
        if(buf_sortpower <= 0)
                buf_sortpower = 99999999;
@@ -3958,7 +4105,7 @@ void VM_changepitch (void)
        PRVM_EDICTFIELDVALUE(ent, prog->fieldoffsets.angles)->vector[0] = ANGLEMOD (current + move);
 }
 
-
+// TODO: adapt all static function names to use a single naming convention... [12/3/2007 Black]
 static int Is_Text_Color (char c, char t)
 {
        int a = 0;
index 8be51b6b47cf5807020ab5ba169041d9eb44e4e0..b9d16bdb8ca8ae5dce0f03953ff16a824cdc72a6 100644 (file)
@@ -126,7 +126,7 @@ perhaps only : Menu : WriteMsg
                WriteString(string data, float dest, float desto)
                WriteEntity(entity data, float dest, float desto)
 
-Client & Menu : draw functions & video functions
+Client & Menu : draw functions & video functions (& gecko functions)
 ===================================================
 
 float  iscachedpic(string pic)
@@ -149,6 +149,14 @@ void       cin_setstate(string name, float type)
 float  cin_getstate(string name)
 void   cin_restart(string name)
 
+#ifdef SUPPORT_GECKO
+float[bool] gecko_create( string name )
+void gecko_destroy( string name )
+void gecko_navigate( string name, string URI )
+float[bool] gecko_keyevent( string name, float key, float eventtype ) 
+void gecko_mousemove( string name, float x, float y )
+#endif
+
 ==============================================================================
 menu cmd list:
 ===============
@@ -187,6 +195,9 @@ float       getserverlistindexforkey(string key)
 #include "mprogdefs.h"
 
 #include "cl_video.h"
+#ifdef SUPPORT_GECKO
+#include "cl_gecko.h"
+#endif
 
 //============================================================================
 // nice helper macros
@@ -347,6 +358,14 @@ void VM_cin_setstate( void );
 void VM_cin_getstate( void );
 void VM_cin_restart( void );
 
+#ifdef SUPPORT_GECKO
+void VM_gecko_create( void );
+void VM_gecko_destroy( void );
+void VM_gecko_navigate( void );
+void VM_gecko_keyevent( void );
+void VM_gecko_movemouse( void );
+#endif
+
 void VM_drawline (void);
 
 void VM_bitshift (void);
index aee3eba5edc3ae03270b1aed9791458f570a9341..64fae58b56e94fa49b7d2ad711f231d0745bc25f 100644 (file)
@@ -1464,9 +1464,7 @@ void PRVM_FindOffsets(void)
        prog->globaloffsets.drawfont                      = PRVM_ED_FindGlobalOffset("drawfont");
 
        // menu qc only uses some functions, nothing else
-       prog->funcoffsets.m_display                       = PRVM_ED_FindFunctionOffset("m_display");
        prog->funcoffsets.m_draw                          = PRVM_ED_FindFunctionOffset("m_draw");
-       prog->funcoffsets.m_hide                          = PRVM_ED_FindFunctionOffset("m_hide");
        prog->funcoffsets.m_init                          = PRVM_ED_FindFunctionOffset("m_init");
        prog->funcoffsets.m_keydown                       = PRVM_ED_FindFunctionOffset("m_keydown");
        prog->funcoffsets.m_keyup                         = PRVM_ED_FindFunctionOffset("m_keyup");