AxibugEmuOnline/References/VirtuaNESex_src_191105/Macro.h

24 lines
682 B
C
Raw Normal View History

2024-08-05 17:58:53 +08:00
//
// <20>֗<EFBFBD><D697><EFBFBD><EFBFBD><EFBFBD><EFBFBD>m<EFBFBD><6D><EFBFBD>Ȃ<EFBFBD><C882>}<7D>N<EFBFBD><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//
#ifndef __MACRO_INCLUDED__
#define __MACRO_INCLUDED__
// <20><><EFBFBD>d<EFBFBD>Ăяo<D18F><6F><EFBFBD>Ή<EFBFBD><CE89>}<7D>N<EFBFBD><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define DELETEPTR(x) if(x) { delete x; x = NULL; }
#define DELETEARR(x) if(x) { delete[] x; x = NULL; }
#define RELEASE(x) if(x) { x->Release(); x=NULL; }
#define FREE(x) if(x) { free(x); x=NULL; }
#define FCLOSE(x) if(x) { fclose(x); x=NULL; }
#define GDIDELETE(x) if(x) { ::DeleteObject(x); x=NULL; }
#define CLOSEHANDLE(x) if(x) { ::CloseHandle(x); x = NULL; }
// <20><><EFBFBD>̑<EFBFBD>
#define ZEROMEMORY(p,s) ::memset( (p), 0, (s) )
// RECT<43>\<5C><><EFBFBD>̗p
#define RCWIDTH(rc) ((rc).right-(rc).left)
#define RCHEIGHT(rc) ((rc).bottom-(rc).top)
#endif // !__MACRO_INCLUDED__