Git Product home page Git Product logo

png2px2's Introduction

PNG2PX2.c / PX22PNG.c

Version 0.1a

PNG2PX2 for Windows

このプログラムは、pngファイルからX68000用スプライトエディタ「ぴくせる君」向けスプライト・パターンデータ「PX2」ファイルに変換するものです。使っていた人は少ないと思いますので解説しますと、

PX2ファイルは基本的に、パターンデータとパレットデータが結合されたものです。構造体で表すと下記のようになります。

// PX2ファイル構造体
typedef struct
{
	unsigned short atr[256];	// ツール用アトリビュート
	unsigned short pal[256];	// X68Kパレット
	unsigned char  sprpat[0x8000];	// X68Kスプライトパターン
} PX2FILE, * pPX2FILE;

ビルドに必要なもの

Visual Studio 2022と、zlib、libpngを用意してください。

使用法

png2px2 [オプション] filename[.png]

オプション

-p PX2ファイルの代わりに、X68000用スプライトパターン256個(PAT)、256色分のパレット(PAL)のベタファイルを書きだします。

注意

  • pngファイルのフォーマットはインデックスカラー(256色)、横256ピクセル、縦256ピクセル決め打ちです。 EDGEなどのドット絵ツールを使って作成すると良いでしょう。

  • X68000のスプライトは1枚につき16色(透明色+15色)です。 EDGEのパレット横1ライン16色が、スプライトのパレットとして使えます。全部で16本のパレットがあります。

  • 先頭の16色パレットはテキスト画面と共用となりますので注意してください。

PX22PNG for Windows

このプログラムは、X68000用スプライトエディタ「ぴくせる君」向けスプライト・パターンデータ「PX2」ファイルから、インデックスカラーフォーマットのPNGファイルに変換するものです。

使用法

px22png filename[.px2]

更新履歴

  • Ver0.1a - gccでpngctrl.c のコンパイルが通るように修正しました。

おまけ

PXLOOK.R

X68000環境で使うPX2ファイルビューアーです。

waru.PX2

X68000用「ぴくせる君」サンプルデータです。

waru.png

waru.PX2 をPNGに変換したデータです。


By Pirota

png2px2's People

Contributors

marukun318 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.