X Tutup
Skip to content
This repository was archived by the owner on Jan 4, 2023. It is now read-only.

Commit 078d7d4

Browse files
committed
Added support for Paint tool to load default color.png file from game folder, cleaned up more of the API Examples, and added a new example from Thatsmaik to the DemoScene Disk.
1 parent 3822fde commit 078d7d4

File tree

49 files changed

+886
-797
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+886
-797
lines changed

Build/Tasks/launch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let {run} = require('gulp-dotnet-cli');
44
gulp.task('build-pv8', ()=>{
55
return gulp.src(process.env.PROJECT, {read: false})
66
.pipe(run({
7-
additionalArgs: [process.env.DISKS + 'PixelVisionOS/', process.env.DISKS + 'TinyCard/'], //process.env.DISKS + 'APIExamples/'], // APIExamples ['-d', 'Disks/PixelVisionOS/', '-disk', 'Disks/APIExamples/']
7+
additionalArgs: [process.env.DISKS + 'PixelVisionOS/', process.env.DISKS + 'APIExamples/'], //process.env.DISKS + 'TinyCard/'], // APIExamples ['-d', 'Disks/PixelVisionOS/', '-disk', 'Disks/APIExamples/']
88
echo: true
99
}));
1010
});

Disks/APIExamples/DrawSpriteBlock/code.cs

Lines changed: 0 additions & 57 deletions
This file was deleted.

Disks/APIExamples/DrawSpriteBlock/code.lua

Lines changed: 0 additions & 39 deletions
This file was deleted.

Disks/APIExamples/DrawSpriteBlock/data.json

Lines changed: 0 additions & 60 deletions
This file was deleted.

Disks/APIExamples/DrawSpriteBlock/info.json

Lines changed: 0 additions & 10 deletions
This file was deleted.
-11.7 KB
Binary file not shown.

Disks/APIExamples/DrawText/code.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ public override void Draw()
3838
}
3939

4040
}
41-
}
41+
}

Disks/APIExamples/DrawTilemap/code.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Learn more about making Pixel Vision 8 games at
1111
https://www.pixelvision8.com/getting-started
1212
**/
1313

14-
using Microsoft.Xna.Framework;
1514
using PixelVision8.Player;
1615

1716
namespace PixelVision8.Examples
@@ -45,10 +44,10 @@ public override void Draw()
4544
Clear();
4645

4746
// Draw the actual tilemap starting below the top border and manually adjust the scroll offset values
48-
DrawTilemap(0, 16, 32, 28, pos.X, 16);
47+
DrawTilemap(0, 16, 33, 28, pos.X, 16);
4948

5049
// Draw the tilemap top border over everything else and lock the x scroll value
51-
DrawTilemap(0, 0, 32, 2, 0);
50+
DrawTilemap(0, 0, 33, 2, 0);
5251

5352
// Display the scroll position
5453
DrawText("Scroll Position: " + ScrollPosition().X + ", " + ScrollPosition().Y, 8, 16, DrawMode.Sprite,

Disks/APIExamples/DrawTilemap/code.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ function Draw()
3030
Clear()
3131

3232
-- Draw the actual tilemap starting below the top border and manually adjust the scroll offset values
33-
DrawTilemap(0, 16, 32, 28, nextPos, 16)
33+
DrawTilemap(0, 16, 33, 28, nextPos, 16)
3434

3535
-- Draw the tilemap top border over everything else and lock the x scroll value
36-
DrawTilemap(0, 0, 32, 2, 0)
36+
DrawTilemap(0, 0, 33, 2, 0)
3737

3838
-- Display the scroll position
3939
DrawText("Scroll Position: " .. ScrollPosition().x..", "..ScrollPosition().y, 8, 16, DrawMode.Sprite, "large")

Disks/APIExamples/Flag/code.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ Learn more about making Pixel Vision 8 games at
1111
https://www.pixelvision8.com/getting-started
1212
**/
1313

14-
using Microsoft.Xna.Framework;
14+
using System;
1515
using PixelVision8.Player;
16-
using PixelVision8.Engine.Utils;
1716

1817
namespace PixelVision8.Examples
1918
{
@@ -31,8 +30,8 @@ public override void Update(int timeDelta)
3130
tilePosition = MousePosition();
3231

3332
// Convert the mouse position to the tilemap's correct column and row
34-
tilePosition.X = MathUtil.FloorToInt(tilePosition.X / 8f);
35-
tilePosition.Y = MathUtil.FloorToInt(tilePosition.Y / 8f);
33+
tilePosition.X = (int)Math.Floor(tilePosition.X / 8f);
34+
tilePosition.Y = (int)Math.Floor(tilePosition.Y / 8f);
3635

3736
// Get the flag value of the current tile
3837
flagID = Flag(tilePosition.X, tilePosition.Y);

0 commit comments

Comments
 (0)
X Tutup