def dec_i(self, amx): offs = cast_value(cell, amx.PRI) val = amx._getheapcell(offs) amx._writeheap(offs, cell(val - 1))
def shr(self, amx): pri = cast_value(ucell, amx.PRI) amx.PRI = pri >> amx.ALT
def dec(self, amx): offs = cast_value(cell, amx._getparam()) val = amx._getheapcell(offs) amx._writeheap(cell(val - 1))
def sp_ctof(value): """Takes a raw value and ctypes casts it to a Python float value""" cf = pointer(c_long(value)) return cast_value(c_float, cf)