Cube  Diff

Differences From Artifact [b565167d7b]:

To Artifact [76cc8ec718]:


1
2
3
4
5
6

7
8
9
10
11
12
13
// editing.cpp: most map editing commands go here, entity editing commands are
// in world.cpp

#include "cube.h"

#import "DynamicEntity.h"


bool editmode = false;

// the current selection, used by almost all editing commands
// invariant: all code assumes that these are kept inside MINBORD distance of
// the edge of the map







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
// editing.cpp: most map editing commands go here, entity editing commands are
// in world.cpp

#include "cube.h"

#import "DynamicEntity.h"
#import "OFString+Cube.h"

bool editmode = false;

// the current selection, used by almost all editing commands
// invariant: all code assumes that these are kept inside MINBORD distance of
// the edge of the map

601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616

void
newent(OFString *what, OFString *a1, OFString *a2, OFString *a3, OFString *a4)
{
	EDITSEL;
	@autoreleasepool {
		newentity(sel.x, sel.y, (int)player1.o.z, what,
		    [a1 intValueWithBase:0], [a2 intValueWithBase:0],
		    [a3 intValueWithBase:0], [a4 intValueWithBase:0]);
	}
}

COMMANDN(select, selectpos, ARG_4INT)
COMMAND(edittag, ARG_1INT)
COMMAND(replace, ARG_NONE)
COMMAND(archvertex, ARG_3INT)







|
|







602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617

void
newent(OFString *what, OFString *a1, OFString *a2, OFString *a3, OFString *a4)
{
	EDITSEL;
	@autoreleasepool {
		newentity(sel.x, sel.y, (int)player1.o.z, what,
		    [a1 cube_intValueWithBase:0], [a2 cube_intValueWithBase:0],
		    [a3 cube_intValueWithBase:0], [a4 cube_intValueWithBase:0]);
	}
}

COMMANDN(select, selectpos, ARG_4INT)
COMMAND(edittag, ARG_1INT)
COMMAND(replace, ARG_NONE)
COMMAND(archvertex, ARG_3INT)