Le jeu 15/07/2004 à 18:21, Victor STINNER a écrit : > I made a branch called "CL07". It's based on today CVS.
It's quite "very easy" to port Wormux to ClanLib 0.7 ! I use my friend sed, and ClanLib API. Directories game, interface, include, graphic, gui, interface are already done ! rotation and conversion should be removed because ClanLib do this ! And I propose to remove clipping from Wormux. I think that it's slower with clipping ! With this email : my bash and sed scripts. Bye, Haypo
EXCLUDE="(interface|include|game|graphic)" for i in `find -name "*.cpp" -o -name "*.h" | egrep -v $EXCLUDE`; do echo $i mv -f $i $i.old sed -f script_sed $i.old >$i || exit 1 # rm $i.old done
# s/CL_SurfaceProvider/CL_PixelBuffer/g #s/flip_display/flip/g #s/CL_System::sig_quit/CL_DisplayWindow::sig_window_close/g #s/CL_System::sig_resized/CL_DisplayWindow::sig_resize/g #s/CL_Display::sig_paint/CL_DisplayWindow::sig_paint/g #s|clear_display *(\([^,]\+\), *\([^,]\+\), *\([^,]\+\))|clear (CL_Color((uchar)(\1*255), (uchar)(\2*255), (uchar)(\3*255)))|g #s~push_clip_rect~push_cliprect~g #s~pop_clip_rect~pop_cliprect~g #s~pop_translate_offset~pop_modelview~g #s~push_translate_offset~push_translate~g #s~CL_ClipRect~CL_Rect~g #s/CL_KEY_KP_/CL_KEY_NUMPAD/g # Dangerous #s/x1/left/g #s/y1/top/g #s/x2/right/g #s/y2/bottom/g ### BROKEN ## ### s~\(fill_rect\|draw_rect\) (\([^,]\+\), *\([^,]\+\), *\([^,]\+\), *\([^,]\+\), *\([^,]\+\), *\([^,]\+\), *\([^,]\+\)\(, *[^,]\+\)\?)~\1 (CL_Rect(\2, \3, \4, \5), CL_Color(\6, \7, \8\9))~g ### s/sync_buffers/update/g ### s/inside/is_inside/g -> x,y -> CL_Point(x,y) ### s/CL_MOUSE_LEFTBUTTON/CL_MOUSE_LEFT/g ### s/CL_MOUSE_RIGHTBUTTON/CL_MOUSE_RIGHT/g # s/put_screen/draw/g ## Wormux changes # s/CL_Surface::load/new CL_Sprite/g
