Compare commits

..

No commits in common. "28e3899163856b543fcc673c099b364b1ab7c334" and "e6f084346ae2536b2c8b669d1d988375d4d43f73" have entirely different histories.

60 changed files with 1568 additions and 18489 deletions

2
.gitignore vendored
View file

@ -1,2 +1,2 @@
.DS_Store
docs/*.map
dlm.*

View file

@ -1,4 +0,0 @@
Files from original project, including C source code, images and sound files are
licensed as original.
Other files is under MIT license.

14
Makefile Normal file
View file

@ -0,0 +1,14 @@
OPTIONS = -o dlm.js \
-s NO_EXIT_RUNTIME=1 \
--js-library lib.js
SRC = loadg.cpp main.cpp
debug:
emcc -g4 $(OPTIONS) $(SRC)
release:
emcc -O3 -s OUTLINING_LIMIT=2000 --memory-init-file 0 $(OPTIONS) $(SRC)
clean:
rm dlm.js* dlm.data

View file

@ -1,7 +0,0 @@
CAT MARIO
-----------------
The game CatMario, ported to HTML5 for mobile devices.
To play the game, Visit:
[http://tiwb.github.io/catmario/]

2
build.bat Normal file
View file

@ -0,0 +1,2 @@
call C:\tools\emscripten\emsdk.bat construct_env
call C:\tools\gnuwin32\bin\make.exe %1

22
dlm.sln Normal file
View file

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dlm", "dlm.vcxproj", "{D007FECF-C7E6-40F1-886E-5B065021872B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D007FECF-C7E6-40F1-886E-5B065021872B}.Debug|Win32.ActiveCfg = Debug|Win32
{D007FECF-C7E6-40F1-886E-5B065021872B}.Debug|Win32.Build.0 = Debug|Win32
{D007FECF-C7E6-40F1-886E-5B065021872B}.Release|Win32.ActiveCfg = Release|Win32
{D007FECF-C7E6-40F1-886E-5B065021872B}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

69
dlm.vcxproj Normal file
View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="loadg.cpp" />
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="lib.h" />
</ItemGroup>
<ItemGroup>
<None Include="index.html" />
<None Include="lib.js" />
<None Include="Makefile" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D007FECF-C7E6-40F1-886E-5B065021872B}</ProjectGuid>
<Keyword>MakeFileProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(ProjectDir)</OutDir>
<IntDir>$(ProjectDir)</IntDir>
<NMakeBuildCommandLine>build.bat</NMakeBuildCommandLine>
<NMakeCleanCommandLine>build.bat clean</NMakeCleanCommandLine>
<IncludePath>C:\tools\emscripten\emscripten\1.34.1\system\include;C:\tools\emscripten\emscripten\1.34.1\system\include\libc;C:\tools\emscripten\emscripten\1.34.1\system\include\emscripten</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(ProjectDir)</OutDir>
<IntDir>$(ProjectDir)</IntDir>
<NMakeBuildCommandLine>build.bat release</NMakeBuildCommandLine>
<NMakeCleanCommandLine>build.bat clean</NMakeCleanCommandLine>
<IncludePath>C:\tools\emscripten\emscripten\1.34.1\system\include;C:\tools\emscripten\emscripten\1.34.1\system\include\libc;C:\tools\emscripten\emscripten\1.34.1\system\include\emscripten</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

15
dlm.vcxproj.filters Normal file
View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="main.cpp" />
<ClCompile Include="loadg.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="lib.h" />
</ItemGroup>
<ItemGroup>
<None Include="Makefile" />
<None Include="index.html" />
<None Include="lib.js" />
</ItemGroup>
</Project>

View file

@ -1,354 +0,0 @@
html {
height: 100%;
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
font-family: arial;
margin: 0;
padding: 0;
background-color: #5D5C5C;
height: 100%;
user-select: none;
overflow: hidden;
}
btn {
border: 2px solid black;
border-radius: 30px;
padding: 0 40px 0 40px;
background-color: #C3C8C9;
font-size: 28px;
margin: 6px;
padding: 6px 30px;
cursor: pointer;
text-align: center;
}
btn:active {
background-color: #D7DCDD;
}
.left {
text-align: left;
}
.right {
float: right;
text-align: right;
}
#container {
position: relative;
width: 480px;
height: 100%;
max-height:853px;
margin-left: auto;
margin-right: auto;
background-color: #282828;
}
#canvas {
border: 0px none;
outline: none;
padding: 0;
margin-left: auto;
margin-right: auto;
display: block;
width: 100%;
height: 100%;
}
#ad {
position: absolute;
padding: 0;
margin: 0;
width: 480px;
overflow: hidden;
}
#title {
position: absolute;
left:0;
right: 0;
top: 0;
bottom: 0;
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
}
#title header {
flex:1;
display: flex;
flex-direction: column;
justify-content: center;
}
#title content {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
#title btn {
width: 200px;
}
#title footer {
line-height: 50px;
font-size: 16px;
text-shadow: 0px 0px 5px #000;
}
#title footer a {
color: white;
text-decoration: none;
}
#settings_window {
height: 450px;
}
#settings_window content {
padding: 25px 95px;
font-size: 26px;
display: flex;
flex-direction: column;
}
#settings_window content div {
margin: 10px;
}
#error {
height: 50%;
}
#error content {
padding: 40px;
}
.mask {
position: fixed;
background-color: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
left: 0;
top: 0;
}
img {
max-width: 100%;
height: auto;
}
figure {
margin: 0;
padding: 10px;
}
figure a {
display: block;
}
mark {
padding: 0 5px;
background-color: #ddd;
}
::backdrop {
background-color: rgba(0, 0, 0, 0.5);
}
.btn {
padding: 10px 45px;
cursor: pointer;
color: #555;
border-width: 1px;
border-style: solid;
border-radius: 3px;
background-color: #f3f3f3;
}
.btn.disabled {
cursor: not-allowed;
color: #ddd;
border-color: #ddd;
}
.btn-group {
padding: 15px 20px;
text-align: right;
background-color: #f5f6f8;
}
.btn-primary {
color: #fff;
border-color: #0066c0;
background-color: #0074d9;
}
.btn-primary:hover {
background-color: #0066c0;
}
.btn-danger {
color: #fff;
font-size: 24px;
border-color: #ab3326;
margin: 8px;
background-color: #c0392b;
}
.start-btn{
width: 210px
}
.setting-btn{
font-size: 18px;
margin: 8px;
width: 200px;
}
.btn-danger:hover {
background-color: #ab3326;
}
.btn-cancel {
color: #999;
border-color: #ddd;
}
.btn-cancel:hover {
background-color: #e6e6e6;
}
.window {
position: absolute;
left: 30px;
top: 30px;
bottom: 30px;
right: 30px;
display: flex;
flex-direction: column;
font-size: 32px;
font-family: 黑体;
width: 416px;
margin: auto;
background-color: #fff;
border-width: 0;
border-radius: 5px;
box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.3);
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.window header {
position: relative;
padding: 8px;
text-align: center;
padding: 12px 20px;
background-color: #434a54;
color: white;
}
.window content {
position: relative;
background-color: #FFF;
flex: 1;
font-size: 22px;
height: 60%;
}
.window footer {
position: relative;
padding: 10px;
background-color: #f5f6f8;
text-align: center;
vertical-align: middle;
}
/**
* Checkbox Four
*/
.checkboxFour {
width: 40px;
height: 40px;
background: #ddd;
margin: 20px 90px;
border-radius: 100%;
position: relative;
-webkit-box-shadow: 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: 0px 1px 3px rgba(0,0,0,0.5);
box-shadow: 0px 1px 3px rgba(0,0,0,0.5);
float: left;
}
.checkboxFour input{
display: none;
}
.checkboxFourFront{
padding-top: 5px;
}
/**
* Create the checkbox button
*/
.checkboxFour label {
display: block;
width: 30px;
height: 30px;
border-radius: 100px;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-o-transition: all .5s ease;
-ms-transition: all .5s ease;
transition: all .5s ease;
cursor: pointer;
position: absolute;
top: 5px;
left: 5px;
z-index: 1;
background: #333;
-webkit-box-shadow:inset 0px 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow:inset 0px 1px 3px rgba(0,0,0,0.5);
box-shadow:inset 0px 1px 3px rgba(0,0,0,0.5);
}
/**
* Create the checked state
*/
.checkboxFour input[type=checkbox]:checked + label {
background: #26ca28;
}
.close {
position: absolute;
width: 58px;
height: 54px;
background:#434a54;
opacity:0.5;
display:inline-block;
top: 3px;
right: 3px;
}
.close:hover{
cursor:pointer;
opacity:1;
}
.close::before, .close::after {
content: '';
position: absolute;
width: 80%;
top: 50%;
left: 10%;
height: 12px;
margin-top: -6px;
border-radius: 5px;
background: #ffffff;
}
.close::before {
transform: rotate(45deg);
}
.close::after {
transform: rotate(-45deg);
}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View file

@ -1,75 +0,0 @@
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=480,user-scalable=no" />
<meta name="screen-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
<title>しょぼんのアクション</title>
<link rel="stylesheet" href="catmario.css"/>
<script type="text/javascript" src="jquery-3.1.1.min.js"></script>
</head>
<body oncontextmenu="event.preventDefault()">
<div style='display:none'><img src='res/wxicon.jpg'/></div>
<div id="container">
<div id="title" style="display:none">
<header><div><img class="titleimg" src="res/logo.png" /></div></header>
<content>
<button class="btn btn-danger start-btn" id="startgame">プレイ</button>
<button class="btn btn-danger start-btn" id="settings">設定</button>
</content>
<footer><div><a href="/">ゲームの版権は原作者に帰属します</a></div></footer>
</div>
<div id="error" class="window" style="display:none">
<div class="mask"></div>
<header>エラー</header>
<content id="error_text"></content>
<footer>
<button class="btn btn-danger start-btn" id="error_close">確定</button>
</footer>
</div>
<div id="settings_window" class="window" style="display:none">
<div class="mask"></div>
<header>設定 <span id ="settings_back" class="close"></span></header>
<content>
<div>
<div class="checkboxFour">
<input type="checkbox" id="settings_se" name="" />
<label for="settings_se"></label>
</div>
<div class="checkboxFourFront">
<label for="settings_se">音声を再生する</label>
</div>
</div>
<div>
<div class="checkboxFour">
<input type="checkbox" id="settings_bgm" name="" />
<label for="settings_bgm"></label>
</div>
<div class="checkboxFourFront">
<label for="settings_bgm">音楽を再生する</label>
</div>
</div>
<div>
<div class="checkboxFour">
<input type="checkbox" id="settings_onehand" name="" />
<label for="settings_onehand"></label>
</div>
<div class="checkboxFourFront">
<label for="settings_onehand">片手モード</label>
</div>
</div>
<div>
<button class="btn btn-cancel setting-btn" id="settings_cleardata" >ゲームデータをクリアする</button>
</div>
</content>
</div>
<canvas id="canvas" width="480" height="420" tabindex="0"></canvas>
<script type='text/javascript' src="load.js"></script>
<script async type="text/javascript" src="catmario.js"></script>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -1,159 +0,0 @@
var Dlm;
var Module = {
ios: !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
screen: document.getElementById('container'),
canvas: document.getElementById('canvas'),
pause: false,
ready: false,
status: 'loading',
setStatus: function (text) {
Module.status = text;
}
};
window.onerror = function (event) {
$('#error').show();
$('#error_text').text(event);
};
window.onpopstate = function() {
if (history.state == 'title') {
if (Module.ready) Module["_dlm_title"]();
$('#title').show();
$('#settings_window').hide();
Module.pause = false;
}
}
history.replaceState('title', '', location.pathname);
(function (Module) {
var canvas = Module.canvas;
var mainTask = null;
var canvasRect = canvas.getBoundingClientRect();
canvas.height = canvas.width * canvasRect.height / canvasRect.width;
var angle = 0;
function loading() {
if (!Module.dlm && Dlm) {
Module.dlm = Dlm(Module);
}
if (!Module.loading && Module.status == '') {
Module.ready = true;
Module["_dlm_init"]();
Module["_dlm_frame"]();
mainTask = game;
if (Module.autoEnterGame) {
Module.startGame();
}
else {
$('#title').show();
}
return;
}
var ctx = canvas.getContext('2d');
ctx.save();
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.translate(canvas.width / 2, canvas.height / 2);
ctx.font = '20px sans-serif';
ctx.lineWidth = 4;
ctx.strokeStyle = 'white';
ctx.fillStyle = 'white';
ctx.textAlign = 'center';
ctx.textBaseline = 'top';
ctx.globalAlpha = 0.5;
ctx.fillText('読み込み中...', 0, 40);
var t = Math.PI * 2 * 0.9;
var step = t / 20;
ctx.rotate(angle);
for (var i = 0; i < t; i += step) {
ctx.globalAlpha = i / t * 0.5;
ctx.beginPath();
ctx.arc(0, 0, 20, i, i + step);
ctx.stroke();
}
angle += 0.1;
ctx.restore();
}
function game() {
if (Module.pause === false) {
Module["_dlm_frame"]();
}
}
mainTask = loading;
function runFrame() {
if (mainTask) mainTask();
window.requestAnimationFrame(runFrame);
}
runFrame();
})(Module);
$('#startgame').click(function () {
history.pushState('game', '', location.href);
Module["_dlm_start"]();
$('#title').hide();
$('#canvas').focus();
if (Module.unlockAudio) {
Module.unlockAudio();
Module.unlockAudio = null;
}
});
$('#settings').click(function () {
$('#settings_se').prop('checked', !localStorage.disableSe);
$('#settings_bgm').prop('checked', !localStorage.disableBgm);
$('#settings_onehand').prop('checked', !!localStorage.onehandMode);
$('#settings_window').show();
});
$('#settings_back').click(function () {
$('#settings_window').hide();
});
$('#settings_se').change(function() {
localStorage.setItem('disableSe', $(this).prop('checked') ? '' : '1');
});
$('#settings_bgm').change(function() {
localStorage.setItem('disableBgm', $(this).prop('checked') ? '' : '1');
});
$('#settings_onehand').change(function() {
localStorage.setItem('onehandMode', $(this).prop('checked') ? '1' : '');
});
$('#settings_cleardata').click(function() {
if (confirm('ゲームの進行状況が削除されます、よろしいですか?')) {
Module['_dlm_reset']();
}
});
$('#error_close').click(function() {
$('#error').hide();
location.reload();
});
// 不允许屏幕移动
$(function() {
var supportsPassiveOption = false;
try {
addEventListener("test", null, Object.defineProperty({}, 'passive', {
get: function () {
supportsPassiveOption = true;
}
}));
} catch(e) {}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, supportsPassiveOption ? {
capture: false,
passive: false
} : false);
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

114
index.html Normal file
View file

@ -0,0 +1,114 @@
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=480,user-scalable=no" />
<title>变态马里奥</title>
<style>
body {
font-family: arial;
margin: 0;
padding: 0;
background-color: #282828;
}
#canvas {
border: 0px none;
outline: none;
padding: 0;
margin-left: auto;
margin-right: auto;
display: block;
}
#output {
width: 470px;
height: 200px;
margin: 0 auto;
margin-top: 10px;
display: block;
background-color: black;
color: white;
font-family: 'Lucida Console', Monaco, monospace;
outline: none;
border: none;
}
</style>
</head>
<body>
<canvas id="canvas" width="480" height="640" oncontextmenu="event.preventDefault()" tabindex="0"></canvas>
<textarea id="output" rows="8" readonly></textarea>
<script type='text/javascript'>
var canvas = document.getElementById('canvas');
var Module = {
preRun: [],
postRun: [],
canvas: canvas,
setStatus: function (text) {
Module.setStatus.text = text;
console.log(text);
},
print: (function () {
var element = document.getElementById('output');
if (element) element.value = '';
return function (text) {
if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
console.log(text);
if (element) {
element.value += text + "\n";
element.scrollTop = element.scrollHeight;
}
};
})(),
};
Module.setStatus('Loading...');
window.onerror = function (event) {
};
Module.print(document.documentElement.clientWidth, document.documentElement.clientHeight);
canvas.height = document.documentElement.clientHeight;
var angle = 0;
var drawLoading = function () {
if (Module.setStatus.text == '')
return;
var ctx = canvas.getContext('2d');
ctx.save();
ctx.clearRect(0, 0, 480, 420);
ctx.translate(480 / 2, 420 / 2);
ctx.font = '12px sans-serif';
ctx.lineWidth = 4;
ctx.strokeStyle = 'white';
ctx.fillStyle = 'white';
ctx.textAlign = 'center';
ctx.textBaseline = 'top';
ctx.globalAlpha = 0.5;
ctx.fillText('Loading...', 0, 18);
var t = Math.PI * 2 * 0.9;
var step = t / 20;
ctx.rotate(angle);
for (var i = 0; i < t; i += step) {
ctx.globalAlpha = i / t * 0.5;
ctx.beginPath();
ctx.arc(0, 0, 10, i, i + step);
ctx.stroke();
}
angle += 0.1;
ctx.restore();
window.requestAnimationFrame(drawLoading);
}
drawLoading();
</script>
<script async type="text/javascript" src="dlm.js"></script>
</body>
</html>

View file

@ -5,39 +5,31 @@ typedef uint8_t byte;
#define TRUE 1
#define FALSE 0
#define DX_FONTTYPE_EDGE (1) // <20><><EFBFBD>å<EFBFBD><C3A5>Ĥ<EFBFBD><C4A4>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>
#define DX_FONTTYPE_NORMAL (0) // <20>Ω`<60>ޥ<EFBFBD><DEA5>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>
#define DX_FONTTYPE_EDGE (1) // ¥¨¥Ã¥¸¤Ä¤­¥Õ¥©¥ó¥È
#define DX_FONTTYPE_NORMAL (0) // ¥Î©`¥Þ¥ë¥Õ¥©¥ó¥È
#define DX_INPUT_KEY_PAD1 (0x1001) // ¥­©`ÈëÁ¦¤È¥Ñ¥Ã¥É£±ÈëÁ¦
#define PAD_INPUT_LEFT (0x01)
#define PAD_INPUT_RIGHT (0x02)
#define PAD_INPUT_DOWN (0x04)
#define PAD_INPUT_UP (0x08)
#define PAD_INPUT_JUMP (0x10)
#define PAD_INPUT_CLICK (0x20)
#define PAD_INPUT_ACTION (PAD_INPUT_JUMP | PAD_INPUT_CLICK)
#define PAD_INPUT_DECIDE (0x20)
extern "C" {
void dlm_init();
void dlm_frame();
void dlm_score(int type, int score);
void dlm_start();
void dlm_reset();
void dlm_title();
int dlm_mainproc();
void input_init();
int input_waitkey(void);
int input_get();
void graphics_init();
int graphics_init();
void begindraw();
void enddraw();
void drawpad();
int getscreenheight();
int loadimage(const char *FileName);
int subimage(int x, int y, int w, int h, int imgid);
int subimage(int SrcX, int SrcY, int Width, int Height, int SrcGraphHandle);
void getimagesize(int GrHandle, int *SizeXBuf, int *SizeYBuf);
void clearscreen();
@ -56,8 +48,7 @@ extern "C" {
void setfont(int x, int y);
int setfonttype(int FontType);
int drawstring(int x, int y, const char *str);
int drawstringc(int x, int y, const char *str);
int drawstring(int x, int y, const char *String);
void sound_init();
void soundplay(int x);
@ -69,7 +60,4 @@ extern "C" {
int getrand(int value);
int gettime();
void adshow();
void adhide();
}

420
lib.js Normal file
View file

@ -0,0 +1,420 @@
//"use strict";
var LibraryDLM = {
$gfxContext: null,
$DLM: {
audioCtx: null,
audioBuffer: [],
audioSources: [],
bgmPlayer: null,
currentBgm: 0,
mirror: false,
images: [],
fontSize: 14,
fontType: 0,
},
//------------------------------------------------------------------------------
// Graphics
//------------------------------------------------------------------------------
graphics_init: function() {
var canvas = Module['canvas'];
gfxContext = canvas.getContext('2d');
gfxContext.textBaseline = 'top';
gfxContext.strokeStyle = 'black';
},
loadimage: function(filename) {
filename = UTF8ToString(filename);
var img = new Image();
img.src = filename;
DLM.images.push({
img: img,
x: 0,
y: 0,
w: 1,
h: 1,
});
return DLM.images.length - 1;
},
subimage: function(x, y, w, h, img) {
var src = DLM.images[img];
DLM.images.push({
img: src.img,
x: x,
y: y,
w: w,
h: h
});
return DLM.images.length - 1;
},
getimagesize: function(img, pw, ph) {
var src = DLM.images[img];
setValue(pw, src.w, 'i32');
setValue(ph, src.h, 'i32');
},
clearscreen: function() {
gfxContext.fillRect(0, 0, 480, 420);
},
drawline: function(x, y, w, h) {
gfxContext.beginPath();
gfxContext.moveTo(x, y);
gfxContext.lineTo(w, h);
gfxContext.closePath();
gfxContext.stroke();
},
drawrect: function(x, y, w, h) {
gfxContext.strokeRect(x, y, w, h);
},
fillrect: function(x, y, w, h) {
gfxContext.fillRect(x, y, w, h);
},
drawarc: function(x, y, w, h) {
gfxContext.lineWidth = 0.5;
gfxContext.strokeStyle = 'black';
gfxContext.arc(x, y, w, 0, Math.PI * 2);
gfxContext.stroke();
},
fillarc: function(x, y, w, h) {
gfxContext.beginPath();
gfxContext.arc(x, y, w, 0, Math.PI * 2);
gfxContext.closePath();
gfxContext.fill();
},
drawimage: function(img, x, y) {
var src = DLM.images[img];
if (!src)
return;
gfxContext.fillStyle = 'white';
if (DLM.mirror) {
gfxContext.save();
gfxContext.translate(x + src.w, y);
gfxContext.scale(-1, 1);
gfxContext.drawImage(src.img, src.x, src.y, src.w, src.h, 0, 0, src.w, src.h);
gfxContext.restore();
}
else {
gfxContext.drawImage(src.img, src.x, src.y, src.w, src.h, x, y, src.w, src.h);
}
},
drawimageflip: function(img, x, y) {
var src = DLM.images[img];
if (!src)
return;
gfxContext.fillStyle = 'white';
gfxContext.save();
gfxContext.translate(x, y + src.h);
gfxContext.scale(1, -1);
gfxContext.drawImage(src.img, src.x, src.y, src.w, src.h, 0, 0, src.w, src.h);
gfxContext.restore();
},
setfont: function (size, thick) {
DLM.fontSize = size;
},
setfonttype: function(type) {
DLM.fontType = type;
},
drawstring: function(x, y, str) {
str = UTF8ToString(str);
gfxContext.font = DLM.fontSize + 'px sans-serif';
if (DLM.fontType == 1) {
var f = gfxContext.fillStyle;
gfxContext.fillStyle = 'black';
gfxContext.fillText(str, x, y - 1);
gfxContext.fillText(str, x, y + 1);
gfxContext.fillText(str, x - 1, y);
gfxContext.fillText(str, x + 1, y);
gfxContext.fillStyle = f;
}
gfxContext.fillText(str, x, y);
},
setcolor: function(r, g, b) {
gfxContext.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + 255 + ')';
},
setmirror: function(mirror) {
DLM.mirror = (mirror != 0);
},
begindraw: function() {
},
enddraw: function() {
var canvas = Module['canvas'];
var h = canvas.height;
if (h <= 420)
return;
var drawArrow = function () {
}
gfxContext.clearRect(0, 420, canvas.width, h - 420);
gfxContext.save();
var key = [];
key[0] = (DLM.touch & 1) != 0;
key[1] = (DLM.touch & 8) != 0;
key[2] = (DLM.touch & 2) != 0;
key[3] = (DLM.touch & 4) != 0;
gfxContext.fillStyle = 'white';
gfxContext.strokeStyle = 'black';
gfxContext.strokeWidth = 2;
gfxContext.translate(140, 420 + (h - 420) / 2);
for (var i = 0; i < 4; i++) {
gfxContext.globalAlpha = key[i] ? 0.6 : 0.3;
gfxContext.beginPath();
gfxContext.moveTo(-5, 0);
gfxContext.lineTo(-35, -30);
gfxContext.lineTo(-80, -30);
gfxContext.lineTo(-80, 30);
gfxContext.lineTo(-35, 30);
gfxContext.closePath();
gfxContext.fill();
gfxContext.stroke();
gfxContext.rotate(Math.PI / 2);
}
gfxContext.setTransform(1, 0, 0, 1, 340, 420 + (h - 420) / 2);
gfxContext.globalAlpha = (DLM.touch & 0x10) != 0 ? 0.6 : 0.3;
gfxContext.fillRect(-40, -40, 80, 80);
gfxContext.strokeRect(-40, -40, 80, 80);
gfxContext.restore();
},
//------------------------------------------------------------------------------
// Input
//------------------------------------------------------------------------------
input_init: function() {
DLM.key = 0;
DLM.touch = 0;
DLM.mouse = 0;
var canvas = Module['canvas'];
var key_callback = function (e) {
e.preventDefault();
if (e.repeat)
return;
var buttons = 0;
switch (e.keyCode) {
case 37: buttons |= 1; break;
case 38: buttons |= 16; break;
case 39: buttons |= 2; break;
case 40: buttons |= 4; break;
case 13: buttons |= 32; break;
}
if (e.type == 'keydown') {
DLM.key |= buttons;
}
else if (e.type == 'keyup') {
DLM.key = DLM.key & (~buttons);
}
};
var mouse_callback = function (e) {
switch (e.type) {
case 'mousedown': DLM.mouse |= 32; break;
case 'mouseup': DLM.mouse &= (~32); break;
}
}
var check_touch = function (t, x1, y1, x2, y2) {
return (t.clientX > x1 && t.clientX < x2 &&
t.clientY > y1 && t.clientY < y2);
}
var touch_callback = function (e) {
e.preventDefault();
var touch = 0;
var centerY = 420 + (Module['canvas'].height - 420) / 2;
for (var i = 0; i < e.touches.length; i++) {
var t = e.touches.item(i);
if (check_touch(t, 140 - 40, centerY + 20, 140 + 40, centerY + 100)) touch |= 4;
else if (check_touch(t, 140 - 40, centerY - 100, 140 + 40, centerY - 40)) touch |= 8;
else if (check_touch(t, 140 - 100, centerY - 40, 140, centerY + 40)) touch |= 1;
else if (check_touch(t, 140, centerY - 40, 140 + 100, centerY + 40)) touch |= 2;
if (check_touch(t, 340 - 100, centerY - 100, 340 + 100, centerY + 100)) touch |= 0x10;
touch |= 0x20;
}
DLM.touch = touch;
}
canvas.addEventListener('keydown', key_callback, true);
canvas.addEventListener('keyup', key_callback, true);
canvas.addEventListener('mousedown', mouse_callback, true);
canvas.addEventListener('mouseup', mouse_callback, true);
canvas.addEventListener('touchstart', touch_callback, true);
canvas.addEventListener('touchend', touch_callback, true);
canvas.addEventListener('touchmove', touch_callback, true);
canvas.addEventListener('touchcancel', touch_callback, true);
},
input_waitkey: function() {
},
input_get: function() {
return DLM.key | DLM.touch | DLM.mouse;
},
getrand: function(maxValue) {
return Math.floor(Math.random() * maxValue);
},
gettime: function() {
var t = new Date().getTime();
return t % 0xfffffff;
},
//------------------------------------------------------------------------------
// Sound
//------------------------------------------------------------------------------
sound_init: function() {
return;
var audioCtx;
try {
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
}
catch (e) {
}
if (audioCtx) {
DLM.audioCtx = audioCtx;
// Old Web Audio API (e.g. Safari 6.0.5) had an inconsistently named createGainNode function.
if (typeof (audioCtx.createGain) === 'undefined') audioCtx.createGain = audioCtx.createGainNode;
var loadAudio = function (id, url) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'arraybuffer';
xhr.onload = function (e) {
audioCtx.decodeAudioData(this.response, function (buffer) {
DLM.audioBuffer[id] = buffer;
});
};
xhr.send();
}
loadAudio(1, 'bgm/se1.mp3');
loadAudio(2, 'bgm/se2.mp3');
}
var player = document.createElement("AUDIO");
if (player) {
player.volume = 0.5;
DLM.bgmPlayer = player;
}
},
soundplay: function(x) {
var i = 0;
var s = 0;
var d = 0;
switch (x) {
case 1: i = 1; s = 0.000; d = 0.641; break;
case 3: i = 1; s = 0.700; d = 0.432; break;
case 4: i = 1; s = 1.200; d = 0.928; break;
case 5: i = 1; s = 2.200; d = 0.458; break;
case 6: i = 1; s = 2.700; d = 0.249; break;
case 7: i = 1; s = 3.000; d = 0.928; break;
case 8: i = 1; s = 4.000; d = 0.928; break;
case 9: i = 1; s = 5.000; d = 0.928; break;
case 10: i = 1; s = 6.000; d = 0.432; break;
case 11: i = 1; s = 6.500; d = 6.936; break;
case 12: i = 1; s = 13.500; d = 3.253; break;
case 13: i = 2; s = 0.000; d = 0.275; break;
case 14: i = 2; s = 0.300; d = 0.118; break;
case 15: i = 2; s = 0.500; d = 0.797; break;
case 16: i = 2; s = 1.400; d = 4.428; break;
case 17: i = 2; s = 5.900; d = 6.936; break;
case 18: i = 2; s = 13.000; d = 1.476; break;
}
if (i > 0) {
var audioCtx = DLM.audioCtx;
if (audioCtx == null)
return;
var buf = DLM.audioBuffer[i];
if (buf) {
var source = audioCtx.createBufferSource();
source.buffer = buf;
source.connect(audioCtx.destination);
source.start(0, s, d);
source.onended = function () {
if (DLM.audioSources[x] == source) {
DLM.audioSources[x] = null;
}
}
DLM.audioSources[x] = source;
}
}
},
soundstop: function(x) {
var s = DLM.audioSources[x];
if (s) {
s.stop();
DLM.audioSources[x] = null;
}
},
soundcheck: function(x) {
return DLM.audioSources[x] != null;
},
bgmchange: function (x) {
DLM.currentBgm = x;
},
bgmstop: function (x) {
if (DLM.bgmPlayer) {
DLM.bgmPlayer.pause();
}
},
bgmplay: function(x) {
var player = DLM.bgmPlayer;
if (!player) return;
switch (DLM.currentBgm) {
case 100: player.src = "bgm/field.mp3"; break;
case 103: player.src = "bgm/dungeon.mp3"; break;
case 104: player.src = "bgm/star4.mp3"; break;
case 105: player.src = "bgm/castle.mp3"; break;
case 106: player.src = "bgm/puyo.mp3"; break;
default: return;
}
player.loop = true;
player.play();
}
};
autoAddDeps(LibraryDLM, '$DLM', '$gfxContext');
mergeInto(LibraryManager.library, LibraryDLM);

194
loadg.cpp Normal file
View file

@ -0,0 +1,194 @@
#include "lib.h"
extern int ma, t, tt;
extern int grap[161][8], mgrap[51];
extern int oto[151];
extern int anx[160], any[160];
extern int ne[40], nf[40];
void loadg(void) {
for (t = 0; t < 7; t++) {
mgrap[t] = 0;
}
//画像読み込み
//プレイヤー
mgrap[0] = loadimage("res/player.png");
//ブロック
mgrap[1] = loadimage("res/brock.png");
//アイテム
mgrap[2] = loadimage("res/item.png");
//敵
mgrap[3] = loadimage("res/teki.png");
//背景
mgrap[4] = loadimage("res/haikei.png");
//ブロック2
mgrap[5] = loadimage("res/brock2.png");
//おまけ
mgrap[6] = loadimage("res/omake.png");
//おまけ2
mgrap[7] = loadimage("res/omake2.png");
//タイトル
mgrap[30] = loadimage("res/syobon3.png");
//プレイヤー読み込み
grap[40][0] = subimage(0, 0, 30, 36, mgrap[0]);
grap[0][0] = subimage(31 * 4, 0, 30, 36, mgrap[0]);
grap[1][0] = subimage(31 * 1, 0, 30, 36, mgrap[0]);
grap[2][0] = subimage(31 * 2, 0, 30, 36, mgrap[0]);
grap[3][0] = subimage(31 * 3, 0, 30, 36, mgrap[0]);
grap[41][0] = subimage(50, 0, 51, 73, mgrap[6]);
//ブロック読み込み
for (t = 0; t <= 6; t++) {
grap[t][1] = subimage(33 * t, 0, 30, 30, mgrap[1]);
grap[t + 30][1] = subimage(33 * t, 33, 30, 30, mgrap[1]);
grap[t + 60][1] = subimage(33 * t, 66, 30, 30, mgrap[1]);
}
grap[8][1] = subimage(33 * 7, 0, 30, 30, mgrap[1]);
grap[16][1] = subimage(33 * 6, 0, 24, 27, mgrap[2]);
grap[10][1] = subimage(33 * 9, 0, 30, 30, mgrap[1]);
grap[40][1] = subimage(33 * 9, 33, 30, 30, mgrap[1]);
grap[70][1] = subimage(33 * 9, 66, 30, 30, mgrap[1]);
//ブロック読み込み2
for (t = 0; t <= 6; t++) {
grap[t][5] = subimage(33 * t, 0, 30, 30, mgrap[5]);
}
grap[10][5] = subimage(33 * 1, 33, 30, 30, mgrap[5]);
grap[11][5] = subimage(33 * 2, 33, 30, 30, mgrap[5]);
grap[12][5] = subimage(33 * 0, 66, 30, 30, mgrap[5]);
grap[13][5] = subimage(33 * 1, 66, 30, 30, mgrap[5]);
grap[14][5] = subimage(33 * 2, 66, 30, 30, mgrap[5]);
//アイテム読み込み
for (t = 0; t <= 5; t++) {
grap[t][2] = subimage(33 * t, 0, 30, 30, mgrap[2]);
}
//敵キャラ読み込み
grap[0][3] = subimage(33 * 0, 0, 30, 30, mgrap[3]);
grap[1][3] = subimage(33 * 1, 0, 30, 43, mgrap[3]);
grap[2][3] = subimage(33 * 2, 0, 30, 30, mgrap[3]);
grap[3][3] = subimage(33 * 3, 0, 30, 44, mgrap[3]);
grap[4][3] = subimage(33 * 4, 0, 33, 35, mgrap[3]);
grap[5][3] = subimage(0, 0, 37, 55, mgrap[7]);
grap[6][3] = subimage(38 * 2, 0, 36, 50, mgrap[7]);
grap[150][3] = subimage(38 * 2 + 37 * 2, 0, 36, 50, mgrap[7]);
grap[7][3] = subimage(33 * 6 + 1, 0, 32, 32, mgrap[3]);
grap[8][3] = subimage(38 * 2 + 37 * 3, 0, 37, 47, mgrap[7]);
grap[151][3] = subimage(38 * 3 + 37 * 3, 0, 37, 47, mgrap[7]);
grap[9][3] = subimage(33 * 7 + 1, 0, 26, 30, mgrap[3]);
grap[10][3] = subimage(214, 0, 46, 16, mgrap[6]);
//モララー
grap[30][3] = subimage(0, 56, 30, 36, mgrap[7]);
grap[155][3] = subimage(31 * 3, 56, 30, 36, mgrap[7]);
grap[31][3] = subimage(50, 74, 49, 79, mgrap[6]);
grap[80][3] = subimage(151, 31, 70, 40, mgrap[4]);
grap[81][3] = subimage(151, 72, 70, 40, mgrap[4]);
grap[130][3] = subimage(151 + 71, 72, 70, 40, mgrap[4]);
grap[82][3] = subimage(33 * 1, 0, 30, 30, mgrap[5]);
grap[83][3] = subimage(0, 0, 49, 48, mgrap[6]);
grap[84][3] = subimage(33 * 5 + 1, 0, 30, 30, mgrap[3]);
grap[86][3] = subimage(102, 66, 49, 59, mgrap[6]);
grap[152][3] = subimage(152, 66, 49, 59, mgrap[6]);
grap[90][3] = subimage(102, 0, 64, 63, mgrap[6]);
grap[100][3] = subimage(33 * 1, 0, 30, 30, mgrap[2]);
grap[101][3] = subimage(33 * 7, 0, 30, 30, mgrap[2]);
grap[102][3] = subimage(33 * 3, 0, 30, 30, mgrap[2]);
//grap[104][3] = subimage( 33*2, 0, 30, 30, mgrap[5]) ;
grap[105][3] = subimage(33 * 5, 0, 30, 30, mgrap[2]);
grap[110][3] = subimage(33 * 4, 0, 30, 30, mgrap[2]);
//背景読み込み
grap[0][4] = subimage(0, 0, 150, 90, mgrap[4]);
grap[1][4] = subimage(151, 0, 65, 29, mgrap[4]);
grap[2][4] = subimage(151, 31, 70, 40, mgrap[4]);
grap[3][4] = subimage(0, 91, 100, 90, mgrap[4]);
grap[4][4] = subimage(151, 113, 51, 29, mgrap[4]);
grap[5][4] = subimage(222, 0, 28, 60, mgrap[4]);
grap[6][4] = subimage(151, 143, 90, 40, mgrap[4]);
//中間フラグ
grap[20][4] = subimage(40, 182, 40, 60, mgrap[4]);
//グラ
grap[0][5] = subimage(167, 0, 45, 45, mgrap[6]);
//敵サイズ収得
//int GrHandle=0;
for (t = 0; t <= 140; t++) {
getimagesize(grap[t][3], &anx[t], &any[t]);
anx[t] *= 100; any[t] *= 100;
}
anx[79] = 120 * 100; any[79] = 15 * 100;
anx[85] = 25 * 100; any[85] = 30 * 10 * 100;
//背景サイズ収得
for (t = 0; t < 40; t++) {
getimagesize(grap[t][4], &ne[t], &nf[t]);
//ne[t]*=100;nf[t]*=100;
}
/*
anx[0]=30;any[0]=30;
anx[1]=30;any[1]=43;
anx[2]=30;any[2]=30;
anx[3]=30;any[3]=44;
*/
/*
SetCreateSoundDataType(DX_SOUNDDATATYPE_MEMNOPRESS);
oto[1] = LoadSoundMem("se/jump.mp3");
//oto[2] = LoadSoundMem("se/brockcoin.mp3");
oto[3] = LoadSoundMem("se/brockbreak.mp3");
oto[4] = LoadSoundMem("se/coin.mp3");
oto[5] = LoadSoundMem("se/humi.mp3");
oto[6] = LoadSoundMem("se/koura.mp3");
oto[7] = LoadSoundMem("se/dokan.mp3");
oto[8] = LoadSoundMem("se/brockkinoko.mp3");
oto[9] = LoadSoundMem("se/powerup.mp3");
oto[10] = LoadSoundMem("se/kirra.mp3");
oto[11] = LoadSoundMem("se/goal.mp3");
oto[12] = LoadSoundMem("se/death.mp3");
oto[13] = LoadSoundMem("se/Pswitch.mp3");
oto[14] = LoadSoundMem("se/jumpBlock.mp3");
oto[15] = LoadSoundMem("se/hintBlock.mp3");
oto[16] = LoadSoundMem("se/4-clear.mp3");
oto[17] = LoadSoundMem("se/allclear.mp3");
oto[18] = LoadSoundMem("se/tekifire.mp3");
//}catch( int num){end();}
ChangeVolumeSoundMem(255 * 40 / 100, oto[103]);
*/
//ループ設定-20000-20秒
//SetLoopPosSoundMem( 1,oto[104]) ;
//SetLoopSamplePosSoundMem(44100,oto[104]);
//SetLoopSamplePosSoundMem(22050,oto[104]);
}

File diff suppressed because it is too large Load diff

View file

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View file

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View file

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 8 KiB

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View file

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View file

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
se/4-clear.mp3 Normal file

Binary file not shown.

BIN
se/allclear.mp3 Normal file

Binary file not shown.

BIN
se/brockbreak.mp3 Normal file

Binary file not shown.

BIN
se/brockcoin.mp3 Normal file

Binary file not shown.

BIN
se/brockkinoko.mp3 Normal file

Binary file not shown.

BIN
se/coin.mp3 Normal file

Binary file not shown.

BIN
se/death.mp3 Normal file

Binary file not shown.

BIN
se/dokan.mp3 Normal file

Binary file not shown.

BIN
se/gameover.mp3 Normal file

Binary file not shown.

BIN
se/goal.mp3 Normal file

Binary file not shown.

BIN
se/hintblock.mp3 Normal file

Binary file not shown.

BIN
se/humi.mp3 Normal file

Binary file not shown.

BIN
se/jump.mp3 Normal file

Binary file not shown.

BIN
se/jumpblock.mp3 Normal file

Binary file not shown.

BIN
se/kirra.mp3 Normal file

Binary file not shown.

BIN
se/koura.mp3 Normal file

Binary file not shown.

BIN
se/powerup.mp3 Normal file

Binary file not shown.

BIN
se/pswitch.mp3 Normal file

Binary file not shown.

BIN
se/tekifire.mp3 Normal file

Binary file not shown.

View file

@ -1,16 +0,0 @@
@echo off
if "%1" == "debug" (
set OPTIONS=-g4
) else (
set OPTIONS=-O3 -s OUTLINING_LIMIT=2000
)
set OPTIONS=%OPTIONS% --memory-init-file 0 ^
-s DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[] ^
-s EXPORTED_RUNTIME_METHODS=[] ^
-s NO_EXIT_RUNTIME=1 ^
-s NO_BROWSER=1 ^
-s NO_DYNAMIC_EXECUTION=1 ^
-s MODULARIZE=1 ^
-s EXPORT_NAME='Dlm'
emcc %OPTIONS% -o ../docs/catmario.js --js-library lib.js main.cpp

View file

@ -1,3 +0,0 @@
#!/bin/sh
emcc main.cpp -s WASM=0 --js-library lib.js -o ../docs/catmario.js

View file

@ -1,624 +0,0 @@
//"use strict";
var LibraryDLM = {
$gfxContext: null,
$DLM: {
audioCtx: null,
audioBuffer: [],
audioSources: [],
bgmId: 0,
bgmPlaying: 0,
bgmCurrent: 0,
bgmSource: null,
mirror: false,
images: [],
fontSize: 14,
fontType: 0,
color: 'white',
mouse: 0,
touch: 0,
key: 0,
},
//------------------------------------------------------------------------------
// Graphics
//------------------------------------------------------------------------------
graphics_init: function() {
DLM.images.push(null);
},
getscreenheight: function () {
return Module['canvas'].height;
},
loadimage: function(filename) {
filename = UTF8ToString(filename);
var img = new Image();
img.src = filename;
DLM.images.push({
img: img,
x: 0,
y: 0,
w: 0,
h: 0,
});
return DLM.images.length - 1;
},
subimage: function(x, y, w, h, img) {
var src = DLM.images[img];
DLM.images.push({
img: src.img,
x: x,
y: y,
w: w,
h: h
});
return DLM.images.length - 1;
},
getimagesize: function(img, pw, ph) {
var src = DLM.images[img];
if (src) {
setValue(pw, src.w, 'i32');
setValue(ph, src.h, 'i32');
}
else {
setValue(pw, 0, 'i32');
setValue(ph, 0, 'i32');
}
},
clearscreen: function() {
gfxContext.fillStyle = DLM.color;
gfxContext.fillRect(0, 0, 480, Module['canvas'].height);
},
drawline: function(x, y, w, h) {
gfxContext.beginPath();
gfxContext.moveTo(x, y);
gfxContext.lineTo(w, h);
gfxContext.closePath();
gfxContext.strokeStyle = DLM.color;
gfxContext.stroke();
},
drawrect: function(x, y, w, h) {
if (x + w < 0 || x > 480)
return;
gfxContext.strokeStyle = DLM.color;
gfxContext.strokeRect(x, y, w, h);
},
fillrect: function(x, y, w, h) {
if (x + w < 0 || x > 480)
return;
gfxContext.fillStyle = DLM.color;
gfxContext.fillRect(x, y, w, h);
},
drawarc: function(x, y, w, h) {
gfxContext.lineWidth = 0.5;
gfxContext.arc(x, y, w, 0, Math.PI * 2);
gfxContext.strokeStyle = DLM.color;
gfxContext.stroke();
},
fillarc: function(x, y, w, h) {
gfxContext.beginPath();
gfxContext.arc(x, y, w, 0, Math.PI * 2);
gfxContext.closePath();
gfxContext.fillStyle = DLM.color;
gfxContext.fill();
},
drawimage: function(img, x, y) {
var src = DLM.images[img];
if (!src)
return;
if (x + src.w < 0 || x > 480)
return;
gfxContext.fillStyle = 'white';
if (DLM.mirror) {
gfxContext.save();
gfxContext.translate(x + src.w, y);
gfxContext.scale(-1, 1);
gfxContext.drawImage(src.img, src.x, src.y, src.w, src.h, 0, 0, src.w, src.h);
gfxContext.restore();
}
else {
gfxContext.drawImage(src.img, src.x, src.y, src.w, src.h, x, y, src.w, src.h);
}
},
drawimageflip: function(img, x, y) {
var src = DLM.images[img];
if (!src)
return;
if (x + src.w < 0 || x > 480)
return;
gfxContext.fillStyle = 'white';
gfxContext.save();
gfxContext.translate(x, y + src.h);
gfxContext.scale(1, -1);
gfxContext.drawImage(src.img, src.x, src.y, src.w, src.h, 0, 0, src.w, src.h);
gfxContext.restore();
},
setfont: function (size, thick) {
DLM.fontSize = size;
},
setfonttype: function(type) {
DLM.fontType = type;
},
drawstring: function(x, y, str) {
str = UTF8ToString(str);
gfxContext.font = DLM.fontSize + 'px sans-serif';
if (DLM.fontType == 1) {
gfxContext.fillStyle = 'black';
gfxContext.fillText(str, x, y - 1);
gfxContext.fillText(str, x, y + 1);
gfxContext.fillText(str, x - 1, y);
gfxContext.fillText(str, x + 1, y);
}
gfxContext.textAlign = 'left';
gfxContext.fillStyle = DLM.color;
gfxContext.fillText(str, x, y);
},
drawstringc: function(x, y, str) {
str = UTF8ToString(str);
gfxContext.font = DLM.fontSize + 'px sans-serif';
if (DLM.fontType == 1) {
gfxContext.fillStyle = 'black';
gfxContext.fillText(str, x, y - 1);
gfxContext.fillText(str, x, y + 1);
gfxContext.fillText(str, x - 1, y);
gfxContext.fillText(str, x + 1, y);
}
gfxContext.fillStyle = DLM.color;
gfxContext.textAlign = 'center';
gfxContext.fillText(str, x, y);
},
setcolor: function(r, g, b) {
DLM.color = 'rgba(' + r + ',' + g + ',' + b + ',' + 255 + ')';
},
setmirror: function(mirror) {
DLM.mirror = (mirror != 0);
},
begindraw: function() {
var canvas = Module['canvas'];
gfxContext = canvas.getContext('2d');
gfxContext.textBaseline = 'top';
gfxContext.strokeStyle = 'black';
},
enddraw: function() {
},
drawpad : function() {
var canvas = Module['canvas'];
var h = canvas.height;
if (h <= 420)
return;
gfxContext.clearRect(0, 420, canvas.width, h - 420);
gfxContext.save();
var key = [];
var k = DLM.touch | DLM.mouse;
key[0] = (k & 1) != 0;
key[1] = (k & 8) != 0;
key[2] = (k & 2) != 0;
key[3] = (k & 4) != 0;
gfxContext.fillStyle = 'white';
gfxContext.strokeStyle = 'black';
gfxContext.strokeWidth = 2;
var singleHand = localStorage.onehandMode;
if (singleHand) {
key[1] = (k & 0x10) != 0;
gfxContext.translate(240, 420 + (h - 420) / 2);
}
else {
gfxContext.translate(120, 420 + (h - 420) / 2);
}
for (var i = 0; i < 4; i++) {
gfxContext.globalAlpha = key[i] ? 0.6 : 0.3;
gfxContext.beginPath();
gfxContext.moveTo(-5, 0);
gfxContext.lineTo(-35, -30);
gfxContext.lineTo(-80, -30);
gfxContext.lineTo(-80, 30);
gfxContext.lineTo(-35, 30);
gfxContext.closePath();
gfxContext.fill();
gfxContext.stroke();
gfxContext.rotate(Math.PI / 2);
}
if (!singleHand) {
gfxContext.translate(260, 0);
gfxContext.globalAlpha = (k & 0x10) != 0 ? 0.6 : 0.3;
gfxContext.fillRect(-40, -40, 80, 80);
gfxContext.strokeRect(-40, -40, 80, 80);
}
gfxContext.restore();
},
//------------------------------------------------------------------------------
// Input
//------------------------------------------------------------------------------
input_init: function() {
DLM.key = 0;
DLM.touch = 0;
DLM.mouse = 0;
var canvas = Module['canvas'];
var key_callback = function (e) {
e.preventDefault();
if (e.repeat)
return;
var buttons = 0;
switch (e.keyCode) {
case 37: buttons |= 1; break;
case 38: buttons |= 16; break;
case 39: buttons |= 2; break;
case 40: buttons |= 4; break;
case 13: buttons |= 32; break;
case 32: buttons |= 16; break;
}
if (e.type == 'keydown') {
DLM.key |= buttons;
}
else if (e.type == 'keyup') {
DLM.key = DLM.key & (~buttons);
}
};
var check_touch = function (x, y, x1, y1, x2, y2) {
return (x > x1 && x < x2 && y > y1 && y < y2);
}
var check_pad = function (px, py) {
var rect = canvas.getBoundingClientRect();
var x = (px - rect.left) / (rect.right - rect.left) * canvas.width;
var y = (py - rect.top) / (rect.bottom - rect.top) * canvas.height;
var touch = 0;
var cy = 420 + (canvas.height - 420) / 2;
var singleHand = localStorage.onehandMode;
if (check_touch(x, y, 0, 0, 480, 420)) {
touch |= 0x20;
} else if (singleHand) {
var cx = 240;
var w1 = 40 * 1.0;
var w2 = 200 * 1.0;
if (check_touch(x, y, cx - w1, cy + w1, cx + w1, cy + w2)) touch |= 4; // down
if (check_touch(x, y, cx - w1, cy - w2, cx + w1, cy - w1)) touch |= 16; // up
if (check_touch(x, y, cx - w2, cy - w1, cx, cy + w1)) touch |= 1; // left
if (check_touch(x, y, cx, cy - w1, cx + w2, cy + w1)) touch |= 2; // right
if (check_touch(x, y, cx - w2, cy - w2, cx - w1, cy - w1)) touch |= (16 | 1); // upleft
if (check_touch(x, y, cx + w1, cy - w2, cx + w2, cy - w1)) touch |= (16 | 2); // upright
if (check_touch(x, y, cx - w2, cy + w1, cx - w1, cy + w2)) touch |= (4 | 1); // downleft
if (check_touch(x, y, cx + w1, cy + w1, cx + w2, cy + w2)) touch |= (4 | 2); // downright
}
else {
var cx = 120;
var w1 = 40;
var w2 = 120;
if (check_touch(x, y, 380 - 80, cy - 80, 380 + 80, cy + 80)) touch |= 0x10; // jump
else if (check_touch(x, y, cx - w1, cy + w1, cx + w1, cy + w2)) touch |= 4; // down
else if (check_touch(x, y, cx - w1, cy - w2, cx + w1, cy - w1)) touch |= 8; // up
else if (check_touch(x, y, cx - w2, cy - w1, cx, cy + w1)) touch |= 1; // left
else if (check_touch(x, y, cx, cy - w1, cx + w2, cy + w1)) touch |= 2; // right
}
return touch;
}
var mouse_callback = function (e) {
DLM.mouse = 0;
if (e.buttons) {
DLM.mouse = check_pad(e.clientX, e.clientY);
}
}
var touch_callback = function (e) {
e.preventDefault();
var touch = 0;
for (var i = 0; i < e.touches.length; i++) {
var t = e.touches.item(i);
touch |= check_pad(t.clientX, t.clientY);
}
DLM.touch = touch;
}
canvas.addEventListener('keydown', key_callback, true);
canvas.addEventListener('keyup', key_callback, true);
canvas.addEventListener('mousedown', mouse_callback, true);
canvas.addEventListener('mouseup', mouse_callback, true);
canvas.addEventListener('mousemove', mouse_callback, true);
canvas.addEventListener('touchstart', touch_callback, true);
canvas.addEventListener('touchend', touch_callback, true);
canvas.addEventListener('touchmove', touch_callback, true);
canvas.addEventListener('touchcancel', touch_callback, true);
if (Module.ios) {
canvas.addEventListener('touchend', function() {
if (Module.unlockAudio) {
Module.unlockAudio();
Module.unlockAudio = null;
}
}, true);
}
},
input_waitkey: function() {
},
input_get: function() {
return DLM.key | DLM.touch | DLM.mouse;
},
getrand: function(maxValue) {
return Math.floor(Math.random() * maxValue);
},
gettime: function() {
var t = new Date().getTime();
return t % 0xfffffff;
},
//------------------------------------------------------------------------------
// Sound
//------------------------------------------------------------------------------
sound_init: function() {
Module.unlockAudio = function() {
if (!DLM.audioCtx)
return;
// create empty buffer
var buffer = DLM.audioCtx.createBuffer(1, 1, 22050);
var source = DLM.audioCtx.createBufferSource();
source.buffer = buffer;
// connect to output (your speakers)
source.connect(DLM.audioCtx.destination);
// play the file
source.start(0);
};
DLM.loadAudio = function (id, url, cb) {
if (!DLM.audioCtx)
return;
if (DLM.audioBuffer[id]) {
if (cb) cb(id);
return;
}
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'arraybuffer';
xhr.onload = function (e) {
DLM.audioCtx.decodeAudioData(this.response, function (buffer) {
DLM.audioBuffer[id] = buffer;
if (cb) cb(id);
});
};
DLM.audioBuffer[id] = xhr;
xhr.send();
};
DLM.bgmUpdate = function() {
if (!DLM.audioCtx)
return;
if (DLM.bgmPlaying == DLM.bgmCurrent)
return;
// stop current bgm
if (DLM.bgmSource) {
try {DLM.bgmSource.stop(0)} catch (err) {}
DLM.bgmSource = null;
}
if (localStorage.disableBgm)
return;
var buf = DLM.audioBuffer[DLM.bgmPlaying];
if (buf instanceof AudioBuffer) {
var audioCtx = DLM.audioCtx;
var source = audioCtx.createBufferSource();
source.buffer = buf;
source.loop = true;
var gainNode = audioCtx.createGain();
source.connect(gainNode);
gainNode.connect(audioCtx.destination);
gainNode.gain.value = 0.5;
source.start(0);
DLM.bgmSource = source;
DLM.bgmCurrent = DLM.bgmPlaying;
}
}
DLM.loadSe = function() {
DLM.loadAudio(1, 'snd/se1.mp3');
DLM.loadAudio(2, 'snd/se2.mp3');
DLM.loadSe = null;
};
var audioCtx;
try { audioCtx = new (window.AudioContext || window.webkitAudioContext)(); } catch (e) {}
if (audioCtx) {
DLM.audioCtx = audioCtx;
// Old Web Audio API (e.g. Safari 6.0.5) had an inconsistently named createGainNode function.
if (typeof (audioCtx.createGain) === 'undefined') audioCtx.createGain = audioCtx.createGainNode;
var visibilitychange = function () {
if (document.visibilityState == 'visible') {
audioCtx.resume();
}
else {
audioCtx.suspend();
}
};
document.addEventListener("visibilitychange", visibilitychange);
}
},
soundplay: function(x) {
if (localStorage.disableSe) {
return;
}
var audioCtx = DLM.audioCtx;
if (!audioCtx)
return;
if (DLM.loadSe)
DLM.loadSe();
var i = 0;
var s = 0;
var d = 0;
switch (x) {
case 1: i = 1; s = 0.000; d = 0.641; break;
case 3: i = 1; s = 0.700; d = 0.432; break;
case 4: i = 1; s = 1.200; d = 0.928; break;
case 5: i = 1; s = 2.200; d = 0.458; break;
case 6: i = 1; s = 2.700; d = 0.249; break;
case 7: i = 1; s = 3.000; d = 0.928; break;
case 8: i = 1; s = 4.000; d = 0.928; break;
case 9: i = 1; s = 5.000; d = 0.928; break;
case 10: i = 1; s = 6.000; d = 0.432; break;
case 11: i = 1; s = 6.500; d = 6.936; break;
case 12: i = 1; s = 13.500; d = 3.253; break;
case 13: i = 2; s = 0.000; d = 0.275; break;
case 14: i = 2; s = 0.300; d = 0.118; break;
case 15: i = 2; s = 0.500; d = 0.797; break;
case 16: i = 2; s = 1.400; d = 4.428; break;
case 17: i = 2; s = 5.900; d = 6.936; break;
case 18: i = 2; s = 13.000; d = 1.476; break;
}
if (i > 0) {
var buf = DLM.audioBuffer[i];
if (buf instanceof AudioBuffer) {
var source = audioCtx.createBufferSource();
source.buffer = buf;
source.connect(audioCtx.destination);
source.start(0, s, d);
source.onended = function () {
if (DLM.audioSources[x] == source) {
DLM.audioSources[x] = null;
}
}
DLM.audioSources[x] = source;
}
}
},
soundstop: function(x) {
var s = DLM.audioSources[x];
if (s) {
try { s.stop(0); } catch (err) {}
DLM.audioSources[x] = null;
}
},
soundcheck: function(x) {
return DLM.audioSources[x] != null;
},
bgmchange: function (x) {
DLM.bgmId = x;
if (localStorage.disableBgm) {
return;
}
var buf = DLM.audioBuffer[x];
if (!buf) {
var src;
switch (DLM.bgmId) {
case 100: src = "snd/field.mp3"; break;
case 103: src = "snd/dungeon.mp3"; break;
case 104: src = "snd/star4.mp3"; break;
case 105: src = "snd/castle.mp3"; break;
case 106: src = "snd/puyo.mp3"; break;
default: return;
}
DLM.loadAudio(DLM.bgmId, src, function (id) {
DLM.bgmUpdate();
});
}
},
bgmstop: function (x) {
DLM.bgmPlaying = 0;
DLM.bgmUpdate();
},
bgmplay: function(x) {
DLM.bgmPlaying = DLM.bgmId;
DLM.bgmCurrent = 0;
DLM.bgmUpdate();
},
//------------------------------------------------------------------------------
// AD
//------------------------------------------------------------------------------
adshow: function() {
var ad = document.getElementById('ad');
if (ad) {
DLM.ad = ad;
}
if (DLM.ad) {
var ad = DLM.ad;
var canvas = Module['canvas'];
var rect = canvas.getBoundingClientRect();
ad.style.left = rect.left + 'px';
ad.style.top = rect.top + 'px';
ad.style.width = rect.width + 'px';
ad.style.height = 100;
DLM.ad.hidden = false;
}
},
adhide: function() {
if (DLM.ad) {
DLM.ad.hidden = true;
}
},
dlm_score: function(type, score) {
}
};
autoAddDeps(LibraryDLM, '$DLM', '$gfxContext');
mergeInto(LibraryManager.library, LibraryDLM);

355
src/str.h
View file

@ -1,355 +0,0 @@
#ifndef JP
#define JP(id, str)
#endif
#ifndef CN
#define CN(id, str)
#endif
JP(IDS_1, "51")
CN(IDS_1, "51")
JP(IDS_2, "ゲームクリアー")
CN(IDS_2, "恭喜您通关了")
JP(IDS_3, "プレイしてくれてありがとー")
CN(IDS_3, "感谢您体验我们的游戏")
JP(IDS_4, "WELCOME TO OWATA ZONE")
CN(IDS_4, "貌似发现了隐藏的关卡")
JP(IDS_SCORE, "SCORE")
CN(IDS_SCORE, "分数")
JP(IDS_LEVEL, "LEVEL %d-%d")
CN(IDS_LEVEL, "关卡 %d-%d")
JP(IDS_HISCORE, "HISCORE")
CN(IDS_HISCORE, "最高分")
// 碰到云时
JP(IDS_MSG_1, "お、おいしい!!")
CN(IDS_MSG_1, "好吃!!")
// 吃到没有毒的蘑菇时
JP(IDS_MSG_2, "毒は無いが……")
CN(IDS_MSG_2, "虽然没有毒...")
// 碰到星星室
JP(IDS_MSG_3, "刺さった!!")
CN(IDS_MSG_3, "被刺死了!!")
// 吃到毒蘑菇时
JP(IDS_MSG_10, "食べるべきではなかった!!")
CN(IDS_MSG_10, "吃蘑菇才不会变大呢..")
// 吃到花时
JP(IDS_MSG_11, "俺は燃える男だ!!")
CN(IDS_MSG_11, "肚子里有火球,烫死了!!")
// 碰到火球时
JP(IDS_MSG_50, "体が……焼ける……")
CN(IDS_MSG_50, "身体烧着了……")
// 被机关扎到
JP(IDS_MSG_51, "たーまやー!!")
CN(IDS_MSG_51, "这...!!")
// 走进水管里
JP(IDS_MSG_52, "見事にオワタ")
CN(IDS_MSG_52, "死路一条")
JP(IDS_MSG_53, "足が、足がぁ!!")
CN(IDS_MSG_53, "我的脚、我的脚啊!!")
JP(IDS_MSG_54, "流石は摂氏800度!!")
CN(IDS_MSG_54, "不愧是摄氏800度!!")
JP(IDS_MSG_55, "溶岩と合体したい……")
CN(IDS_MSG_55, "烫死了……")
// 普通小怪
JP(IDS_AMSG_1001, "ヤッフー!!")
CN(IDS_AMSG_1001, "Yeah!!")
JP(IDS_AMSG_1002, "え?俺勝っちゃったの?")
CN(IDS_AMSG_1002, "恩?这样就赢了?")
JP(IDS_AMSG_1003, "貴様の死に場所はここだ!")
CN(IDS_AMSG_1003, "简直是不堪一击!")
JP(IDS_AMSG_1004, "二度と会う事もないだろう")
CN(IDS_AMSG_1004, "你确定你会打游戏?")
JP(IDS_AMSG_1005, "俺、最強!!")
CN(IDS_AMSG_1005, "我是最强的!!")
JP(IDS_AMSG_1006, "一昨日来やがれ!!")
CN(IDS_AMSG_1006, "没见过这么笨的!!")
JP(IDS_AMSG_1007, "漢に後退の二文字は無い!!")
CN(IDS_AMSG_1007, "冲啊!!")
JP(IDS_AMSG_1008, "ハッハァ!!")
CN(IDS_AMSG_1008, "哈哈!!")
JP(IDS_AMSG_1011, "ヤッフー!!")
CN(IDS_AMSG_1011, "...")
JP(IDS_AMSG_1012, "え?俺勝っちゃったの?")
CN(IDS_AMSG_1012, "完全不是我的对手")
JP(IDS_AMSG_1013, "貴様の死に場所はここだ!")
CN(IDS_AMSG_1013, "这里就是你的归宿!")
JP(IDS_AMSG_1014, "身の程知らずが……")
CN(IDS_AMSG_1014, "你这个不知天高地厚的家伙……")
JP(IDS_AMSG_1015, "油断が死を招く")
CN(IDS_AMSG_1015, "少看不起我了")
JP(IDS_AMSG_1016, "おめでたい奴だ")
CN(IDS_AMSG_1016, "菜鸟一个")
JP(IDS_AMSG_1017, "屑が!!")
CN(IDS_AMSG_1017, "笨死了!!")
JP(IDS_AMSG_1018, "無謀な……")
CN(IDS_AMSG_1018, "太乱来了……")
JP(IDS_AMSG_1021, "ヤッフー!!")
CN(IDS_AMSG_1021, "Yes!!")
JP(IDS_AMSG_1022, "え?俺勝っちゃったの?")
CN(IDS_AMSG_1022, "我就这么赢了吗?")
JP(IDS_AMSG_1023, "二度と会う事もないだろう")
CN(IDS_AMSG_1023, "你还是放弃吧")
JP(IDS_AMSG_1024, "身の程知らずが……")
CN(IDS_AMSG_1024, "就你也敢跟我斗?")
JP(IDS_AMSG_1025, "僕は……負けない!!")
CN(IDS_AMSG_1025, "我是不会输的!!")
JP(IDS_AMSG_1026, "貴様に見切れる筋は無い")
CN(IDS_AMSG_1026, "我这招是不会被你识破的")
JP(IDS_AMSG_1027, "今死ね、すぐ死ね、骨まで砕けろ!!")
CN(IDS_AMSG_1027, "去死吧!!")
JP(IDS_AMSG_1028, "任務完了!!")
CN(IDS_AMSG_1028, "任務完成!!")
JP(IDS_AMSG_1031, "ヤッフー!!")
CN(IDS_AMSG_1031, "Yahoo!!")
JP(IDS_AMSG_1032, "え?俺勝っちゃったの?")
CN(IDS_AMSG_1032, "就这么赢了?")
JP(IDS_AMSG_1033, "貴様の死に場所はここだ!")
CN(IDS_AMSG_1033, "今天就是您的死期了!")
JP(IDS_AMSG_1034, "身の程知らずが……")
CN(IDS_AMSG_1034, "居然敢碰我……")
JP(IDS_AMSG_1035, "油断が死を招く")
CN(IDS_AMSG_1035, "大意了吧")
JP(IDS_AMSG_1036, "おめでたい奴だ")
CN(IDS_AMSG_1036, "你也没那么厉害么")
JP(IDS_AMSG_1037, "屑が!!")
CN(IDS_AMSG_1037, "笨蛋!")
JP(IDS_AMSG_1038, "無謀な……")
CN(IDS_AMSG_1038, "太乱来了……")
// 碰到乌龟时
JP(IDS_AMSG_15, "鉄壁!!よって、無敵!!")
CN(IDS_AMSG_15, "我有壳,我是无敌的!!")
JP(IDS_AMSG_16, "丸腰で勝てるとでも?")
CN(IDS_AMSG_16, "你就这身垃圾装备还想赢我?")
JP(IDS_AMSG_17, "パリイ!!")
CN(IDS_AMSG_17, "巴里!!")
JP(IDS_AMSG_18, "自業自得だ")
CN(IDS_AMSG_18, "这是你自找的")
JP(IDS_AMSG_20, "Zzz")
CN(IDS_AMSG_20, "Zzz")
JP(IDS_AMSG_21, "ク、クマー")
CN(IDS_AMSG_21, "好、好吃")
JP(IDS_AMSG_24, "?")
CN(IDS_AMSG_24, "?")
// 吃到毒蘑菇时
JP(IDS_AMSG_25, "食べるべきではなかった!!")
CN(IDS_AMSG_25, "不应该吃它的!!")
JP(IDS_AMSG_30, "うめぇ!!")
CN(IDS_AMSG_30, "哎呀,不好意思!!")
// 鹏到地上的刺
JP(IDS_AMSG_31, "ブロックを侮ったな?")
CN(IDS_AMSG_31, "不带这么玩的..")
JP(IDS_AMSG_32, "シャキーン")
CN(IDS_AMSG_32, "我来了")
JP(IDS_AMSG_50, "波動砲!!")
CN(IDS_AMSG_50, "波動砲!!")
JP(IDS_AMSG_85, "裏切られたとでも思ったか?")
CN(IDS_AMSG_85, "你觉得被出卖了吗?")
JP(IDS_AMSG_86, "ポールアターック!!")
CN(IDS_AMSG_86, "超级攻击!!")
JP(IDS_STAFF_1, "制作・プレイに関わった方々")
CN(IDS_STAFF_1, "制作名单")
JP(IDS_STAFF_2, "ステージ1 プレイ")
CN(IDS_STAFF_2, "关卡1 制作")
JP(IDS_STAFF_3, "先輩 Ⅹ~Z")
CN(IDS_STAFF_3, "先輩 Ⅹ~Z")
JP(IDS_STAFF_4, "ステージ2 プレイ")
CN(IDS_STAFF_4, "关卡2 制作")
JP(IDS_STAFF_5, "友人 willowlet")
CN(IDS_STAFF_5, "友人 willowlet")
JP(IDS_STAFF_6, "ステージ3 プレイ")
CN(IDS_STAFF_6, "关卡3 制作")
JP(IDS_STAFF_7, "友人 willowlet")
CN(IDS_STAFF_7, "友人 willowlet")
JP(IDS_STAFF_8, "ステージ4 プレイ")
CN(IDS_STAFF_8, "关卡4 制作")
JP(IDS_STAFF_9, "友人 ann")
CN(IDS_STAFF_9, "友人 ann")
JP(IDS_STAFF_10, "ご協力")
CN(IDS_STAFF_10, "协助")
JP(IDS_STAFF_11, "T先輩")
CN(IDS_STAFF_11, "T先輩")
JP(IDS_STAFF_12, "S先輩")
CN(IDS_STAFF_12, "S先輩")
JP(IDS_STAFF_13, "動画技術提供")
CN(IDS_STAFF_13, "動画技術提供")
JP(IDS_STAFF_14, "K先輩")
CN(IDS_STAFF_14, "K先輩")
JP(IDS_STAFF_15, "動画キャプチャ・編集・エンコード")
CN(IDS_STAFF_15, "动画制作")
JP(IDS_STAFF_16, "willowlet")
CN(IDS_STAFF_16, "willowlet")
JP(IDS_STAFF_17, "プログラム・描画・ネタ・動画編集")
CN(IDS_STAFF_17, "程序・美术・动画")
JP(IDS_STAFF_18, "ちく")
CN(IDS_STAFF_18, "ちく")
JP(IDS_STAFF_19, "プレイしていただき ありがとうございました~")
CN(IDS_STAFF_19, "感谢您的参与~")
JP(IDS_START, "Enterキーを押せ!!")
CN(IDS_START, "按任意键开始游戏!!")
JP(IDS_STAGE, "Stage %d-%d")
CN(IDS_STAGE, "第 %d-%d 关")
JP(IDS_TMSG_0, "テスト hoge")
CN(IDS_TMSG_0, "Test hoge")
JP(IDS_TMSG_11, "ステージ 1 より")
JP(IDS_TMSG_12, "特殊的なものが増えたので")
JP(IDS_TMSG_13, "気をつけてくれよ~")
JP(IDS_TMSG_14, "後、アイテムの一部を利用するかも…")
JP(IDS_TMSG_15, " ちく より")
CN(IDS_TMSG_11, "居然可以通过第一关")
CN(IDS_TMSG_12, "看来有点实力啊")
CN(IDS_TMSG_13, "接下来要当心一点~")
CN(IDS_TMSG_14, "因为真正的挑战才刚刚开始...")
CN(IDS_TMSG_15, " 哇哈哈哈哈")
JP(IDS_TMSG_21, " ?が必要です ")
JP(IDS_TMSG_22, " m9(^Д^)")
CN(IDS_TMSG_21, "必须获得带有?的道具")
CN(IDS_TMSG_22, " m9(^Д^)")
JP(IDS_TMSG_31, " 別にコインに意味ないけどね ")
JP(IDS_TMSG_32, " (・ω・ )ノシ")
CN(IDS_TMSG_31, " 吃再多的金币,也不会增加分数.. ")
CN(IDS_TMSG_32, " (・ω・ )ノシ")
JP(IDS_TMSG_41, "この先に隠しブロックがあります ")
JP(IDS_TMSG_42, "注意してください !!")
CN(IDS_TMSG_41, "前方有一个隐藏的方块")
CN(IDS_TMSG_42, "请小心一点 !!")
JP(IDS_TMSG_51, " 前回よりも難易度を下げましたので")
JP(IDS_TMSG_52, " 気楽にプレイしてください")
JP(IDS_TMSG_53, " ちく より")
CN(IDS_TMSG_51, " 比上一关玩难度更低了")
CN(IDS_TMSG_52, " 请随便玩玩吧")
CN(IDS_TMSG_53, " 作者")
JP(IDS_TMSG_61, " そこにいる敵のそばによると、 ")
JP(IDS_TMSG_62, " 自分と一緒にジャンプしてくれます。")
JP(IDS_TMSG_63, " 可愛いですね。 ")
CN(IDS_TMSG_61, " 你站在敌人的旁边")
CN(IDS_TMSG_62, " 它就会和你一起跳起来。")
CN(IDS_TMSG_63, " 真是太可爱了。")
JP(IDS_TMSG_71, " あの敵は連れて来れましたか?、")
JP(IDS_TMSG_72, " 連れて来れなかった貴方は、")
JP(IDS_TMSG_73, " そこの落とし穴から Let's dive!")
CN(IDS_TMSG_71, " 你把那个会跳到敌人带来了吗?")
CN(IDS_TMSG_72, " 如果你没把它带过来、")
CN(IDS_TMSG_73, " 那我就把你踢到坑里 Let's dive!")
JP(IDS_TMSG_81, "そんな容易に")
JP(IDS_TMSG_82, "ヒントに頼るもんじゃないぜ")
JP(IDS_TMSG_83, "ほら、さっさと次行きな!!")
CN(IDS_TMSG_81, "别想着很容易的")
CN(IDS_TMSG_82, "就能走捷径")
CN(IDS_TMSG_83, "接下来怎么办,自己想办法吧!!")
JP(IDS_TMSG_91, " 正真正銘のファイナルステージ。")
JP(IDS_TMSG_92, " クリアすれば遂にエンディング!! ")
JP(IDS_TMSG_93, " その土管から戻ってもいいんだぜ?")
CN(IDS_TMSG_91, " 这是正宗的最后一关。")
CN(IDS_TMSG_92, " 只要能打通,就能迎来结局!!")
CN(IDS_TMSG_93, " 我能从那跟管道里回去吗?")
JP(IDS_TMSG_1001, "え?私ですか? ")
JP(IDS_TMSG_1002, "いやぁ、ただの通りすがりの")
JP(IDS_TMSG_1003, "ヒントブロックですよ~")
JP(IDS_TMSG_1004, "決して怪しいブロックじゃないですよ")
JP(IDS_TMSG_1005, " (…チッ)")
CN(IDS_TMSG_1001, "诶?是我吗? ")
CN(IDS_TMSG_1002, "不是的, 我只是一个路过的提示框")
CN(IDS_TMSG_1003, "不是很奇怪的方块~")
CN(IDS_TMSG_1004, "")
CN(IDS_TMSG_1005, " ")
#undef CN
#undef JP