public Bitmap GetImg(ReadAndWrite rw, int frames) { if (palletes[0] == null) { LoadPalletes(rw); } int off; try { off = rw.ReadPointer(npc.gfx_table + (frames << 3)); } catch (Exception) { return(null); } Bitmap p = rw.GetIndexedBitmapNotLz(off, palletes[(byte)npc.pal_tag], npc.width, npc.height); return(p); }