add RGSS 3.0.1 etc classes equality comparison #67
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -22,6 +22,7 @@
 | 
				
			||||||
#include "etc.h"
 | 
					#include "etc.h"
 | 
				
			||||||
#include "binding-util.h"
 | 
					#include "binding-util.h"
 | 
				
			||||||
#include "serializable-binding.h"
 | 
					#include "serializable-binding.h"
 | 
				
			||||||
 | 
					#include "sharedstate.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEF_TYPE(Color);
 | 
					DEF_TYPE(Color);
 | 
				
			||||||
DEF_TYPE(Tone);
 | 
					DEF_TYPE(Tone);
 | 
				
			||||||
| 
						 | 
					@ -68,6 +69,9 @@ ATTR_INT_RW(Rect, Height)
 | 
				
			||||||
		VALUE otherObj; \
 | 
							VALUE otherObj; \
 | 
				
			||||||
		Klass *other; \
 | 
							Klass *other; \
 | 
				
			||||||
		rb_get_args(argc, argv, "o", &otherObj RB_ARG_END); \
 | 
							rb_get_args(argc, argv, "o", &otherObj RB_ARG_END); \
 | 
				
			||||||
 | 
							if (rgssVer >= 3) \
 | 
				
			||||||
 | 
								if (!rb_typeddata_is_kind_of(otherObj, &Klass##Type)) \
 | 
				
			||||||
 | 
									return Qfalse; \
 | 
				
			||||||
		other = getPrivateDataCheck<Klass>(otherObj, Klass##Type); \
 | 
							other = getPrivateDataCheck<Klass>(otherObj, Klass##Type); \
 | 
				
			||||||
		return rb_bool_new(*p == *other); \
 | 
							return rb_bool_new(*p == *other); \
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue