From 37c2e0937c44e8cfac3a9ccb1a02791b8557774a Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 12 Sep 2010 18:12:02 +0900 Subject: [PATCH] Get progs source scanning working. Of course, this is if the environment is set up just right, but it's another step towards something to fix. --- tools/Forge/Bundles/MapEdit/EntityClass.m | 3 +- .../Bundles/MapEdit/MapEdit.gorm/data.classes | 78 ++++++++++++ .../Bundles/MapEdit/MapEdit.gorm/objects.gorm | Bin 35451 -> 39400 bytes tools/Forge/Bundles/MapEdit/Preferences.m | 12 +- tools/Forge/Bundles/MapEdit/Project.m | 15 ++- tools/Forge/Bundles/MapEdit/SetBrush.m | 115 +++++++++--------- tools/Forge/Bundles/MapEdit/Things.m | 1 + 7 files changed, 155 insertions(+), 69 deletions(-) diff --git a/tools/Forge/Bundles/MapEdit/EntityClass.m b/tools/Forge/Bundles/MapEdit/EntityClass.m index 8a20a39ca..7924e841a 100644 --- a/tools/Forge/Bundles/MapEdit/EntityClass.m +++ b/tools/Forge/Bundles/MapEdit/EntityClass.m @@ -41,8 +41,7 @@ parse_vector (script_t * script, vec3_t vec) // // /*QUAKED func_door (0 .5 .8) ? START_OPEN STONE_SOUND DOOR_DONT_LINK GOLD_KEY SILVER_KEY --initFromText:(const char *) -text source:(const char *) filename +-initFromText:(const char *) text source:(const char *) filename { const char *t; size_t len; diff --git a/tools/Forge/Bundles/MapEdit/MapEdit.gorm/data.classes b/tools/Forge/Bundles/MapEdit/MapEdit.gorm/data.classes index 1c3f7aab6..5b141bab6 100644 --- a/tools/Forge/Bundles/MapEdit/MapEdit.gorm/data.classes +++ b/tools/Forge/Bundles/MapEdit/MapEdit.gorm/data.classes @@ -20,6 +20,8 @@ "BSP_entities:", "BSP_relight:", "BSP_stop:", + "UIChanged:", + "addPair:", "appDidInit:", "appWillTerminate:", "applyRegion:", @@ -28,13 +30,18 @@ "changeInspector:", "changeXYLookUp:", "clear:", + "clearBspOutput:", "clearTexinfo:", + "clickedOnMap:", + "clickedOnWad:", "cloneSelection:", "decRotate:", "decXScale:", "decXShift:", "decYScale:", "decYShift:", + "delPair:", + "doubleClickEntity:", "downFloor:", "drawMode:", "flip_x:", @@ -49,6 +56,7 @@ "makeEntity:", "onlyShowMapTextures:", "openProject:", + "reloadEntityClasses:", "rotate_x:", "rotate_y:", "rotate_z:", @@ -57,9 +65,14 @@ "searchForTexture:", "selectCompleteEntity:", "selectCompletelyInside:", + "selectEntity:", "selectPartiallyInside:", + "setAngle:", "setBrushRegion:", + "setBspSound:", "setCurrentEntity:", + "setCurrentProject:", + "setFlags:", "setModeRadio:", "setXYRegion:", "shortBrush:", @@ -96,6 +109,51 @@ ); Super = NSMutableArray; }; + Preferences = { + Actions = ( + "setBspSound:", + "setCurrentProject:", + "UIChanged:" + ); + Outlets = ( + bspSound_i, + startproject_i, + bspSoundField_i, + brushOffset_i, + showBSP_i, + startwad_i, + xlight_i, + ylight_i, + zlight_i + ); + Super = NSObject; + }; + Project = { + Actions = ( + "clearBspOutput:", + "clickedOnMap:", + "clickedOnWad:" + ); + Outlets = ( + projectInfo, + basepathinfo_i, + mapbrowse_i, + currentmap_i, + mapList, + descList, + wadList, + pis_panel_i, + pis_basepath_i, + pis_wads_i, + pis_fullvis_i, + pis_fastvis_i, + pis_novis_i, + pis_relight_i, + pis_leaktest_i, + BSPoutput_i + ); + Super = NSObject; + }; QuakeEd = { Actions = ( "updateAll:", @@ -168,6 +226,26 @@ ); Super = NSObject; }; + Things = { + Actions = ( + "reloadEntityClasses:", + "selectEntity:", + "doubleClickEntity:", + "addPair:", + "delPair:", + "setAngle:", + "setFlags:" + ); + Outlets = ( + entity_browser_i, + entity_comment_i, + prog_path_i, + keyInput_i, + valueInput_i, + flags_i + ); + Super = NSObject; + }; XYView = { Actions = ( "setModeRadio:", diff --git a/tools/Forge/Bundles/MapEdit/MapEdit.gorm/objects.gorm b/tools/Forge/Bundles/MapEdit/MapEdit.gorm/objects.gorm index aade3fc21bcb9506aa3140e5b967a6201f0938c0..730715d71814611c11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ga=2DE$#so6+<7b$_%_mDb{2G;kHHX#Z5 z4+G7*Aqn&&=o*L-{0HP3`i)#W9h;^DAxQF)qD);uM_tlBKHZ91dcyKIs{3e z9|!IdBlr{jbMM8PM^WhcG19ffJaFR}%ds(s9z@DWoeP2~vLsG`kIwK>r-u zhZw=1?q7pvu;!1b=CepYPxLR4{x{Lj0nL{X{Y%XM8PU%p{ddyl1*D&VBxrB|>4zZ+ z^smq!h!OnP{cH0ZtoeJY`6AN4Ao{mRzd`ixfaYfq{d=Uh6a5lm9wPb=NdK5Ldl~6h zAqm>Ng81Vh3G^S)PRGl@`zO*&Kf~78k%r!X73xP}}0EjmcDtb{-O{zlGIb zrs{8F^_Q`F$e`-_!b4S;ryNfZA%x}f7Nxr(K5#G+4 zhM6feTw!ZOXar&P^-*I>)4D_};zlZ5OoWOEr_W%BgI9nda1;UAn<6xtfO@;=sIo16 zi~`>!Ld9P2M)`7>b&c@a3FJIhfgcs2aRkuvb{5kyZ`=nF(>N`5rH_XW|1D)e#@no4N> zgl#)KtG%u<_gFF3n5Jr!iqK(HL+@}|Lq6S&*uxd}10pn?uzLS&-?0u?BXacu;3IH& zK%8AFLPru + #include "QF/sys.h" #include "Preferences.h" @@ -189,12 +191,14 @@ _atof (const char *c) path = ""; strcpy (bspSound, path); - if (bspSound_i) + if (bspSound_i) { [bspSound_i release]; - bspSound_i =[[NSSound alloc] initWithContentsOfFile: [NSString stringWithCString:bspSound]]; + bspSound_i = nil; + } + if (path[0] && access (path, R_OK)) + bspSound_i =[[NSSound alloc] initWithContentsOfFile: [NSString stringWithCString:bspSound] byReference: YES]; if (!bspSound_i) { - strcpy (bspSound, "/NextLibrary/Sounds/Funk.snd"); - bspSound_i =[[NSSound alloc] initWithContentsOfFile: [NSString stringWithCString:bspSound]]; + return self; } [bspSoundField_i setStringValue: [NSString stringWithCString:bspSound]]; diff --git a/tools/Forge/Bundles/MapEdit/Project.m b/tools/Forge/Bundles/MapEdit/Project.m index d01520ba5..18570a5e3 100644 --- a/tools/Forge/Bundles/MapEdit/Project.m +++ b/tools/Forge/Bundles/MapEdit/Project.m @@ -6,6 +6,7 @@ #include +#include "QF/quakefs.h" #include "QF/sys.h" #include "Project.h" @@ -36,19 +37,21 @@ id project_i; -initVars { char *s; + const char *pe; s =[preferences_i getProjectPath]; - // XXX StripFilename(s); + pe = QFS_SkipPath (s); + s[pe - s] = 0; strcpy (path_basepath, s); strcpy (path_progdir, s); - strcat (path_progdir, "/" SUBDIR_ENT); + strcat (path_progdir, SUBDIR_ENT); strcpy (path_mapdirectory, s); - strcat (path_mapdirectory, "/" SUBDIR_MAPS); // source dir + strcat (path_mapdirectory, SUBDIR_MAPS); // source dir strcpy (path_finalmapdir, s); - strcat (path_finalmapdir, "/" SUBDIR_MAPS); // dest dir + strcat (path_finalmapdir, SUBDIR_MAPS); // dest dir [basepathinfo_i setStringValue: [NSString stringWithCString:s]]; // in Project Inspector @@ -165,6 +168,7 @@ id project_i; -initProject { [self parseProjectFile]; + Sys_Printf ("%p\n", projectInfo); if (projectInfo == NULL) return self; [self initVars]; @@ -331,7 +335,7 @@ t in:(id) obj { FILE *fp; struct stat s; - +Sys_Printf ("openProjectFile: %s\n", path); strcpy (path_projectinfo, path); projectInfo = NULL; @@ -372,6 +376,7 @@ t in:(id) obj if (rtn == NSOKButton) { filenames =[openpanel filenames]; dir =[[openpanel directory] cString]; + dir = ""; sprintf (path, "%s/%s", dir,[[filenames objectAtIndex:0] cString]); strcpy (path_projectinfo, path); [self openProjectFile:path]; diff --git a/tools/Forge/Bundles/MapEdit/SetBrush.m b/tools/Forge/Bundles/MapEdit/SetBrush.m index be78ac854..99fe3801e 100644 --- a/tools/Forge/Bundles/MapEdit/SetBrush.m +++ b/tools/Forge/Bundles/MapEdit/SetBrush.m @@ -622,80 +622,79 @@ initOwner: fromTokens */ int numsb; --initFromScript:(script_t *) -script owner:own { +-initFromScript:(script_t *)script owner:own +{ face_t *f; int i, j; [self init]; - parent = own; + parent = own; - f = faces; - numfaces = 0; - do -{ -if (!Script_GetToken (script, true)) - break; -if (!strcmp (Script_Token (script), "}")) - break; + f = faces; + numfaces = 0; + do { + if (!Script_GetToken (script, true)) + break; + if (!strcmp (Script_Token (script), "}")) + break; -for (i = 0; i < 3; i++) { - if (i != 0) - Script_GetToken (script, true); - if (strcmp (Script_Token (script), "(")) - Sys_Error ("parsing map file"); + for (i = 0; i < 3; i++) { + if (i != 0) + Script_GetToken (script, true); + if (strcmp (Script_Token (script), "(")) + Sys_Error ("parsing map file"); + + for (j = 0; j < 3; j++) { + Script_GetToken (script, false); + f->planepts[i][j] = atoi (Script_Token (script)); + } Script_GetToken (script, false); + + if (strcmp (Script_Token (script), ")")) + Sys_Error ("parsing map file"); + } - for (j = 0; j < 3; j++) { Script_GetToken (script, false); - f->planepts[i][j] = atoi (Script_Token (script)); - } Script_GetToken (script, false); - - if (strcmp (Script_Token (script), ")")) - Sys_Error ("parsing map file"); -} - -Script_GetToken (script, false); -strcpy (f->texture.texture, Script_Token (script)); -Script_GetToken (script, false); -f->texture.shift[0] = atof (Script_Token (script)); -Script_GetToken (script, false); -f->texture.shift[1] = atof (Script_Token (script)); -Script_GetToken (script, false); -f->texture.rotate = atof (Script_Token (script)); -Script_GetToken (script, false); -f->texture.scale[0] = atof (Script_Token (script)); -Script_GetToken (script, false); -f->texture.scale[1] = atof (Script_Token (script)); + strcpy (f->texture.texture, Script_Token (script)); + Script_GetToken (script, false); + f->texture.shift[0] = atof (Script_Token (script)); + Script_GetToken (script, false); + f->texture.shift[1] = atof (Script_Token (script)); + Script_GetToken (script, false); + f->texture.rotate = atof (Script_Token (script)); + Script_GetToken (script, false); + f->texture.scale[0] = atof (Script_Token (script)); + Script_GetToken (script, false); + f->texture.scale[1] = atof (Script_Token (script)); #if 0 -flags = atoi (Script_Token (script)); + flags = atoi (Script_Token (script)); -flags &= 7; + flags &= 7; -f->texture.rotate = 0; -f->texture.scale[0] = 1; -f->texture.scale[1] = 1; + f->texture.rotate = 0; + f->texture.scale[0] = 1; + f->texture.scale[1] = 1; -#define TEX_FLIPAXIS 1 -#define TEX_FLIPS 2 -#define TEX_FLIPT 4 + #define TEX_FLIPAXIS 1 + #define TEX_FLIPS 2 + #define TEX_FLIPT 4 -if (flags & TEX_FLIPAXIS) { - f->texture.rotate = 90; - if (!(flags & TEX_FLIPT)) - f->texture.scale[0] = -1; - if (flags & TEX_FLIPS) - f->texture.scale[1] = -1; -} else { - if (flags & TEX_FLIPS) - f->texture.scale[0] = -1; - if (flags & TEX_FLIPT) - f->texture.scale[1] = -1; -} + if (flags & TEX_FLIPAXIS) { + f->texture.rotate = 90; + if (!(flags & TEX_FLIPT)) + f->texture.scale[0] = -1; + if (flags & TEX_FLIPS) + f->texture.scale[1] = -1; + } else { + if (flags & TEX_FLIPS) + f->texture.scale[0] = -1; + if (flags & TEX_FLIPT) + f->texture.scale[1] = -1; + } #endif -f++; -numfaces++; + f++; + numfaces++; } while (1); numsb++; diff --git a/tools/Forge/Bundles/MapEdit/Things.m b/tools/Forge/Bundles/MapEdit/Things.m index 85703160f..076bb321e 100644 --- a/tools/Forge/Bundles/MapEdit/Things.m +++ b/tools/Forge/Bundles/MapEdit/Things.m @@ -1,3 +1,4 @@ +#include "QF/sys.h" #include "Things.h" #include "QuakeEd.h"