annotate pytouhou/utils/random.pxd @ 612:73f134f84c7f

Request a RGB888 context, since SDL2’s default of RGB332 sucks. On X11/GLX, it will select the first config available, that is the best one, while on EGL it will iterate over them to select the one closest to what the application requested. Of course, anything lower than RGB888 looks bad and we really don’t want that.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 26 Mar 2015 20:20:37 +0100
parents 292fea5c584e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
509
292fea5c584e Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
1 cdef class Random:
292fea5c584e Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
2 cdef unsigned short seed
292fea5c584e Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
3 cdef unsigned long counter
292fea5c584e Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
4
292fea5c584e Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
5 cdef void set_seed(self, unsigned short seed) nogil
292fea5c584e Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
6 cdef unsigned short rewind(self) nogil
292fea5c584e Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
7
292fea5c584e Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
8 cpdef unsigned short rand_uint16(self)
292fea5c584e Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
9 cpdef unsigned int rand_uint32(self)
292fea5c584e Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
10 cpdef double rand_double(self)