#include #include #include #include #include #include void _grayscale_on(char **buffers) { GrayMode(GRAY_ON); buffers[0] = GetPlane(0); buffers[1] = GetPlane(1); } void _grayscale_off() { GrayMode(GRAY_OFF); } SYM_ENTRY *find_it() { return DerefSym(SymFind($(platdata))); } void *_get_data_file() { SYM_ENTRY *f; long x; f = find_it(); if (f == NULL) return NULL; return HeapDeref(f->handle); } void *_create_save_file(int size) { SYM_ENTRY *file; HANDLE data; EM_moveSymFromExtMem($(platdata), HS_NULL); SymDel($(platdata)); data = HeapAlloc(size); if (data == H_NULL) return NULL; file = DerefSym(SymAdd($(platdata))); if (file == NULL) { HeapFree(data); return NULL; } file->handle = data; return HeapDeref(data); }