Compare commits
No commits in common. "73d9c4da1e5c536b48a56b5e8153e1f2877da695" and "fb1246e38e08fda9dccb19a3bcedea9997aa5a2a" have entirely different histories.
73d9c4da1e
...
fb1246e38e
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
|||||||
[submodule "tools/sillyimage"]
|
|
||||||
path = tools/sillyimage
|
|
||||||
url = https://git.sillysagiri.moe/sillysagiri/sillyimage.git
|
|
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -1,9 +1,6 @@
|
|||||||
{
|
{
|
||||||
"java.project.referencedLibraries": [
|
"java.project.referencedLibraries": [
|
||||||
"/home/sillysagiri/Documents/wtk/lib/midpapi20.jar",
|
"vendor/**/*.jar",
|
||||||
"/home/sillysagiri/Documents/wtk/lib/cldcapi11.jar",
|
|
||||||
"/home/sillysagiri/Documents/wtk/lib/midpapi20.jar",
|
|
||||||
"/home/sillysagiri/Documents/wtk/lib/mmapi.jar",
|
|
||||||
"library/tinygzip/tinylinegzip.jar"
|
"library/tinygzip/tinylinegzip.jar"
|
||||||
],
|
],
|
||||||
"java.project.sourcePaths": [
|
"java.project.sourcePaths": [
|
||||||
|
BIN
assets/silly/bmf/nds12_0.png
Normal file
BIN
assets/silly/bmf/nds12_0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/silly/bmf/nds12_0.silly
Normal file
BIN
assets/silly/bmf/nds12_0.silly
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/silly/bmf/onds12_0.png
Normal file
BIN
assets/silly/bmf/onds12_0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
@ -1,548 +0,0 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<!--NewPage-->
|
|
||||||
<html>
|
|
||||||
<head><!-- is_embed=True -->
|
|
||||||
<script type="text/javascript" src="/_static/js/bundle-playback.js?v=krFivnjJ" charset="utf-8"></script>
|
|
||||||
<script type="text/javascript" src="/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script>
|
|
||||||
<script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script>
|
|
||||||
<script type="text/javascript" src="/_static/js/ruffle/ruffle.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
__wm.init("https://web.archive.org/web");
|
|
||||||
__wm.wombat("http://www.tinyline.com:80/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html","20110918212711","https://web.archive.org/","web","/_static/",
|
|
||||||
"1316381231");
|
|
||||||
</script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=S1zqJCYt" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=3PDvdIFv" />
|
|
||||||
<!-- End Wayback Rewrite JS Include -->
|
|
||||||
|
|
||||||
<!-- Generated by javadoc (build 1.4.2_03) on Sat Mar 05 16:30:02 PST 2005 -->
|
|
||||||
<title>
|
|
||||||
GZIPInputStream (TinyLine Utils v1.8.2 API Specification)
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<meta name="keywords" content="com.tinyline.util.GZIPInputStream class">
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="/web/20110918212711cs_/http://www.tinyline.com/utils/tinylinegzip/docs/stylesheet.css" title="Style">
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
parent.document.title="GZIPInputStream (TinyLine Utils v1.8.2 API Specification)";
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body bgcolor="white" onload="windowTitle();">
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
||||||
<a name="navbar_top"><!-- --></a>
|
|
||||||
<a href="#skip-navbar_top" title="Skip navigation links"></a>
|
|
||||||
<table border="0" width="100%" cellpadding="1" cellspacing="0" summary="">
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" bgcolor="#EEEEFF" class="NavBarCell1">
|
|
||||||
<a name="navbar_top_firstrow"><!-- --></a>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="3" summary="">
|
|
||||||
<tr align="center" valign="top">
|
|
||||||
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="package-summary.html"><font class="NavBarFont1"><b>Package</b></font></a> </td>
|
|
||||||
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> <font class="NavBarFont1Rev"><b>Class</b></font> </td>
|
|
||||||
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="package-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a> </td>
|
|
||||||
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/deprecated-list.html"><font class="NavBarFont1"><b>Deprecated</b></font></a> </td>
|
|
||||||
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="top" rowspan="3"><em>
|
|
||||||
<b>TinyLine Utils </b><br><font size="-1">v1.8.2 </font></em>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="white" class="NavBarCell2"><font size="-2">
|
|
||||||
PREV CLASS
|
|
||||||
NEXT CLASS</font></td>
|
|
||||||
<td bgcolor="white" class="NavBarCell2"><font size="-2">
|
|
||||||
<a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/index.html" target="_top"><b>FRAMES</b></a>
|
|
||||||
<a href="GZIPInputStream.html" target="_top"><b>NO FRAMES</b></a>
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
||||||
}
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
<noscript>
|
|
||||||
<a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/allclasses-noframe.html"><b>All Classes</b></a>
|
|
||||||
</noscript>
|
|
||||||
|
|
||||||
</font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign="top" class="NavBarCell3"><font size="-2">
|
|
||||||
SUMMARY: NESTED | FIELD | <a href="#constructor_summary">CONSTR</a> | <a href="#method_summary">METHOD</a></font></td>
|
|
||||||
<td valign="top" class="NavBarCell3"><font size="-2">
|
|
||||||
DETAIL: FIELD | <a href="#constructor_detail">CONSTR</a> | <a href="#method_detail">METHOD</a></font></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<a name="skip-navbar_top"></a>
|
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<!-- ======== START OF CLASS DATA ======== -->
|
|
||||||
<h2>
|
|
||||||
<font size="-1">
|
|
||||||
com.tinyline.util</font>
|
|
||||||
<br>
|
|
||||||
Class GZIPInputStream</h2>
|
|
||||||
<pre>
|
|
||||||
java.lang.Object
|
|
||||||
<img src="/web/20110918212711im_/http://www.tinyline.com/utils/tinylinegzip/docs/resources/inherit.gif" alt="extended by">java.io.InputStream
|
|
||||||
<img src="/web/20110918212711im_/http://www.tinyline.com/utils/tinylinegzip/docs/resources/inherit.gif" alt="extended by"><b>com.tinyline.util.GZIPInputStream</b>
|
|
||||||
</pre>
|
|
||||||
<hr>
|
|
||||||
<dl>
|
|
||||||
<dt>public class <b>GZIPInputStream</b><dt>extends java.io.InputStream</dl>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This class implements a stream filter for reading compressed data in the GZIP format.
|
|
||||||
The "GZIP" format is described in RFC 1952
|
|
||||||
<p>
|
|
||||||
version 1.8.2
|
|
||||||
<p>
|
|
||||||
Copyright (c) 2002-2005 TinyLine. All Rights Reserved.
|
|
||||||
<p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- =========== FIELD SUMMARY =========== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
||||||
|
|
||||||
<a name="constructor_summary"><!-- --></a>
|
|
||||||
<table border="1" width="100%" cellpadding="3" cellspacing="0" summary="">
|
|
||||||
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
|
|
||||||
<td colspan="2"><font size="+2">
|
|
||||||
<b>Constructor Summary</b></font></td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#GZIPInputStream(java.io.InputStream)">GZIPInputStream</a></b>(java.io.InputStream in)</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Creates a new input stream with a default buffer size.</td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#GZIPInputStream(java.io.InputStream, int)">GZIPInputStream</a></b>(java.io.InputStream inputstream,
|
|
||||||
int size)</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Creates a new input stream with the specified buffer size.</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<!-- ========== METHOD SUMMARY =========== -->
|
|
||||||
|
|
||||||
<a name="method_summary"><!-- --></a>
|
|
||||||
<table border="1" width="100%" cellpadding="3" cellspacing="0" summary="">
|
|
||||||
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
|
|
||||||
<td colspan="2"><font size="+2">
|
|
||||||
<b>Method Summary</b></font></td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td align="right" valign="top" width="1%"><font size="-1">
|
|
||||||
<code> int</code></font></td>
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#available()">available</a></b>()</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Returns the number of bytes that can be read from this input
|
|
||||||
stream without blocking.</td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td align="right" valign="top" width="1%"><font size="-1">
|
|
||||||
<code> void</code></font></td>
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#close()">close</a></b>()</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Closes the input stream.</td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td align="right" valign="top" width="1%"><font size="-1">
|
|
||||||
<code> void</code></font></td>
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#mark(int)">mark</a></b>(int readlimit)</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Marks the current position in this input stream.</td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td align="right" valign="top" width="1%"><font size="-1">
|
|
||||||
<code> boolean</code></font></td>
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#markSupported()">markSupported</a></b>()</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Tests if this input stream supports the <code>mark</code></td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td align="right" valign="top" width="1%"><font size="-1">
|
|
||||||
<code> int</code></font></td>
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#read()">read</a></b>()</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Reads a byte of uncompressed data.</td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td align="right" valign="top" width="1%"><font size="-1">
|
|
||||||
<code> int</code></font></td>
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#read(byte[])">read</a></b>(byte[] b)</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Reads uncompressed data into an array of bytes.</td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td align="right" valign="top" width="1%"><font size="-1">
|
|
||||||
<code> int</code></font></td>
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#read(byte[], int, int)">read</a></b>(byte[] buffer,
|
|
||||||
int offset,
|
|
||||||
int length)</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Reads uncompressed data into an array of bytes.</td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td align="right" valign="top" width="1%"><font size="-1">
|
|
||||||
<code> void</code></font></td>
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#reset()">reset</a></b>()</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Repositions this stream to the position at the time the
|
|
||||||
<code>mark</code> method was last called on this input stream.</td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td align="right" valign="top" width="1%"><font size="-1">
|
|
||||||
<code> long</code></font></td>
|
|
||||||
<td><code><b><a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/com/tinyline/util/GZIPInputStream.html#skip(long)">skip</a></b>(long n)</code>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
Skips specified number of bytes of uncompressed data.</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<a name="methods_inherited_from_class_java.lang.Object"><!-- --></a>
|
|
||||||
<table border="1" width="100%" cellpadding="3" cellspacing="0" summary="">
|
|
||||||
<tr bgcolor="#EEEEFF" class="TableSubHeadingColor">
|
|
||||||
<td><b>Methods inherited from class java.lang.Object</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="white" class="TableRowColor">
|
|
||||||
<td><code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
|
|
||||||
<!-- ============ FIELD DETAIL =========== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
||||||
|
|
||||||
<a name="constructor_detail"><!-- --></a>
|
|
||||||
<table border="1" width="100%" cellpadding="3" cellspacing="0" summary="">
|
|
||||||
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
|
|
||||||
<td colspan="1"><font size="+2">
|
|
||||||
<b>Constructor Detail</b></font></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a name="GZIPInputStream(java.io.InputStream, int)"><!-- --></a><h3>
|
|
||||||
GZIPInputStream</h3>
|
|
||||||
<pre>
|
|
||||||
public <b>GZIPInputStream</b>(java.io.InputStream inputstream,
|
|
||||||
int size)
|
|
||||||
throws java.io.IOException</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Creates a new input stream with the specified buffer size.
|
|
||||||
<p>
|
|
||||||
<dt><b>Parameters:</b><dd><code>size</code> - the input buffer size
|
|
||||||
<dt><b>Throws:</b>
|
|
||||||
<dd><code>java.io.IOException</code> - if an I/O error has occurred</dl>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<a name="GZIPInputStream(java.io.InputStream)"><!-- --></a><h3>
|
|
||||||
GZIPInputStream</h3>
|
|
||||||
<pre>
|
|
||||||
public <b>GZIPInputStream</b>(java.io.InputStream in)
|
|
||||||
throws java.io.IOException</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Creates a new input stream with a default buffer size.
|
|
||||||
<p>
|
|
||||||
<dt><b>Parameters:</b><dd><code>in</code> - the input stream
|
|
||||||
<dt><b>Throws:</b>
|
|
||||||
<dd><code>java.io.IOException</code> - if an I/O error has occurred</dl>
|
|
||||||
|
|
||||||
<!-- ============ METHOD DETAIL ========== -->
|
|
||||||
|
|
||||||
<a name="method_detail"><!-- --></a>
|
|
||||||
<table border="1" width="100%" cellpadding="3" cellspacing="0" summary="">
|
|
||||||
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
|
|
||||||
<td colspan="1"><font size="+2">
|
|
||||||
<b>Method Detail</b></font></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<a name="read(byte[], int, int)"><!-- --></a><h3>
|
|
||||||
read</h3>
|
|
||||||
<pre>
|
|
||||||
public int <b>read</b>(byte[] buffer,
|
|
||||||
int offset,
|
|
||||||
int length)
|
|
||||||
throws java.io.IOException</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Reads uncompressed data into an array of bytes. Blocks until enough
|
|
||||||
input is available for decompression.
|
|
||||||
<p>
|
|
||||||
<dd><dl>
|
|
||||||
<dt><b>Parameters:</b><dd><code>buffer</code> - the buffer into which the data is read<dd><code>offset</code> - the start offset of the data<dd><code>length</code> - the maximum number of bytes read
|
|
||||||
<dt><b>Returns:</b><dd>the actual number of bytes read, or -1 if the end of the
|
|
||||||
compressed input stream is reached
|
|
||||||
<dt><b>Throws:</b>
|
|
||||||
<dd><code>java.io.IOException</code> - if an I/O error has occurred or the compressed
|
|
||||||
input data is corrupt</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<a name="read()"><!-- --></a><h3>
|
|
||||||
read</h3>
|
|
||||||
<pre>
|
|
||||||
public int <b>read</b>()
|
|
||||||
throws java.io.IOException</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Reads a byte of uncompressed data. This method will block until
|
|
||||||
enough input is available for decompression.
|
|
||||||
<p>
|
|
||||||
<dd><dl>
|
|
||||||
|
|
||||||
<dt><b>Returns:</b><dd>the byte read, or -1 if end of compressed input is reached
|
|
||||||
<dt><b>Throws:</b>
|
|
||||||
<dd><code>java.io.IOException</code> - if an I/O error has occurred</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<a name="read(byte[])"><!-- --></a><h3>
|
|
||||||
read</h3>
|
|
||||||
<pre>
|
|
||||||
public int <b>read</b>(byte[] b)
|
|
||||||
throws java.io.IOException</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Reads uncompressed data into an array of bytes. This method will
|
|
||||||
block until some input can be decompressed.
|
|
||||||
<p>
|
|
||||||
<dd><dl>
|
|
||||||
<dt><b>Parameters:</b><dd><code>b</code> - the buffer into which the data is read
|
|
||||||
<dt><b>Returns:</b><dd>the total number of bytes read into the buffer, or
|
|
||||||
<code>-1</code> if there is no more data because the end of
|
|
||||||
the stream has been reached.
|
|
||||||
<dt><b>Throws:</b>
|
|
||||||
<dd><code>java.io.IOException</code> - if an I/O error occurs.</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<a name="close()"><!-- --></a><h3>
|
|
||||||
close</h3>
|
|
||||||
<pre>
|
|
||||||
public void <b>close</b>()
|
|
||||||
throws java.io.IOException</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Closes the input stream.
|
|
||||||
<p>
|
|
||||||
<dd><dl>
|
|
||||||
|
|
||||||
<dt><b>Throws:</b>
|
|
||||||
<dd><code>java.io.IOException</code> - if an I/O error has occurred</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<a name="skip(long)"><!-- --></a><h3>
|
|
||||||
skip</h3>
|
|
||||||
<pre>
|
|
||||||
public long <b>skip</b>(long n)
|
|
||||||
throws java.io.IOException</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Skips specified number of bytes of uncompressed data.
|
|
||||||
<p>
|
|
||||||
<dd><dl>
|
|
||||||
<dt><b>Parameters:</b><dd><code>n</code> - the number of bytes to skip.
|
|
||||||
<dt><b>Returns:</b><dd>the actual number of bytes skipped.
|
|
||||||
<dt><b>Throws:</b>
|
|
||||||
<dd><code>java.io.IOException</code> - if an I/O error has occurred</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<a name="available()"><!-- --></a><h3>
|
|
||||||
available</h3>
|
|
||||||
<pre>
|
|
||||||
public int <b>available</b>()
|
|
||||||
throws java.io.IOException</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Returns the number of bytes that can be read from this input
|
|
||||||
stream without blocking.
|
|
||||||
<p>
|
|
||||||
<dd><dl>
|
|
||||||
|
|
||||||
<dt><b>Returns:</b><dd>the number of bytes that can be read from the input stream
|
|
||||||
without blocking.
|
|
||||||
<dt><b>Throws:</b>
|
|
||||||
<dd><code>java.io.IOException</code> - if an I/O error occurs.</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<a name="mark(int)"><!-- --></a><h3>
|
|
||||||
mark</h3>
|
|
||||||
<pre>
|
|
||||||
public void <b>mark</b>(int readlimit)</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Marks the current position in this input stream. A subsequent
|
|
||||||
call to the <code>reset</code> method repositions this stream at
|
|
||||||
the last marked position so that subsequent reads re-read the same bytes.
|
|
||||||
<p>
|
|
||||||
The <code>readlimit</code> argument tells this input stream to
|
|
||||||
allow that many bytes to be read before the mark position gets
|
|
||||||
invalidated.
|
|
||||||
<p>
|
|
||||||
<p>
|
|
||||||
<dd><dl>
|
|
||||||
<dt><b>Parameters:</b><dd><code>readlimit</code> - the maximum limit of bytes that can be read before
|
|
||||||
the mark position becomes invalid.</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<a name="reset()"><!-- --></a><h3>
|
|
||||||
reset</h3>
|
|
||||||
<pre>
|
|
||||||
public void <b>reset</b>()
|
|
||||||
throws java.io.IOException</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Repositions this stream to the position at the time the
|
|
||||||
<code>mark</code> method was last called on this input stream.
|
|
||||||
<p>
|
|
||||||
Stream marks are intended to be used in
|
|
||||||
situations where you need to read ahead a little to see what's in
|
|
||||||
the stream. Often this is most easily done by invoking some
|
|
||||||
general parser. If the stream is of the type handled by the
|
|
||||||
parse, it just chugs along happily. If the stream is not of
|
|
||||||
that type, the parser should toss an exception when it fails.
|
|
||||||
If this happens within readlimit bytes, it allows the outer
|
|
||||||
code to reset the stream and try another parser.
|
|
||||||
<p>
|
|
||||||
<dd><dl>
|
|
||||||
|
|
||||||
<dt><b>Throws:</b>
|
|
||||||
<dd><code>java.io.IOException</code> - if the stream has not been marked or if the
|
|
||||||
mark has been invalidated.</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<a name="markSupported()"><!-- --></a><h3>
|
|
||||||
markSupported</h3>
|
|
||||||
<pre>
|
|
||||||
public boolean <b>markSupported</b>()</pre>
|
|
||||||
<dl>
|
|
||||||
<dd>Tests if this input stream supports the <code>mark</code>
|
|
||||||
<p>
|
|
||||||
<dd><dl>
|
|
||||||
|
|
||||||
<dt><b>Returns:</b><dd><code>true</code> if this stream type supports the
|
|
||||||
<code>mark</code> and <code>reset</code> method;
|
|
||||||
<code>false</code> otherwise.</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<!-- ========= END OF CLASS DATA ========= -->
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
||||||
<a name="navbar_bottom"><!-- --></a>
|
|
||||||
<a href="#skip-navbar_bottom" title="Skip navigation links"></a>
|
|
||||||
<table border="0" width="100%" cellpadding="1" cellspacing="0" summary="">
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" bgcolor="#EEEEFF" class="NavBarCell1">
|
|
||||||
<a name="navbar_bottom_firstrow"><!-- --></a>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="3" summary="">
|
|
||||||
<tr align="center" valign="top">
|
|
||||||
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="package-summary.html"><font class="NavBarFont1"><b>Package</b></font></a> </td>
|
|
||||||
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> <font class="NavBarFont1Rev"><b>Class</b></font> </td>
|
|
||||||
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="package-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a> </td>
|
|
||||||
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/deprecated-list.html"><font class="NavBarFont1"><b>Deprecated</b></font></a> </td>
|
|
||||||
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td align="right" valign="top" rowspan="3"><em>
|
|
||||||
<b>TinyLine Utils </b><br><font size="-1">v1.8.2 </font></em>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="white" class="NavBarCell2"><font size="-2">
|
|
||||||
PREV CLASS
|
|
||||||
NEXT CLASS</font></td>
|
|
||||||
<td bgcolor="white" class="NavBarCell2"><font size="-2">
|
|
||||||
<a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/index.html" target="_top"><b>FRAMES</b></a>
|
|
||||||
<a href="GZIPInputStream.html" target="_top"><b>NO FRAMES</b></a>
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
||||||
}
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
<noscript>
|
|
||||||
<a href="/web/20110918212711/http://www.tinyline.com/utils/tinylinegzip/docs/allclasses-noframe.html"><b>All Classes</b></a>
|
|
||||||
</noscript>
|
|
||||||
|
|
||||||
</font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign="top" class="NavBarCell3"><font size="-2">
|
|
||||||
SUMMARY: NESTED | FIELD | <a href="#constructor_summary">CONSTR</a> | <a href="#method_summary">METHOD</a></font></td>
|
|
||||||
<td valign="top" class="NavBarCell3"><font size="-2">
|
|
||||||
DETAIL: FIELD | <a href="#constructor_detail">CONSTR</a> | <a href="#method_detail">METHOD</a></font></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<a name="skip-navbar_bottom"></a>
|
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Copyright (C) 2002-2005 TinyLine. All Rights Reserved.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<!-- text below generated by server. PLEASE REMOVE --><!-- Counter/Statistics data collection code --><script language="JavaScript" src="https://web.archive.org/web/20110918212711js_/http://l.yimg.com/d/lib/smb/js/hosting/cp/js_source/whv2_001.js"></script><script language="javascript">geovisit();</script><noscript><img src="https://web.archive.org/web/20110918212711im_/http://visit.webhosting.yahoo.com/visit.gif?us1316381231" alt="setstats" border="0" width="1" height="1"></noscript><!--
|
|
||||||
FILE ARCHIVED ON 21:27:11 Sep 18, 2011 AND RETRIEVED FROM THE
|
|
||||||
INTERNET ARCHIVE ON 16:01:03 Oct 16, 2024.
|
|
||||||
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
|
|
||||||
|
|
||||||
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
|
|
||||||
SECTION 108(a)(3)).
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
playback timings (ms):
|
|
||||||
captures_list: 0.596
|
|
||||||
exclusion.robots: 0.022
|
|
||||||
exclusion.robots.policy: 0.011
|
|
||||||
esindex: 0.012
|
|
||||||
cdx.remote: 21.366
|
|
||||||
LoadShardBlock: 25.054 (3)
|
|
||||||
PetaboxLoader3.datanode: 41.989 (4)
|
|
||||||
load_resource: 49.507
|
|
||||||
PetaboxLoader3.resolve: 28.922
|
|
||||||
-->
|
|
@ -1,92 +0,0 @@
|
|||||||
============================================================================
|
|
||||||
TINYLINE GZIPInputStream 1.8.2
|
|
||||||
============================================================================
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
|
||||||
OVERVIEW
|
|
||||||
|
|
||||||
TinyLine GZIPInputStream is a pure J2ME implementation of the
|
|
||||||
java.util.zip.GZIPInputStream class that uses the same Java API as in
|
|
||||||
Java 1.1 or Java 1.4.1.
|
|
||||||
The size of the com.tinyline.util.GZIPInputStream in the
|
|
||||||
JAR format is about 6K. It is developed as a part of TinyLine SVG
|
|
||||||
Toolkit.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
|
||||||
CHANGES
|
|
||||||
|
|
||||||
The following changes have been made since the version 1.8 of
|
|
||||||
the TINYLINE GZIPInputStream
|
|
||||||
|
|
||||||
1. The skip() bug was fixed. The skip() was restricted to 2048 bytes.
|
|
||||||
Now it is conformed to the java.util.zip.GZIPInputStream
|
|
||||||
implementation.
|
|
||||||
|
|
||||||
The following changes have been made since the version 1.4 of
|
|
||||||
the TINYLINE GZIPInputStream
|
|
||||||
|
|
||||||
1. In order to be compartible with the NTT MIDP DoJa platform
|
|
||||||
the java.lang.IllegalStateException was replaced with the
|
|
||||||
java.io.IOException.
|
|
||||||
|
|
||||||
2. The big files bug is fixed.
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
|
||||||
CONTENTS
|
|
||||||
|
|
||||||
bin This directory containes the demo application files:
|
|
||||||
tinylinegzip.jad and tinylinegzip.jar
|
|
||||||
|
|
||||||
docs This directory containes the JavaDoc files generated for
|
|
||||||
the com.tinyline.util.GZIPInputStream class
|
|
||||||
|
|
||||||
lib This directory containes com.tinyline.util.GZIPInputStream
|
|
||||||
class (tinylinegzip.zip).
|
|
||||||
DO NOT UNZIP THIS FILE! It must remain zipped for the
|
|
||||||
compiler and interpreter to access the class files
|
|
||||||
within it properly.
|
|
||||||
|
|
||||||
src This directory containes sources of the GZIPInputStream demo
|
|
||||||
sample.
|
|
||||||
|
|
||||||
|
|
||||||
README.TXT This file you are currently reading
|
|
||||||
|
|
||||||
TINYLINE_LICENSE.TXT
|
|
||||||
License agreement for the TinyLine GZIPInputStream
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
|
||||||
HOW TO INSTALL?
|
|
||||||
|
|
||||||
[1] You need to have J2ME™ Wireless Toolkit 1.04 (or later) installed
|
|
||||||
[2] Unzip the tinylinegzip.zip under the WTK104\apps directory.
|
|
||||||
So the result directory structure should be :
|
|
||||||
WTK104\apps\tinylinegzip\
|
|
||||||
bin\
|
|
||||||
classes\
|
|
||||||
docs\
|
|
||||||
lib\
|
|
||||||
src\
|
|
||||||
tmpclasses\
|
|
||||||
tmplib\
|
|
||||||
README.TXT
|
|
||||||
TINYLINE_LICENSE.TXT
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
|
||||||
HOW TO RUN THE SAMPLES?
|
|
||||||
|
|
||||||
You can run the sample or
|
|
||||||
[1] Install and run the JAD and JAR files from the bin
|
|
||||||
directory on your device or emulator
|
|
||||||
OR
|
|
||||||
[2] Open the tinylinegzip project from KToolbar (J2ME™ Wireless Toolkit)
|
|
||||||
and run the project.
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
|
||||||
MORE INFO
|
|
||||||
|
|
||||||
For more information on the TinyLine,
|
|
||||||
please see <http://www.tinyline.com/>.
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 11 KiB |
@ -7,8 +7,6 @@ import javax.microedition.lcdui.Graphics;
|
|||||||
import javax.microedition.lcdui.Image;
|
import javax.microedition.lcdui.Image;
|
||||||
import javax.microedition.lcdui.game.Sprite;
|
import javax.microedition.lcdui.game.Sprite;
|
||||||
|
|
||||||
import com.tinyline.util.GZIPInputStream;
|
|
||||||
|
|
||||||
import sillysagiri.scene.DeathError;
|
import sillysagiri.scene.DeathError;
|
||||||
|
|
||||||
public class BMF {
|
public class BMF {
|
||||||
@ -31,33 +29,21 @@ public class BMF {
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final BMF Create(String path_sillyimg, String path_fnt, int tint) throws Exception
|
public static final BMF Create(String path_img, String path_fnt) throws Exception
|
||||||
{
|
{
|
||||||
BMF bmf = new BMF();
|
BMF bmf = new BMF();
|
||||||
// InputStream in = bmf.getClass().getResourceAsStream(path_sillyimg);
|
bmf.img = Image.createImage(path_img);
|
||||||
GZIPInputStream in = new GZIPInputStream(bmf.getClass().getResourceAsStream(path_sillyimg));
|
|
||||||
|
|
||||||
// read header
|
|
||||||
byte[] temp = new byte[4];
|
|
||||||
in.read(temp, 0, 4);
|
|
||||||
|
|
||||||
int w = ((temp[1] << 8 | temp[0])) & 0xFF;
|
|
||||||
int h = ((temp[3] << 8 | temp[2])) & 0xFF;
|
|
||||||
int[] buffer = new int[w*h];
|
|
||||||
|
|
||||||
for (int i=0; true; i++)
|
|
||||||
{
|
|
||||||
int read = in.read(temp, 0, 2);
|
|
||||||
if (read == -1) break;
|
|
||||||
|
|
||||||
int rgb = Utils.ARGB15to255((char)((temp[1] << 8) | (temp[0] & 0xff)));
|
|
||||||
if (rgb == 0xFFFFFFFF) buffer[i] = tint;
|
|
||||||
else buffer[i] = rgb;
|
|
||||||
}
|
|
||||||
|
|
||||||
bmf.img = Image.createRGBImage(buffer, w, h, true);
|
|
||||||
bmf.Parse_fnt(path_fnt);
|
bmf.Parse_fnt(path_fnt);
|
||||||
in.close();
|
|
||||||
|
return bmf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final BMF Create(Image img, String path_fnt) throws Exception
|
||||||
|
{
|
||||||
|
BMF bmf = new BMF();
|
||||||
|
bmf.img = img;
|
||||||
|
bmf.Parse_fnt(path_fnt);
|
||||||
|
|
||||||
return bmf;
|
return bmf;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,6 +148,76 @@ public class BMF {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* this is cpu intensive process
|
||||||
|
* consider creating new BMF for each color instead
|
||||||
|
*
|
||||||
|
* limitation:
|
||||||
|
* currently can only be used once
|
||||||
|
* since its replacing white pixel with tinted color
|
||||||
|
*/
|
||||||
|
public void SetColor(int rgb)
|
||||||
|
{
|
||||||
|
// int[] buffer = new int[img.getWidth()*img.getHeight()];
|
||||||
|
// img.getRGB(buffer, 0, img.getWidth(), 0, 0, img.getWidth(), img.getHeight());
|
||||||
|
|
||||||
|
// for (int i=0; i<buffer.length; i++)
|
||||||
|
// {
|
||||||
|
// if (buffer[i] == 0xFF000000) buffer[i] = rgb;
|
||||||
|
// else buffer[i] = 0x00000000;
|
||||||
|
// }
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// ByteArrayOutputStream out = new ByteArrayOutputStream(128*64);
|
||||||
|
// Gzip.gunzip(this.getClass().getResourceAsStream("/silly/bmf/nds12_0.silly.gz"), out);
|
||||||
|
|
||||||
|
// GZIPInputStream in = new GZIPInputStream(this.getClass().getResourceAsStream("/silly/bmf/nds12_0.silly.gz"));
|
||||||
|
|
||||||
|
InputStream in = this.getClass().getResourceAsStream("/silly/bmf/nds12_0.silly");
|
||||||
|
int[] buffer = new int[128*64];
|
||||||
|
|
||||||
|
// read header
|
||||||
|
byte[] size = new byte[4];
|
||||||
|
in.read(size, 0, 4);
|
||||||
|
int pointer = 0;
|
||||||
|
while(true)
|
||||||
|
{
|
||||||
|
byte[] temp = new byte[2];
|
||||||
|
int res = in.read(temp, 0, 2);
|
||||||
|
if (res == -1) break;
|
||||||
|
|
||||||
|
char i = (char)((temp[1] << 8) | temp[0]);
|
||||||
|
|
||||||
|
// Extract 5-bit ABGR;
|
||||||
|
char alpha = (char)((i >> 15) & 0x01);
|
||||||
|
char blue = (char)((i >> 10) & 0x1F);
|
||||||
|
char green = (char)((i >> 5) & 0x1F);
|
||||||
|
char red = (char)(i & 0x1F);
|
||||||
|
|
||||||
|
// Scale the 5-bit values to 8-bit
|
||||||
|
if (alpha == 1) alpha = 255;
|
||||||
|
else alpha = 0;
|
||||||
|
|
||||||
|
red = (char)((red << 3) | 0x07);
|
||||||
|
blue = (char)((green << 3) | 0x07);
|
||||||
|
green = (char)((blue << 3) | 0x07);
|
||||||
|
|
||||||
|
// Combine into 24-bit value AARRGGBB
|
||||||
|
buffer[pointer] = (alpha << 24) | (red << 16) | (green << 8) | blue;
|
||||||
|
pointer++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// img = Image.createRGBImage(buffer, img.getWidth(), img.getHeight(), true);
|
||||||
|
img = Image.createRGBImage(buffer, 128, 64, true);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
Sagiri._instance.Set_Scene(new DeathError(e));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: handle multiline
|
// TODO: handle multiline
|
||||||
public short[] Measure(String str)
|
public short[] Measure(String str)
|
||||||
|
@ -39,7 +39,7 @@ public class Sagiri
|
|||||||
|
|
||||||
public Input input;
|
public Input input;
|
||||||
|
|
||||||
public int fps = 60;
|
public int fps = 20;
|
||||||
|
|
||||||
private Scene _scene_current = null;
|
private Scene _scene_current = null;
|
||||||
public long time_begin = 0;
|
public long time_begin = 0;
|
||||||
|
@ -6,25 +6,6 @@ import javax.microedition.lcdui.Image;
|
|||||||
import dothack.Global;
|
import dothack.Global;
|
||||||
|
|
||||||
public final class Utils {
|
public final class Utils {
|
||||||
public static int ARGB15to255(char argb15)
|
|
||||||
{
|
|
||||||
// Extract 5-bit ABGR;
|
|
||||||
int a5 = ((argb15 >> 15) & 0x01);
|
|
||||||
int b5 = ((argb15 >> 10) & 0x1F);
|
|
||||||
int g5 = ((argb15 >> 5) & 0x1F);
|
|
||||||
int r5 = (argb15 & 0x1F);
|
|
||||||
|
|
||||||
// Scale the 5-bit values to 8-bit
|
|
||||||
if (a5 == 1) a5 = 255;
|
|
||||||
else a5 = 0;
|
|
||||||
|
|
||||||
int r8 = (r5 * 255) / 31;
|
|
||||||
int g8 = (g5 * 255) / 31;
|
|
||||||
int b8 = (b5 * 255) / 31;
|
|
||||||
|
|
||||||
return (a5 << 24) | (r8 << 16) | (g8 << 8) | b8;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Clear_Screen(Graphics gg, int r, int g, int b)
|
public static void Clear_Screen(Graphics gg, int r, int g, int b)
|
||||||
{
|
{
|
||||||
gg.setColor(r,g,b);
|
gg.setColor(r,g,b);
|
||||||
|
@ -10,7 +10,6 @@ public class DeathError extends Scene {
|
|||||||
public DeathError(Exception e)
|
public DeathError(Exception e)
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
e.printStackTrace();
|
|
||||||
this.e = e;
|
this.e = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ public class Intro extends Scene {
|
|||||||
private long counter = 0;
|
private long counter = 0;
|
||||||
private int state = 0;
|
private int state = 0;
|
||||||
|
|
||||||
private BMF bmf_white;
|
private BMF bmf_normal;
|
||||||
private BMF bmf_black;
|
private BMF bmf_black;
|
||||||
private BMF bmf_outline;
|
private BMF bmf_outline;
|
||||||
private Image img_logo = null;
|
private Image img_logo = null;
|
||||||
@ -23,9 +23,10 @@ public class Intro extends Scene {
|
|||||||
public void Preload() {
|
public void Preload() {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bmf_white = BMF.Create("/silly/bmf/nds12_0.silly.gz", "/silly/bmf/nds12.fnt", 0xffffffff);
|
bmf_normal = BMF.Create("/silly/bmf/nds12_0.png", "/silly/bmf/nds12.fnt");
|
||||||
bmf_outline = BMF.Create("/silly/bmf/onds12_0.silly.gz", "/silly/bmf/onds12.fnt", 0xffffffff);
|
bmf_outline = BMF.Create("/silly/bmf/onds12_0.png", "/silly/bmf/onds12.fnt");
|
||||||
bmf_black = BMF.Create("/silly/bmf/nds12_0.silly.gz", "/silly/bmf/nds12.fnt", 0xff000000);
|
bmf_black = BMF.Create("/silly/bmf/nds12_0.png", "/silly/bmf/nds12.fnt");
|
||||||
|
bmf_black.SetColor(0xFFFF0000);
|
||||||
img_logo = Image.createImage("/t_1.png");
|
img_logo = Image.createImage("/t_1.png");
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
@ -38,7 +39,7 @@ public class Intro extends Scene {
|
|||||||
{
|
{
|
||||||
img_logo = null;
|
img_logo = null;
|
||||||
img_theworld = null;
|
img_theworld = null;
|
||||||
bmf_white = null;
|
bmf_normal = null;
|
||||||
bmf_black = null;
|
bmf_black = null;
|
||||||
bmf_outline = null;
|
bmf_outline = null;
|
||||||
}
|
}
|
||||||
@ -67,7 +68,7 @@ public class Intro extends Scene {
|
|||||||
g.drawRegion(
|
g.drawRegion(
|
||||||
img_logo,
|
img_logo,
|
||||||
0, 0, img_logo.getWidth(), halfH, Sprite.TRANS_NONE,
|
0, 0, img_logo.getWidth(), halfH, Sprite.TRANS_NONE,
|
||||||
pos, Utils.GetScreenHeight()/2,
|
pos, Utils.GetScreenHeight()/2-1,
|
||||||
Graphics.BOTTOM | Graphics.HCENTER);
|
Graphics.BOTTOM | Graphics.HCENTER);
|
||||||
|
|
||||||
g.drawRegion(
|
g.drawRegion(
|
||||||
@ -116,7 +117,7 @@ public class Intro extends Scene {
|
|||||||
5, Utils.GetScreenHeight()-5,
|
5, Utils.GetScreenHeight()-5,
|
||||||
Graphics.LEFT | Graphics.BOTTOM);
|
Graphics.LEFT | Graphics.BOTTOM);
|
||||||
|
|
||||||
bmf_white.Draw(g,
|
bmf_normal.Draw(g,
|
||||||
"VOL 1 - v0.1-silly",
|
"VOL 1 - v0.1-silly",
|
||||||
5, 5);
|
5, 5);
|
||||||
|
|
||||||
@ -127,6 +128,8 @@ public class Intro extends Scene {
|
|||||||
Utils.GetScreenWidth()/2, (int)(Utils.GetScreenHeight()*0.7),
|
Utils.GetScreenWidth()/2, (int)(Utils.GetScreenHeight()*0.7),
|
||||||
Graphics.VCENTER | Graphics.HCENTER);
|
Graphics.VCENTER | Graphics.HCENTER);
|
||||||
|
|
||||||
|
g.drawImage(bmf_black.img, 0, 0, 20);
|
||||||
|
|
||||||
if (sagiri.input.IsKeyDownAny())
|
if (sagiri.input.IsKeyDownAny())
|
||||||
sagiri.Set_Scene(new MainMenu());
|
sagiri.Set_Scene(new MainMenu());
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package sillysagiri.scene;
|
package sillysagiri.scene;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.microedition.lcdui.Graphics;
|
import javax.microedition.lcdui.Graphics;
|
||||||
import javax.microedition.lcdui.Image;
|
import javax.microedition.lcdui.Image;
|
||||||
import javax.microedition.lcdui.game.Sprite;
|
|
||||||
|
|
||||||
import sillysagiri.BMF;
|
import sillysagiri.BMF;
|
||||||
import sillysagiri.Scene;
|
import sillysagiri.Scene;
|
||||||
@ -13,23 +14,12 @@ public class MainMenu extends Scene {
|
|||||||
private int state = 0;
|
private int state = 0;
|
||||||
|
|
||||||
private Image img_bg;
|
private Image img_bg;
|
||||||
private Image img_box;
|
|
||||||
private Image img_bandai;
|
private Image img_bandai;
|
||||||
private BMF bmf_white;
|
private BMF bmf;
|
||||||
private BMF bmf_blue;
|
|
||||||
|
|
||||||
private Image img_head1;
|
|
||||||
private Image img_head2;
|
|
||||||
private Image img_head3;
|
|
||||||
private Image img_head4;
|
|
||||||
|
|
||||||
private Image img_arrow;
|
|
||||||
|
|
||||||
public void Preload() {
|
public void Preload() {
|
||||||
try {
|
try {
|
||||||
bmf_white = BMF.Create("/silly/bmf/onds12_0.silly.gz", "/silly/bmf/onds12.fnt", 0xffffffff);
|
bmf = BMF.Create("/silly/bmf/onds12_0.png", "/silly/bmf/onds12.fnt");
|
||||||
bmf_blue = BMF.Create("/silly/bmf/onds12_0.silly.gz", "/silly/bmf/onds12.fnt", 0xff00dbff);
|
|
||||||
bmf_blue.lineHeight = (short)(bmf_blue.lineHeight*1.5);
|
|
||||||
Image img_loop = Image.createImage("/m_2.png");
|
Image img_loop = Image.createImage("/m_2.png");
|
||||||
img_bandai = Image.createImage("/c_0.png");
|
img_bandai = Image.createImage("/c_0.png");
|
||||||
|
|
||||||
@ -41,19 +31,6 @@ public class MainMenu extends Scene {
|
|||||||
|
|
||||||
for (int i = 0; i<loopCount; i++)
|
for (int i = 0; i<loopCount; i++)
|
||||||
g_bg.drawImage(img_loop, 0, i*img_loop.getHeight(), Graphics.LEFT | Graphics.TOP);
|
g_bg.drawImage(img_loop, 0, i*img_loop.getHeight(), Graphics.LEFT | Graphics.TOP);
|
||||||
|
|
||||||
int boxw = (int)(bmf_blue.Measure("INSTRUCTION")[0]+bmf_blue.lineHeight*1.4);
|
|
||||||
int boxh = bmf_blue.lineHeight*8;
|
|
||||||
int[] temp = new int[boxw*boxh];
|
|
||||||
for (int i=0; i<temp.length; i++) temp[i] = 0x93800000;
|
|
||||||
img_box = Image.createRGBImage(temp, boxw, boxh, true);
|
|
||||||
temp = null;
|
|
||||||
|
|
||||||
img_head1 = Image.createImage("/bF_0.png");
|
|
||||||
img_head2 = Image.createImage("/bF_1.png");
|
|
||||||
img_head3 = Image.createImage("/bF_4.png");
|
|
||||||
img_head4 = Image.createImage("/bF_2.png");
|
|
||||||
img_arrow = Image.createImage("/i_0.png");
|
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
@ -81,7 +58,7 @@ public class MainMenu extends Scene {
|
|||||||
|
|
||||||
if (counter >= 600) counter = 0;
|
if (counter >= 600) counter = 0;
|
||||||
if (counter < 400)
|
if (counter < 400)
|
||||||
bmf_white.DrawEx(g,
|
bmf.DrawEx(g,
|
||||||
"PRESS ANY KEY",
|
"PRESS ANY KEY",
|
||||||
Utils.GetScreenWidth()/2, (int)(Utils.GetScreenHeight()*0.7),
|
Utils.GetScreenWidth()/2, (int)(Utils.GetScreenHeight()*0.7),
|
||||||
Graphics.VCENTER | Graphics.HCENTER);
|
Graphics.VCENTER | Graphics.HCENTER);
|
||||||
@ -93,51 +70,6 @@ public class MainMenu extends Scene {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
Utils.Clear_Screen(g, 255, 108, 0);
|
|
||||||
g.drawImage(img_bg, 0, 0, Graphics.TOP | Graphics.LEFT);
|
|
||||||
|
|
||||||
int padding = 3;
|
|
||||||
g.drawImage(img_head1, padding, padding, Graphics.LEFT | Graphics.TOP);
|
|
||||||
g.drawImage(img_head2, Utils.GetScreenWidth()-padding, padding, Graphics.RIGHT | Graphics.TOP);
|
|
||||||
g.drawImage(img_head3, padding, Utils.GetScreenHeight()-padding, Graphics.LEFT | Graphics.BOTTOM);
|
|
||||||
g.drawImage(img_head4, Utils.GetScreenWidth()-padding, Utils.GetScreenHeight()-5, Graphics.RIGHT | Graphics.BOTTOM);
|
|
||||||
|
|
||||||
int cursor = (int)(Utils.GetScreenHeight()*0.35);
|
|
||||||
g.drawImage(img_box, Utils.GetScreenWidth()/2, cursor-(bmf_blue.lineHeight/2), Graphics.HCENTER | Graphics.TOP);
|
|
||||||
|
|
||||||
bmf_blue.DrawEx(g, "NEW GAME", Utils.GetScreenWidth()/2, cursor, Graphics.HCENTER | Graphics.TOP);
|
|
||||||
bmf_blue.DrawEx(g, "LOAD GAME", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
|
||||||
bmf_blue.DrawEx(g, "INSTRUCTION", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
|
||||||
bmf_blue.DrawEx(g, "OPTIONS", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
|
||||||
bmf_blue.DrawEx(g, "LEADERBOARD", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
|
||||||
bmf_blue.DrawEx(g, "CREDITS", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
|
||||||
bmf_blue.DrawEx(g, "EXIT GAME", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
|
||||||
|
|
||||||
// if (counter > 360) counter = 0;
|
|
||||||
|
|
||||||
padding = (int)(Math.sin((float)counter/200) * 3) + 3;
|
|
||||||
cursor = (int)(Utils.GetScreenHeight()*0.35);
|
|
||||||
|
|
||||||
g.drawRegion(
|
|
||||||
img_arrow,
|
|
||||||
0, 0,
|
|
||||||
img_arrow.getWidth()/2, img_arrow.getHeight(),
|
|
||||||
Sprite.TRANS_NONE,
|
|
||||||
(Utils.GetScreenWidth()/2) + (img_box.getWidth()/2)+padding, cursor,
|
|
||||||
Graphics.LEFT | Graphics.TOP);
|
|
||||||
|
|
||||||
g.drawRegion(
|
|
||||||
img_arrow,
|
|
||||||
img_arrow.getWidth()/2, 0,
|
|
||||||
img_arrow.getWidth()/2, img_arrow.getHeight(),
|
|
||||||
Sprite.TRANS_NONE,
|
|
||||||
(Utils.GetScreenWidth()/2) - (img_box.getWidth()/2)-padding, cursor,
|
|
||||||
Graphics.RIGHT | Graphics.TOP);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit cfadc0314b3d9c41bc693b63bef3d162ca45c8fb
|
|
Loading…
x
Reference in New Issue
Block a user