1
0
Fork 0

corrected a little bug in path (forgot to take the last point of the track + edited a bit maps for aesthetic reasons :D

This commit is contained in:
Sylvain PILLOT 2023-08-21 14:05:22 +02:00
parent 4dec9677ff
commit 9c38862507
4 changed files with 31 additions and 20 deletions

View File

@ -164,7 +164,7 @@
</properties>
<point/>
</object>
<object id="9" name="TRJ1" type="TRJ" x="251.967" y="164.12">
<object id="9" name="Chemin Crémier" type="TRJ" x="251.967" y="164.12">
<polyline points="0,0 -72.25,-18.5 -171.75,-19 -172.5,-99.25 -206.25,-122.75 -140.75,-114.75 -175.25,-97.5 -174.5,-33 -148.25,-20.5 -73.25,-20.25 39,-30.25 81.25,-45 79.25,-24.5"/>
</object>
</objectgroup>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="48" height="24" tilewidth="8" tileheight="8" infinite="0" nextlayerid="5" nextobjectid="2">
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="48" height="24" tilewidth="8" tileheight="8" infinite="0" nextlayerid="5" nextobjectid="4">
<tileset firstgid="1" source="tilesetnpp.tsx"/>
<tileset firstgid="409" source="Walkable.tsx"/>
<layer id="1" name="Background" width="48" height="24">
@ -97,5 +97,20 @@
</properties>
<point/>
</object>
<object id="2" name="Gardien" type="NPC" x="303.636" y="117.273">
<properties>
<property name="choices" value="&quot;_&quot;"/>
<property name="conclusion1" value="&quot;_&quot;"/>
<property name="conclusion2" value="&quot;_&quot;"/>
<property name="dialog" value="&quot;Salut, je suis la gardien du Tombeau&quot;"/>
<property name="hasPath" type="int" value="1"/>
<property name="isQuestion" type="int" value="0"/>
<property name="path" type="object" value="3"/>
</properties>
<point/>
</object>
<object id="3" name="Chemin Gardien" x="303.818" y="117.455">
<polyline points="0,0 -31.2727,-11.0909 -87.2727,-16.1818 -100.909,-6.72727 -100.182,28.9091 -72.3636,32.7273 -11.4546,37.8181 42.5455,42.5454 75.4546,22.9091 77.4545,1.45453 32.3636,-0.727273"/>
</object>
</objectgroup>
</map>

View File

@ -13,21 +13,21 @@
325,313,290,265,313,265,241,290,313,314,290,241,313,290,325,2,330,331,332,333,333,333,333,333,334,335,336,132,2,2,2,2,2,2,2,86,87,88,186,187,188,189,90,91,92,132,2,2,
349,2,2,2,2,2,2,2,2,2,2,2,2,2,349,2,162,163,164,162,163,164,165,162,163,164,165,132,2,297,298,299,300,2,2,110,111,112,210,211,212,213,114,115,116,133,2,2,
387,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,86,87,88,186,187,188,189,86,87,88,92,132,2,2,2,2,2,385,2,2,2,2,2,265,266,2,2,2,2,2,2,2,
2,2,258,259,260,261,261,262,263,264,2,21,22,23,24,2,110,111,112,210,211,212,213,110,111,112,116,133,386,241,241,313,241,313,266,265,266,266,265,289,290,2,160,161,385,2,2,387,
2,2,282,283,284,285,285,286,287,288,2,45,46,47,48,2,2,2,2,2,265,266,2,2,2,2,2,313,290,265,313,265,313,266,290,289,290,265,266,313,314,2,2,2,2,2,2,2,
2,2,306,307,308,309,309,310,311,312,131,69,70,71,72,2,266,265,266,266,265,386,160,161,2,386,2,265,265,266,241,2,258,259,260,261,261,262,263,264,2,2,2,2,2,2,2,2,
2,2,258,259,260,261,261,262,263,264,2,21,22,23,24,2,110,111,112,210,211,212,213,110,111,112,116,133,2,241,241,313,241,313,266,265,266,266,265,289,290,2,160,161,385,2,2,387,
2,2,282,283,284,285,285,286,287,288,2,45,46,47,48,2,2,2,2,2,265,266,2,2,2,2,2,2,2,265,313,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,306,307,308,309,309,310,311,312,131,69,70,71,72,2,2,2,2,2,265,386,160,161,2,386,2,2,2,266,241,2,258,259,260,261,261,262,263,264,2,2,2,2,2,2,2,2,
386,2,330,331,332,333,333,334,335,336,132,2,2,2,2,266,290,289,290,265,266,290,266,265,266,266,265,289,289,290,386,2,282,283,284,285,285,286,287,288,2,2,2,2,2,2,2,2,
2,2,162,163,165,162,163,163,165,165,132,2,313,290,265,313,265,2,2,2,2,2,290,289,290,265,266,313,313,314,241,2,306,307,308,309,309,310,311,312,131,2,2,2,2,2,2,2,
2,2,86,87,88,186,187,188,189,92,132,2,265,266,266,2,258,259,260,261,261,261,261,261,261,262,263,264,2,265,266,2,330,331,332,333,333,334,335,336,132,2,2,2,2,2,2,2,
2,2,110,111,112,210,211,212,213,116,133,2,289,290,2,2,282,283,284,285,285,285,285,285,285,286,287,288,2,289,290,2,162,163,164,162,163,164,165,165,132,2,2,297,298,299,300,2,
2,2,2,2,2,2,265,266,2,2,2,386,313,314,2,2,306,307,308,309,309,309,309,309,309,310,311,312,131,241,265,2,86,87,88,186,187,188,189,92,132,2,2,2,2,2,2,2,
2,2,2,386,2,2,289,290,160,161,2,2,265,266,2,2,330,331,332,333,333,333,333,333,333,334,335,336,132,266,266,2,110,111,112,210,211,212,213,116,133,2,2,2,2,2,386,2,
2,2,2,2,2,2,313,314,289,265,266,290,289,290,2,2,162,163,164,165,162,163,164,162,163,163,165,165,132,265,266,241,2,2,2,2,265,266,2,2,2,2,2,2,2,2,386,2,
265,266,266,265,386,313,265,266,265,266,313,314,313,314,266,2,86,87,88,90,90,87,88,186,187,188,189,92,132,289,289,290,266,265,266,266,289,290,2,160,161,2,21,22,23,24,2,2,
289,290,265,266,290,2,2,2,2,2,2,2,266,265,266,2,110,111,112,114,114,111,112,210,211,212,213,116,133,241,313,314,290,289,290,265,313,314,2,386,2,2,45,46,47,48,2,2,
2,2,162,163,165,162,163,163,165,165,132,2,2,290,265,313,2,2,2,2,2,2,2,2,2,2,2,2,2,314,241,2,306,307,308,309,309,310,311,312,131,2,2,2,2,2,2,2,
2,2,86,87,88,186,187,188,189,92,132,2,2,266,266,2,258,259,260,261,261,261,261,261,261,262,263,264,2,265,266,2,330,331,332,333,333,334,335,336,132,2,2,2,2,2,2,2,
2,2,110,111,112,210,211,212,213,116,133,2,2,290,2,2,282,283,284,285,285,285,285,285,285,286,287,288,2,289,290,2,162,163,164,162,163,164,165,165,132,2,2,297,298,299,300,2,
2,2,2,2,2,2,265,266,2,2,2,386,2,314,2,2,306,307,308,309,309,309,309,309,309,310,311,312,131,241,265,2,86,87,88,186,187,188,189,92,132,2,2,2,2,2,2,2,
2,2,2,386,2,2,289,290,160,161,2,2,2,266,2,2,330,331,332,333,333,333,333,333,333,334,335,336,132,266,266,2,110,111,112,210,211,212,213,116,133,2,2,2,2,2,386,2,
2,2,2,2,2,2,313,314,2,2,2,2,2,290,2,2,162,163,164,165,162,163,164,162,163,163,165,165,132,265,266,241,2,2,2,2,265,266,2,2,2,2,2,2,2,2,386,2,
265,266,266,265,386,313,265,266,265,266,313,314,313,314,2,2,86,87,88,90,90,87,88,186,187,188,189,92,132,289,289,290,266,265,266,266,289,290,2,160,161,2,21,22,23,24,2,2,
289,290,265,266,290,2,2,2,2,2,2,2,2,265,266,2,110,111,112,114,114,111,112,210,211,212,213,116,133,2,2,2,2,2,2,2,2,2,2,386,2,2,45,46,47,48,2,2,
2,2,2,2,2,2,2,2,2,386,2,2,2,265,266,2,2,2,2,2,2,2,2,2,265,266,2,2,2,2,345,346,347,348,2,339,340,2,2,2,2,2,69,70,71,72,2,2,
2,297,298,299,300,2,2,339,340,2,2,2,2,289,290,266,265,266,266,265,386,265,266,266,289,290,2,160,161,2,369,370,371,372,2,363,364,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,386,2,2,363,364,2,2,2,2,313,314,290,289,290,265,266,290,289,290,265,313,314,2,2,385,2,393,394,395,396,2,2,2,2,2,2,2,387,2,2,2,386,2,2
2,2,2,2,386,2,2,363,364,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,385,2,393,394,395,396,2,2,2,2,2,2,2,387,2,2,2,386,2,2
</data>
</layer>
<layer id="2" name="Foreground" width="48" height="24">

View File

@ -34,7 +34,7 @@ void npc_draw(Game *game) {
/* to be followed by the NPC when this will be implemented */
if (Data->hasPath==1) /* this NPC has a trajectory */
{
int NbPoints = Data->path_length;
int NbPoints = Data->path_length+1;
for(int v=0; v<NbPoints; v++)
{
@ -47,12 +47,8 @@ void npc_draw(Game *game) {
dline( player->px + deltaX1, player->py + deltaY1,
player->px + deltaX2, player->py + deltaY2,
PATH_COLOR);
PATH_COLOR);
}
}
int16_t deltaX=((int16_t) (Data->x * PXSIZE))-(int16_t) player->wx;