Reverse shared SAVE.DAT integer opcodes
This commit is contained in:
@@ -4,17 +4,14 @@ using Xunit;
|
||||
public class GfxStateTests
|
||||
{
|
||||
[Fact]
|
||||
public void QueryReturnsBoundSourceSlot_NotOperandRegistryValue()
|
||||
public void QueryReturnsBoundSourceSlot()
|
||||
{
|
||||
// Native op 0x215 queries the retained-object map and returns obj+4. The default initializer zeroes
|
||||
// that field, while draw-texture replaces it with the bound slot. Op 0x1a2 is a separate registry.
|
||||
// that field, while draw-texture replaces it with the bound slot.
|
||||
var g = new GfxState();
|
||||
g.GetOrCreate(0xcb2a).V18 = (400, 600, 0);
|
||||
Assert.Equal(0, g.QuerySlot(0xcb2a));
|
||||
|
||||
g.Register(0xcb2a);
|
||||
Assert.Equal(0, g.QuerySlot(0xcb2a));
|
||||
|
||||
g.BindDraw(0xcb2a, 6, 0, 0, 200, 200, 10, 20);
|
||||
Assert.Equal(6, g.QuerySlot(0xcb2a));
|
||||
Assert.Equal(-1, g.QuerySlot(0x9999));
|
||||
|
||||
Reference in New Issue
Block a user