Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: MIDlet Pascal

  1. #11

    MIDlet Pascal

    I have already created a forum for MIDletPascal in Compilers and IDE via the Administration Panel, but it appears that WILL needs to do some kind of incantation and or dance before it will appear for all to see. So it does exist ( you'll need to trust me ), but only I can see it until WILL gets back, which I think is this week-end.

    On another note, I'm finding the DrawText function unreliable as you can never guarantee that the default font size it chooses is small enough of big enough to work on all mobiles. To avoid this I'd like to use bitmap fonts where each letter is either 8x8 or 12x12. At least then I know how to space all my text.
    I've managed to write a function to display numbers ( see below ), but could not find an easy way via the MIDP API to get the alphabet happening. I've probably overlooked something. Any ideas?

    My number sprite routine is...
    [pascal]procedure DrawSpriteText( Text: string; x, y: integer );
    begin
    for iCounterX := 0 to Length( Text ) - 1 do
    begin
    DrawImage( NumberSprites[ StringToInteger( GetChar( Text, iCounterX ) ) ], x, y );
    x := x + 8;
    end;
    end;
    [/pascal]
    iCounter is a global counter variable used in all my loops.
    and since this font is 8x8 that is why x := x + 8; is used to draw the next number in the string.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  2. #12

    MIDlet Pascal

    Quote Originally Posted by Lifepower
    Perhaps. The idea of generating Java bytecode out of Pascal is very interesting. Too bad it doesn't support classes, I hope it's on TO-DO list or something.
    I heard that when Java first came out, apparently Borland had a Pascal to Java generator in house, but they did not think it would be commercially viable, so it was shelved.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  3. #13

    MIDlet Pascal

    Quote Originally Posted by savage
    I heard that when Java first came out, apparently Borland had a Pascal to Java generator in house, but they did not think it would be commercially viable, so it was shelved.
    If that's true, it's a bad move for Borland. They never knew what they are missing. :?

  4. #14

    MIDlet Pascal

    Quote Originally Posted by Lifepower
    Quote Originally Posted by savage
    I heard that when Java first came out, apparently Borland had a Pascal to Java generator in house, but they did not think it would be commercially viable, so it was shelved.
    If that's true, it's a bad move for Borland. They never knew what they are missing. :?
    Not sure if it's true either, it was a rumour going around way back in 1995/6.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  5. #15

    MIDlet Pascal

    I've managed to write a function to display numbers ( see below ), but could not find an easy way via the MIDP API to get the alphabet happening. I've probably overlooked something. Any ideas?
    I think you don't really need my (poor) programming skills but you
    might find the solution doing somethin like DXFont from DelphiX.

    function "ImageFromImage" from MP lib should solve your problem

    I mean, declare an array like alphabet_array['a', 'b',....'0','1',....'?','!'...]
    then you have an alphabet image that have letters and numbers and
    symbols in the same order as your array.

    Once you get the letter pos in the array you call a ImageFromImage and
    get the 8x8 tile from the alphabet image..

    That should work i think.. but i may be wrong ops:
    <center>
    <br />Federico &quot;FNX&quot; Nisoli
    <br />Lead Programmer - FNX Games
    <br />http://www.fnxgames.com
    <br /><img src="http://www.fnxgames.com/imgs/banners/fnxban.gif">
    <br /></center>

  6. #16

    MIDlet Pascal

    TIP : Do NOT use ImageFromImage if using MIDP 1.0. It loses transparency information. Apparently it works in MIDP 2.0.
    It is also very s l o o o o w, at least it was for me. In the end I ended up spending one lunch-time cutting each bitmap out of composite so that I could make use of the transparency and stored everything into image arrays. This worked well and everythin speeded up quite nicely.

    I think I'll use the alphabet array and do look-ups. I swear I remember less each year .
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  7. #17

    MIDlet Pascal

    Well, actually i never used such function because i always prefer to have
    different images for everything, even if i have 20 resouce files or more..

    I was reading the help and i saw that function that i thought would have
    done what you were aiming to do. Anyway thanx for the tip, i'll remember
    it for future stuff
    <center>
    <br />Federico &quot;FNX&quot; Nisoli
    <br />Lead Programmer - FNX Games
    <br />http://www.fnxgames.com
    <br /><img src="http://www.fnxgames.com/imgs/banners/fnxban.gif">
    <br /></center>

  8. #18

    MIDlet Pascal

    does anyone have any idea how to download the games with a nokia 2650? i tried one but it just showed a page of text

  9. #19

    MIDlet Pascal

    WILL has activated the MIDletPascal forum over @ http://www.pascalgamedevelopment.com/viewforum.php?f=65
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  10. #20

    MIDlet Pascal

    Hi Tux, did you manage to download any MP games? Have you worked out how to visit webpages?
    It looks like the Nokia 2650 only supports MIDP 1.0 API, so I don't think any MIDP 2.0 games will work on it, unless the phone is upgradeable.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •