Changeset 264
- Timestamp:
- 06/26/08 02:52:02 (2 months ago)
- Files:
-
- GtkRadiant/trunk/contrib/bkgrnd2d/dialog.cpp (modified) (7 diffs)
- GtkRadiant/trunk/contrib/bobtoolz/StdAfx.h (modified) (5 diffs)
- GtkRadiant/trunk/contrib/camera/camera.h (modified) (1 diff)
- GtkRadiant/trunk/contrib/gtkgensurf/gendlgs.cpp (modified) (6 diffs)
- GtkRadiant/trunk/contrib/gtkgensurf/gensurf.cpp (modified) (3 diffs)
- GtkRadiant/trunk/contrib/gtkgensurf/gensurf.h (modified) (1 diff)
- GtkRadiant/trunk/contrib/prtview/prtview.cpp (modified) (14 diffs)
- GtkRadiant/trunk/contrib/prtview/stdafx.h (modified) (2 diffs)
- GtkRadiant/trunk/contrib/ufoai/plugin.cpp (modified) (5 diffs)
- GtkRadiant/trunk/include/ifilters.h (modified) (1 diff)
- GtkRadiant/trunk/include/iundo.h (modified) (1 diff)
- GtkRadiant/trunk/include/qerplugin.h (modified) (12 diffs)
- GtkRadiant/trunk/include/qertypes.h (modified) (13 diffs)
- GtkRadiant/trunk/plugins/surface/surfacedialog.cpp (modified) (44 diffs)
- GtkRadiant/trunk/plugins/surface_heretic2/surfacedialog.cpp (modified) (44 diffs)
- GtkRadiant/trunk/plugins/surface_heretic2/surfaceflagsdialog_heretic2.cpp (modified) (2 diffs)
- GtkRadiant/trunk/plugins/surface_quake2/surfacedialog.cpp (modified) (44 diffs)
- GtkRadiant/trunk/plugins/surface_quake2/surfaceflagsdialog_quake2.cpp (modified) (1 diff)
- GtkRadiant/trunk/plugins/surface_ufoai/surfacedialog.cpp (modified) (1 diff)
- GtkRadiant/trunk/plugins/surface_ufoai/surfaceflagsdialog_ufoai.cpp (modified) (1 diff)
- GtkRadiant/trunk/plugins/textool/StdAfx.h (modified) (5 diffs)
- GtkRadiant/trunk/radiant/brush.cpp (modified) (56 diffs)
- GtkRadiant/trunk/radiant/camwindow.cpp (modified) (39 diffs)
- GtkRadiant/trunk/radiant/dialog.cpp (modified) (6 diffs)
- GtkRadiant/trunk/radiant/dialog.h (modified) (2 diffs)
- GtkRadiant/trunk/radiant/dialoginfo.cpp (modified) (1 diff)
- GtkRadiant/trunk/radiant/error.cpp (modified) (4 diffs)
- GtkRadiant/trunk/radiant/filters.cpp (modified) (13 diffs)
- GtkRadiant/trunk/radiant/filters.h (modified) (1 diff)
- GtkRadiant/trunk/radiant/glwidget.cpp (modified) (4 diffs)
- GtkRadiant/trunk/radiant/groupdialog.cpp (modified) (18 diffs)
- GtkRadiant/trunk/radiant/gtkdlgs.cpp (modified) (71 diffs)
- GtkRadiant/trunk/radiant/gtkmisc.cpp (modified) (44 diffs)
- GtkRadiant/trunk/radiant/gtkmisc.h (modified) (3 diffs)
- GtkRadiant/trunk/radiant/main.cpp (modified) (15 diffs)
- GtkRadiant/trunk/radiant/mainframe.cpp (modified) (249 diffs)
- GtkRadiant/trunk/radiant/mainframe.h (modified) (6 diffs)
- GtkRadiant/trunk/radiant/map.cpp (modified) (20 diffs)
- GtkRadiant/trunk/radiant/pmesh.cpp (modified) (160 diffs)
- GtkRadiant/trunk/radiant/preferences.cpp (modified) (95 diffs)
- GtkRadiant/trunk/radiant/preferences.h (modified) (17 diffs)
- GtkRadiant/trunk/radiant/qe3.cpp (modified) (36 diffs)
- GtkRadiant/trunk/radiant/qe3.h (modified) (8 diffs)
- GtkRadiant/trunk/radiant/texwindow.cpp (modified) (9 diffs)
- GtkRadiant/trunk/radiant/undo.cpp (modified) (13 diffs)
- GtkRadiant/trunk/radiant/undo.h (modified) (1 diff)
- GtkRadiant/trunk/radiant/xywindow.cpp (modified) (73 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GtkRadiant/trunk/contrib/bkgrnd2d/dialog.cpp
r185 r264 29 29 30 30 #include <gtk/gtk.h> 31 #include <glib/gi18n.h> 31 32 32 33 #include "bkgrnd2d.h" … … 105 106 const char *newfile; 106 107 char *t; 107 108 108 109 //TODO GetMapName saves the map. eeep! 109 110 //also with no map, returns unnamed.map, otherwise returns full path 110 111 // Syn_Printf(MSG_PREFIX "GetMapName() %s\n", 111 112 // g_FuncTable.m_pfnGetMapName()); 112 113 113 114 ct = g_FuncTable.m_pfnReadProjectKey("basepath"); 114 115 // TODO shouldn't need this stuff … … 124 125 125 126 strcpy(browsedir,ct); 126 // make sure we have a trailing / 127 // make sure we have a trailing / 127 128 if(browsedir[strlen(browsedir) - 1] != '/') 128 129 strcat(browsedir,"/"); … … 137 138 // lop off the file part 138 139 t = browsedir + strlen(browsedir) - 1; 139 while (t != browsedir && *t != '/') 140 while (t != browsedir && *t != '/') 140 141 t--; 141 142 *t = 0; 142 143 } 143 144 Syn_Printf(MSG_PREFIX "browse directory %s\n",browsedir); 144 145 145 146 //does NOT need freeing contrary to include/qerplugin.h comments 146 147 //TODO bug/patch for comments … … 203 204 } 204 205 // A vbox to hold everything 205 m_pWidget = gtk_vbox_new(FALSE,0); 206 m_pWidget = gtk_vbox_new(FALSE,0); 206 207 // Frame for file row 207 208 frame = gtk_frame_new("File"); … … 227 228 gtk_tooltips_set_tip (pTooltips, w, "Select a file", NULL); 228 229 gtk_widget_show (w); 229 230 230 231 w = gtk_button_new_with_label ("Reload"); 231 232 g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (reload_callback), … … 349 350 350 351 gtk_widget_show ( pNotebook ); 351 352 352 353 gtk_widget_realize( pDialogWnd ); 353 354 } GtkRadiant/trunk/contrib/bobtoolz/StdAfx.h
r199 r264 31 31 #include <gdk/gdkkeysyms.h> 32 32 #include <gtk/gtk.h> 33 #include <glib/gi18n.h> 33 34 #include <stdio.h> 34 35 #include <stdlib.h> … … 54 55 #define MB_YESNO 0x00000004L 55 56 #define MB_RETRYCANCEL 0x00000005L 56 57 57 58 58 59 #define MB_ICONHAND 0x00000010L 59 60 #define MB_ICONQUESTION 0x00000020L 60 61 #define MB_ICONEXCLAMATION 0x00000030L 61 62 #define MB_ICONASTERISK 0x00000040L 62 63 63 64 #define MB_USERICON 0x00000080L 64 65 #define MB_ICONWARNING MB_ICONEXCLAMATION … … 66 67 #define MB_ICONINFORMATION MB_ICONASTERISK 67 68 #define MB_ICONSTOP MB_ICONHAND 68 69 69 70 #define MB_TYPEMASK 0x0000000FL 70 71 #define MB_ICONMASK 0x000000F0L … … 72 73 #define MB_MODEMASK 0x00003000L 73 74 #define MB_MISCMASK 0x0000C000L 74 75 75 76 #define IDOK 1 76 77 #define IDCANCEL 2 … … 99 100 100 101 #endif 101 102 102 103 #if defined(__cplusplus) 103 104 #ifndef _REFGUID_DEFINED GtkRadiant/trunk/contrib/camera/camera.h
r183 r264 37 37 38 38 #include <gtk/gtk.h> 39 #include <glib/gi18n.h> 39 40 40 41 #include "str.h" GtkRadiant/trunk/contrib/gtkgensurf/gendlgs.cpp
r218 r264 19 19 20 20 #include <gtk/gtk.h> 21 #include <glib/gi18n.h> 21 22 #include <stdio.h> 22 23 #include <stdlib.h> … … 1170 1171 GTK_WIDGET (g_object_get_data (G_OBJECT (g_pWnd), "main_antialiasing")), 1171 1172 "The lines in the preview window are antialiased for better quality", 1172 ""); 1173 ""); 1173 1174 1174 1175 // General tab … … 1192 1193 "bitmaps. GenSurf will work with any 256-color bitmap, but gray scale bitmaps are a bit " 1193 1194 "more intuitive.", 1194 "" ); 1195 "" ); 1195 1196 gtk_tooltips_set_tip(GTK_TOOLTIPS (tooltips), 1196 1197 GTK_WIDGET (wave_radios[4]), … … 1397 1398 "From bitmap", "Fractal" }; 1398 1399 char *orientations[] = { "Ground surface", "Ceiling", "Wall facing 0", "Wall facing 90", 1399 "Wall facing 180","Wall facing 270" }; 1400 "Wall facing 180","Wall facing 270" }; 1400 1401 1401 1402 g_pWnd = dlg = gtk_window_new (GTK_WINDOW_TOPLEVEL); … … 2352 2353 } 2353 2354 return FALSE; 2354 2355 2355 2356 } /* AboutDlgProc */ 2356 2357 … … 2365 2366 } 2366 2367 2367 #endif 2368 #endif GtkRadiant/trunk/contrib/gtkgensurf/gensurf.cpp
r195 r264 19 19 20 20 #include <gtk/gtk.h> 21 #include <glib/gi18n.h> 21 22 #include <stdio.h> 22 23 #include <stdlib.h> … … 331 332 va_end (argptr); 332 333 333 return string; 334 return string; 334 335 } 335 336 … … 402 403 if (name != NULL) 403 404 { 404 char key[32], text[32]; 405 char key[32], text[32]; 405 406 int i, j; 406 407 GtkRadiant/trunk/contrib/gtkgensurf/gensurf.h
r183 r264 22 22 23 23 #include <gtk/gtk.h> 24 #include <glib/gi18n.h> 24 25 25 26 #include "qerplugin.h" GtkRadiant/trunk/contrib/prtview/prtview.cpp
r185 r264 56 56 #define CLIP "Clip" 57 57 58 void InitInstance () 58 void InitInstance () 59 59 { 60 60 #ifdef _WIN32 … … 129 129 } 130 130 131 void SaveConfig () 131 void SaveConfig () 132 132 { 133 133 INISetInt(RENDER_2D, portals.show_2d, "Draw in 2D windows"); … … 163 163 char line[1024], *ptr; 164 164 FILE *rc; 165 165 166 166 rc = fopen (filename, "rt"); 167 167 168 168 if (rc == NULL) 169 169 return false; 170 170 171 171 while (fgets (line, 1024, rc) != 0) 172 172 { … … 174 174 if (line[0] != '[') 175 175 continue; 176 176 177 177 ptr = strchr (line, ']'); 178 178 *ptr = '\0'; 179 179 180 180 if (strcmp (&line[1], section) == 0) 181 181 { … … 183 183 { 184 184 ptr = strchr (line, '='); 185 185 186 186 if (ptr == NULL) 187 187 { … … 191 191 } 192 192 *ptr = '\0'; 193 193 194 194 if (strcmp (line, key) == 0) 195 195 { 196 196 strcpy (value, ptr+1); 197 197 fclose (rc); 198 199 while (value[strlen (value)-1] == 10 || 198 199 while (value[strlen (value)-1] == 10 || 200 200 value[strlen (value)-1] == 13 || 201 201 value[strlen (value)-1] == 32) 202 value[strlen (value)-1] = 0; 202 value[strlen (value)-1] = 0; 203 203 return true; 204 204 } … … 262 262 } 263 263 } 264 } 264 } 265 265 266 266 if (!found) … … 284 284 if (strcmp (line, key) == 0) 285 285 break; 286 286 287 287 *ptr = '='; 288 288 fputs (line, rc); … … 297 297 while (fgets (line, 1024, old_rc) != NULL) 298 298 fputs (line, rc); 299 299 300 300 fclose (old_rc); 301 301 … … 312 312 #endif 313 313 314 int INIGetInt(c har *key, int def)314 int INIGetInt(const char *key, int def) 315 315 { 316 316 #if defined(__linux__) || defined(__APPLE__) … … 326 326 } 327 327 328 void INISetInt(c har *key, int val,char *comment /* = NULL */)328 void INISetInt(const char *key, int val, const char *comment /* = NULL */) 329 329 { 330 330 char s[1000]; … … 364 364 //extern "C" LPCSTR WINAPI QERPlug_Init (HMODULE hApp, GtkWidget* hwndMain) 365 365 extern "C" const char* QERPlug_Init (void *hApp, void* pMainWidget) 366 { 366 { 367 367 // Setup defaults & load config 368 368 InitInstance(); 369 369 370 370 return "Portal Viewer for Q3Radiant"; 371 371 } … … 488 488 bool RequestAPI(APIDescriptor_t *pAPI); 489 489 const char* GetInfo(); 490 490 491 491 CSynapseClientPrtView() { } 492 492 virtual ~CSynapseClientPrtView() { } … … 512 512 g_pSynapseServer->IncRef(); 513 513 Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf()); 514 514 515 515 g_SynapseClient.AddAPI(PLUGIN_MAJOR, PRTVIEW_MINOR, sizeof(_QERPluginTable)); 516 516 GtkRadiant/trunk/contrib/prtview/stdafx.h
r195 r264 22 22 23 23 #include <gtk/gtk.h> 24 #include <glib/gi18n.h> 24 25 25 26 #if defined(__linux__) || defined(__APPLE__) … … 70 71 #define UPDATE_ALL (UPDATE_2D | UPDATE_3D) 71 72 72 int INIGetInt(c har *key, int def);73 void INISetInt(c har *key, int val,char *comment = NULL);73 int INIGetInt(const char *key, int def); 74 void INISetInt(const char *key, int val, const char *comment = NULL); 74 75 75 76 extern bool interfaces_started; GtkRadiant/trunk/contrib/ufoai/plugin.cpp
r211 r264 51 51 typedef struct toolbar_button_info_s 52 52 { 53 c har *image;54 c har *text;55 c har *tip;53 const char *image; 54 const char *text; 55 const char *tip; 56 56 void (*func)(); 57 57 IToolbarButton::EType type; … … 62 62 { 63 63 "ufoai_actorclip.bmp", 64 "Filter actorclip",65 "Actorclip",64 _("Filter actorclip"), 65 _("Actorclip"), 66 66 DoActorClipFiltering, 67 67 IToolbarButton::eToggleButton … … 69 69 { 70 70 "ufoai_weaponclip.bmp", 71 "Filter weaponclip",72 "Weaponclip",71 _("Filter weaponclip"), 72 _("Weaponclip"), 73 73 DoWeaponClipFiltering, 74 74 IToolbarButton::eToggleButton … … 76 76 { 77 77 "ufoai_nodraw.bmp", 78 "Filter nodraw",79 "NoDraw",78 _("Filter nodraw"), 79 _("NoDraw"), 80 80 DoNoDrawFiltering, 81 81 IToolbarButton::eToggleButton … … 83 83 { 84 84 "ufoai_stepon.bmp", 85 "Filter stepon",86 "Stepon",85 _("Filter stepon"), 86 _("Stepon"), 87 87 DoSteponFiltering, 88 88 IToolbarButton::eToggleButton GtkRadiant/trunk/include/ifilters.h
r209 r264 31 31 32 32 // adds a new filter 33 typedef bfilter_t* (* PFN_QERPLUG_FILTERADD) (int type, int bmask, c har *str, int exclude);33 typedef bfilter_t* (* PFN_QERPLUG_FILTERADD) (int type, int bmask, const char *str, int exclude); 34 34 35 35 // performs the filtering GtkRadiant/trunk/include/iundo.h
r183 r264 26 26 27 27 //start operation 28 typedef void (*PFN_UNDOSTART) (c har *operation);28 typedef void (*PFN_UNDOSTART) (const char *operation); 29 29 //end operation 30 30 typedef void (*PFN_UNDOEND) (void); GtkRadiant/trunk/include/qerplugin.h
r209 r264 51 51 #endif 52 52 53 // the editor will look for plugins in two places, the plugins path 53 // the editor will look for plugins in two places, the plugins path 54 54 // under the application path, and the path under the basepath as defined 55 55 // in the project (.qe4) file. 56 56 // 57 57 // you can drop any number of new texture, model format DLL's in the standard plugin path 58 // but only one plugin that overrides map loading/saving, surface dialog, surface flags, etc.. 59 // should be used at one time.. if multiples are loaded then the last one loaded will be the 58 // but only one plugin that overrides map loading/saving, surface dialog, surface flags, etc.. 59 // should be used at one time.. if multiples are loaded then the last one loaded will be the 60 60 // active one 61 61 // … … 63 63 // it is assumed the plugin will have a matching function as defined below 64 64 // to correlate to the implied functionality 65 // 65 // 66 66 67 67 #define RADIANT_MAJOR "radiant" … … 83 83 { 84 84 char m_TextureExtension[QER_MAX_NAMELEN]; // the extension these textures have 85 qboolean m_bHiColor; // if textures are NOT high color, the default 85 qboolean m_bHiColor; // if textures are NOT high color, the default 86 86 // palette (as described inthe qe4 file will be used for gamma correction) 87 // if they are high color, gamma and shading are computed on the fly 87 // if they are high color, gamma and shading are computed on the fly 88 88 // based on the rgba data 89 89 //--bool m_bIsShader; // will probably do q3 shaders this way when i merge … … 96 96 { 97 97 _QERTextureLoad() 98 { 98 { 99 99 memset(reinterpret_cast<void*>(this), 0, sizeof(_QERTextureLoad)); 100 100 }; … … 165 165 // by passing in appropriate alpha data or by setting the appropriate surface flags 166 166 // expected by q2 (which the editor will use.. ) 167 typedef void (WINAPI *PFN_QERPLUG_LOADTEXTURE)(const char* pFilename); 167 typedef void (WINAPI *PFN_QERPLUG_LOADTEXTURE)(const char* pFilename); 168 168 169 169 // v1.6 … … 207 207 const GUID *interface_GUID; 208 208 const char* interface_name; 209 const char* version_name; 209 const char* version_name; 210 210 } moduleentry_t; 211 211 … … 269 269 // 2. the selected brush list (brushes the user has selected) 270 270 // 3. the active brush list (brushes in the map that are not selected) 271 // 271 // 272 272 // In general, the same things can be done to brush handles (face manip, delete brushhandle, etc.. ) in each 273 // list. There are a few exceptions. 274 // 1. You cannot commit a selected or active brush handle to the map. This is because it is already in the map. 273 // list. There are a few exceptions. 274 // 1. You cannot commit a selected or active brush handle to the map. This is because it is already in the map. 275 275 // 2. You cannot bind brush handles from the selected or active brush list to an entity. As of v1.0 of the plugins 276 276 // the only way for a plugin to create entities is to create a brush handles (or a list of handles) and then bind 277 277 // them to an entity. This will commit the brush(s) and/or the entities to the map as well. 278 // 278 // 279 279 // To use the active or selected brush lists, you must first allocate them (which returns a count) and then 280 // release them when you are finish manipulating brushes in one of those lists. 280 // release them when you are finish manipulating brushes in one of those lists. 281 281 282 282 //++timo NOTE : the #defines here are never used, but can help finding where things are done in the editor … … 312 312 #define QERAPP_SETCURRENTTEXTURE "QERApp_SetCurrentTexture" 313 313 314 // selection 314 // selection 315 315 #define QERAPP_DELETESELECTION "QERApp_DeleteSelection" 316 316 #define QERAPP_SELECTBRUSH "QERApp_SelectBrush" // PGM … … 348 348 // FIXME: new primtives do not work in v1.00 349 349 // primitives are new types of things in the map 350 // for instance, the Q3 curves could have been done as 351 // primitives instead of being built in 350 // for instance, the Q3 curves could have been done as 351 // primitives instead of being built in 352 352 // it will be a plugins responsibility to hook the map load and save funcs to load 353 353 // and/or save any additional data (like new primitives of some type) … … 357 357 // FIXME: go backwards on this a bit.. orient it more towards the temp brush mode as it will be cleaner 358 358 // basically a plugin will hook the map load and save and will add the primitives to the map.. this will 359 // produce a temporary 'primitive' brush and the appropriate renderer will be called as well as the 359 // produce a temporary 'primitive' brush and the appropriate renderer will be called as well as the 360 360 // edit handler (for edge drags, sizes, rotates, etc.. ) and the vertex maker will be called when vertex 361 361 // mode is attemped on the brush.. there will need to be a GetPrimitiveBounds callback in the edit handler 362 // so the brush can resize appropriately as needed.. this might be the plugins responsibility to set the 362 // so the brush can resize appropriately as needed.. this might be the plugins responsibility to set the 363 363 // sibling brushes size.. it will then be the plugins responsibility to hook map save to save the primitives 364 364 // as the editor will discard any temp primitive brushes.. (there probably needs to be some kind of sanity check … … 496 496 typedef int (WINAPI * PFN_QERAPP_REQUESTINTERFACE)( REFGUID, void* ); 497 497 // use this one for errors, Radiant will stop after the "edit preferences" dialog 498 typedef void (WINAPI * PFN_QERAPP_ERROR)(c har* pMsg, ...);498 typedef void (WINAPI * PFN_QERAPP_ERROR)(const char* pMsg, ...); 499 499 // use to gain read access to the project epairs 500 500 // FIXME: removed, accessed through QERPlug_RegisterPluginEntities with the IEpair interface … … 611 611 typedef char* (* PFN_GETMAPFILENAME)(); 612 612 613 typedef bfilter_t* (* PFN_QERPLUG_FILTERADD)(int type, int bmask, c har *str, int exclude);613 typedef bfilter_t* (* PFN_QERPLUG_FILTERADD)(int type, int bmask, const char *str, int exclude); 614 614 615 615 typedef void (* PFN_QERPLUG_FILTERACTIVATE) (void); GtkRadiant/trunk/include/qertypes.h
r222 r264 323 323 texdef_t texdef; 324 324 plane_t plane; 325 325 326 326 // Nurail: Face Undo 327 327 int undoId; … … 386 386 #define PATCH_BSPLINE 0x10000000 // bspline 387 387 388 #define PATCH_TYPEMASK 0x00000fff // 389 #define PATCH_BTYPEMASK 0x0000f000 // 390 #define PATCH_STYLEMASK 0xffff0000 // 388 #define PATCH_TYPEMASK 0x00000fff // 389 #define PATCH_BTYPEMASK 0x0000f000 // 390 #define PATCH_STYLEMASK 0xffff0000 // 391 391 392 392 typedef struct { … … 469 469 qboolean patchBrush; 470 470 qboolean hiddenBrush; 471 471 472 472 //int nPatchID; 473 473 … … 576 576 #define W_XZ 0x0200 //--| only used for patch vertex manip stuff 577 577 #define W_YZ 0x0400 //--| 578 #define W_GROUP 0x0800 579 #define W_MEDIA 0x1000 578 #define W_GROUP 0x0800 579 #define W_MEDIA 0x1000 580 580 #define W_ALL 0xFFFFFFFF 581 581 … … 694 694 }; 695 695 // MODEL END 696 696 697 697 typedef struct entity_s 698 698 { … … 757 757 // 6=brush->face->texdef.contents (q2) 758 758 int mask; 759 c har *string;759 const char *string; 760 760 bool active; 761 761 }; … … 808 808 float d_gridsize; 809 809 qboolean d_bSmallGrid; // we use this flag to hack our way into editing of <1 grids 810 810 811 811 int d_num_entities; 812 812 813 813 entity_t *d_project_entity; 814 814 … … 840 840 841 841 SavedInfo_t d_savedinfo; 842 842 843 843 int d_workcount; 844 844 845 845 // connect entities uses the last two brushes selected 846 846 int d_select_count; … … 848 848 vec3_t d_select_translate; // for dragging w/o making new display lists 849 849 select_t d_select_mode; 850 850 851 851 int d_parsed_brushes; 852 852 853 853 qboolean show_blocks; 854 854 int blockSize; … … 857 857 // a lot of this data should be in a property bag and available to the other modules through an API 858 858 // this is generated from game configuration and the project settings, and should be still be part of it 859 859 860 860 // tells if we are internally using brush primitive (texture coordinates and map format) 861 861 // this is a shortcut for IntForKey( g_qeglobals.d_project_entity, "brush_primit" ) … … 878 878 qboolean bOldBrushes; 879 879 qboolean bPrimitBrushes; 880 880 881 881 vec3_t d_vAreaTL; 882 882 vec3_t d_vAreaBR; 883 883 884 884 // tells if we are using .INI files for prefs instead of registry 885 885 qboolean use_ini; … … 888 888 // disabled all INI / registry read write .. used when shutting down after registry cleanup 889 889 qboolean disable_ini; 890 890 891 891 // tells we are using a BSP frontend plugin 892 892 qboolean bBSPFrontendPlugin; … … 905 905 bool m_bOpenGLCompressionSupported; 906 906 bool m_bS3CompressionSupported; 907 907 908 908 // set to true after OpenGL has been initialized and extensions have been tested 909 909 bool m_bOpenGLReady; GtkRadiant/trunk/plugins/surface/surfacedialog.cpp
r185 r264 30 30 31 31 #include <gtk/gtk.h> 32 #include <glib/gi18n.h> 32 33 #include <gdk/gdkkeysyms.h> 33 34 … … 319 320 320 321 blank[0] = 0; 321 322 322 323 if (texdef_face_list_empty()) 323 324 { … … 328 329 else if ( !is_TextureName_conflicting ) 329 330 { 330 temp_texdef_face_list = get_texdef_face_list(); 331 temp_texdef_face_list = get_texdef_face_list(); 331 332 tmp_texdef = (texdef_t *) &get_texdef_face_list()->texdef; 332 333 items = g_list_append( items, (gpointer) tmp_texdef->GetName() ); … … 354 355 strcpy (old_texture_entry, blank); 355 356 } 356 357 357 358 gtk_combo_set_popdown_strings (GTK_COMBO (texture_combo), items); 358 359 g_list_free(items); … … 376 377 if(count == 0) 377 378 count = GetSelectedFaceCount(); 378 379 379 380 g_texdef_face_vector.resize(count); 380 381 … … 384 385 GetSelFacesTexdef( get_texdef_face_list() ); 385 386 } 386 387 387 388 IsFaceConflicting(); 388 PopulateTextureComboList(); 389 PopulateTextureComboList(); 389 390 ZeroOffsetValues(); 390 391 } … … 432 433 if (!g_bListenUpdate) 433 434 return; 434 435 435 436 if (!SurfaceInspector) 436 437 return; … … 439 440 while (gtk_events_pending ()) 440 441 gtk_main_iteration (); 441 442 442 443 if (g_surfwin) 443 444 { … … 460 461 if (!SurfaceInspector) 461 462 create_SurfaceInspector (); 462 463 463 464 ShowDlg(); 464 465 SetTexMods (); … … 547 548 if (!g_surfwin) 548 549 return; 549 550 550 551 pt = &texturewin->texdef; 551 552 … … 555 556 texdef_offset.SetName(SHADER_NOT_FOUND); 556 557 557 558 558 559 spin = GTK_SPIN_BUTTON (hshift_offset_spinbutton); 559 560 gtk_spin_button_set_value (spin, texdef_offset.shift[0]); … … 561 562 adjust->step_increment = l_pIncrement->shift[0]; 562 563 gtk_spin_button_set_value (GTK_SPIN_BUTTON(hshift_step_spinbutton), l_pIncrement->shift[0]); 563 564 564 565 spin = GTK_SPIN_BUTTON (hshift_value_spinbutton); 565 566 adjust = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin)); 566 567 adjust->step_increment = l_pIncrement->shift[0]; 567 568 568 569 569 570 spin = GTK_SPIN_BUTTON (vshift_offset_spinbutton); … … 572 573 adjust->step_increment = l_pIncrement->shift[1]; 573 574 gtk_spin_button_set_value (GTK_SPIN_BUTTON(vshift_step_spinbutton), l_pIncrement->shift[1]); 574 575 575 576 spin = GTK_SPIN_BUTTON (vshift_value_spinbutton); 576 577 adjust = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin)); … … 588 589 adjust->step_increment = l_pIncrement->scale[0]; 589 590 590 591 591 592 spin = GTK_SPIN_BUTTON (vscale_offset_spinbutton); 592 593 gtk_spin_button_set_value (spin, texdef_offset.scale[1]); … … 594 595 adjust->step_increment = l_pIncrement->scale[1]; 595 596 gtk_spin_button_set_value (GTK_SPIN_BUTTON(vscale_step_spinbutton), l_pIncrement->scale[1]); 596 597 597 598 spin = GTK_SPIN_BUTTON (vscale_value_spinbutton); 598 599 adjust = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin)); 599 600 adjust->step_increment = l_pIncrement->scale[1]; 600 601 601 602 602 603 spin = GTK_SPIN_BUTTON (rotate_offset_spinbutton); … … 605 606 adjust->step_increment = l_pIncrement->rotate; 606 607 gtk_spin_button_set_value (GTK_SPIN_BUTTON(rotate_step_spinbutton), l_pIncrement->rotate); 607 608 608 609 spin = GTK_SPIN_BUTTON (rotate_value_spinbutton); 609 610 adjust = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin)); 610 611 adjust->step_increment = l_pIncrement->rotate; 611 612 612 613 613 614 g_bListenChanged = true; 614 615 … … 656 657 GtkWidget* create_SurfaceInspector (void) 657 658 { 658 659 659 660 GtkWidget *label; 660 661 GtkWidget *hseparator; … … 694 695 gtk_container_set_border_width (GTK_CONTAINER (SurfaceInspector), 4); 695 696 gtk_window_set_title (GTK_WINDOW (SurfaceInspector), "Surface Inspector"); 696 697 697 698 SetWinPos_from_Prefs(SurfaceInspector); 698 699 … … 725 726 g_object_set_data (G_OBJECT (GTK_COMBO (texture_combo)->popwin), 726 727 "KeepMeAround", texture_combo); 727 gtk_combo_disable_activate ( (GtkCombo*) texture_combo); 728 gtk_combo_disable_activate ( (GtkCombo*) texture_combo); 728 729 gtk_widget_show (texture_combo); 729 730 gtk_box_pack_start (GTK_BOX (hbox1), texture_combo, TRUE, TRUE, 0); … … 1026 1027 gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (vscale_value_spinbutton), TRUE); 1027 1028 gtk_widget_set_sensitive( GTK_WIDGET( vscale_value_spinbutton ), FALSE ); 1028 1029 1029 1030 rotate_value_spinbutton_adj = gtk_adjustment_new (0.0, -360.0, 360.0, 1.0, 10.0, 10.0); 1030 1031 rotate_value_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rotate_value_spinbutton_adj), 1, 0); … … 1037 1038 gtk_widget_set_sensitive( GTK_WIDGET( rotate_value_spinbutton ), FALSE ); 1038 1039 1039 // Offset Spins 1040 // Offset Spins 1040 1041 hshift_offset_spinbutton_adj = gtk_adjustment_new (0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0); 1041 1042 hshift_offset_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (hshift_offset_spinbutton_adj), 0, 2); … … 1324 1325 1325 1326 1326 g_signal_connect ( (gpointer) SurfaceInspector, 1327 "delete_event", 1328 G_CALLBACK (delete_event_callback), 1327 g_signal_connect ( (gpointer) SurfaceInspector, 1328 "delete_event", 1329 G_CALLBACK (delete_event_callback), 1329 1330 NULL ); 1330 1331 g_signal_connect ((gpointer) SurfaceInspector, "destroy", 1331 1332 G_CALLBACK (gtk_widget_destroy), 1332 1333 NULL); 1333 1334 1334 1335 g_signal_connect ((gpointer) texture_combo_entry, "key_press_event", 1335 1336 G_CALLBACK (on_texture_combo_entry_key_press_event), … … 1338 1339 G_CALLBACK (on_texture_combo_entry_activate), 1339 1340 NULL); 1340 1341 1341 1342 1342 1343 g_signal_connect ((gpointer) hshift_offset_spinbutton, "value_changed", 1343 1344 G_CALLBACK (on_hshift_offset_spinbutton_value_changed), … … 1355 1356 G_CALLBACK (on_rotate_offset_spinbutton_value_changed), 1356 1357 NULL); 1357 1358 1358 1359 g_signal_connect ((gpointer) hshift_value_spinbutton, "value_changed", 1359 1360 G_CALLBACK (on_hshift_value_spinbutton_value_changed), … … 1371 1372 G_CALLBACK (on_rotate_value_spinbutton_value_changed), 1372 1373 NULL); 1373 1374 1374 1375 g_signal_connect ((gpointer) hshift_step_spinbutton, "value_changed", 1375 1376 G_CALLBACK (on_hshift_step_spinbutton_value_changed), … … 1387 1388 G_CALLBACK (on_rotate_step_spinbutton_value_changed), 1388 1389 NULL); 1389 1390
