1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-18 10:38:31 +02: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.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));
}
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));
fillboxabs((ed.tilex*8),0,8,240,graphics.getRGB(200,32,32));
}
else if(ed.hmod && ed.drawmode<2)
{
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
@ -5328,59 +5330,65 @@ void editorinput()
if(key.rightbutton)
{
//place tiles
if(ed.bmod)
{
for(int i=0; i<30; i++)
if(ed.drawmode < 2) {
if(ed.bmod)
{
ed.placetilelocal(ed.tilex, i, 0);
}
}
else if(ed.hmod)
{
for(int i=0; i<40; i++)
{
ed.placetilelocal(i, ed.tiley, 0);
}
}
else if(ed.vmod)
{
for(int j=-4; j<5; j++)
{
for(int i=-4; i<5; i++)
for(int i=0; i<30; i++)
{
ed.placetilelocal(ed.tilex+i, ed.tiley+j, 0);
ed.placetilelocal(ed.tilex, i, 0);
}
}
}
else if(ed.cmod)
{
for(int j=-3; j<4; j++)
else if(ed.hmod)
{
for(int i=-3; i<4; i++)
for(int i=0; i<40; i++)
{
ed.placetilelocal(ed.tilex+i, ed.tiley+j, 0);
ed.placetilelocal(i, ed.tiley, 0);
}
}
}
else if(ed.xmod)
{
for(int j=-2; j<3; j++)
else if(ed.vmod)
{
for(int i=-2; i<3; i++)
for(int j=-4; j<5; j++)
{
ed.placetilelocal(ed.tilex+i, ed.tiley+j, 0);
for(int i=-4; i<5; i++)
{
ed.placetilelocal(ed.tilex+i, ed.tiley+j, 0);
}
}
}
}
else if(ed.zmod)
{
for(int j=-1; j<2; j++)
else if(ed.cmod)
{
for(int i=-1; i<2; i++)
for(int j=-3; j<4; j++)
{
ed.placetilelocal(ed.tilex+i, ed.tiley+j, 0);
for(int i=-3; i<4; i++)
{
ed.placetilelocal(ed.tilex+i, ed.tiley+j, 0);
}
}
}
else if(ed.xmod)
{
for(int j=-2; j<3; j++)
{
for(int i=-2; i<3; i++)
{
ed.placetilelocal(ed.tilex+i, ed.tiley+j, 0);
}
}
}
else if(ed.zmod)
{
for(int j=-1; j<2; j++)
{
for(int i=-1; i<2; i++)
{
ed.placetilelocal(ed.tilex+i, ed.tiley+j, 0);
}
}
}
else
{
ed.placetilelocal(ed.tilex, ed.tiley, 0);
}
}
else
{