Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: A question on Modula2 vs Free Pascal
« Last post by LV on Today at 07:39:34 am »
Code: Pascal  [Select][+][-]
  1. program project1;
  2.  
  3. {$R *.res}
  4.  
  5. begin
  6.   writeln('Pascal Community - 1 :-(');
  7.   readln;
  8. end.    
  9.  
  10.  
2
Spanish / Re: android
« Last post by Thaddy on Today at 06:10:08 am »
The easy way is fpcupdeluxe to install lamw.
3
General / Re: Initiaiizing records by constructor
« Last post by Thaddy on Today at 05:41:49 am »
Yes, it is initialized and the warning can in this case be ignored. It is a known issue that you will get a bogus warning on some managed types if they are stack allocated (local). You will get the same warning with a string that is initialized by setlength().
4
Graphics / Re: Hypocycloid Program (included)
« Last post by speter on Today at 05:33:19 am »
I've recently been relooking at pixel drawing code. ;)
In another thread WP included an example using LazIntfImage.

So, here (finally) is my hypocycloid rewritten using (much) faster graphics. :)

If you'd like some nice (sugar free) donuts, checkout the attached project.

cheers
S.
5
Games / Re: Fairtris 2: The Ultimate Challenge
« Last post by kevin498 on Today at 05:09:44 am »
You've made good progress with your project, which is encouraging! Testing across platforms is key for a smooth user experience. It's important to verify features like toggling fullscreen, resizing the window, and gamepad detection. DGCustomerFirst These functionalities enhance usability and accessibility. Ensuring they work well on both Windows and Linux will make your project more robust.
6
General / Re: Here's some Pong game. Suggestions? Feedback? Ideeas?
« Last post by Seenkao on Today at 04:28:13 am »
Могу я предложить ZenGL? Он работает с графикой используя OpenGL, но для того чтоб его использовать не обязательно знать OpenGL. Уже есть готовый функционал, для отрисовки примитивов, использования спрайтов, работы с ресурсами и многое другое. Всё можно увидеть в демо-версиях идущих вместе с библиотекой.
И, он поддерживает несколько платформ: Windows, Linux, MacOS, Android.  :)

Я не думаю, что это будет намного сложнее чем работать в текстовом режиме. И допустим уже есть готовые функции для проверки столкновения.
Я бы посоветовал вам другие какие-то движки, но не уверен насколько они просты для изучения. В данном случае вам нужно знать только паскаль и уметь им пользоваться. Демонстрации показывают основную функциональность и вместе с ними код документирован. А так же ведётся документация внутри библиотеки ZenGL. На данный момент не полностью, но постепенно заполняются не документированные части.
-----------------------------------------------------

Google translate:
May I suggest ZenGL? It works with graphics using OpenGL, but you don't need to know OpenGL to use it. There is already ready-made functionality for drawing primitives, using sprites, working with resources, and much more. Everything can be seen in the demo versions that come with the library.
And, it supports multiple platforms: Windows, Linux, MacOS, Android. :)

I don't think it will be much more difficult than working in text mode. And let’s say there are already ready-made functions for checking collisions.
I would recommend some other engines, but I'm not sure how easy they are to learn. In this case, you only need to know Pascal and be able to use it. The demos show the basic functionality and along with them the code is documented. Documentation is also maintained inside the ZenGL library. At the moment, not completely, but the undocumented parts are gradually being filled in.
7
LazReport / Re: Designer
« Last post by SandyG on Today at 03:20:24 am »
Will take a look at the 2x feature, will help a lot if it works.

Sandy
8
General / Re: A question on Modula2 vs Free Pascal
« Last post by speter on Today at 03:09:19 am »
They are really easy to stop though. Just don’t allow people who don’t know pascal to post.  Problem solved.  8)
I would not support this approach.

I would suggest the opposite -> give help to everyone who asks; especially those with poor (or no) knowledge of Pascal.

cheers
S.
9
General / Re: Initiaiizing records by constructor
« Last post by speter on Today at 03:04:31 am »
Interestingly, when I implement Thaddy's very cool code,
I get a "managed type not initialised" warning if "a:TA" is a local variable;
the compiler does not give the warning if "a:TA" is a global.

Code: Pascal  [Select][+][-]
  1. unit foo;
  2.  
  3. {$mode objfpc}{$modeswitch advancedrecords}{$H+}
  4.  ...
  5. type
  6.   TA = record
  7.     int: integer;
  8.     str: string;
  9.     class operator initialize(var a:TA);
  10.   end;
  11.  
  12.   { TForm1 }
  13.  
  14.   TForm1 = class(TForm)
  15.    ...
  16.     procedure FormCreate(Sender: TObject);
  17.   private
  18.  
  19.   public
  20.     a : ta;
  21.   end;
  22.  
  23. var
  24.   Form1: TForm1;
  25.  
  26. implementation
  27.  
  28. {$R *.lfm}
  29.  
  30. { TForm1 }
  31.  
  32. class operator TA.initialize(var a:TA);
  33. begin
  34.   a.int := 200;
  35.   a.str := 'test';
  36. end;
  37.  
  38. procedure TForm1.FormCreate(Sender: TObject);
  39. var
  40.   b : ta;
  41. begin
  42.   memo1.append('int='+a.int.tostring+'; str='+a.str);
  43.   memo1.append('int='+b.int.tostring+'; str='+b.str);
  44. end;

The code above give the message:
  Warning: Local variable "b" of a managed type does not seem to be initialized
(even though it _is_ initialised.)

cheers
S.
10
General / Re: Best way to exchange data between a form and a unit
« Last post by cdbc on Today at 03:00:24 am »
Hi
That's the spirit  ;)
Nice to hear, your efforts now, _will_ pay you back  8)
Remember, that if you have a field/member of the transaction, say e.g.: "TSettingsTransaction.Sender : TObject", then you are able to send the /offending/ checkbox along, throug the observer mechanism in i.e.: "procedure HandleObsNotify(aReason: TProviderReason;aNotifyClass: TObject;UserData: pointer);" and then check for it in the /common/ handler e.g.:
Code: Pascal  [Select][+][-]
  1. TSomeView.DoSetChecks(anObj: TObject;aSettingsRec: PSettingsRec);
  2. begin
  3.   ...
  4.   with aSettingsRec^ do begin
  5.     if anObj is TCheckBox then begin
  6.       if TCheckBox(anObj).Name = 'chbActiveLogging' then TCheckBox(anObj).Checked:= srActiveLog; // field of record
  7.       ...
  8.       etc...
  9.     end;
  10.   end;
  11. end;
That should alleviate duplicate code...  :D
Just a thought, anyway, best keep it simple.
Regards Benny
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018