cJass

Any tool that you think is useful, make a thread here and upload it.

Moderator: Cheaters

Forum rules
While crediting should be allowed, please keep down the advertising. If you know who it's from, and they have a website, please link to it as a basic courtesy.
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

cJass

Post by Black-Hole »

cJass is small, but useful preprocessor for JASS2 interpreted language, used in Warcraft III by Blizzard ent. Its main purposes are to make the process of writing the script simple and comfortable and to increase its readability.
Here is what cJass code looks like:

Code: Select all

include "syn\\cj_types.j" 

define <new timer> = CreateTimer()

timer MyGlobalTimer = new timer

void SomeFunc (bool b) {
  if (!b) { b = true }

  float a = 2.
  int c = -2
  a *= c + 8.

  whilenot (a < c++) {
    BJDebugMsg(I2S(a))
  }
}

The program is designed for use with Jass New Gen Pack, is compatible with vJass (0.9.J.1) parser and is run before it.
Installing:
Download the installer, run it, select preferred install type, then select the NewGen folder and press Install button. That's all!
The AutoUpdate tool is included in the install package, so you can be sure that your cJass version is always the latest one available
Downloads:
Latest version: 01 03 04 02 (01.09.2009)
Download cJass installer (470K, exe)
Changelog:
01 03 04 02
— Added support of debug instruction
— Added cj_order and cj_antibj_base to standard library
— Updated cj_print
01 03 04 01
— Fixed bug with {} inside of defines
01 03 04 00
— Added "cj_print.j" library
— Fixed bug with operator overloading inside of interface
— fixed private multi-word defines
01 03 03 14
— Fixed bug with define arguments not processed without <>
01 03 03 12
— Fixed C-style methods inside of modules
— Now defines can take any arguments without additional mess
— Fixed rare 'out of memory' bug
— Some rare define bugs fixed
01 03 03 09
— Fixed bug with ==
— vJass textmacro processing removed.
01 03 03 08
— define's arguments parsing logic changed
— Comma in enums added.
— Fixed bugs with external tools' calls
— Some bugs with ++ and -- fixed
01 03 03 04
— C-style operator declaration added
— Enums added.
— Some define-related bugs fixed
01 03 02 18
— Branch 1.3.x.x public release
— Lots of new features (see syntax section and manual).
— 'Capital Z in define arguments' issue fixed
01 03 01 00
— Free locals declaration added.
— Rewrote increment.
— Blocks inside the loop added.
01 03 00 03
— Info panel finished.
— Script refactoring
01 02 01 08
— Added info panel.
01 02 01 07
— Lots of bugs fixed.
01 02 01 06
— Fixed bug with vJass preprocessor instructions (//!).
01 02 01 05
— Now defines can takes arguments.
01 02 01 03
— Fixed specific bug with define.
— Fixed library_once bug.
— Include directive also searches in the map's folder.
01 02 01 02
— Fixed program crash when there was only one define.
01 02 01 01
— Added concatenation (##) instruction.
— Added ability to hook native functions.
01 02 00 0c
— And one more bug fixed.
01 02 00 0b
— Fixed some bugs.
01 02 00 0a
— Added nested defines.
— Added include instruction.
— Added the ability to group variables.
— Fixed bug with private or public types and structures.
01 01 00 02
— Visual progress added.
— Some bugs fixed.
01 00 04 04
— Private defines added.
— Some bugs fixed.
01 00 01 00
— Textmacro processing added.
01 00 00 01
— Public release.

I dont take credit, Found this http://cjass.xgm.ru/
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: cJass

Post by Ken »

Oh, I'm lovin' it.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: cJass

Post by Black-Hole »

:P I put this in General chat on Accident, can a mod/admin move this to the WC3 section please
Nothinbeter2do
Junior Member
Posts: 40
Joined: November 14th, 2008, 8:56 pm

Re: cJass

Post by Nothinbeter2do »

So what exactly does this do? Convert C++ to Jass? That's what it looks like to me.
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: cJass

Post by Ken »

It just lets you write JASS with a more C-like syntax, to make it more comfortable to people used to C/C++.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that