[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] [BUG] pygame-ctypes
While trying to run 20,000 Light Years in Space, version 1.2 I get
the following exception:
Traceback (most recent call last):
File "lightyears.py", line 23, in ?
startup.Main()
File "C:\prg\LightYears\code\startup.py", line 81, in Main
main.Main()
File "C:\prg\LightYears\code\main.py", line 103, in Main
quit = Main_Menu_Loop(n, clock, screen, (width, height))
File "C:\prg\LightYears\code\main.py", line 125, in Main_Menu_Loop
main_menu = current_menu = menu.Menu([
File "C:\prg\LightYears\code\menu.py", line 31, in __init__
(discard1, discard2,
File "C:\prg\LightYears\code\menu.py", line 149, in __Draw
extra.Tile_Texture(surf, "greenrust.jpg", r)
File "C:\prg\LightYears\code\extra.py", line 50, in Tile_Texture
output.set_clip(rect)
File "C:\PRG\PYGAME-CTYPES\CTYPES-SOC\pygame\surface.py", line 825,
in set_cli
p
SDL_SetClipRect(self._surf, rect)
ctypes.ArgumentError: argument 2: exceptions.TypeError: expected
LP_SDL_Rect instance instead of _RectProxy
Since SDL_SetClipRect has argtypes defined _RectProxy's
_as_parameter_ is not used. A from_param method will not help here
either, as it must belong to the type object in the argtypes list,
not the object passed as an argument.
Lenard Lindstrom
<len-l@xxxxxxxxx>