1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00
This makes the modifiers for removing tiles only work if you're using tools 0 or 1 (wall or background). In the future it might be worth it to add some extra subtools for spikes, but for now this should be fine.
Also, there was a small inconsistency with the tool drawn and the tool used. If you started holding down V, then started holding down Z, you would place tiles like you're holding V (9x9) but your cursor would look like you're holding Z (3x3). The `if` chain for drawing the resized cursors has been flipped around for this.
This commit is contained in:
AllyTally 2020-08-01 16:23:56 -03:00 committed by Ethan Lee
parent 720cd7642a
commit c8b4c0f1e7

View file

@ -3046,30 +3046,32 @@ void editorrender()
if(ed.drawmode<3) if(ed.drawmode<3)
{ {
if(ed.zmod && ed.drawmode<2) if(ed.bmod && ed.drawmode<2)
{ {
fillboxabs((ed.tilex*8)-8,(ed.tiley*8)-8,24,24, graphics.getRGB(200,32,32)); fillboxabs((ed.tilex*8),0,8,240,graphics.getRGB(200,32,32));
}
else if(ed.xmod && ed.drawmode<2)
{
fillboxabs((ed.tilex*8)-16,(ed.tiley*8)-16,24+16,24+16, graphics.getRGB(200,32,32));
}
else if(ed.cmod && ed.drawmode<2)
{
fillboxabs((ed.tilex*8)-24,(ed.tiley*8)-24,24+32,24+32, graphics.getRGB(200,32,32));
}
else if(ed.vmod && ed.drawmode<2)
{
fillboxabs((ed.tilex*8)-32,(ed.tiley*8)-32,24+48,24+48, graphics.getRGB(200,32,32));
} }
else if(ed.hmod && ed.drawmode<2) else if(ed.hmod && ed.drawmode<2)
{ {
fillboxabs(0,(ed.tiley*8),320,8,graphics.getRGB(200,32,32)); fillboxabs(0,(ed.tiley*8),320,8,graphics.getRGB(200,32,32));
} }
else if(ed.bmod && ed.drawmode<2) else if(ed.vmod && ed.drawmode<2)
{ {
fillboxabs((ed.tilex*8),0,8,240,graphics.getRGB(200,32,32)); fillboxabs((ed.tilex*8)-32,(ed.tiley*8)-32,24+48,24+48, graphics.getRGB(200,32,32));
} }
else if(ed.cmod && ed.drawmode<2)
{
fillboxabs((ed.tilex*8)-24,(ed.tiley*8)-24,24+32,24+32, graphics.getRGB(200,32,32));
}
else if(ed.xmod && ed.drawmode<2)
{
fillboxabs((ed.tilex*8)-16,(ed.tiley*8)-16,24+16,24+16, graphics.getRGB(200,32,32));
}
else if(ed.zmod && ed.drawmode<2)
{
fillboxabs((ed.tilex*8)-8,(ed.tiley*8)-8,24,24, graphics.getRGB(200,32,32));
}
} }
//If in directmode, show current directmode tile //If in directmode, show current directmode tile
@ -5328,6 +5330,7 @@ void editorinput()
if(key.rightbutton) if(key.rightbutton)
{ {
//place tiles //place tiles
if(ed.drawmode < 2) {
if(ed.bmod) if(ed.bmod)
{ {
for(int i=0; i<30; i++) for(int i=0; i<30; i++)
@ -5386,6 +5389,11 @@ void editorinput()
{ {
ed.placetilelocal(ed.tilex, ed.tiley, 0); ed.placetilelocal(ed.tilex, ed.tiley, 0);
} }
}
else
{
ed.placetilelocal(ed.tilex, ed.tiley, 0);
}
for(size_t i=0; i<edentity.size(); i++) for(size_t i=0; i<edentity.size(); i++)
{ {
if(edentity[i].x==ed.tilex + (ed.levx*40)&& edentity[i].y==ed.tiley+ (ed.levy*30)) if(edentity[i].x==ed.tilex + (ed.levx*40)&& edentity[i].y==ed.tiley+ (ed.levy*30))