You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(5) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
2003 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2004 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(4) |
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Per G. <p.g...@ya...> - 2018-07-29 18:17:31
|
I had not installed the development libraries. Now ocamlsdl is installed. On 2018-07-29 19:44, Per Gunnarsson via ocamlsdl-user wrote: > I tried to install ocamlsdl with opam on Debian. > > opam does not seem to find the SDL libraries > > The SDL libraries are in /usr/lib/x86_64-linux-gnu > > I am sorry if I should have reported this to the opam list instead. > > Regards, > > Per Gunnarsson > > > per@konjak:~$ opam install ocamlsdl > The following actions will be performed: > ∗ install ocamlsdl 0.9.1 > ↻ recompile mm 0.3.1 [uses ocamlsdl] > ↻ recompile liquidsoap 1.3.3-1 [uses mm] > ===== ∗ 1 ↻ 2 ===== > Do you want to continue ? [Y/n] Y > > =-=- Gathering sources > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > [liquidsoap] Archive in cache > [mm] Archive in cache > [default] https://opam.ocaml.org/archives/ocamlsdl.0.9.1+opam.tar.gz > downloaded > > =-=- Processing actions > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > ⊘ removed liquidsoap.1.3.3-1 > ⊘ removed mm.0.3.1 > [ERROR] The compilation of ocamlsdl failed at "./configure > --with-installdir=/home/per/.opam/system/lib/ocamlsdl". > Processing 3/5: [ocamlsdl: ocamlfind remove] > #=== ERROR while installing ocamlsdl.0.9.1 > ====================================# > # opam-version 1.2.2 > # os linux > # command ./configure > --with-installdir=/home/per/.opam/system/lib/ocamlsdl > # path /home/per/.opam/system/build/ocamlsdl.0.9.1 > # compiler system (4.05.0) > # exit-code 1 > # env-file > /home/per/.opam/system/build/ocamlsdl.0.9.1/ocamlsdl-10300-335865.env > # stdout-file > /home/per/.opam/system/build/ocamlsdl.0.9.1/ocamlsdl-10300-335865.out > # stderr-file > /home/per/.opam/system/build/ocamlsdl.0.9.1/ocamlsdl-10300-335865.err > ### stdout ### > # [...] > # checking for alloca... yes > # checking for inline... inline > # checking for a BSD-compatible install... /usr/bin/install -c > # checking for OCaml module lablGL... not found > # checking for sdl-config... no > # checking for SDL - version >= 1.2.0... no > # *** The sdl-config script installed by SDL could not be found > # *** If SDL was installed in PREFIX, make sure PREFIX/bin is in > # *** your path, or set the SDL_CONFIG environment variable to the > # *** full path to sdl-config. > ### stderr ### > # configure: error: *** SDL version 1.2.0 not found! > > > > =-=- Error report > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > The following actions were aborted > ∗ install liquidsoap 1.3.3-1 > ∗ install mm 0.3.1 > The following actions failed > ∗ install ocamlsdl 0.9.1 > The following changes have been performed > ⊘ remove liquidsoap 1.3.3-1 > ⊘ remove mm 0.3.1 > > =-=- ocamlsdl.0.9.1 troobleshooting > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > => This package relies on external (system) dependencies that may be > missing. `opam depext ocamlsdl.0.9.1' may help you find the correct > installation for your system. > > The former state can be restored with: > opam switch import "~/.opam/system/backup/state-20180629173210.export" > > > > per@konjak:~$ ls /usr/lib/x86_64-linux-gnu/*SDL* > > /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0 > /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 > /usr/lib/x86_64-linux-gnu/libSDL_image-1.2.so.0 > /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4 > /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.8.0 > /usr/lib/x86_64-linux-gnu/libSDL_image-1.2.so.0.8.4 > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > ocamlsdl-user mailing list > oca...@li... > https://lists.sourceforge.net/lists/listinfo/ocamlsdl-user |
From: Per G. <p.g...@ya...> - 2018-07-29 17:44:37
|
I tried to install ocamlsdl with opam on Debian. opam does not seem to find the SDL libraries The SDL libraries are in /usr/lib/x86_64-linux-gnu I am sorry if I should have reported this to the opam list instead. Regards, Per Gunnarsson per@konjak:~$ opam install ocamlsdl The following actions will be performed: ∗ install ocamlsdl 0.9.1 ↻ recompile mm 0.3.1 [uses ocamlsdl] ↻ recompile liquidsoap 1.3.3-1 [uses mm] ===== ∗ 1 ↻ 2 ===== Do you want to continue ? [Y/n] Y =-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [liquidsoap] Archive in cache [mm] Archive in cache [default] https://opam.ocaml.org/archives/ocamlsdl.0.9.1+opam.tar.gz downloaded =-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ⊘ removed liquidsoap.1.3.3-1 ⊘ removed mm.0.3.1 [ERROR] The compilation of ocamlsdl failed at "./configure --with-installdir=/home/per/.opam/system/lib/ocamlsdl". Processing 3/5: [ocamlsdl: ocamlfind remove] #=== ERROR while installing ocamlsdl.0.9.1 ====================================# # opam-version 1.2.2 # os linux # command ./configure --with-installdir=/home/per/.opam/system/lib/ocamlsdl # path /home/per/.opam/system/build/ocamlsdl.0.9.1 # compiler system (4.05.0) # exit-code 1 # env-file /home/per/.opam/system/build/ocamlsdl.0.9.1/ocamlsdl-10300-335865.env # stdout-file /home/per/.opam/system/build/ocamlsdl.0.9.1/ocamlsdl-10300-335865.out # stderr-file /home/per/.opam/system/build/ocamlsdl.0.9.1/ocamlsdl-10300-335865.err ### stdout ### # [...] # checking for alloca... yes # checking for inline... inline # checking for a BSD-compatible install... /usr/bin/install -c # checking for OCaml module lablGL... not found # checking for sdl-config... no # checking for SDL - version >= 1.2.0... no # *** The sdl-config script installed by SDL could not be found # *** If SDL was installed in PREFIX, make sure PREFIX/bin is in # *** your path, or set the SDL_CONFIG environment variable to the # *** full path to sdl-config. ### stderr ### # configure: error: *** SDL version 1.2.0 not found! =-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The following actions were aborted ∗ install liquidsoap 1.3.3-1 ∗ install mm 0.3.1 The following actions failed ∗ install ocamlsdl 0.9.1 The following changes have been performed ⊘ remove liquidsoap 1.3.3-1 ⊘ remove mm 0.3.1 =-=- ocamlsdl.0.9.1 troobleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= => This package relies on external (system) dependencies that may be missing. `opam depext ocamlsdl.0.9.1' may help you find the correct installation for your system. The former state can be restored with: opam switch import "~/.opam/system/backup/state-20180629173210.export" per@konjak:~$ ls /usr/lib/x86_64-linux-gnu/*SDL* /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0 /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 /usr/lib/x86_64-linux-gnu/libSDL_image-1.2.so.0 /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4 /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.8.0 /usr/lib/x86_64-linux-gnu/libSDL_image-1.2.so.0.8.4 |
From: Romain B. <ba...@ls...> - 2012-08-16 17:06:51
|
Hello, I'm trying to convert a friend to OCaml and to this end, I want to teach him how to program video games. I want to use OCamlSDL. However, although he is not reluctant to install Linux, it's easier to convince him if I can ensure that he will be able to compile his games for Windows, as most gamers use Windows. However, I failed to compile OCamlSDL on Windows. Here is what I did. - Install OCaml using the OCaml installer, which installs ocaml 4.0.0 with the MinGW compiler, as well as a Cygwin environment. As I understand it, although Cygwin is provided, the OCaml program are not compiled using the Cygwin compilers, so they should work without Cygwin as well (which is what I want). The installer also installs findlib. - Download the OCamlSDL .zip archive, unzip it and run ./configure. It fails due to some syntax errors. The errors also occurs on Linux. - Download the OCamlSDL .tar.gz archive, extract it and run ./configure. It fails because it does not find gcc. I think ocamlc can be called to compile C files (although ocamlc will probably call gcc). Using ocamlc instead of gcc could maybe remove a dependency, as well as a configure step? I think i686-mingw32-gcc.exe could -and SHOULD- be used instead of gcc, although I'm not sure. - Copy "i686-mingw32-gcc.exe" to "gcc" to make the configure script believe that gcc is available. Run ./configure again. Now it fails to find sdl-config. This is where I'm stuck. I don't know how to obtain sdl-config. I downloaded the SDL sources and found sdl-config.h and sdl-config.in, so I tried to run ./configure for the source of SDL, but it failed (I don't remember why). I believe that it should be possible to compile OCamlSDL without the source of SDL, except maybe some .h files, so this is disappointing. If I understand correctly the configure.in of OCamlSDL, sdl-config is only used to retrieve the version of SDL (and maybe the path to some headers?). Shouldn't the configure script just emit a warning in this case? I mean, it's not very important if the version cannot be determined. Now, I also saw in the configure.in of OCamlSDL that it checks for the presence of some .h files. Can I say where to find the SDL source if sdl-config is not available? Summary: - it would be great if the ./configure script could try to find i686-mingw32-gcc.exe (but the "i686" part may change depending on the platform?); - it would be great if OCamlSDL only needed the location of the SDL headers and nothing else (to avoid having to compile, or even configure, SDL); - even better, if possible, the .h files could be part of the OCamlSDL distribution as a fallback if the SDL sources cannot be found. What do you think? I could try and make the changes myself and provide a patch, but right now I'm a little lost. Cheers, -- Romain Bardou |
From: Olivier A. <ol...@us...> - 2012-07-03 19:09:45
|
On Sat, Jun 9, 2012 at 7:44 PM, Kakadu <kak...@gm...> wrote: > Hi! > > Have you ever tried to crosscompile Ocaml-SDL for ARM? I have looked > at your sources and it seems that android is not supported yet. > What do you think, is it theoretically possible to crosscompile your > library for ARM? Pure SDL works --- I have configured it using > recomendations from [1] (russian-language link). I have no experience on ARM development, but the OCaml compiler is usually not very cross-compilation friendly. So it's probably not possible or very difficult. -- Olivier |
From: Kakadu <kak...@gm...> - 2012-06-09 17:44:47
|
Hi! Have you ever tried to crosscompile Ocaml-SDL for ARM? I have looked at your sources and it seems that android is not supported yet. What do you think, is it theoretically possible to crosscompile your library for ARM? Pure SDL works --- I have configured it using recomendations from [1] (russian-language link). Best wishes, Kakadu [1] http://zserge.wordpress.com/2012/02/27/androidsdl-%D0%B1%D1%83%D0%B4%D1%8C-%D0%BC%D1%83%D0%B6%D0%B8%D0%BA%D0%BE%D0%BC-%D0%BF%D0%B8%D1%88%D0%B8-%D0%BD%D0%B0-c/ |
From: Olivier A. <ol...@us...> - 2011-04-10 13:03:21
|
Hi, On Mon, Sep 20, 2010 at 03:34, Bryan Mills <bm...@al...> wrote: > It appears that the ocamlsdl binding maps load_string to the > Mix_QuickLoad_WAV SDL function, but my string does not have a WAV header -- > it is just the raw bytes to be played. I believe that what I really want is > Mix_QuickLoad_RAW, but I don't see a binding for than in ocamlsdl. Right, I added a Sdlmixer.load_string_raw binding for Mix_QuickLoad_RAW in the CVS repository. -- Olivier |
From: Bryan M. <bm...@al...> - 2010-09-20 01:34:58
|
I'm writing a music synthesizer using ocamlsdl, and I'm having trouble writing raw audio to the audio device. I've set up the audio device using: Sdlmixer.open_audio ~freq: 12000 ~format: Sdlmixer.AUDIO_FORMAT_S16LSB ~channels: Sdlmixer.MONO () Then I'm generating a chunk of audio by writing bytes directly to a string, and calling: Sdlmixer.load_string buffer to convert the string buffer into an Sdlmixer chunk. Unfortunately, that call results in a segfault. It appears that the ocamlsdl binding maps load_string to the Mix_QuickLoad_WAV SDL function, but my string does not have a WAV header -- it is just the raw bytes to be played. I believe that what I really want is Mix_QuickLoad_RAW, but I don't see a binding for than in ocamlsdl. Should the load_string OCaml function actually be calling _RAW instead of _WAV? Is there some other, preferred way to load raw audio bytes into the sound device? Any help would be appreciated. Thanks, Bryan |
From: Olivier A. <ol...@us...> - 2009-11-25 10:03:16
|
2009/11/24 Christophe Papazian <pap...@i3...>: > > Le 24 nov. 09 à 17:30, Olivier Andrieu a écrit : >>> Si effectivement ce projet est abandonné, je voudrais savoir s'il est >>> possible >>> pour moi de maintenir officiellement ce projet. >> >> tout à fait, c'est possible ! Il me faut simplement votre login sur >> Sourceforge pour que je vous ajoute à la liste des admins projets. > > login : papazian c'est fait ! Welcome :) -- Olivier |
From: Christophe P. <pap...@i3...> - 2009-11-24 19:26:49
|
Le 24 nov. 09 à 17:30, Olivier Andrieu a écrit : > Bonjour, > > parce que ça ne compile plus avec un OCaml récent ou parce qu'il y a > de nouvelles fonctions SDL à wrapper ? > Quelques fonctions ne sont plus vraiment bonnes (certaines fonctionnalités de SDL ont changé depuis, en particulier il me semble que le wrapper ne tient pas toujours compte des bitmasks), et bien sur, il y a quelques nouveautés et peut-être d'autres fonctionnalités à ajouter par la suite à OcamlSDL. >> Si effectivement ce projet est abandonné, je voudrais savoir s'il est >> possible >> pour moi de maintenir officiellement ce projet. > > tout à fait, c'est possible ! Il me faut simplement votre login sur > Sourceforge pour que je vous ajoute à la liste des admins projets. login : papazian Merci ! |
From: Olivier A. <ol...@us...> - 2009-11-24 16:30:30
|
Bonjour, 2009/11/24 Christophe Papazian <pap...@i3...>: > Bonjour, > > J'utilise régulièrement OCamlSDL, et j'en suis extrêmement content ! > Toutefois je constate que ce projet ne semble plus réellement maintenu, > la dernière version datant de plusieurs années. > Il faudrait en effet mettre à jour plusieurs parties de ces bindings. parce que ça ne compile plus avec un OCaml récent ou parce qu'il y a de nouvelles fonctions SDL à wrapper ? > Si effectivement ce projet est abandonné, je voudrais savoir s'il est > possible > pour moi de maintenir officiellement ce projet. tout à fait, c'est possible ! Il me faut simplement votre login sur Sourceforge pour que je vous ajoute à la liste des admins projets. -- Olivier |
From: Christophe P. <pap...@i3...> - 2009-11-24 07:11:44
|
Bonjour, J'utilise régulièrement OCamlSDL, et j'en suis extrêmement content ! Toutefois je constate que ce projet ne semble plus réellement maintenu, la dernière version datant de plusieurs années. Il faudrait en effet mettre à jour plusieurs parties de ces bindings. Si effectivement ce projet est abandonné, je voudrais savoir s'il est possible pour moi de maintenir officiellement ce projet. Merci de me tenir au courant et merci pour tout le travail accompli ! Je suis maître de conférence en informatique à l'université de Nice et je travaille au laboratoire I3S à Sophia Antipolis. Christophe Papazian pap...@i3... |
From: Jacques Le N. <rat...@gm...> - 2009-04-19 16:09:05
|
Dear ocamlsdl team, I've created a patch that adds a unicode field to a keyboard_event and adds the render_utf8_* functions. I couldn't get access to cvs so I diff'd it off version 0.7.2 cheers --Jacques Le Normand |
From: Jacques Le N. <rat...@gm...> - 2009-04-14 21:05:52
|
tried it, nothing happened. Here's the code: let font_filename = "test.ttf" let font_size = 29 let _ = Sdl.init [`VIDEO] let _ = Sdlttf.init () let font = Sdlttf.open_font font_filename font_size let screen = Sdlvideo.set_video_mode 400 400 [`OPENGL] let pair_to_rect (a,b) = Sdlvideo.rect a b 100 100 let loop () = GlClear.color (0.0, 0.0, 0.0); GlClear.clear [`color]; GlDraw.color (1.0, 1.0, 1.0); let text_surface = Sdlttf.render_text_blended font "hello world" ~fg:Sdlvideo.white in Sdlvideo.blit_surface ~dst_rect:(pair_to_rect (100,100)) ~src:text_surface ~dst:screen (); Sdlvideo.update_rect screen let run () = while true do loop (); Sdlgl.swap_buffers () done let main () = at_exit Sdl.quit; at_exit Sdlttf.quit; run () let _ = main () On Tue, Apr 14, 2009 at 4:04 PM, Eric Cooper <ec...@cm...> wrote: > On Tue, Apr 14, 2009 at 10:14:57AM -0400, Jacques Le Normand wrote: > > I'm trying to get a simple sdlttf + lablgl example to work. The > > following code displays a blank window; what am I doing wrong? > > You might need to call update_rect after you call blit_surface. > > -- > Eric Cooper e c c @ c m u . e d u > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > ocamlsdl-user mailing list > oca...@li... > https://lists.sourceforge.net/lists/listinfo/ocamlsdl-user > |
From: Eric C. <ec...@cm...> - 2009-04-14 20:54:37
|
On Tue, Apr 14, 2009 at 10:14:57AM -0400, Jacques Le Normand wrote: > I'm trying to get a simple sdlttf + lablgl example to work. The > following code displays a blank window; what am I doing wrong? You might need to call update_rect after you call blit_surface. -- Eric Cooper e c c @ c m u . e d u |
From: Jacques Le N. <rat...@gm...> - 2009-04-14 20:49:21
|
Dear list, how do I get the corresponding unicode from a keyboard_event? --Jacques |
From: Jacques Le N. <rat...@gm...> - 2009-04-14 14:15:08
|
Dear list, I'm trying to get a simple sdlttf + lablgl example to work. The following code displays a blank window; what am I doing wrong? cheers --Jacques let font_filename = "test.ttf" let font_size = 29 let _ = Sdl.init [`VIDEO] let _ = Sdlttf.init () let font = Sdlttf.open_font font_filename font_size let screen = Sdlvideo.set_video_mode 400 400 [`OPENGL] let pair_to_rect (a,b) = Sdlvideo.rect a b 100 100 let loop () = GlClear.color (0.0, 0.0, 0.0); GlClear.clear [`color]; GlDraw.color (1.0, 1.0, 1.0); let text_surface = Sdlttf.render_text_blended font "hello world" ~fg:Sdlvideo.white in Sdlvideo.blit_surface ~dst_rect:(pair_to_rect (100,100)) ~src:text_surface ~dst:screen () let run () = while true do loop (); Sdlgl.swap_buffers () done let main () = at_exit Sdl.quit; at_exit Sdlttf.quit; run () let _ = main () |
From: Sharif O. <ari...@gm...> - 2008-09-01 06:58:06
|
Greetings! I'm trying to write a tile engine, and am having a lot of trouble handling input. This is my code: (** Test chassis for The Apprentice's engine. *) (* Sharif Oerton, 2008 *) open Sdlevent;; open Sdlkey;; open Tatileengine;; open Tavector;; let main () = let map = (* map snipped *) in Sdl.init [`EVERYTHING]; at_exit Sdl.quit; let screen = Sdlvideo.set_video_mode 640 400 [`DOUBLEBUF] in let cam_pos = { x=0.0; y=0.0; } in let c = new camera cam_pos 5.0 in let tl = new tile_layer screen c [| Grass; Sand; Mud; Road; Invalid |] map in while true do pump (); if (is_key_pressed KEY_ESCAPE) then raise Exit; tl#update_cam (if (is_key_pressed KEY_LEFT) then 1.0 else 0.0) 0.0 0.0 0.0; Tagraphics.begin_scene screen; tl#draw (); Tagraphics.end_scene screen; done;; main ();; The program exits when I press escape, but doesn't move the camera to the left when left is pressed, and I have no idea why. It works fine when I use wait_event instead of is_key_pressed, but of course only moves the camera one space at a time. Just in case it's useful, here's the tile_layer class: class tile_layer (scr : Sdlvideo.surface) (cam : camera) texture_array mp = object (self) val screen = scr val mutable camera = cam val textures = Array.map load_tile texture_array val mutable map = mp method get_cam = camera method update_cam w e n s = camera#update w e n s (** Draw the layer to the screen *) method draw () = let map_width = Array.length map.(0) in let map_height = Array.length map in for x = 0 to map_width - 1 do for y = 0 to map_height - 1 do Tagraphics.draw_whole screen textures.(map.(y).(x)) (x * tile_width - (int_of_float camera#get_position.x)) (y * tile_height - (int_of_float camera#get_position.y)) tile_width tile_height; done done end;; and the camera class: class camera pos speed = object (self) val mutable position = pos val mutable speed = speed method update w e n s = let nx = 0.0 in let ny = 0.0 in let nx = nx -. w in let nx = nx +. e in let ny = ny -. n in let ny = ny +. s in let motion = Tavector.normalize { x=nx; y=ny } in position <- Tavector.add_vectors position (Tavector.mul_vector motion speed) method get_position = position end;; Thanks a lot for any pointers as to what I'm doing wrong. Sharif |
From: Tom L. <to...@al...> - 2008-09-01 03:56:20
|
I cannot build/run any OCamlSDL programs on OS X 10.5. I built SDL and SDL_mixer with straight configure/make/make install. If I try to make a new top-level: $ ocamlmktop -I +sdl -custom -o ocamlsdl bigarray.cma sdl.cma Undefined symbols: "_NSDeallocateMemoryPages", referenced from: -[NSString(ReplaceSubString) stringByReplacingRange:with:] in libSDLmain.a(SDLMain.o) ".objc_class_name_NSObject", referenced from: .objc_class_name_SDLMain in libSDLmain.a(SDLMain.o) "_NSAllocateMemoryPages", referenced from: -[NSString(ReplaceSubString) stringByReplacingRange:with:] in libSDLmain.a(SDLMain.o) ".objc_class_name_NSString", referenced from: literal-pointer@__OBJC@__cls_refs@NSString in libSDLmain.a(SDLMain.o) "___CFConstantStringClassReference", referenced from: cfstring=CFBundleName in libSDLmain.a(SDLMain.o) cfstring= in libSDLmain.a(SDLMain.o) cfstring=About in libSDLmain.a(SDLMain.o) cfstring=Hide in libSDLmain.a(SDLMain.o) cfstring=h in libSDLmain.a(SDLMain.o) cfstring=Hide Others in libSDLmain.a(SDLMain.o) cfstring=Show All in libSDLmain.a(SDLMain.o) cfstring=Quit in libSDLmain.a(SDLMain.o) cfstring=q in libSDLmain.a(SDLMain.o) cfstring=Window in libSDLmain.a(SDLMain.o) cfstring=m in libSDLmain.a(SDLMain.o) cfstring=Minimize in libSDLmain.a(SDLMain.o) "_NSApp", referenced from: _NSApp$non_lazy_ptr in libSDLmain.a(SDLMain.o) "_CPSGetCurrentProcess", referenced from: _main in libSDLmain.a(SDLMain.o) "_CFBundleCopyBundleURL", referenced from: -[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o) "_CPSEnableForegroundOperation", referenced from: _main in libSDLmain.a(SDLMain.o) "_objc_msgSend", referenced from: -[SDLMain application:openFile:] in libSDLmain.a(SDLMain.o) -[SDLMain applicationDidFinishLaunching:] in libSDLmain.a(SDLMain.o) -[NSString(ReplaceSubString) stringByReplacingRange:with:] in libSDLmain.a(SDLMain.o) -[NSString(ReplaceSubString) stringByReplacingRange:with:] in libSDLmain.a(SDLMain.o) -[NSString(ReplaceSubString) stringByReplacingRange:with:] in libSDLmain.a(SDLMain.o) -[NSString(ReplaceSubString) stringByReplacingRange:with:] in libSDLmain.a(SDLMain.o) -[NSString(ReplaceSubString) stringByReplacingRange:with:] in libSDLmain.a(SDLMain.o) -[NSString(ReplaceSubString) stringByReplacingRange:with:] in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) "_CFURLCreateCopyDeletingLastPathComponent", referenced from: -[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o) ".objc_class_name_NSProcessInfo", referenced from: literal-pointer@__OBJC@__cls_refs@NSProcessInfo in libSDLmain.a(SDLMain.o) "_CFBundleGetInfoDictionary", referenced from: _main in libSDLmain.a(SDLMain.o) ".objc_class_name_NSAutoreleasePool", referenced from: literal-pointer@__OBJC@__cls_refs@NSAutoreleasePool in libSDLmain.a(SDLMain.o) ".objc_class_name_NSMenuItem", referenced from: literal-pointer@__OBJC@__cls_refs@NSMenuItem in libSDLmain.a(SDLMain.o) "_CFURLGetFileSystemRepresentation", referenced from: -[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o) "_CPSSetFrontProcess", referenced from: _main in libSDLmain.a(SDLMain.o) ".objc_class_name_NSApplication", referenced from: .objc_class_name_SDLApplication in libSDLmain.a(SDLMain.o) ".objc_class_name_NSMenu", referenced from: literal-pointer@__OBJC@__cls_refs@NSMenu in libSDLmain.a(SDLMain.o) "_CFBundleGetMainBundle", referenced from: -[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o) _main in libSDLmain.a(SDLMain.o) "_CFRelease", referenced from: -[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o) -[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o) ld: symbol(s) not found collect2: ld returned 1 exit status Error while building custom runtime system --- And when running this OCaml program: let main () = Sdl.init [`VIDEO]; Sdlvideo.set_video_mode 200 200 []; Sdltimer.delay 2000; Sdl.quit () let _ = main () $ ocamlc -c -I +sdl sdltest.ml $ ocamlc -o sdltest -I +sdl bigarray.cma sdl.cma sdltest.cmo $ ./sdltest 2008-08-31 22:50:18.778 ocamlrun[62240:10b] *** _NSAutoreleaseNoPool(): Object 0x122c40 of class NSCFNumber autoreleased with no pool in place - just leaking Stack: (0x922abcdf 0x921b8562 0x907dbb05 0x9630ab78 0x963094f9 0x96319736 0x90837f2f 0x90836135 0x90835e7a 0x90835829 0x90835368 0x90833364 0x2376a6 0x22d65b 0x201670 0x2016a7 0xa5b8a 0x12bd1 0x146c0) 2008-08-31 22:50:18.781 ocamlrun[62240:10b] *** _NSAutoreleaseNoPool(): Object 0x1230c0 of class NSCFNumber autoreleased with no pool in place - just leaking Stack: (0x922abcdf 0x921b8562 0x907dbb3d 0x9630ab78 0x963094f9 0x96319736 0x90837f2f 0x90836135 0x90835e7a 0x90835829 0x90835368 0x90833364 0x2376a6 0x22d65b 0x201670 0x2016a7 0xa5b8a 0x12bd1 0x146c0) 2008-08-31 22:50:18.795 ocamlrun[62240:10b] *** _NSAutoreleaseNoPool(): Object 0x123790 of class NSCFNumber autoreleased with no pool in place - just leaking Stack: (0x922abcdf 0x921b8562 0x907dbb77 0x9630ab78 0x963094f9 0x96319736 0x90837f2f 0x90836135 0x90835e7a 0x90835829 0x90835368 0x90833364 0x2376a6 0x22d65b 0x201670 0x2016a7 0xa5b8a 0x12bd1 0x146c0) 2008-08-31 22:50:18.796 ocamlrun[62240:10b] *** _NSAutoreleaseNoPool(): Object 0x123450 of class NSCFDictionary autoreleased with no pool in place - just leaking ... ... Stack: (0x922abcdf 0x921b8562 0x921ccc35 0x921cc811 0x965c60e2 0x9630e0fb 0x908d1895 0x907ed3a7 0x907ec865 0x907ec222 0x23a54f 0x237cbc 0x22d99e 0xa28e7 0x12cba 0x146c0) 2008-08-31 22:50:18.870 ocamlrun[62240:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow' 2008-08-31 22:50:18.871 ocamlrun[62240:10b] Stack: ( 2522636619, 2519785723, 2522636075, 2522636138, 2425171064, 2425165915, 2424230823, 2424227941, 2424226338, 2336079, 2325692, 2283934, 665831, 76986, 83648 ) zsh: trace trap ./sdltest Am willing to help debug this (though I'm new enough to not know how to start on my own). I'm trying to get sample-level access to my sound card, and OCamlSDL seemed my best bet. -- Tom Lieber http://AllTom.com/ |
From: Ian F. <fin...@gm...> - 2008-01-16 21:52:52
|
Hey thanks! I was wondering if that was the case, but I got confused when I saw that there is a free function for Mix music chunks. I really appreciate the answer. - Ian On Jan 16, 2008 4:00 PM, Olivier Andrieu <ol...@us...> wrote: > Hi ! > > On Jan 14, 2008 6:51 PM, Ian Finlayson <fin...@gm...> wrote: > > Why is there no OcamlSDL function to free a loaded surface? I am > attempting > > to write a game using OcamlSDL, but I really need this capability. > > The surface is registered in the OCaml garbage collector: you don't > have to do anything to free the surface, it will be automatically > freed after it's become unreachable in your program. > > -- > Olivier > |
From: Olivier A. <ol...@us...> - 2008-01-16 21:00:17
|
Hi ! On Jan 14, 2008 6:51 PM, Ian Finlayson <fin...@gm...> wrote: > Why is there no OcamlSDL function to free a loaded surface? I am attempting > to write a game using OcamlSDL, but I really need this capability. The surface is registered in the OCaml garbage collector: you don't have to do anything to free the surface, it will be automatically freed after it's become unreachable in your program. -- Olivier |
From: Ian F. <fin...@gm...> - 2008-01-14 17:51:49
|
Why is there no OcamlSDL function to free a loaded surface? I am attempting to write a game using OcamlSDL, but I really need this capability. I know this list has been inactive for a while, but if anyone out there can answer this, I'd really appreciate it! - Ian |
From: Olivier A. <ol...@us...> - 2007-09-19 19:31:17
|
On 9/16/07, Chris Campbell <cyb...@gm...> wrote: > Hi there, > > I am trying to build a tetris clone which uses both camlimages and > ocamlsdl but get the following error. > To get around this I just renamed list_length to ocsdl_list_length and > replaced it everywhere it was called. Attached is a patch against the > 0.7.2.tarball. It was tested by manually patching godi tarball and it > compiles fine now. I have not checked the cvs version to see if this > problem is still present. Thanks, I've updated the CVS. -- Olivier |
From: Chris C. <cyb...@gm...> - 2007-09-16 01:00:58
|
Hi there, I am trying to build a tetris clone which uses both camlimages and ocamlsdl but get the following error. danx@arwen:>'tetris'$ omake *** omake: reading OMakefiles *** omake: finished reading OMakefiles (0.16 sec) - build src tc.opt + ocamlfind ocamlopt -package lablGL,camlimages,sdl -warn-error A -I . -o tc.opt config.cmx texture.cmx shape.cmx grid.cmx game.cmx control.cmx input.cmx display.cmx loop.cmx tc.cmx -linkpkg /my-stuff/extra/sw/godi/lib/ocaml/pkg-lib/camlimages/libci_gif.a(gifwrite.o): In function `list_length': gifwrite.c:(.text+0x0): multiple definition of `list_length' /my-stuff/extra/sw/godi/lib/ocaml/pkg-lib/sdl/libsdlstub.a(common.o):common.c:(.text+0x0): first defined here /usr/bin/ld: Warning: size of symbol `list_length' changed from 29 in /my-stuff/extra/sw/godi/lib/ocaml/pkg-lib/sdl/libsdlstub.a(common.o) to 112 in /my-stuff/extra/sw/godi/lib/ocaml/pkg-lib/camlimages/libci_gif.a(gifwrite.o) collect2: ld returned 1 exit status Error during linking *** omake: 66/80 targets are up to date *** omake: failed (2.75 sec, 0/10 scans, 1/30 rules, 0/145 digests) *** omake: targets were not rebuilt because of errors: src/tc.opt To get around this I just renamed list_length to ocsdl_list_length and replaced it everywhere it was called. Attached is a patch against the 0.7.2.tarball. It was tested by manually patching godi tarball and it compiles fine now. I have not checked the cvs version to see if this problem is still present. Regards, Chris |
From: Avishai S. <ch...@al...> - 2006-11-18 16:36:27
|
VlAiiGRA $3.35 http://www.aderunjintunhadesunpion.com to the concert site. There was a grove of trees here that were serving |
From: Ladislas G. <duf...@ag...> - 2006-11-07 17:13:03
|
Hi, PHAuuRMACY for YOU http://www.waertundehtiondeewa.com =20 photograph of the alien artifact from my pocket and held it out. |