Skip to content

Commit

Permalink
increases version and fix typos. Also updates README and bbcode README
Browse files Browse the repository at this point in the history
  • Loading branch information
ericoporto committed Nov 29, 2019
1 parent 332d6a2 commit c4bbcbe
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 6 deletions.
29 changes: 27 additions & 2 deletions README.bbcode
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[b][size=14pt]agsbox2d[/size][/b] [color=gray][b] version 0.3.0 [/b][/color]
[b][size=14pt]agsbox2d[/size][/b] [color=gray][b] version 0.4.0 [/b][/color]

[url=https://github.com/ericoporto/agsbox2d/releases/download/0.3.0/agsbox2d.dll]Get Latest Release [b]agsbox2d.dll[/b][/url] | [url=https://github.com/ericoporto/agsbox2d/releases/download/0.3.0/libagsbox2d.so][b]libagsbox2d.so[/b][/url] | [url=https://github.com/ericoporto/agsbox2d/releases/download/0.3.0/libagsbox2d.dylib][b]libagsbox2d.dylib[/b][/url] | [url=https://github.com/ericoporto/agsbox2d]GitHub Repo[/url] | [b][url=https://github.com/ericoporto/agsbox2d/releases/download/0.3.0/agsbox2d_demo_windows.zip]Demo Windows[/url][/b] | [b][url=https://github.com/ericoporto/agsbox2d/releases/download/0.3.0/agsbox2d_demo_linux.tar.xz]Demo Linux[/url][/b]
[url=https://github.com/ericoporto/agsbox2d/releases/download/0.4.0/agsbox2d.dll]Get Latest Release [b]agsbox2d.dll[/b][/url] | [url=https://github.com/ericoporto/agsbox2d/releases/download/0.4.0/libagsbox2d.so][b]libagsbox2d.so[/b][/url] | [url=https://github.com/ericoporto/agsbox2d/releases/download/0.4.0/libagsbox2d.dylib][b]libagsbox2d.dylib[/b][/url] | [url=https://github.com/ericoporto/agsbox2d]GitHub Repo[/url] | [b][url=https://github.com/ericoporto/agsbox2d/releases/download/0.4.0/agsbox2d_demo_windows.zip]Demo Windows[/url][/b] | [b][url=https://github.com/ericoporto/agsbox2d/releases/download/0.4.0/agsbox2d_demo_linux.tar.xz]Demo Linux[/url][/b]

[url=https://dev.azure.com/ericoporto/agsbox2d/_build/latest?definitionId=11&branchName=master][img]https://dev.azure.com/ericoporto/agsbox2d/_apis/build/status/ericoporto.agsbox2d?branchName=master[/img][/url]

Expand Down Expand Up @@ -398,6 +398,31 @@ Box2D uses the square root of the multiplication of two contacting fixtures to c
[li][b][tt]float Fixture.Restitution[/tt][/b]
Restitution is used to make objects bounce, and is usually a value between [tt]0.0[/tt] and [tt]1.0[/tt]. A value of [tt]0.0[/tt] means the object won't bounce, and a value of [tt]1.0[/tt] means the object velocity will be exactly reflected.

[/li]
[li][b][tt]readonly Body* Fixture.Body[/tt][/b]
Returns Body if it's defined for this fixture, otherwise null.

[/li]
[li][b][tt]int Fixture.GroupIndex[/tt][/b]
Group the fixture belongs to, from -32768 to 32767. Fixtures with the same group will always collide if group is positive or never collide if it's negative.
Zero means no group, and is default.

[/li]
[li][b][tt]int Fixture.CategoryBits[/tt][/b]
Category of this fixture, from 16 possible categories encoded as 16-bit integer (1, 2, 4, 8, ... 32768). 65535 means all categories.

[/li]
[li][b][tt]int Fixture.MaskBits[/tt][/b]
Mask of this fixture, encoded as 16-bit integer. Categories selected will collide with this fixture (ex: 5, means category 1 and 4 will collide). Default is 65535 - collide with all categories.

[/li]
[li][b][tt]bool Fixture.TestPoint(float x, float y)`[/tt][/b]
Returns true if a point is inside the shape of the fixture.

[/li]
[li][b][tt]bool Fixture.IsSensor[/tt][/b]
Whether this fixture is a sensor. Sensors do not cause collision responses, but generate begin-contact and end-contact events.

[/li]
[/list]

Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,31 @@ Restitution is used to make objects bounce, and is usually a value between
`0.0` and `1.0`. A value of `0.0` means the object won't bounce, and a value
of `1.0` means the object velocity will be exactly reflected.
#### `readonly Body* Fixture.Body`
Returns Body if it's defined for this fixture, otherwise null.
#### `int Fixture.GroupIndex`
Group the fixture belongs to, from -32768 to 32767. Fixtures with the same group will always collide if group is positive or never collide if it's negative.
Zero means no group, and is default.
#### `int Fixture.CategoryBits`
Category of this fixture, from 16 possible categories encoded as 16-bit integer (1, 2, 4, 8, ... 32768). 65535 means all categories.
#### `int Fixture.MaskBits`
Mask of this fixture, encoded as 16-bit integer. Categories selected will collide with this fixture (ex: 5, means category 1 and 4 will collide). Default is 65535 - collide with all categories.
#### `bool Fixture.TestPoint(float x, float y)`
Returns true if a point is inside the shape of the fixture.
#### `bool Fixture.IsSensor`
Whether this fixture is a sensor. Sensors do not cause collision responses, but generate begin-contact and end-contact events.
### Joint
#### `JointDistance* Joint.AsDistance`
Expand Down
8 changes: 4 additions & 4 deletions agsbox2d/agsbox2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const char *ourScriptHeader =
" /// Usually a value between 0.0 and 1.0 to make objects bounce. \r\n"
" import attribute float Restitution; \r\n"
" \r\n"
" /// Returns Bodyif it's defined for this fixture, otherwise null. \r\n"
" /// Returns Body if it's defined for this fixture, otherwise null. \r\n"
" readonly import attribute Body* Body; \r\n"
" \r\n"
" /// Group the fixture belongs to, from -32768 to 32767. Fixtures with the same group will always collide if group is positive or never collide if it's negative. Zero means no group, and is default. \r\n"
Expand All @@ -250,7 +250,7 @@ const char *ourScriptHeader =
" /// Returns true if a point is inside the shape of the fixture. \r\n"
" import bool TestPoint(float x, float y); \r\n"
" \r\n"
" /// Wheter this fixture is a sensor. Sensors do not cause collision responses, but generate begin-contact and end-contact events. \r\n"
" /// Whether this fixture is a sensor. Sensors do not cause collision responses, but generate begin-contact and end-contact events. \r\n"
" import attribute bool IsSensor; \r\n"
" \r\n"
"}; \r\n"
Expand Down Expand Up @@ -518,7 +518,7 @@ void AGS_EditorProperties(HWND parent) //*** optional ***
// User has chosen to view the Properties of the plugin
// We could load up an options dialog or something here instead
MessageBox(parent,
L"agsbox2d v0.3.0 By eri0o",
L"agsbox2d v0.4.0 By eri0o",
L"About",
MB_OK | MB_ICONINFORMATION);

Expand Down Expand Up @@ -1890,7 +1890,7 @@ int AGS_EngineOnEvent(int event, int data) //*** optional ***
int screenWidth, screenHeight, colDepth;
engine->GetScreenDimensions(&screenWidth, &screenHeight, &colDepth);
debugDraw.InitializeAgsDebugDraw(engine, screenWidth, screenHeight, colDepth);
printf("\nagsbox2d 0.3.0\n");
printf("\nagsbox2d 0.4.0\n");
do_only_once = true;
}
}
Expand Down

0 comments on commit c4bbcbe

Please sign in to comment.