------------------------------------------------------------------------
r4256 | acceptthis | 2013-03-12 21:07:07 +0000 (Tue, 12 Mar 2013) | 5 lines Don't mess up/crash when the snap command is used (in multiple ways). Misc NQ+csqc compat tweaks/hacks/fixes. Added pointsound. Don't rely upon fragmentation support with downloads. its a bad idea. Fixed up the text editor to be able to debug properly again. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4252 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
dd68115e58
commit
c1a80e5ba8
31 changed files with 383 additions and 180 deletions
|
@ -296,7 +296,8 @@ static void EditorOpenFile(char *name, qboolean readonly)
|
|||
int len, flen, pos=0;
|
||||
vfsfile_t *F;
|
||||
fileblock_t *b;
|
||||
|
||||
char *prname;
|
||||
pubprogfuncs_t *epf = editprogfuncs;
|
||||
CloseEditor();
|
||||
|
||||
strcpy(OpenEditorFile, name);
|
||||
|
@ -315,6 +316,12 @@ static void EditorOpenFile(char *name, qboolean readonly)
|
|||
}
|
||||
i=1;
|
||||
|
||||
prname = OpenEditorFile;
|
||||
if (!strncmp(prname, "src/", 4))
|
||||
prname += 4;
|
||||
if (!strncmp(prname, "source/", 7))
|
||||
prname += 7;
|
||||
|
||||
flen = VFS_GETLEN(F);
|
||||
|
||||
while(pos < flen)
|
||||
|
@ -349,9 +356,9 @@ static void EditorOpenFile(char *name, qboolean readonly)
|
|||
firstblock->datalength = len;
|
||||
|
||||
memcpy(firstblock->data, line, len);
|
||||
if (editprogfuncs)
|
||||
if (epf)
|
||||
{
|
||||
if (editprogfuncs->ToggleBreak(editprogfuncs, OpenEditorFile, i, 3))
|
||||
if (epf->ToggleBreak(epf, prname, i, 3))
|
||||
{
|
||||
firstblock->flags |= FB_BREAK;
|
||||
}
|
||||
|
@ -360,7 +367,7 @@ static void EditorOpenFile(char *name, qboolean readonly)
|
|||
{
|
||||
if (svprogfuncs)
|
||||
{
|
||||
if (svprogfuncs->ToggleBreak(svprogfuncs, OpenEditorFile, i, 3))
|
||||
if (svprogfuncs->ToggleBreak(svprogfuncs, prname, i, 3))
|
||||
{
|
||||
firstblock->flags |= FB_BREAK;
|
||||
}
|
||||
|
@ -389,6 +396,7 @@ static void EditorOpenFile(char *name, qboolean readonly)
|
|||
editor_oldkeydest = key_dest;
|
||||
key_dest = key_editor;
|
||||
editoractive = true;
|
||||
editprogfuncs = epf;
|
||||
}
|
||||
|
||||
extern qboolean keydown[K_MAX];
|
||||
|
@ -634,9 +642,15 @@ void Editor_Key(int key, int unicode)
|
|||
case K_F9: /*set breakpoint*/
|
||||
{
|
||||
int f = 0;
|
||||
char *fname = OpenEditorFile;
|
||||
if (!strncmp(fname, "src/", 4))
|
||||
fname += 4;
|
||||
if (!strncmp(fname, "source/", 7))
|
||||
fname += 7;
|
||||
|
||||
if (editprogfuncs)
|
||||
{
|
||||
if (editprogfuncs->ToggleBreak(editprogfuncs, OpenEditorFile, cursorlinenum, 2))
|
||||
if (editprogfuncs->ToggleBreak(editprogfuncs, fname, cursorlinenum, 2))
|
||||
f |= 1;
|
||||
else
|
||||
f |= 2;
|
||||
|
@ -644,7 +658,7 @@ void Editor_Key(int key, int unicode)
|
|||
#ifndef CLIENTONLY
|
||||
else if (svprogfuncs)
|
||||
{
|
||||
if (svprogfuncs->ToggleBreak(svprogfuncs, OpenEditorFile, cursorlinenum, 2))
|
||||
if (svprogfuncs->ToggleBreak(svprogfuncs, fname, cursorlinenum, 2))
|
||||
f |= 1;
|
||||
else
|
||||
f |= 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue