def stor_s_alt(self, amx): offs = amx._getparam_p() addr = amx.FRM + offs val = cell(amx.ALT) amx._writeheap(addr, val) # Keep our Python stack list updated amx._stack_set(addr, val)
def fill(self, amx): # TODO: verify addresses offs = amx._getparam() i = amx.ALT while offs >= sizeof(cell): amx._writeheap(i, cell(amx.PRI)) i += sizeof(cell) offs -= sizeof(cell)
def sref_s_pri(self, amx): offs = amx._getparam() offs = amx._getdatacell(amx.FRM + offs) amx._writeheap(offs, cell(amx.PRI))
def stor_alt(self, amx): offs = amx._getparam() amx._writeheap(offs, cell(amx.ALT))
def dec_s(self, amx): offs = amx._getparam_p() addr = amx.FRM + offs val = cell(amx._getheapcell(addr) - 1) amx._writeheap(addr, val) amx._stack_set(addr, val)
def zero_s(self, amx): offs = amx._getparam() amx._writeheap(amx.FRM + offs, cell(0))
def dec(self, amx): offs = cast_value(cell, amx._getparam()) val = amx._getheapcell(offs) amx._writeheap(cell(val - 1))
def stor_i(self, amx): # TODO: verify address amx._writeheap(amx.ALT, cell(amx.PRI))
def sref_s_alt(self, amx): offs = amx._getparam() offs = amx._getdatacell(amx.FRM + offs) amx._writeheap(offs, cell(amx.ALT))
def dec_i(self, amx): offs = cast_value(cell, amx.PRI) val = amx._getheapcell(offs) amx._writeheap(offs, cell(val - 1))
def const_s(self, amx): offs = amx._getparam() val = amx._getparam() amx._writeheap(amx.FRM + offs, cell(val))
def stor_pri(self, amx): offs = amx._getparam() amx._writeheap(offs, cell(amx.PRI))