Logic icon support for all blocks
This commit is contained in:
@@ -889,17 +889,25 @@ public class LExecutor{
|
||||
exec.textBuffer.setLength(0);
|
||||
}
|
||||
}else{
|
||||
int num1 = p1.numi(), xval = packSign(x.numi()), yval = packSign(y.numi());
|
||||
int num1 = p1.numi(), num4 = p4.numi(), xval = packSign(x.numi()), yval = packSign(y.numi());
|
||||
|
||||
if(type == LogicDisplay.commandImage){
|
||||
num1 = p1.obj() instanceof UnlockableContent u ? u.iconId : 0;
|
||||
if(p1.obj() instanceof UnlockableContent u){
|
||||
//TODO: with mods, this will overflow (ID >= 512), but that's better than the previous system, at least
|
||||
num1 = u.id;
|
||||
num4 = u.getContentType().ordinal();
|
||||
}else{
|
||||
num1 = -1;
|
||||
num4 = -1;
|
||||
}
|
||||
//num1 = p1.obj() instanceof UnlockableContent u ? u.iconId : 0;
|
||||
}else if(type == LogicDisplay.commandScale){
|
||||
xval = packSign((int)(x.numf() / LogicDisplay.scaleStep));
|
||||
yval = packSign((int)(y.numf() / LogicDisplay.scaleStep));
|
||||
}
|
||||
|
||||
//add graphics calls, cap graphics buffer size
|
||||
exec.graphicsBuffer.add(DisplayCmd.get(type, xval, yval, packSign(num1), packSign(p2.numi()), packSign(p3.numi()), packSign(p4.numi())));
|
||||
exec.graphicsBuffer.add(DisplayCmd.get(type, xval, yval, packSign(num1), packSign(p2.numi()), packSign(p3.numi()), packSign(num4)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user