Author Topic: NED2 editor  (Read 1558 times)

Guilect

  • Newbie
  • *
  • Posts: 6
    • View Profile
NED2 editor
« on: October 23, 2016 »
Hi Guys,

How have you been?

I have put together an editor so that coding in NaaLaa might be easier for you.



NED2 is an editor for the programming language NaaLaa.

There is of course the editor that comes with NaaLaa, NED,
Aurel made an editor called Nalator2,
and Azrak made and editor also called NED2.
(perhaps there are others as well).

But this editor is, I believe, the most complete editor made specifically to work with NaaLaa.
This NED2 is not programmed in NaaLaa itself like NED, sorry.
It is based upon the public domain SED program from the PowerBasic folks
and its derivative XSED from the XBLite community.
I have modified it so it works well with NaaLaa.
Hopefully I have included all the necessary support files so that it runs on your computer.
It of course works fine on mine.  Let me know.

Installation is easy.
Unzip to its own folder.
Go to Options -> Compiler... and browse to the NaaLaa compiler.
e.g. for NaaLaa version 6 it can be found in N6/bin/naalaa6.exe

If there is a tool that you would like to be able to launch from NED2,
place the .exe in the tools sub-folder of NED2, it will then appear in the tools menu.
(you may have to restart Ned2)

Attached are a screenshot and the zip file for the editor.

Marcus:  When the Poly_editor is launched from the editor's tool menu it works as expected.
however, when either the Raycaster or Tilemap editor are launched they immediately close.
Any idea?
The editor is using a standard Win32 API:
Code: [Select]
ShellExecuteA ($$HWND_DESKTOP, &"open", &szPath$, 0, 0, $$SW_SHOWNORMAL)
Where szPath is the path to the .exe.

Update : Oct. 24, 2016
version 2.01
Fixed procedure / endproc not folding correctly.
Please re-download from link below.
« Last Edit: October 25, 2016 by Guilect »

B+

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: NED2 editor
« Reply #1 on: October 23, 2016 »
Thanks, very nice!  :)

My number frustration has been fixed:
The right click menu is a beauty, along with Cut, Copy, Paste there are Block Indents and Unindents, Block Comments and Uncomment, character map...  8)

If you take requests and can do a screen dump from that menu as well...  ;)

B+

Guilect

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: NED2 editor
« Reply #2 on: October 23, 2016 »
Per request, here is a screenshot showing the right-click menu.


One feature I like is when you make and error, the NaaLaa compiler will tell you which line it is on, and by double clicking on the error line in the output window it will automatically take you to the offending line.
« Last Edit: October 23, 2016 by Guilect »

B+

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: NED2 editor
« Reply #3 on: October 23, 2016 »
Oops sorry, I did not realize this (screen shot) was impossible from an editor only program.

I like allot of things about this editor!!!

« Last Edit: October 23, 2016 by B+ »
B+

Rick3137

  • Sr. Member
  • ****
  • Posts: 347
  • May the Force be with You
    • View Profile
    • Rick's Programs
Re: NED2 editor
« Reply #4 on: October 24, 2016 »
 Nice work.
 
 I hope you get the raycaster fixed. I have been using that one.

kcfb

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: NED2 editor
« Reply #5 on: October 24, 2016 »
Very nice......I was very happy with NED but this has features that will be very useful. I have one question/possible issue......I can see that the following procedure does not collapse like others - the procedure seems to work ok but the screenshot shows that the last few lines do not collapse - any idea why? I've not used NaaLaa for a while so this may well be an issue with the way I have made the procedure......

Code: [Select]
procedure collision()

for a = 0 to MAX_BALLS - 1
for b = 0 to MAX_BALLS - 1
if a <> b
gapx# = balls[b][BALL_X]-balls[a][BALL_X]
gapy# = balls[b][BALL_Y]-balls[a][BALL_Y]
distance# = sqr#(gapx*gapx + gapy*gapy)
if distance <= 48.0
edge_collisionPointX# = (balls[a][BALL_X]*balls[a][BALL_RAD] + balls[b][BALL_X]*balls[b][BALL_RAD]) / (balls[a][BALL_RAD] + balls[b][BALL_RAD] )
edge_collisionPointY# = (balls[a][BALL_Y]*balls[a][BALL_RAD] + balls[b][BALL_Y]*balls[b][BALL_RAD]) / (balls[a][BALL_RAD] + balls[b][BALL_RAD] )
balls[0][BALL_X_INC] = 0.0
balls[0][BALL_Y_INC] = 0.0
draw line int(balls[a][BALL_X]),int(balls[a][BALL_Y]),int(balls[b][BALL_X]),int(balls[b][BALL_Y])
Temp_angle# = AngleToF# (balls[b][BALL_X],balls[b][BALL_Y],balls[a][BALL_X],balls[a][BALL_Y])+90.0
if Temp_angle > 360.0 then Temp_angle = Temp_angle - 360.0
endif
endif
next
next

endproc

B+

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: NED2 editor
« Reply #6 on: October 24, 2016 »
Curious, it wont collapse even when everything is commented.
B+

Guilect

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: NED2 editor
« Reply #7 on: October 24, 2016 »
Fixed in v2.01
download from original post.

kcfb

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: NED2 editor
« Reply #8 on: October 25, 2016 »
Many thanks - I look forward to using the editor and its new features.......

aurel

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: NED2 editor
« Reply #9 on: October 25, 2016 »
NIce...
but when i download your zip called ned2_release i found only one exe file...
look in screenshot.. where is sciLexer?

heh yes long time ago i made Nalator2 i even forget about that..
original NED is not written in naalaa than in C ...markus even give me source code  :D

by the way do you recompile Jose Roca 1.16 with PowerBasic
or just modify lexer keyword list
looks to me to much like XSED for XBlite... :D

Guilect

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: NED2 editor
« Reply #10 on: October 25, 2016 »
Hi Aurel,

Sorry, I made a mistake in making the zip file.  I will re-upload later.

I worked from the XBlite version of XSED.  That version was closer to being useable for Naalaa
than the PowerBasic version.

aurel

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: NED2 editor
« Reply #11 on: October 25, 2016 »
Quote
I worked from the XBlite version of XSED.  That version was closer to being useable for Naalaa
than the PowerBasic version.

Hi yes i see...
i copy few dll-s from XBlite including scilexer then run editor but i get editor without scintilla control
strange  :o

Is XSED compiled with PowerBasic or with XBlite?

Guilect

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: NED2 editor
« Reply #12 on: October 25, 2016 »
@ Aurel :  XBLite.


I have re-uploaded the .zip file with all necessary files.
Please download from first post.

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 549
    • View Profile
Re: NED2 editor
« Reply #13 on: November 01, 2016 »
This looks freakin awesome :)  I'll promote it on the start page if that's okay with you. Are there any restrictions preventing me from including this editor in the distribution?

.\\\opz

Guilect

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: NED2 editor
« Reply #14 on: November 01, 2016 »
The base code was made public domain.
From the PowerBasic SED editor :
Quote
This is a collective work made by members of the so called PowerBASIC community, i.e. users
' of the PowerBasic compilers. His names and contributions are specified in the history below.
' All of them have agreed to donate his work for this project to the public domain, so there are
' no restrictions of his use unless otherwise stated. If you use the code for your own projects,
' please give us the due credit.
' Project started and leaded by José Roca.

Then David SZAFRANSKI adapted the editor for the XBLite programming language.
Regarding the compiler the website says :
Quote
The XBLite compiler is free, open-source, and published under GPL and LGPL licenses.
The source code is freely supplied for the compiler as well as other components including the XSED editor.

I then adapted it for NaaLaa. I have no restrictions.
So, I think as long as credit is given to the folks who did the majority of the coding we would be in keeping with their request and be okay.