Merge branch 'accurate' into portable
This commit is contained in:
commit
71970c1f74
41 changed files with 716 additions and 595 deletions
69
README.md
69
README.md
|
@ -2,22 +2,19 @@
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
This repo has multiple branches:
|
This repo has two main branches:
|
||||||
|
|
||||||
Branch | Description
|
Branch | Description
|
||||||
--------|--------
|
--------|--------
|
||||||
[accurate](https://www.github.com/Clownacy/CSE2/tree/accurate) | The main decompilation branch. The code intended to be as close to the original as possible, down to all the bugs and platform-dependencies.
|
[accurate](https://www.github.com/Clownacy/CSE2/tree/accurate) | The main decompilation branch. The code is intended to be as close to the original as possible, down to all the bugs and platform-dependencies.
|
||||||
[portable](https://www.github.com/Clownacy/CSE2/tree/portable) | This branch ports the engine away from WinAPI and DirectX, and addresses numerous portability issues, allowing it to run on other platforms.
|
[portable](https://www.github.com/Clownacy/CSE2/tree/portable) | This branch ports the engine away from WinAPI and DirectX, and addresses numerous portability issues, allowing it to run on other platforms.
|
||||||
[enhanced-lite](https://www.github.com/Clownacy/CSE2/tree/enhanced-lite) | Based on the `portable` branch, this branch is **intended for modders**, and adds several enhancements and features to the engine.
|
|
||||||
[enhanced](https://www.github.com/Clownacy/CSE2/tree/enhanced) | Based on the `enhanced-lite` branch, this branch is **intended for players**, and adds further enhancements and features to the engine.
|
|
||||||
[emscripten](https://www.github.com/Clownacy/CSE2/tree/emscripten) | Modifies the engine to build with Emscripten, [allowing it to run in web browsers](http://sonicresearch.org/clownacy/cave.html) (no longer maintained).
|
|
||||||
[wii](https://www.github.com/Clownacy/CSE2/tree/wii) | Ports the engine to the Nintendo Wii (no longer maintained).
|
|
||||||
|
|
||||||
# CSE2 (Portable)
|
# CSE2 (Portable)
|
||||||
|
|
||||||
CSE2 is a decompilation of Cave Story.
|
CSE2 is a decompilation of Cave Story.
|
||||||
|
|
||||||
This branch migrates the engine away from WinAPI and DirectX, and addresses numerous portability issues, allowing it to run on other platforms.
|
This branch migrates the engine away from WinAPI and DirectX, and addresses
|
||||||
|
numerous portability issues, allowing it to run on other platforms.
|
||||||
|
|
||||||
Supported platforms include...
|
Supported platforms include...
|
||||||
* Windows
|
* Windows
|
||||||
|
@ -29,19 +26,39 @@ Supported platforms include...
|
||||||
|
|
||||||
## Background
|
## Background
|
||||||
|
|
||||||
When Pixel made Cave Story, he compiled the original Windows EXE with no optimisations. This left the generated assembly code extremely verbose and easy to read. It also made the code very decompiler-friendly, since the assembly could be mapped directly back to the original C(++) code.
|
When Pixel made Cave Story, he compiled the original Windows EXE with no
|
||||||
|
optimisations. This left the generated assembly code extremely verbose and easy
|
||||||
|
to read. It also made the code very decompiler-friendly, since the assembly
|
||||||
|
could be mapped directly back to the original C(++) code.
|
||||||
|
|
||||||
Technically, this alone made a decompilation feasible, as was the case for [the Super Mario 64 decompilation project](https://github.com/n64decomp/sm64) - however, there was more to be found...
|
Technically, this alone made a decompilation feasible, as was the case for [the
|
||||||
|
Super Mario 64 decompilation project](https://github.com/n64decomp/sm64) -
|
||||||
|
however, there was more to be found...
|
||||||
|
|
||||||
In 2007, a Linux port of Cave Story was made by Peter Mackay and Simon Parzer. Details about it can be found on [Peter's old blog](https://web.archive.org/web/20070911202919/http://aaiiee.wordpress.com:80/). This port received an update in 2011, including two shiny new executables. What Peter and Simon didn't realise was that they left huge amounts of debugging information in these executables, including the names of every C++ source file, as well as the variables, functions, and structs they contained.
|
In 2007, a Linux port of Cave Story was made by Peter Mackay and Simon Parzer.
|
||||||
|
Details about it can be found on [Peter's old blog](https://web.archive.org/web/20070911202919/http://aaiiee.wordpress.com:80/).
|
||||||
|
This port received an update in 2011, including two shiny new executables. What
|
||||||
|
Peter and Simon didn't realise was that they left huge amounts of debugging
|
||||||
|
information in these executables, including the names of every C++ source file,
|
||||||
|
as well as the variables, functions, and structs they contained.
|
||||||
|
|
||||||
This was a goldmine of information about not just the game's inner-workings, but its _source code._ This is the same lucky-break [the Diablo decompilation project](https://github.com/diasurgical/devilution) had. With it, much of the game's code was pre-documented and explained _for_ us, saving us the effort of doing it ourselves. In fact, the combination of easy-to-decompile code, and a near-full set of function/variable names, reduced much of the decompilation process to mere copy-paste.
|
This was a goldmine of information about not just the game's inner-workings, but
|
||||||
|
its _source code._ This is the same lucky-break [the Diablo decompilation project](https://github.com/diasurgical/devilution)
|
||||||
|
had. With it, much of the game's code was pre-documented and explained _for_ us,
|
||||||
|
saving us the effort of doing it ourselves. In fact, the combination of
|
||||||
|
easy-to-decompile code, and a near-full set of function/variable names, reduced
|
||||||
|
much of the decompilation process to mere copy-paste.
|
||||||
|
|
||||||
To top it all off, some of Cave Story's original source code would eventually see the light of day...
|
To top it all off, some of Cave Story's original source code would eventually
|
||||||
|
see the light of day...
|
||||||
|
|
||||||
In early 2018, the Organya music engine was [released on GitHub](https://github.com/shbow/organya) by an old friend of Pixel's. On top of providing an insight into Pixel's coding style, this helped with figuring out one of the most complex parts of Cave Story's codebase.
|
In early 2018, the Organya music engine was [released on GitHub](https://github.com/shbow/organya)
|
||||||
|
by an old friend of Pixel's. On top of providing an insight into Pixel's coding
|
||||||
|
style, this helped with figuring out one of the most complex parts of Cave
|
||||||
|
Story's codebase.
|
||||||
|
|
||||||
And... that's it! It's not often that a game this decompilable comes along, so I'm glad that Cave Story was one of them. [Patching a dusty old executable from 2004 has its downsides](https://github.com/Clownacy/Cave-Story-Mod-Loader/blob/master/src/mods/graphics_enhancement/widescreen/patch_camera.c).
|
And... that's it! It's not often that a game this decompilable comes along, so
|
||||||
|
I'm glad that Cave Story was one of them. [Patching a dusty old executable from 2004 has its downsides](https://github.com/Clownacy/Cave-Story-Mod-Loader/blob/master/src/mods/graphics_enhancement/widescreen/patch_camera.c).
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
|
@ -59,7 +76,9 @@ A list of dependencies for specific platforms can be found [on the wiki](https:/
|
||||||
|
|
||||||
This project uses CMake, allowing it to be built with a range of compilers.
|
This project uses CMake, allowing it to be built with a range of compilers.
|
||||||
|
|
||||||
Switch to the terminal (Visual Studio users should open the [Developer Command Prompt](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs)) and `cd` into this folder. After that, generate the files for your build system with:
|
Switch to the terminal (Visual Studio users should open the [Developer Command Prompt](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs))
|
||||||
|
and `cd` into this folder. After that, generate the files for your build system
|
||||||
|
with:
|
||||||
|
|
||||||
```
|
```
|
||||||
cmake -B build -DCMAKE_BUILD_TYPE=Release
|
cmake -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
|
@ -104,15 +123,18 @@ You can then compile CSE2 with this command:
|
||||||
cmake --build build --config Release
|
cmake --build build --config Release
|
||||||
```
|
```
|
||||||
|
|
||||||
If you're a Visual Studio user, you can open the generated `CSE2.sln` file instead, which can be found in the `build` folder.
|
If you're a Visual Studio user, you can open the generated `CSE2.sln` file
|
||||||
|
instead, which can be found in the `build` folder.
|
||||||
|
|
||||||
Once built, the executables can be found in the `game_english`/`game_japanese` folder, depending on the selected language.
|
Once built, the executables can be found in the `game_english`/`game_japanese`
|
||||||
|
folder, depending on the selected language.
|
||||||
|
|
||||||
### Building for the Wii U
|
### Building for the Wii U
|
||||||
|
|
||||||
To target the Wii U, you'll need devkitPro, and WUT.
|
To target the Wii U, you'll need devkitPro, and WUT.
|
||||||
|
|
||||||
First, add the devkitPPC tools directory to your PATH (because WUT's CMake support is broken, as of writing):
|
First, add the devkitPPC tools directory to your PATH (because WUT's CMake
|
||||||
|
support is broken, as of writing):
|
||||||
|
|
||||||
```
|
```
|
||||||
PATH=$PATH:$DEVKITPPC/bin
|
PATH=$PATH:$DEVKITPPC/bin
|
||||||
|
@ -130,7 +152,8 @@ Finally, build the game with this command:
|
||||||
cmake --build buildwiiu
|
cmake --build buildwiiu
|
||||||
```
|
```
|
||||||
|
|
||||||
This will build a binary, but you still need to convert it to an `.rpx` file that can be ran on your Wii U.
|
This will build a binary, but you still need to convert it to an `.rpx` file
|
||||||
|
that can be ran on your Wii U.
|
||||||
|
|
||||||
First, we need to strip the binary:
|
First, we need to strip the binary:
|
||||||
|
|
||||||
|
@ -143,8 +166,12 @@ Then, we convert it to an `.rpx`:
|
||||||
elf2rpl game_english/CSE2 game_english/CSE2.rpx
|
elf2rpl game_english/CSE2 game_english/CSE2.rpx
|
||||||
```
|
```
|
||||||
|
|
||||||
`game_english/CSE2.rpx` is now ready to be ran on your Wii U. This port expects the data folder to be in a folder called `CSE2-portable-en`/`CSE2-portable-jp` on the root of your SD card.
|
`game_english/CSE2.rpx` is now ready to be ran on your Wii U. This port expects
|
||||||
|
the data folder to be in a folder called `CSE2-portable-en`/`CSE2-portable-jp`
|
||||||
|
on the root of your SD card.
|
||||||
|
|
||||||
## Licensing
|
## Licensing
|
||||||
|
|
||||||
Being a decompilation, the majority of the code in this project belongs to Daisuke "Pixel" Amaya - not us. We've yet to agree on a licence for our own code.
|
Being a decompilation, the majority of the code in this project belongs to
|
||||||
|
Daisuke "Pixel" Amaya - not us. We've yet to agree on a licence for our own
|
||||||
|
code.
|
||||||
|
|
38
src/Back.cpp
38
src/Back.cpp
|
@ -18,10 +18,9 @@ static unsigned long color_black;
|
||||||
// TODO - Another function that has an incorrect stack frame
|
// TODO - Another function that has an incorrect stack frame
|
||||||
BOOL InitBack(const char *fName, int type)
|
BOOL InitBack(const char *fName, int type)
|
||||||
{
|
{
|
||||||
// Unused
|
color_black = GetCortBoxColor(RGB(0, 0, 0x10)); // Unused. This may have once been used by background type 4 (the solid black background)
|
||||||
color_black = GetCortBoxColor(RGB(0, 0, 0x10));
|
|
||||||
|
|
||||||
// Get width and height
|
// We're not actually loading the bitmap here - we're just reading its width/height and making sure it's really a BMP file
|
||||||
std::string path = gDataPath + '/' + fName + ".pbm";
|
std::string path = gDataPath + '/' + fName + ".pbm";
|
||||||
|
|
||||||
FILE *fp = fopen(path.c_str(), "rb");
|
FILE *fp = fopen(path.c_str(), "rb");
|
||||||
|
@ -39,12 +38,14 @@ BOOL InitBack(const char *fName, int type)
|
||||||
|
|
||||||
fseek(fp, 18, SEEK_SET);
|
fseek(fp, 18, SEEK_SET);
|
||||||
|
|
||||||
|
// Get bitmap width and height
|
||||||
gBack.partsW = File_ReadLE32(fp);
|
gBack.partsW = File_ReadLE32(fp);
|
||||||
gBack.partsH = File_ReadLE32(fp);
|
gBack.partsH = File_ReadLE32(fp);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
// Set background stuff and load texture
|
gBack.flag = TRUE; // This variable is otherwise unused
|
||||||
gBack.flag = TRUE;
|
|
||||||
|
// *Now* we actually load the bitmap
|
||||||
if (!ReloadBitmap_File(fName, SURFACE_ID_LEVEL_BACKGROUND))
|
if (!ReloadBitmap_File(fName, SURFACE_ID_LEVEL_BACKGROUND))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -57,18 +58,19 @@ void ActBack(void)
|
||||||
{
|
{
|
||||||
switch (gBack.type)
|
switch (gBack.type)
|
||||||
{
|
{
|
||||||
case 5:
|
case BACKGROUND_TYPE_AUTOSCROLL:
|
||||||
gBack.fx += 6 * 0x200;
|
gBack.fx += 6 * 0x200;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case BACKGROUND_TYPE_OUTSIDE_WITH_WIND:
|
||||||
case 7:
|
case BACKGROUND_TYPE_OUTSIDE:
|
||||||
++gBack.fx;
|
++gBack.fx;
|
||||||
gBack.fx %= 640;
|
gBack.fx %= 640;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Draw background background elements
|
||||||
void PutBack(int fx, int fy)
|
void PutBack(int fx, int fy)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
@ -76,42 +78,44 @@ void PutBack(int fx, int fy)
|
||||||
|
|
||||||
switch (gBack.type)
|
switch (gBack.type)
|
||||||
{
|
{
|
||||||
case 0:
|
case BACKGROUND_TYPE_STATIONARY:
|
||||||
for (y = 0; y < WINDOW_HEIGHT; y += gBack.partsH)
|
for (y = 0; y < WINDOW_HEIGHT; y += gBack.partsH)
|
||||||
for (x = 0; x < WINDOW_WIDTH; x += gBack.partsW)
|
for (x = 0; x < WINDOW_WIDTH; x += gBack.partsW)
|
||||||
PutBitmap4(&grcGame, x, y, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
PutBitmap4(&grcGame, x, y, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case BACKGROUND_TYPE_MOVE_DISTANT:
|
||||||
for (y = -((fy / 2 / 0x200) % gBack.partsH); y < WINDOW_HEIGHT; y += gBack.partsH)
|
for (y = -((fy / 2 / 0x200) % gBack.partsH); y < WINDOW_HEIGHT; y += gBack.partsH)
|
||||||
for (x = -((fx / 2 / 0x200) % gBack.partsW); x < WINDOW_WIDTH; x += gBack.partsW)
|
for (x = -((fx / 2 / 0x200) % gBack.partsW); x < WINDOW_WIDTH; x += gBack.partsW)
|
||||||
PutBitmap4(&grcGame, x, y, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
PutBitmap4(&grcGame, x, y, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case BACKGROUND_TYPE_MOVE_NEAR:
|
||||||
for (y = -((fy / 0x200) % gBack.partsH); y < WINDOW_HEIGHT; y += gBack.partsH)
|
for (y = -((fy / 0x200) % gBack.partsH); y < WINDOW_HEIGHT; y += gBack.partsH)
|
||||||
for (x = -((fx / 0x200) % gBack.partsW); x < WINDOW_WIDTH; x += gBack.partsW)
|
for (x = -((fx / 0x200) % gBack.partsW); x < WINDOW_WIDTH; x += gBack.partsW)
|
||||||
PutBitmap4(&grcGame, x, y, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
PutBitmap4(&grcGame, x, y, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case BACKGROUND_TYPE_AUTOSCROLL:
|
||||||
for (y = -gBack.partsH; y < WINDOW_HEIGHT; y += gBack.partsH)
|
for (y = -gBack.partsH; y < WINDOW_HEIGHT; y += gBack.partsH)
|
||||||
for (x = -((gBack.fx / 0x200) % gBack.partsW); x < WINDOW_WIDTH; x += gBack.partsW)
|
for (x = -((gBack.fx / 0x200) % gBack.partsW); x < WINDOW_WIDTH; x += gBack.partsW)
|
||||||
PutBitmap4(&grcGame, x, y, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
PutBitmap4(&grcGame, x, y, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case BACKGROUND_TYPE_OUTSIDE_WITH_WIND:
|
||||||
case 7:
|
case BACKGROUND_TYPE_OUTSIDE:
|
||||||
|
// Draw sky
|
||||||
rect.top = 0;
|
rect.top = 0;
|
||||||
rect.bottom = 88;
|
rect.bottom = 88;
|
||||||
rect.left = 0;
|
rect.left = 0;
|
||||||
rect.right = 320;
|
rect.right = 320;
|
||||||
PutBitmap4(&grcGame, 0, 0, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
PutBitmap4(&grcGame, 0, 0, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
||||||
|
|
||||||
|
// Draw first cloud layer
|
||||||
rect.top = 88;
|
rect.top = 88;
|
||||||
rect.bottom = 123;
|
rect.bottom = 123;
|
||||||
rect.left = gBack.fx / 2;
|
rect.left = gBack.fx / 2;
|
||||||
|
@ -121,6 +125,7 @@ void PutBack(int fx, int fy)
|
||||||
rect.left = 0;
|
rect.left = 0;
|
||||||
PutBitmap4(&grcGame, 320 - ((gBack.fx / 2) % 320), 88, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
PutBitmap4(&grcGame, 320 - ((gBack.fx / 2) % 320), 88, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
||||||
|
|
||||||
|
// Draw second cloud layer
|
||||||
rect.top = 123;
|
rect.top = 123;
|
||||||
rect.bottom = 146;
|
rect.bottom = 146;
|
||||||
rect.left = gBack.fx % 320;
|
rect.left = gBack.fx % 320;
|
||||||
|
@ -130,6 +135,7 @@ void PutBack(int fx, int fy)
|
||||||
rect.left = 0;
|
rect.left = 0;
|
||||||
PutBitmap4(&grcGame, 320 - (gBack.fx % 320), 123, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
PutBitmap4(&grcGame, 320 - (gBack.fx % 320), 123, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
||||||
|
|
||||||
|
// Draw third cloud layer
|
||||||
rect.top = 146;
|
rect.top = 146;
|
||||||
rect.bottom = 176;
|
rect.bottom = 176;
|
||||||
rect.left = 2 * gBack.fx % 320;
|
rect.left = 2 * gBack.fx % 320;
|
||||||
|
@ -139,6 +145,7 @@ void PutBack(int fx, int fy)
|
||||||
rect.left = 0;
|
rect.left = 0;
|
||||||
PutBitmap4(&grcGame, 320 - ((gBack.fx * 2) % 320), 146, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
PutBitmap4(&grcGame, 320 - ((gBack.fx * 2) % 320), 146, &rect, SURFACE_ID_LEVEL_BACKGROUND);
|
||||||
|
|
||||||
|
// Draw fourth cloud layer
|
||||||
rect.top = 176;
|
rect.top = 176;
|
||||||
rect.bottom = 240;
|
rect.bottom = 240;
|
||||||
rect.left = 4 * gBack.fx % 320;
|
rect.left = 4 * gBack.fx % 320;
|
||||||
|
@ -152,6 +159,7 @@ void PutBack(int fx, int fy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Draw background foreground elements - only the water background type makes use of this
|
||||||
void PutFront(int fx, int fy)
|
void PutFront(int fx, int fy)
|
||||||
{
|
{
|
||||||
int xpos, ypos;
|
int xpos, ypos;
|
||||||
|
@ -164,7 +172,7 @@ void PutFront(int fx, int fy)
|
||||||
|
|
||||||
switch (gBack.type)
|
switch (gBack.type)
|
||||||
{
|
{
|
||||||
case 3:
|
case BACKGROUND_TYPE_WATER:
|
||||||
x_1 = fx / (32 * 0x200);
|
x_1 = fx / (32 * 0x200);
|
||||||
x_2 = x_1 + (((WINDOW_WIDTH + (32 - 1)) / 32) + 1);
|
x_2 = x_1 + (((WINDOW_WIDTH + (32 - 1)) / 32) + 1);
|
||||||
y_1 = 0;
|
y_1 = 0;
|
||||||
|
|
14
src/Back.h
14
src/Back.h
|
@ -2,9 +2,21 @@
|
||||||
|
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
BACKGROUND_TYPE_STATIONARY = 0, // Doesn't move at all
|
||||||
|
BACKGROUND_TYPE_MOVE_DISTANT = 1, // Moves at half the speed of the foreground
|
||||||
|
BACKGROUND_TYPE_MOVE_NEAR = 2, // Moves at the same speed as the foreground
|
||||||
|
BACKGROUND_TYPE_WATER = 3, // No background - draws a water foreground layer instead
|
||||||
|
BACKGROUND_TYPE_BLACK = 4, // No background - just black
|
||||||
|
BACKGROUND_TYPE_AUTOSCROLL = 5, // Constantly scrolls to the left (used by Ironhead)
|
||||||
|
BACKGROUND_TYPE_OUTSIDE_WITH_WIND = 6, // Fancy parallax scrolling, items are blown to the left (used by bkMoon)
|
||||||
|
BACKGROUND_TYPE_OUTSIDE = 7 // Fancy parallax scrolling (used by bkFog)
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct BACK
|
typedef struct BACK
|
||||||
{
|
{
|
||||||
BOOL flag; // Basically unused
|
BOOL flag; // Unused - purpose unknown
|
||||||
int partsW;
|
int partsW;
|
||||||
int partsH;
|
int partsH;
|
||||||
int numX;
|
int numX;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "BossX.h"
|
#include "BossX.h"
|
||||||
#include "Bullet.h"
|
#include "Bullet.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Draw.h"
|
#include "Draw.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
#include "MyChar.h"
|
#include "MyChar.h"
|
||||||
|
@ -158,9 +159,9 @@ void HitBossBullet(void)
|
||||||
{
|
{
|
||||||
if (gBoss[bos].shock < 14)
|
if (gBoss[bos].shock < 14)
|
||||||
{
|
{
|
||||||
SetCaret(gBul[bul].x, gBul[bul].y, 11, 0);
|
SetCaret(gBul[bul].x, gBul[bul].y, CARET_HURT_PARTICLES, DIR_LEFT);
|
||||||
SetCaret(gBul[bul].x, gBul[bul].y, 11, 0);
|
SetCaret(gBul[bul].x, gBul[bul].y, CARET_HURT_PARTICLES, DIR_LEFT);
|
||||||
SetCaret(gBul[bul].x, gBul[bul].y, 11, 0);
|
SetCaret(gBul[bul].x, gBul[bul].y, CARET_HURT_PARTICLES, DIR_LEFT);
|
||||||
PlaySoundObject(gBoss[bos_].hit_voice, SOUND_MODE_PLAY);
|
PlaySoundObject(gBoss[bos_].hit_voice, SOUND_MODE_PLAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +188,7 @@ void HitBossBullet(void)
|
||||||
{
|
{
|
||||||
if (!(gBul[bul].bbits & 0x10))
|
if (!(gBul[bul].bbits & 0x10))
|
||||||
{
|
{
|
||||||
SetCaret(gBul[bul].x, gBul[bul].y, 2, 2);
|
SetCaret(gBul[bul].x, gBul[bul].y, CARET_PROJECTILE_DISSIPATION, DIR_RIGHT);
|
||||||
PlaySoundObject(31, SOUND_MODE_PLAY);
|
PlaySoundObject(31, SOUND_MODE_PLAY);
|
||||||
gBul[bul].cond = 0;
|
gBul[bul].cond = 0;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -385,7 +385,7 @@ void ActBossChar_Frog(void)
|
||||||
else
|
else
|
||||||
SetNpChar(NPC_PROJECTILE_BALFROG_SPITBALL, boss->x + 2 * (0x200 * 0x10), boss->y - 8 * 0x200, xm, ym, DIR_LEFT, NULL, 0x100);
|
SetNpChar(NPC_PROJECTILE_BALFROG_SPITBALL, boss->x + 2 * (0x200 * 0x10), boss->y - 8 * 0x200, xm, ym, DIR_LEFT, NULL, 0x100);
|
||||||
|
|
||||||
PlaySoundObject(SND_ENEMY_SHOOT_PROJETILE, SOUND_MODE_PLAY);
|
PlaySoundObject(SND_ENEMY_SHOOT_PROJECTILE, SOUND_MODE_PLAY);
|
||||||
|
|
||||||
if (boss->count1 == 0 || boss->life < boss->tgt_x - 90)
|
if (boss->count1 == 0 || boss->life < boss->tgt_x - 90)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "Bullet.h"
|
#include "Bullet.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
#include "NpChar.h"
|
#include "NpChar.h"
|
||||||
|
@ -16,10 +17,10 @@ static void Vanish(BULLET *bul)
|
||||||
if (bul->code_bullet != 37 && bul->code_bullet != 38 && bul->code_bullet != 39)
|
if (bul->code_bullet != 37 && bul->code_bullet != 38 && bul->code_bullet != 39)
|
||||||
PlaySoundObject(28, SOUND_MODE_PLAY);
|
PlaySoundObject(28, SOUND_MODE_PLAY);
|
||||||
else
|
else
|
||||||
SetCaret(bul->x, bul->y, 2, 1);
|
SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION, DIR_UP);
|
||||||
|
|
||||||
bul->cond = 0;
|
bul->cond = 0;
|
||||||
SetCaret(bul->x, bul->y, 2, 2);
|
SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION, DIR_RIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
int JudgeHitBulletBlock(int x, int y, BULLET *bul)
|
int JudgeHitBulletBlock(int x, int y, BULLET *bul)
|
||||||
|
@ -37,7 +38,7 @@ int JudgeHitBulletBlock(int x, int y, BULLET *bul)
|
||||||
if (!(bul->bbits & 0x40))
|
if (!(bul->bbits & 0x40))
|
||||||
bul->cond = 0;
|
bul->cond = 0;
|
||||||
|
|
||||||
SetCaret(bul->x, bul->y, 2, 0);
|
SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
PlaySoundObject(12, SOUND_MODE_PLAY);
|
PlaySoundObject(12, SOUND_MODE_PLAY);
|
||||||
|
|
||||||
for (i = 0; i < 4; ++i)
|
for (i = 0; i < 4; ++i)
|
||||||
|
|
481
src/Bullet.cpp
481
src/Bullet.cpp
File diff suppressed because it is too large
Load diff
183
src/Caret.cpp
183
src/Caret.cpp
|
@ -4,31 +4,59 @@
|
||||||
|
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Draw.h"
|
#include "Draw.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Triangle.h"
|
#include "Triangle.h"
|
||||||
|
|
||||||
|
#define CARET_MAX 0x40
|
||||||
|
|
||||||
|
struct CARET
|
||||||
|
{
|
||||||
|
int cond;
|
||||||
|
int code;
|
||||||
|
int direct;
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int xm;
|
||||||
|
int ym;
|
||||||
|
int act_no;
|
||||||
|
int act_wait;
|
||||||
|
int ani_no;
|
||||||
|
int ani_wait;
|
||||||
|
int view_left;
|
||||||
|
int view_top;
|
||||||
|
RECT rect;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CARET_TABLE
|
||||||
|
{
|
||||||
|
int view_left;
|
||||||
|
int view_top;
|
||||||
|
};
|
||||||
|
|
||||||
CARET gCrt[CARET_MAX];
|
CARET gCrt[CARET_MAX];
|
||||||
|
|
||||||
|
// Sprite offsets
|
||||||
CARET_TABLE gCaretTable[18] = {
|
CARET_TABLE gCaretTable[18] = {
|
||||||
{0, 0},
|
{0, 0}, // CARET_NULL
|
||||||
{0x800, 0x800},
|
{ 4 * 0x200, 4 * 0x200}, // CARET_BUBBLE
|
||||||
{0x1000, 0x1000},
|
{ 8 * 0x200, 8 * 0x200}, // CARET_PROJECTILE_DISSIPATION
|
||||||
{0x1000, 0x1000},
|
{ 8 * 0x200, 8 * 0x200}, // CARET_SHOOT
|
||||||
{0x1000, 0x1000},
|
{ 8 * 0x200, 8 * 0x200}, // CARET_SNAKE_AFTERIMAGE
|
||||||
{0x800, 0x800},
|
{ 4 * 0x200, 4 * 0x200}, // CARET_ZZZ
|
||||||
{0x1000, 0x1000},
|
{ 8 * 0x200, 8 * 0x200}, // CARET_SNAKE_AFTERIMAGE_DUPLICATE
|
||||||
{0x800, 0x800},
|
{ 4 * 0x200, 4 * 0x200}, // CARET_EXHAUST
|
||||||
{0x1000, 0x1000},
|
{ 8 * 0x200, 8 * 0x200}, // CARET_DROWNED_QUOTE
|
||||||
{0x1000, 0x1000},
|
{ 8 * 0x200, 8 * 0x200}, // CARET_QUESTION_MARK
|
||||||
{0x3800, 0x1000},
|
{28 * 0x200, 8 * 0x200}, // CARET_LEVEL_UP
|
||||||
{0x800, 0x800},
|
{ 4 * 0x200, 4 * 0x200}, // CARET_HURT_PARTICLES
|
||||||
{0x2000, 0x2000},
|
{16 * 0x200, 16 * 0x200}, // CARET_EXPLOSION
|
||||||
{0x800, 0x800},
|
{ 4 * 0x200, 4 * 0x200}, // CARET_TINY_PARTICLES
|
||||||
{0x2800, 0x2800},
|
{20 * 0x200, 20 * 0x200}, // CARET_UNKNOWN
|
||||||
{0x800, 0x800},
|
{ 4 * 0x200, 4 * 0x200}, // CARET_PROJECTILE_DISSIPATION_TINY
|
||||||
{0x2800, 0x800},
|
{20 * 0x200, 4 * 0x200}, // CARET_EMPTY
|
||||||
{0x6800, 0x800}
|
{52 * 0x200, 4 * 0x200} // CARET_PUSH_JUMP_KEY
|
||||||
};
|
};
|
||||||
|
|
||||||
void InitCaret(void)
|
void InitCaret(void)
|
||||||
|
@ -36,16 +64,18 @@ void InitCaret(void)
|
||||||
memset(gCrt, 0, sizeof(gCrt));
|
memset(gCrt, 0, sizeof(gCrt));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Null
|
||||||
void ActCaret00(CARET *crt)
|
void ActCaret00(CARET *crt)
|
||||||
{
|
{
|
||||||
(void)crt;
|
(void)crt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bubble
|
||||||
void ActCaret01(CARET *crt)
|
void ActCaret01(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[4] = {
|
RECT rcLeft[4] = {
|
||||||
{0, 64, 8, 72},
|
{ 0, 64, 8, 72},
|
||||||
{8, 64, 16, 72},
|
{ 8, 64, 16, 72},
|
||||||
{16, 64, 24, 72},
|
{16, 64, 24, 72},
|
||||||
{24, 64, 32, 72},
|
{24, 64, 32, 72},
|
||||||
};
|
};
|
||||||
|
@ -81,16 +111,17 @@ void ActCaret01(CARET *crt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crt->direct == 0)
|
if (crt->direct == DIR_LEFT)
|
||||||
crt->rect = rcLeft[crt->ani_no];
|
crt->rect = rcLeft[crt->ani_no];
|
||||||
else
|
else
|
||||||
crt->rect = rcRight[crt->ani_no];
|
crt->rect = rcRight[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Projectile dissipation
|
||||||
void ActCaret02(CARET *crt)
|
void ActCaret02(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rect_left[4] = {
|
RECT rect_left[4] = {
|
||||||
{0, 32, 16, 48},
|
{ 0, 32, 16, 48},
|
||||||
{16, 32, 32, 48},
|
{16, 32, 32, 48},
|
||||||
{32, 32, 48, 48},
|
{32, 32, 48, 48},
|
||||||
{48, 32, 64, 48},
|
{48, 32, 64, 48},
|
||||||
|
@ -104,14 +135,14 @@ void ActCaret02(CARET *crt)
|
||||||
};
|
};
|
||||||
|
|
||||||
RECT rect_up[3] = {
|
RECT rect_up[3] = {
|
||||||
{0, 32, 16, 48},
|
{ 0, 32, 16, 48},
|
||||||
{32, 32, 48, 48},
|
{32, 32, 48, 48},
|
||||||
{16, 32, 32, 48},
|
{16, 32, 32, 48},
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (crt->direct)
|
switch (crt->direct)
|
||||||
{
|
{
|
||||||
case 0:
|
case DIR_LEFT:
|
||||||
crt->ym -= 0x10;
|
crt->ym -= 0x10;
|
||||||
crt->y += crt->ym;
|
crt->y += crt->ym;
|
||||||
|
|
||||||
|
@ -132,7 +163,7 @@ void ActCaret02(CARET *crt)
|
||||||
crt->rect = rect_left[crt->ani_no];
|
crt->rect = rect_left[crt->ani_no];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case DIR_RIGHT:
|
||||||
if (++crt->ani_wait > 2)
|
if (++crt->ani_wait > 2)
|
||||||
{
|
{
|
||||||
crt->ani_wait = 0;
|
crt->ani_wait = 0;
|
||||||
|
@ -150,7 +181,7 @@ void ActCaret02(CARET *crt)
|
||||||
crt->rect = rect_right[crt->ani_no];
|
crt->rect = rect_right[crt->ani_no];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case DIR_UP:
|
||||||
crt->rect = rect_up[++crt->ani_wait / 2 % 3];
|
crt->rect = rect_up[++crt->ani_wait / 2 % 3];
|
||||||
|
|
||||||
if (crt->ani_wait > 24)
|
if (crt->ani_wait > 24)
|
||||||
|
@ -160,10 +191,11 @@ void ActCaret02(CARET *crt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Shoot
|
||||||
void ActCaret03(CARET *crt)
|
void ActCaret03(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rect[4] = {
|
RECT rect[4] = {
|
||||||
{0, 48, 16, 64},
|
{ 0, 48, 16, 64},
|
||||||
{16, 48, 32, 64},
|
{16, 48, 32, 64},
|
||||||
{32, 48, 48, 64},
|
{32, 48, 48, 64},
|
||||||
{48, 48, 64, 64},
|
{48, 48, 64, 64},
|
||||||
|
@ -185,19 +217,21 @@ void ActCaret03(CARET *crt)
|
||||||
crt->rect = rect[crt->ani_no];
|
crt->rect = rect[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Snake after-image? This doesn't seem to be used.
|
||||||
void ActCaret04(CARET *crt)
|
void ActCaret04(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rect[9] = {
|
RECT rect[9] = {
|
||||||
{64, 32, 80, 48},
|
// Left
|
||||||
{80, 32, 96, 48},
|
{64, 32, 80, 48},
|
||||||
|
{80, 32, 96, 48},
|
||||||
{96, 32, 112, 48},
|
{96, 32, 112, 48},
|
||||||
|
// Up
|
||||||
{64, 48, 80, 64},
|
{64, 48, 80, 64},
|
||||||
{80, 48, 96, 64},
|
{80, 48, 96, 64},
|
||||||
{96, 48, 112, 64},
|
{96, 48, 112, 64},
|
||||||
|
// Right
|
||||||
{64, 64, 80, 80},
|
{64, 64, 80, 80},
|
||||||
{80, 64, 96, 80},
|
{80, 64, 96, 80},
|
||||||
{96, 64, 112, 80},
|
{96, 64, 112, 80},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -217,6 +251,7 @@ void ActCaret04(CARET *crt)
|
||||||
crt->rect = rect[(crt->direct * 3) + crt->ani_no];
|
crt->rect = rect[(crt->direct * 3) + crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'Zzz' - snoring
|
||||||
void ActCaret05(CARET *crt)
|
void ActCaret05(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rect[7] = {
|
RECT rect[7] = {
|
||||||
|
@ -249,15 +284,18 @@ void ActCaret05(CARET *crt)
|
||||||
crt->rect = rect[crt->ani_no];
|
crt->rect = rect[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No ActCaret06...
|
||||||
|
|
||||||
|
// Exhaust (used by the Booster and hoverbike)
|
||||||
void ActCaret07(CARET *crt)
|
void ActCaret07(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[7] = {
|
RECT rcLeft[7] = {
|
||||||
{56, 0, 64, 8},
|
{ 56, 0, 64, 8},
|
||||||
{64, 0, 72, 8},
|
{ 64, 0, 72, 8},
|
||||||
{72, 0, 80, 8},
|
{ 72, 0, 80, 8},
|
||||||
{80, 0, 88, 8},
|
{ 80, 0, 88, 8},
|
||||||
{88, 0, 96, 8},
|
{ 88, 0, 96, 8},
|
||||||
{96, 0, 104, 8},
|
{ 96, 0, 104, 8},
|
||||||
{104, 0, 112, 8},
|
{104, 0, 112, 8},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -278,32 +316,34 @@ void ActCaret07(CARET *crt)
|
||||||
|
|
||||||
switch (crt->direct)
|
switch (crt->direct)
|
||||||
{
|
{
|
||||||
case 0:
|
case DIR_LEFT:
|
||||||
crt->x -= 2 * 0x200;
|
crt->x -= 2 * 0x200;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case DIR_UP:
|
||||||
crt->y -= 2 * 0x200;
|
crt->y -= 2 * 0x200;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case DIR_RIGHT:
|
||||||
crt->x += 2 * 0x200;
|
crt->x += 2 * 0x200;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case DIR_DOWN:
|
||||||
crt->y += 2 * 0x200;
|
crt->y += 2 * 0x200;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Drowned Quote
|
||||||
void ActCaret08(CARET *crt)
|
void ActCaret08(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft = {16, 80, 32, 96};
|
RECT rcLeft = {16, 80, 32, 96};
|
||||||
RECT rcRight = {32, 80, 48, 96};
|
RECT rcRight = {32, 80, 48, 96};
|
||||||
|
|
||||||
if (crt->direct == 0)
|
if (crt->direct == DIR_LEFT)
|
||||||
crt->rect = rcLeft;
|
crt->rect = rcLeft;
|
||||||
else
|
else
|
||||||
crt->rect = rcRight;
|
crt->rect = rcRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The '?' that appears when you press the down key
|
||||||
void ActCaret09(CARET *crt)
|
void ActCaret09(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft = {0, 80, 16, 96};
|
RECT rcLeft = {0, 80, 16, 96};
|
||||||
|
@ -315,27 +355,28 @@ void ActCaret09(CARET *crt)
|
||||||
if (crt->ani_wait == 32)
|
if (crt->ani_wait == 32)
|
||||||
crt->cond = 0;
|
crt->cond = 0;
|
||||||
|
|
||||||
if (crt->direct == 0)
|
if (crt->direct == DIR_LEFT)
|
||||||
crt->rect = rcLeft;
|
crt->rect = rcLeft;
|
||||||
else
|
else
|
||||||
crt->rect = rcRight;
|
crt->rect = rcRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'Level Up!'
|
||||||
void ActCaret10(CARET *crt)
|
void ActCaret10(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
{0, 0, 56, 16},
|
{0, 0, 56, 16},
|
||||||
{0, 16, 56, 32},
|
{0, 16, 56, 32},
|
||||||
};
|
};
|
||||||
|
|
||||||
RECT rcRight[2] = {
|
RECT rcRight[2] = {
|
||||||
{0, 96, 56, 112},
|
{0, 96, 56, 112},
|
||||||
{0, 112, 56, 128},
|
{0, 112, 56, 128},
|
||||||
};
|
};
|
||||||
|
|
||||||
++crt->ani_wait;
|
++crt->ani_wait;
|
||||||
|
|
||||||
if (crt->direct == 0)
|
if (crt->direct == DIR_LEFT)
|
||||||
{
|
{
|
||||||
if (crt->ani_wait < 20)
|
if (crt->ani_wait < 20)
|
||||||
crt->y -= 2 * 0x200;
|
crt->y -= 2 * 0x200;
|
||||||
|
@ -352,12 +393,13 @@ void ActCaret10(CARET *crt)
|
||||||
crt->cond = 0;
|
crt->cond = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crt->direct == 0)
|
if (crt->direct == DIR_LEFT)
|
||||||
crt->rect = rcLeft[crt->ani_wait / 2 % 2];
|
crt->rect = rcLeft[crt->ani_wait / 2 % 2];
|
||||||
else
|
else
|
||||||
crt->rect = rcRight[crt->ani_wait / 2 % 2];
|
crt->rect = rcRight[crt->ani_wait / 2 % 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Red hurt particles (used by bosses and invisible hidden pickups)
|
||||||
void ActCaret11(CARET *crt)
|
void ActCaret11(CARET *crt)
|
||||||
{
|
{
|
||||||
unsigned char deg;
|
unsigned char deg;
|
||||||
|
@ -374,12 +416,12 @@ void ActCaret11(CARET *crt)
|
||||||
crt->y += crt->ym;
|
crt->y += crt->ym;
|
||||||
|
|
||||||
RECT rcRight[7] = {
|
RECT rcRight[7] = {
|
||||||
{56, 8, 64, 16},
|
{ 56, 8, 64, 16},
|
||||||
{64, 8, 72, 16},
|
{ 64, 8, 72, 16},
|
||||||
{72, 8, 80, 16},
|
{ 72, 8, 80, 16},
|
||||||
{80, 8, 88, 16},
|
{ 80, 8, 88, 16},
|
||||||
{88, 8, 96, 16},
|
{ 88, 8, 96, 16},
|
||||||
{96, 8, 104, 16},
|
{ 96, 8, 104, 16},
|
||||||
{104, 8, 112, 16},
|
{104, 8, 112, 16},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -399,6 +441,7 @@ void ActCaret11(CARET *crt)
|
||||||
crt->rect = rcRight[crt->ani_no];
|
crt->rect = rcRight[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Missile Launcher explosion flash
|
||||||
void ActCaret12(CARET *crt)
|
void ActCaret12(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
|
@ -422,6 +465,7 @@ void ActCaret12(CARET *crt)
|
||||||
crt->rect = rcLeft[crt->ani_no];
|
crt->rect = rcLeft[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Particles used when Quote jumps into the ceiling, and also used by the Demon Crown and Ballos's puppy
|
||||||
void ActCaret13(CARET *crt)
|
void ActCaret13(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
|
@ -435,12 +479,12 @@ void ActCaret13(CARET *crt)
|
||||||
|
|
||||||
switch (crt->direct)
|
switch (crt->direct)
|
||||||
{
|
{
|
||||||
case 0:
|
case DIR_LEFT:
|
||||||
crt->xm = Random(-0x600, 0x600);
|
crt->xm = Random(-0x600, 0x600);
|
||||||
crt->ym = Random(-0x200, 0x200);
|
crt->ym = Random(-0x200, 0x200);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case DIR_UP:
|
||||||
crt->ym = -0x200 * Random(1, 3);
|
crt->ym = -0x200 * Random(1, 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -448,7 +492,7 @@ void ActCaret13(CARET *crt)
|
||||||
|
|
||||||
switch (crt->direct)
|
switch (crt->direct)
|
||||||
{
|
{
|
||||||
case 0:
|
case DIR_LEFT:
|
||||||
crt->xm = (crt->xm * 4) / 5;
|
crt->xm = (crt->xm * 4) / 5;
|
||||||
crt->ym = (crt->ym * 4) / 5;
|
crt->ym = (crt->ym * 4) / 5;
|
||||||
break;
|
break;
|
||||||
|
@ -462,12 +506,16 @@ void ActCaret13(CARET *crt)
|
||||||
|
|
||||||
crt->rect = rcLeft[crt->ani_wait / 2 % 2];
|
crt->rect = rcLeft[crt->ani_wait / 2 % 2];
|
||||||
|
|
||||||
if (crt->direct == 5)
|
if (crt->direct == DIR_OTHER)
|
||||||
crt->x -= 4 * 0x200;
|
crt->x -= 4 * 0x200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Broken (unknown and unused)
|
||||||
void ActCaret14(CARET *crt)
|
void ActCaret14(CARET *crt)
|
||||||
{
|
{
|
||||||
|
// These rects are invalid.
|
||||||
|
// However, notably, there are 5 unused 40x40 sprites at the bottom of Caret.pbm.
|
||||||
|
// Perhaps those were originally at these coordinates.
|
||||||
RECT rect[5] = {
|
RECT rect[5] = {
|
||||||
{0, 96, 40, 136},
|
{0, 96, 40, 136},
|
||||||
{40, 96, 80, 136},
|
{40, 96, 80, 136},
|
||||||
|
@ -492,11 +540,12 @@ void ActCaret14(CARET *crt)
|
||||||
crt->rect = rect[crt->ani_no];
|
crt->rect = rect[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tiny version of the projectile dissipation effect
|
||||||
void ActCaret15(CARET *crt)
|
void ActCaret15(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[4] = {
|
RECT rcLeft[4] = {
|
||||||
{0, 72, 8, 80},
|
{ 0, 72, 8, 80},
|
||||||
{8, 72, 16, 80},
|
{ 8, 72, 16, 80},
|
||||||
{16, 72, 24, 80},
|
{16, 72, 24, 80},
|
||||||
{24, 72, 32, 80},
|
{24, 72, 32, 80},
|
||||||
};
|
};
|
||||||
|
@ -517,10 +566,11 @@ void ActCaret15(CARET *crt)
|
||||||
crt->rect = rcLeft[crt->ani_no];
|
crt->rect = rcLeft[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'Empty!'
|
||||||
void ActCaret16(CARET *crt)
|
void ActCaret16(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
{104, 96, 144, 104},
|
{104, 96, 144, 104},
|
||||||
{104, 104, 144, 112},
|
{104, 104, 144, 112},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -533,6 +583,7 @@ void ActCaret16(CARET *crt)
|
||||||
crt->rect = rcLeft[crt->ani_wait / 2 % 2];
|
crt->rect = rcLeft[crt->ani_wait / 2 % 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'PUSH JUMP KEY!' (unused)
|
||||||
void ActCaret17(CARET *crt)
|
void ActCaret17(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
|
@ -558,7 +609,7 @@ CARETFUNCTION gpCaretFuncTbl[18] =
|
||||||
ActCaret03,
|
ActCaret03,
|
||||||
ActCaret04,
|
ActCaret04,
|
||||||
ActCaret05,
|
ActCaret05,
|
||||||
ActCaret04,
|
ActCaret04, // Interestingly, this slot is a duplicate
|
||||||
ActCaret07,
|
ActCaret07,
|
||||||
ActCaret08,
|
ActCaret08,
|
||||||
ActCaret09,
|
ActCaret09,
|
||||||
|
@ -569,7 +620,7 @@ CARETFUNCTION gpCaretFuncTbl[18] =
|
||||||
ActCaret14,
|
ActCaret14,
|
||||||
ActCaret15,
|
ActCaret15,
|
||||||
ActCaret16,
|
ActCaret16,
|
||||||
ActCaret17,
|
ActCaret17
|
||||||
};
|
};
|
||||||
|
|
||||||
void ActCaret(void)
|
void ActCaret(void)
|
||||||
|
|
45
src/Caret.h
45
src/Caret.h
|
@ -2,35 +2,28 @@
|
||||||
|
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
#define CARET_MAX 0x40
|
enum
|
||||||
|
|
||||||
struct CARET_TABLE
|
|
||||||
{
|
{
|
||||||
int view_left;
|
CARET_NULL = 0,
|
||||||
int view_top;
|
CARET_BUBBLE = 1,
|
||||||
|
CARET_PROJECTILE_DISSIPATION = 2,
|
||||||
|
CARET_SHOOT = 3,
|
||||||
|
CARET_SNAKE_AFTERIMAGE = 4,
|
||||||
|
CARET_ZZZ = 5,
|
||||||
|
CARET_SNAKE_AFTERIMAGE_DUPLICATE = 6,
|
||||||
|
CARET_EXHAUST = 7,
|
||||||
|
CARET_DROWNED_QUOTE = 8,
|
||||||
|
CARET_QUESTION_MARK = 9,
|
||||||
|
CARET_LEVEL_UP = 10,
|
||||||
|
CARET_HURT_PARTICLES = 11,
|
||||||
|
CARET_EXPLOSION = 12,
|
||||||
|
CARET_TINY_PARTICLES = 13,
|
||||||
|
CARET_UNKNOWN = 14,
|
||||||
|
CARET_PROJECTILE_DISSIPATION_TINY = 15,
|
||||||
|
CARET_EMPTY = 16,
|
||||||
|
CARET_PUSH_JUMP_KEY = 17
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CARET
|
|
||||||
{
|
|
||||||
int cond;
|
|
||||||
int code;
|
|
||||||
int direct;
|
|
||||||
int x;
|
|
||||||
int y;
|
|
||||||
int xm;
|
|
||||||
int ym;
|
|
||||||
int act_no;
|
|
||||||
int act_wait;
|
|
||||||
int ani_no;
|
|
||||||
int ani_wait;
|
|
||||||
int view_left;
|
|
||||||
int view_top;
|
|
||||||
RECT rect;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern CARET gCrt[CARET_MAX];
|
|
||||||
extern CARET_TABLE gCaretTable[18];
|
|
||||||
|
|
||||||
void InitCaret(void);
|
void InitCaret(void);
|
||||||
void ActCaret(void);
|
void ActCaret(void);
|
||||||
void PutCaret(int fx, int fy);
|
void PutCaret(int fx, int fy);
|
||||||
|
|
|
@ -18,7 +18,8 @@ enum Direction
|
||||||
DIR_UP = 1,
|
DIR_UP = 1,
|
||||||
DIR_RIGHT = 2,
|
DIR_RIGHT = 2,
|
||||||
DIR_DOWN = 3,
|
DIR_DOWN = 3,
|
||||||
DIR_AUTO = 4
|
DIR_AUTO = 4,
|
||||||
|
DIR_OTHER = 5
|
||||||
};
|
};
|
||||||
|
|
||||||
struct OTHER_RECT // The original name for this struct is unknown
|
struct OTHER_RECT // The original name for this struct is unknown
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
const char* const gConfigName = "Config.dat";
|
const char* const gConfigName = "Config.dat";
|
||||||
const char* const gProof = "DOUKUTSU20041206";
|
const char* const gProof = "DOUKUTSU20041206";
|
||||||
|
|
||||||
BOOL LoadConfigData(CONFIG *conf)
|
BOOL LoadConfigData(CONFIGDATA *conf)
|
||||||
{
|
{
|
||||||
// Clear old configuration data
|
// Clear old configuration data
|
||||||
memset(conf, 0, sizeof(CONFIG));
|
memset(conf, 0, sizeof(CONFIGDATA));
|
||||||
|
|
||||||
// Get path
|
// Get path
|
||||||
std::string path = gModulePath + '/' + gConfigName;
|
std::string path = gModulePath + '/' + gConfigName;
|
||||||
|
@ -48,17 +48,17 @@ BOOL LoadConfigData(CONFIG *conf)
|
||||||
// Check if version is not correct, and return if it failed
|
// Check if version is not correct, and return if it failed
|
||||||
if (strcmp(conf->proof, gProof))
|
if (strcmp(conf->proof, gProof))
|
||||||
{
|
{
|
||||||
memset(conf, 0, sizeof(CONFIG));
|
memset(conf, 0, sizeof(CONFIGDATA));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefaultConfigData(CONFIG *conf)
|
void DefaultConfigData(CONFIGDATA *conf)
|
||||||
{
|
{
|
||||||
// Clear old configuration data
|
// Clear old configuration data
|
||||||
memset(conf, 0, sizeof(CONFIG));
|
memset(conf, 0, sizeof(CONFIGDATA));
|
||||||
|
|
||||||
// Fun fact: The Linux port added this line:
|
// Fun fact: The Linux port added this line:
|
||||||
// conf->display_mode = 1;
|
// conf->display_mode = 1;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
struct CONFIG
|
struct CONFIGDATA
|
||||||
{
|
{
|
||||||
char proof[0x20];
|
char proof[0x20];
|
||||||
char font_name[0x40];
|
char font_name[0x40];
|
||||||
|
@ -17,5 +17,5 @@ struct CONFIG
|
||||||
extern const char* const gConfigName;
|
extern const char* const gConfigName;
|
||||||
extern const char* const gProof;
|
extern const char* const gProof;
|
||||||
|
|
||||||
BOOL LoadConfigData(CONFIG *conf);
|
BOOL LoadConfigData(CONFIGDATA *conf);
|
||||||
void DefaultConfigData(CONFIG *conf);
|
void DefaultConfigData(CONFIGDATA *conf);
|
||||||
|
|
|
@ -17,7 +17,7 @@ BOOL InitDirectInput(void)
|
||||||
return ControllerBackend_Init();
|
return ControllerBackend_Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL GetJoystickStatus(JOYSTICK_STATUS *status)
|
BOOL GetJoystickStatus(DIRECTINPUTSTATUS *status)
|
||||||
{
|
{
|
||||||
bool *buttons;
|
bool *buttons;
|
||||||
unsigned int button_count;
|
unsigned int button_count;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
struct JOYSTICK_STATUS
|
struct DIRECTINPUTSTATUS
|
||||||
{
|
{
|
||||||
BOOL bLeft;
|
BOOL bLeft;
|
||||||
BOOL bRight;
|
BOOL bRight;
|
||||||
|
@ -13,5 +13,5 @@ struct JOYSTICK_STATUS
|
||||||
|
|
||||||
void ReleaseDirectInput(void);
|
void ReleaseDirectInput(void);
|
||||||
BOOL InitDirectInput(void);
|
BOOL InitDirectInput(void);
|
||||||
BOOL GetJoystickStatus(JOYSTICK_STATUS *status);
|
BOOL GetJoystickStatus(DIRECTINPUTSTATUS *status);
|
||||||
BOOL ResetJoystickStatus(void);
|
BOOL ResetJoystickStatus(void);
|
||||||
|
|
|
@ -108,7 +108,7 @@ int main(int argc, char *argv[])
|
||||||
// Get path of the data folder
|
// Get path of the data folder
|
||||||
gDataPath = gModulePath + "/data";
|
gDataPath = gModulePath + "/data";
|
||||||
|
|
||||||
CONFIG conf;
|
CONFIGDATA conf;
|
||||||
if (!LoadConfigData(&conf))
|
if (!LoadConfigData(&conf))
|
||||||
DefaultConfigData(&conf);
|
DefaultConfigData(&conf);
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ BOOL SystemTask(void)
|
||||||
void JoystickProc(void)
|
void JoystickProc(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
JOYSTICK_STATUS status;
|
DIRECTINPUTSTATUS status;
|
||||||
|
|
||||||
if (!GetJoystickStatus(&status))
|
if (!GetJoystickStatus(&status))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "ArmsItem.h"
|
#include "ArmsItem.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Draw.h"
|
#include "Draw.h"
|
||||||
#include "Flags.h"
|
#include "Flags.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
|
@ -494,9 +495,9 @@ void ActMyChar_Normal(BOOL bKey)
|
||||||
if (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1)
|
if (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1)
|
||||||
{
|
{
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
SetCaret(gMC.x + (2 * 0x200), gMC.y + (2 * 0x200), 7, 2);
|
SetCaret(gMC.x + (2 * 0x200), gMC.y + (2 * 0x200), CARET_EXHAUST, DIR_RIGHT);
|
||||||
if (gMC.direct == 2)
|
if (gMC.direct == 2)
|
||||||
SetCaret(gMC.x - (2 * 0x200), gMC.y + (2 * 0x200), 7, 0);
|
SetCaret(gMC.x - (2 * 0x200), gMC.y + (2 * 0x200), CARET_EXHAUST, DIR_LEFT);
|
||||||
|
|
||||||
PlaySoundObject(113, SOUND_MODE_PLAY);
|
PlaySoundObject(113, SOUND_MODE_PLAY);
|
||||||
}
|
}
|
||||||
|
@ -509,14 +510,14 @@ void ActMyChar_Normal(BOOL bKey)
|
||||||
// Boost particles (and sound)
|
// Boost particles (and sound)
|
||||||
if (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1)
|
if (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1)
|
||||||
{
|
{
|
||||||
SetCaret(gMC.x, gMC.y + (6 * 0x200), 7, 3);
|
SetCaret(gMC.x, gMC.y + (6 * 0x200), CARET_EXHAUST, DIR_DOWN);
|
||||||
PlaySoundObject(113, SOUND_MODE_PLAY);
|
PlaySoundObject(113, SOUND_MODE_PLAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gMC.boost_sw == 3 && (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1))
|
else if (gMC.boost_sw == 3 && (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1))
|
||||||
{
|
{
|
||||||
// Boost particles (and sound)
|
// Boost particles (and sound)
|
||||||
SetCaret(gMC.x, gMC.y - (6 * 0x200), 7, 1);
|
SetCaret(gMC.x, gMC.y - (6 * 0x200), CARET_EXHAUST, DIR_UP);
|
||||||
PlaySoundObject(113, SOUND_MODE_PLAY);
|
PlaySoundObject(113, SOUND_MODE_PLAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -533,7 +534,7 @@ void ActMyChar_Normal(BOOL bKey)
|
||||||
|
|
||||||
if (gMC.boost_cnt % 3 == 0)
|
if (gMC.boost_cnt % 3 == 0)
|
||||||
{
|
{
|
||||||
SetCaret(gMC.x, gMC.y + (gMC.hit.bottom / 2), 7, 3);
|
SetCaret(gMC.x, gMC.y + (gMC.hit.bottom / 2), CARET_EXHAUST, DIR_DOWN);
|
||||||
PlaySoundObject(113, SOUND_MODE_PLAY);
|
PlaySoundObject(113, SOUND_MODE_PLAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -758,9 +759,9 @@ void ActMyChar_Stream(BOOL bKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gMC.ym < -0x200 && gMC.flag & 2)
|
if (gMC.ym < -0x200 && gMC.flag & 2)
|
||||||
SetCaret(gMC.x, gMC.y - gMC.hit.top, 13, 5);
|
SetCaret(gMC.x, gMC.y - gMC.hit.top, CARET_TINY_PARTICLES, DIR_OTHER);
|
||||||
if (gMC.ym > 0x200 && gMC.flag & 8)
|
if (gMC.ym > 0x200 && gMC.flag & 8)
|
||||||
SetCaret(gMC.x, gMC.y + gMC.hit.bottom, 13, 5);
|
SetCaret(gMC.x, gMC.y + gMC.hit.bottom, CARET_TINY_PARTICLES, DIR_OTHER);
|
||||||
|
|
||||||
if (gMC.xm > 0x400)
|
if (gMC.xm > 0x400)
|
||||||
gMC.xm = 0x400;
|
gMC.xm = 0x400;
|
||||||
|
@ -836,9 +837,9 @@ void AirProcess(void)
|
||||||
StartTextScript(41);
|
StartTextScript(41);
|
||||||
|
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
SetCaret(gMC.x, gMC.y, 8, 0);
|
SetCaret(gMC.x, gMC.y, CARET_DROWNED_QUOTE, DIR_LEFT);
|
||||||
else
|
else
|
||||||
SetCaret(gMC.x, gMC.y, 8, 2);
|
SetCaret(gMC.x, gMC.y, CARET_DROWNED_QUOTE, DIR_RIGHT);
|
||||||
|
|
||||||
gMC.cond &= ~0x80;
|
gMC.cond &= ~0x80;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "Back.h"
|
#include "Back.h"
|
||||||
#include "Boss.h"
|
#include "Boss.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "KeyControl.h"
|
#include "KeyControl.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
|
@ -24,8 +25,8 @@ static void PutlittleStar(void)
|
||||||
if (!(gMC.cond & 2) && gMC.ym < -0x200)
|
if (!(gMC.cond & 2) && gMC.ym < -0x200)
|
||||||
{
|
{
|
||||||
PlaySoundObject(3, SOUND_MODE_PLAY);
|
PlaySoundObject(3, SOUND_MODE_PLAY);
|
||||||
SetCaret(gMC.x, gMC.y - gMC.hit.top, 13, 0);
|
SetCaret(gMC.x, gMC.y - gMC.hit.top, CARET_TINY_PARTICLES, DIR_LEFT);
|
||||||
SetCaret(gMC.x, gMC.y - gMC.hit.top, 13, 0);
|
SetCaret(gMC.x, gMC.y - gMC.hit.top, CARET_TINY_PARTICLES, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -853,7 +854,7 @@ void HitMyCharNpChar(void)
|
||||||
|
|
||||||
// Create question mark when NPC hasn't been interacted with
|
// Create question mark when NPC hasn't been interacted with
|
||||||
if (gMC.ques)
|
if (gMC.ques)
|
||||||
SetCaret(gMC.x, gMC.y, 9, 0);
|
SetCaret(gMC.x, gMC.y, CARET_QUESTION_MARK, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HitMyCharBoss(void)
|
void HitMyCharBoss(void)
|
||||||
|
@ -913,5 +914,5 @@ void HitMyCharBoss(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gMC.ques)
|
if (gMC.ques)
|
||||||
SetCaret(gMC.x, gMC.y, 9, 0);
|
SetCaret(gMC.x, gMC.y, CARET_QUESTION_MARK, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ void AddExpMyChar(int x)
|
||||||
if (gArmsData[gSelectedArms].code != 13)
|
if (gArmsData[gSelectedArms].code != 13)
|
||||||
{
|
{
|
||||||
PlaySoundObject(27, SOUND_MODE_PLAY);
|
PlaySoundObject(27, SOUND_MODE_PLAY);
|
||||||
SetCaret(gMC.x, gMC.y, 10, 0);
|
SetCaret(gMC.x, gMC.y, CARET_LEVEL_UP, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ void DamageMyChar(int damage)
|
||||||
gArmsData[gSelectedArms].exp = gArmsLevelTable[arms_code].exp[lv] + gArmsData[gSelectedArms].exp;
|
gArmsData[gSelectedArms].exp = gArmsLevelTable[arms_code].exp[lv] + gArmsData[gSelectedArms].exp;
|
||||||
|
|
||||||
if (gMC.life > 0 && gArmsData[gSelectedArms].code != 13)
|
if (gMC.life > 0 && gArmsData[gSelectedArms].code != 13)
|
||||||
SetCaret(gMC.x, gMC.y, 10, 2);
|
SetCaret(gMC.x, gMC.y, CARET_LEVEL_UP, DIR_RIGHT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "ArmsItem.h"
|
#include "ArmsItem.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Draw.h"
|
#include "Draw.h"
|
||||||
#include "File.h"
|
#include "File.h"
|
||||||
#include "Flags.h"
|
#include "Flags.h"
|
||||||
|
@ -170,7 +171,7 @@ void SetDestroyNpChar(int x, int y, int w, int num)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flash effect
|
// Flash effect
|
||||||
SetCaret(x, y, 12, 0);
|
SetCaret(x, y, CARET_EXPLOSION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDestroyNpCharUp(int x, int y, int w, int num)
|
void SetDestroyNpCharUp(int x, int y, int w, int num)
|
||||||
|
@ -189,7 +190,7 @@ void SetDestroyNpCharUp(int x, int y, int w, int num)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flash effect
|
// Flash effect
|
||||||
SetCaret(x, y, 12, 0);
|
SetCaret(x, y, CARET_EXPLOSION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetExpObjects(int x, int y, int exp)
|
void SetExpObjects(int x, int y, int exp)
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "Back.h"
|
#include "Back.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Frame.h"
|
#include "Frame.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
|
@ -17,7 +18,7 @@
|
||||||
// Null
|
// Null
|
||||||
void ActNpc000(NPCHAR *npc)
|
void ActNpc000(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
RECT rect = {0x00, 0x00, 0x10, 0x10};
|
RECT rect = {0, 0, 16, 16};
|
||||||
|
|
||||||
if (npc->act_no == 0)
|
if (npc->act_no == 0)
|
||||||
{
|
{
|
||||||
|
@ -34,7 +35,7 @@ void ActNpc000(NPCHAR *npc)
|
||||||
void ActNpc001(NPCHAR *npc)
|
void ActNpc001(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
// In wind
|
// In wind
|
||||||
if (gBack.type == 5 || gBack.type == 6)
|
if (gBack.type == BACKGROUND_TYPE_AUTOSCROLL || gBack.type == BACKGROUND_TYPE_OUTSIDE_WITH_WIND)
|
||||||
{
|
{
|
||||||
if (npc->act_no == 0)
|
if (npc->act_no == 0)
|
||||||
{
|
{
|
||||||
|
@ -144,12 +145,12 @@ void ActNpc001(NPCHAR *npc)
|
||||||
|
|
||||||
// Get framerects
|
// Get framerects
|
||||||
RECT rect[6] = {
|
RECT rect[6] = {
|
||||||
{0x00, 0x10, 0x10, 0x20},
|
{ 0, 16, 16, 32},
|
||||||
{0x10, 0x10, 0x20, 0x20},
|
{16, 16, 32, 32},
|
||||||
{0x20, 0x10, 0x30, 0x20},
|
{32, 16, 48, 32},
|
||||||
{0x30, 0x10, 0x40, 0x20},
|
{48, 16, 64, 32},
|
||||||
{0x40, 0x10, 0x50, 0x20},
|
{64, 16, 80, 32},
|
||||||
{0x50, 0x10, 0x60, 0x20},
|
{80, 16, 96, 32},
|
||||||
};
|
};
|
||||||
|
|
||||||
RECT rcNo = {0, 0, 0, 0};
|
RECT rcNo = {0, 0, 0, 0};
|
||||||
|
@ -214,21 +215,21 @@ void ActNpc002(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
// Rects
|
// Rects
|
||||||
RECT rcLeft[7] = {
|
RECT rcLeft[7] = {
|
||||||
{32, 0, 64, 24},
|
{ 32, 0, 64, 24},
|
||||||
{0, 0, 32, 24},
|
{ 0, 0, 32, 24},
|
||||||
{32, 0, 64, 24},
|
{ 32, 0, 64, 24},
|
||||||
{64, 0, 96, 24},
|
{ 64, 0, 96, 24},
|
||||||
{96, 0, 128, 24},
|
{ 96, 0, 128, 24},
|
||||||
{128, 0, 160, 24},
|
{128, 0, 160, 24},
|
||||||
{160, 0, 192, 24},
|
{160, 0, 192, 24},
|
||||||
};
|
};
|
||||||
|
|
||||||
RECT rcRight[7] = {
|
RECT rcRight[7] = {
|
||||||
{32, 24, 64, 48},
|
{ 32, 24, 64, 48},
|
||||||
{0, 24, 32, 48},
|
{ 0, 24, 32, 48},
|
||||||
{32, 24, 64, 48},
|
{ 32, 24, 64, 48},
|
||||||
{64, 24, 96, 48},
|
{ 64, 24, 96, 48},
|
||||||
{96, 24, 128, 48},
|
{ 96, 24, 128, 48},
|
||||||
{128, 24, 160, 48},
|
{128, 24, 160, 48},
|
||||||
{160, 24, 192, 48},
|
{160, 24, 192, 48},
|
||||||
};
|
};
|
||||||
|
@ -346,20 +347,20 @@ void ActNpc003(NPCHAR *npc)
|
||||||
void ActNpc004(NPCHAR *npc)
|
void ActNpc004(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
RECT rcLeft[8] = {
|
RECT rcLeft[8] = {
|
||||||
{16, 0, 17, 1},
|
{ 16, 0, 17, 1},
|
||||||
{16, 0, 32, 16},
|
{ 16, 0, 32, 16},
|
||||||
{32, 0, 48, 16},
|
{ 32, 0, 48, 16},
|
||||||
{48, 0, 64, 16},
|
{ 48, 0, 64, 16},
|
||||||
{64, 0, 80, 16},
|
{ 64, 0, 80, 16},
|
||||||
{80, 0, 96, 16},
|
{ 80, 0, 96, 16},
|
||||||
{96, 0, 112, 16},
|
{ 96, 0, 112, 16},
|
||||||
{112, 0, 128, 16},
|
{112, 0, 128, 16},
|
||||||
};
|
};
|
||||||
|
|
||||||
RECT rcUp[8] = {
|
RECT rcUp[8] = {
|
||||||
{16, 0, 17, 1},
|
{16, 0, 17, 1},
|
||||||
{80, 48, 96, 64},
|
{80, 48, 96, 64},
|
||||||
{0, 128, 16, 144},
|
{ 0, 128, 16, 144},
|
||||||
{16, 128, 32, 144},
|
{16, 128, 32, 144},
|
||||||
{32, 128, 48, 144},
|
{32, 128, 48, 144},
|
||||||
{48, 128, 64, 144},
|
{48, 128, 64, 144},
|
||||||
|
@ -423,13 +424,13 @@ void ActNpc004(NPCHAR *npc)
|
||||||
void ActNpc005(NPCHAR *npc)
|
void ActNpc005(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
RECT rcLeft[3] = {
|
RECT rcLeft[3] = {
|
||||||
{0, 48, 16, 64},
|
{ 0, 48, 16, 64},
|
||||||
{16, 48, 32, 64},
|
{16, 48, 32, 64},
|
||||||
{32, 48, 48, 64},
|
{32, 48, 48, 64},
|
||||||
};
|
};
|
||||||
|
|
||||||
RECT rcRight[3] = {
|
RECT rcRight[3] = {
|
||||||
{0, 64, 16, 80},
|
{ 0, 64, 16, 80},
|
||||||
{16, 64, 32, 80},
|
{16, 64, 32, 80},
|
||||||
{32, 64, 48, 80},
|
{32, 64, 48, 80},
|
||||||
};
|
};
|
||||||
|
@ -532,7 +533,7 @@ void ActNpc005(NPCHAR *npc)
|
||||||
void ActNpc006(NPCHAR *npc)
|
void ActNpc006(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
RECT rcLeft[5] = {
|
RECT rcLeft[5] = {
|
||||||
{0, 80, 16, 96},
|
{ 0, 80, 16, 96},
|
||||||
{16, 80, 32, 96},
|
{16, 80, 32, 96},
|
||||||
{32, 80, 48, 96},
|
{32, 80, 48, 96},
|
||||||
{48, 80, 64, 96},
|
{48, 80, 64, 96},
|
||||||
|
@ -540,7 +541,7 @@ void ActNpc006(NPCHAR *npc)
|
||||||
};
|
};
|
||||||
|
|
||||||
RECT rcRight[5] = {
|
RECT rcRight[5] = {
|
||||||
{0, 96, 16, 112},
|
{ 0, 96, 16, 112},
|
||||||
{16, 96, 32, 112},
|
{16, 96, 32, 112},
|
||||||
{32, 96, 48, 112},
|
{32, 96, 48, 112},
|
||||||
{48, 96, 64, 112},
|
{48, 96, 64, 112},
|
||||||
|
@ -656,21 +657,21 @@ void ActNpc006(NPCHAR *npc)
|
||||||
void ActNpc007(NPCHAR *npc)
|
void ActNpc007(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
RECT rcLeft[3] = {
|
RECT rcLeft[3] = {
|
||||||
{256, 64, 288, 80},
|
{256, 64, 288, 80},
|
||||||
{256, 80, 288, 96},
|
{256, 80, 288, 96},
|
||||||
{256, 96, 288, 112},
|
{256, 96, 288, 112},
|
||||||
};
|
};
|
||||||
|
|
||||||
RECT rcRight[3] = {
|
RECT rcRight[3] = {
|
||||||
{288, 64, 320, 80},
|
{288, 64, 320, 80},
|
||||||
{288, 80, 320, 96},
|
{288, 80, 320, 96},
|
||||||
{288, 96, 320, 112},
|
{288, 96, 320, 112},
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (npc->act_no)
|
switch (npc->act_no)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
npc->x = gMC.x;
|
npc->x = gMC.x; // Spawn beneath player
|
||||||
|
|
||||||
if (npc->direct == 0)
|
if (npc->direct == 0)
|
||||||
npc->act_no = 1;
|
npc->act_no = 1;
|
||||||
|
@ -679,12 +680,14 @@ void ActNpc007(NPCHAR *npc)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1: // Going left
|
||||||
npc->xm -= 0x40;
|
npc->xm -= 0x40;
|
||||||
|
|
||||||
|
// Turn around if far enough away from the player
|
||||||
if (npc->x < gMC.x - (192 * 0x200))
|
if (npc->x < gMC.x - (192 * 0x200))
|
||||||
npc->act_no = 2;
|
npc->act_no = 2;
|
||||||
|
|
||||||
|
// Turn around if touching a wall
|
||||||
if (npc->flag & 1)
|
if (npc->flag & 1)
|
||||||
{
|
{
|
||||||
npc->xm = 0;
|
npc->xm = 0;
|
||||||
|
@ -693,12 +696,14 @@ void ActNpc007(NPCHAR *npc)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2: // Going right
|
||||||
npc->xm += 0x40;
|
npc->xm += 0x40;
|
||||||
|
|
||||||
|
// Turn around if far enough away from the player
|
||||||
if (npc->x > gMC.x + (192 * 0x200))
|
if (npc->x > gMC.x + (192 * 0x200))
|
||||||
npc->act_no = 1;
|
npc->act_no = 1;
|
||||||
|
|
||||||
|
// Turn around if touching a wall
|
||||||
if (npc->flag & 4)
|
if (npc->flag & 4)
|
||||||
{
|
{
|
||||||
npc->xm = 0;
|
npc->xm = 0;
|
||||||
|
@ -708,27 +713,33 @@ void ActNpc007(NPCHAR *npc)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Face direction Bazil is moving
|
||||||
if (npc->xm < 0)
|
if (npc->xm < 0)
|
||||||
npc->direct = 0;
|
npc->direct = 0;
|
||||||
else
|
else
|
||||||
npc->direct = 2;
|
npc->direct = 2;
|
||||||
|
|
||||||
|
// Cap speed
|
||||||
if (npc->xm > 0x5FF)
|
if (npc->xm > 0x5FF)
|
||||||
npc->xm = 0x5FF;
|
npc->xm = 0x5FF;
|
||||||
if (npc->xm < -0x5FF)
|
if (npc->xm < -0x5FF)
|
||||||
npc->xm = -0x5FF;
|
npc->xm = -0x5FF;
|
||||||
|
|
||||||
|
// Apply momentum
|
||||||
npc->x += npc->xm;
|
npc->x += npc->xm;
|
||||||
|
|
||||||
|
// Increment animation
|
||||||
if (++npc->ani_wait > 1)
|
if (++npc->ani_wait > 1)
|
||||||
{
|
{
|
||||||
npc->ani_wait = 0;
|
npc->ani_wait = 0;
|
||||||
++npc->ani_no;
|
++npc->ani_no;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Loop animation
|
||||||
if (npc->ani_no > 2)
|
if (npc->ani_no > 2)
|
||||||
npc->ani_no = 0;
|
npc->ani_no = 0;
|
||||||
|
|
||||||
|
// Update sprite
|
||||||
if (npc->direct == 0)
|
if (npc->direct == 0)
|
||||||
npc->rect = rcLeft[npc->ani_no];
|
npc->rect = rcLeft[npc->ani_no];
|
||||||
else
|
else
|
||||||
|
@ -739,12 +750,12 @@ void ActNpc007(NPCHAR *npc)
|
||||||
void ActNpc008(NPCHAR *npc)
|
void ActNpc008(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
{80, 80, 96, 96},
|
{80, 80, 96, 96},
|
||||||
{96, 80, 112, 96},
|
{96, 80, 112, 96},
|
||||||
};
|
};
|
||||||
|
|
||||||
RECT rcRight[2] = {
|
RECT rcRight[2] = {
|
||||||
{80, 96, 96, 112},
|
{80, 96, 96, 112},
|
||||||
{96, 96, 112, 112},
|
{96, 96, 112, 112},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1041,7 +1052,7 @@ void ActNpc011(NPCHAR *npc)
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->y += npc->ym;
|
npc->y += npc->ym;
|
||||||
|
@ -1065,7 +1076,7 @@ void ActNpc011(NPCHAR *npc)
|
||||||
|
|
||||||
if (++npc->count1 > 150)
|
if (++npc->count1 > 150)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Frame.h"
|
#include "Frame.h"
|
||||||
#include "MyChar.h"
|
#include "MyChar.h"
|
||||||
|
@ -803,7 +804,7 @@ void ActNpc030(NPCHAR *npc)
|
||||||
if (++npc->act_wait > 100)
|
if (++npc->act_wait > 100)
|
||||||
{
|
{
|
||||||
npc->act_wait = 0;
|
npc->act_wait = 0;
|
||||||
SetCaret(npc->x, npc->y - (2 * 0x200), 5, 0);
|
SetCaret(npc->x, npc->y - (2 * 0x200), CARET_ZZZ, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -970,7 +971,7 @@ void ActNpc033(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
if (npc->flag & 5)
|
if (npc->flag & 5)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
else if (npc->flag & 8)
|
else if (npc->flag & 8)
|
||||||
|
@ -1000,7 +1001,7 @@ void ActNpc033(NPCHAR *npc)
|
||||||
|
|
||||||
if (++npc->act_wait > 250)
|
if (++npc->act_wait > 250)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -819,7 +819,7 @@ void ActNpc048(NPCHAR *npc)
|
||||||
if (++npc->count1 > 2 || npc->direct == 2)
|
if (++npc->count1 > 2 || npc->direct == 2)
|
||||||
{
|
{
|
||||||
VanishNpChar(npc);
|
VanishNpChar(npc);
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -856,7 +856,7 @@ void ActNpc048(NPCHAR *npc)
|
||||||
|
|
||||||
if (++npc->act_wait > 750)
|
if (++npc->act_wait > 750)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1064,7 +1064,7 @@ void ActNpc050(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
if (++npc->count1 > 1)
|
if (++npc->count1 > 1)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -637,7 +637,7 @@ void ActNpc084(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,7 +664,7 @@ void ActNpc084(NPCHAR *npc)
|
||||||
|
|
||||||
if (++npc->count1 > 300)
|
if (++npc->count1 > 300)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -737,7 +737,7 @@ void ActNpc086(NPCHAR *npc)
|
||||||
npc->ani_no = 0;
|
npc->ani_no = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gBack.type == 5 || gBack.type == 6)
|
if (gBack.type == BACKGROUND_TYPE_AUTOSCROLL || gBack.type == BACKGROUND_TYPE_OUTSIDE_WITH_WIND)
|
||||||
{
|
{
|
||||||
if (npc->act_no == 0)
|
if (npc->act_no == 0)
|
||||||
{
|
{
|
||||||
|
@ -818,7 +818,7 @@ void ActNpc087(NPCHAR *npc)
|
||||||
npc->ani_no = 0;
|
npc->ani_no = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gBack.type == 5 || gBack.type == 6)
|
if (gBack.type == BACKGROUND_TYPE_AUTOSCROLL || gBack.type == BACKGROUND_TYPE_OUTSIDE_WITH_WIND)
|
||||||
{
|
{
|
||||||
if (npc->act_no == 0)
|
if (npc->act_no == 0)
|
||||||
{
|
{
|
||||||
|
@ -1410,7 +1410,7 @@ void ActNpc093(NPCHAR *npc)
|
||||||
if (++npc->act_wait > 200)
|
if (++npc->act_wait > 200)
|
||||||
{
|
{
|
||||||
npc->act_wait = 0;
|
npc->act_wait = 0;
|
||||||
SetCaret(npc->x, npc->y, 5, 0);
|
SetCaret(npc->x, npc->y, CARET_ZZZ, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "Bullet.h"
|
#include "Bullet.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Frame.h"
|
#include "Frame.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "MyChar.h"
|
#include "MyChar.h"
|
||||||
|
@ -500,7 +501,7 @@ void ActNpc108(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,7 +527,7 @@ void ActNpc108(NPCHAR *npc)
|
||||||
|
|
||||||
if (++npc->count1 > 300)
|
if (++npc->count1 > 300)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "Bullet.h"
|
#include "Bullet.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Frame.h"
|
#include "Frame.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "KeyControl.h"
|
#include "KeyControl.h"
|
||||||
|
@ -75,7 +76,7 @@ void ActNpc121(NPCHAR *npc)
|
||||||
if (++npc->act_wait > 100)
|
if (++npc->act_wait > 100)
|
||||||
{
|
{
|
||||||
npc->act_wait = 0;
|
npc->act_wait = 0;
|
||||||
SetCaret(npc->x, npc->y, 5, 0);
|
SetCaret(npc->x, npc->y, CARET_ZZZ, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -285,7 +286,7 @@ void ActNpc123(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
npc->act_no = 1;
|
npc->act_no = 1;
|
||||||
SetCaret(npc->x, npc->y, 3, 0);
|
SetCaret(npc->x, npc->y, CARET_SHOOT, DIR_LEFT);
|
||||||
PlaySoundObject(32, SOUND_MODE_PLAY);
|
PlaySoundObject(32, SOUND_MODE_PLAY);
|
||||||
|
|
||||||
switch (npc->direct)
|
switch (npc->direct)
|
||||||
|
@ -345,7 +346,7 @@ void ActNpc123(NPCHAR *npc)
|
||||||
|
|
||||||
if (bBreak)
|
if (bBreak)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 2);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_RIGHT);
|
||||||
PlaySoundObject(28, SOUND_MODE_PLAY);
|
PlaySoundObject(28, SOUND_MODE_PLAY);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
|
@ -819,7 +820,7 @@ void ActNpc131(NPCHAR *npc)
|
||||||
if (++npc->act_wait > 100)
|
if (++npc->act_wait > 100)
|
||||||
{
|
{
|
||||||
npc->act_wait = 0;
|
npc->act_wait = 0;
|
||||||
SetCaret(npc->x, npc->y, 5, 0);
|
SetCaret(npc->x, npc->y, CARET_ZZZ, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc->direct == 0)
|
if (npc->direct == 0)
|
||||||
|
|
|
@ -413,7 +413,7 @@ void ActNpc141(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
npc->act_no = 20;
|
npc->act_no = 20;
|
||||||
npc->act_wait = 0;
|
npc->act_wait = 0;
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
PlaySoundObject(12, SOUND_MODE_PLAY);
|
PlaySoundObject(12, SOUND_MODE_PLAY);
|
||||||
|
|
||||||
for (i = 0; i < 4; ++i)
|
for (i = 0; i < 4; ++i)
|
||||||
|
@ -952,7 +952,7 @@ void ActNpc148(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -971,7 +971,7 @@ void ActNpc148(NPCHAR *npc)
|
||||||
|
|
||||||
if (++npc->count1 > 300)
|
if (++npc->count1 > 300)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1734,7 +1734,7 @@ void ActNpc156(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1754,7 +1754,7 @@ void ActNpc156(NPCHAR *npc)
|
||||||
|
|
||||||
if (++npc->count1 > 300)
|
if (++npc->count1 > 300)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1956,7 +1956,7 @@ void ActNpc158(NPCHAR *npc)
|
||||||
if (++npc->ani_wait > 2)
|
if (++npc->ani_wait > 2)
|
||||||
{
|
{
|
||||||
npc->ani_wait = 0;
|
npc->ani_wait = 0;
|
||||||
SetCaret(npc->x, npc->y, 7, 4);
|
SetCaret(npc->x, npc->y, CARET_EXHAUST, DIR_AUTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->ani_no = (npc->count1 + 0x10) / 0x20;
|
npc->ani_no = (npc->count1 + 0x10) / 0x20;
|
||||||
|
|
|
@ -896,14 +896,14 @@ void ActNpc170(NPCHAR *npc)
|
||||||
npc->xm -= 0x20;
|
npc->xm -= 0x20;
|
||||||
|
|
||||||
if (npc->count1 % 3 == 1)
|
if (npc->count1 % 3 == 1)
|
||||||
SetCaret(npc->x + (8 * 0x200), npc->y, 7, 2);
|
SetCaret(npc->x + (8 * 0x200), npc->y, CARET_EXHAUST, DIR_RIGHT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
npc->xm += 0x20;
|
npc->xm += 0x20;
|
||||||
|
|
||||||
if (npc->count1 % 3 == 1)
|
if (npc->count1 % 3 == 1)
|
||||||
SetCaret(npc->x - (8 * 0x200), npc->y, 7, 0);
|
SetCaret(npc->x - (8 * 0x200), npc->y, CARET_EXHAUST, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc->count1 < 50)
|
if (npc->count1 < 50)
|
||||||
|
@ -1056,7 +1056,7 @@ void ActNpc172(NPCHAR *npc)
|
||||||
|
|
||||||
if (npc->flag & 1 || npc->flag & 4)
|
if (npc->flag & 1 || npc->flag & 4)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
VanishNpChar(npc);
|
VanishNpChar(npc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1294,7 +1294,7 @@ void ActNpc174(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
if (++npc->count1 > 1)
|
if (++npc->count1 > 1)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1474,7 +1474,7 @@ void ActNpc177(NPCHAR *npc)
|
||||||
|
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 3, 0);
|
SetCaret(npc->x, npc->y, CARET_SHOOT, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1521,7 +1521,7 @@ void ActNpc177(NPCHAR *npc)
|
||||||
|
|
||||||
if (++npc->act_wait > 300)
|
if (++npc->act_wait > 300)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 3, 0);
|
SetCaret(npc->x, npc->y, CARET_SHOOT, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1564,7 +1564,7 @@ void ActNpc178(NPCHAR *npc)
|
||||||
{
|
{
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1599,7 +1599,7 @@ void ActNpc178(NPCHAR *npc)
|
||||||
if (++npc->count1 > 150)
|
if (++npc->count1 > 150)
|
||||||
{
|
{
|
||||||
VanishNpChar(npc);
|
VanishNpChar(npc);
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1609,7 +1609,7 @@ void ActNpc179(NPCHAR *npc)
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->xm -= 0x20;
|
npc->xm -= 0x20;
|
||||||
|
@ -1641,6 +1641,6 @@ void ActNpc179(NPCHAR *npc)
|
||||||
if (++npc->count1 > 300)
|
if (++npc->count1 > 300)
|
||||||
{
|
{
|
||||||
VanishNpChar(npc);
|
VanishNpChar(npc);
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "Back.h"
|
#include "Back.h"
|
||||||
#include "Bullet.h"
|
#include "Bullet.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Flags.h"
|
#include "Flags.h"
|
||||||
#include "Frame.h"
|
#include "Frame.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
|
@ -386,12 +387,12 @@ void ActNpc181(NPCHAR *npc)
|
||||||
if (npc->direct == 0)
|
if (npc->direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(12, npc->x - (4 * 0x200), npc->y + (3 * 0x200), 0);
|
SetBullet(12, npc->x - (4 * 0x200), npc->y + (3 * 0x200), 0);
|
||||||
SetCaret(npc->x - (4 * 0x200), npc->y + (3 * 0x200), 3, 0);
|
SetCaret(npc->x - (4 * 0x200), npc->y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(12, npc->x + (4 * 0x200), npc->y + (3 * 0x200), 2);
|
SetBullet(12, npc->x + (4 * 0x200), npc->y + (3 * 0x200), 2);
|
||||||
SetCaret(npc->x + (4 * 0x200), npc->y + (3 * 0x200), 3, 0);
|
SetCaret(npc->x + (4 * 0x200), npc->y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -399,12 +400,12 @@ void ActNpc181(NPCHAR *npc)
|
||||||
if (npc->direct == 0)
|
if (npc->direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(12, npc->x - (2 * 0x200), npc->y - (4 * 0x200), 1);
|
SetBullet(12, npc->x - (2 * 0x200), npc->y - (4 * 0x200), 1);
|
||||||
SetCaret(npc->x - (2 * 0x200), npc->y - (4 * 0x200), 3, 0);
|
SetCaret(npc->x - (2 * 0x200), npc->y - (4 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(12, npc->x + (2 * 0x200), npc->y - (4 * 0x200), 1);
|
SetBullet(12, npc->x + (2 * 0x200), npc->y - (4 * 0x200), 1);
|
||||||
SetCaret(npc->x + (2 * 0x200), npc->y - (4 * 0x200), 3, 0);
|
SetCaret(npc->x + (2 * 0x200), npc->y - (4 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -493,12 +494,12 @@ void ActNpc182(NPCHAR *npc)
|
||||||
if (npc->direct == 0)
|
if (npc->direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(6, npc->x - (4 * 0x200), npc->y + (3 * 0x200), 0);
|
SetBullet(6, npc->x - (4 * 0x200), npc->y + (3 * 0x200), 0);
|
||||||
SetCaret(npc->x - (4 * 0x200), npc->y + (3 * 0x200), 3, 0);
|
SetCaret(npc->x - (4 * 0x200), npc->y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(6, npc->x + (4 * 0x200), npc->y + (3 * 0x200), 2);
|
SetBullet(6, npc->x + (4 * 0x200), npc->y + (3 * 0x200), 2);
|
||||||
SetCaret(npc->x + (4 * 0x200), npc->y + (3 * 0x200), 3, 0);
|
SetCaret(npc->x + (4 * 0x200), npc->y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -506,12 +507,12 @@ void ActNpc182(NPCHAR *npc)
|
||||||
if (npc->direct == 0)
|
if (npc->direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(6, npc->x - (2 * 0x200), npc->y - (4 * 0x200), 1);
|
SetBullet(6, npc->x - (2 * 0x200), npc->y - (4 * 0x200), 1);
|
||||||
SetCaret(npc->x - (2 * 0x200), npc->y - (4 * 0x200), 3, 0);
|
SetCaret(npc->x - (2 * 0x200), npc->y - (4 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(6, npc->x + (2 * 0x200), npc->y - (4 * 0x200), 1);
|
SetBullet(6, npc->x + (2 * 0x200), npc->y - (4 * 0x200), 1);
|
||||||
SetCaret(npc->x + (2 * 0x200), npc->y - (4 * 0x200), 3, 0);
|
SetCaret(npc->x + (2 * 0x200), npc->y - (4 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1184,9 +1185,9 @@ void ActNpc192(NPCHAR *npc)
|
||||||
PlaySoundObject(34, SOUND_MODE_PLAY);
|
PlaySoundObject(34, SOUND_MODE_PLAY);
|
||||||
|
|
||||||
if (npc->direct == 0)
|
if (npc->direct == 0)
|
||||||
SetCaret(npc->x + (10 * 0x200), npc->y + (10 * 0x200), 7, 2);
|
SetCaret(npc->x + (10 * 0x200), npc->y + (10 * 0x200), CARET_EXHAUST, DIR_RIGHT);
|
||||||
else
|
else
|
||||||
SetCaret(npc->x - (10 * 0x200), npc->y + (10 * 0x200), 7, 0);
|
SetCaret(npc->x - (10 * 0x200), npc->y + (10 * 0x200), CARET_EXHAUST, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "Bullet.h"
|
#include "Bullet.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Frame.h"
|
#include "Frame.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "MyChar.h"
|
#include "MyChar.h"
|
||||||
|
@ -163,7 +164,7 @@ void ActNpc202(NPCHAR *npc)
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->y += npc->ym;
|
npc->y += npc->ym;
|
||||||
|
@ -189,7 +190,7 @@ void ActNpc202(NPCHAR *npc)
|
||||||
if (++npc->count1 > 300)
|
if (++npc->count1 > 300)
|
||||||
{
|
{
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -750,7 +751,7 @@ void ActNpc209(NPCHAR *npc)
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->y += npc->ym;
|
npc->y += npc->ym;
|
||||||
|
@ -777,7 +778,7 @@ void ActNpc209(NPCHAR *npc)
|
||||||
if (++npc->count1 > 300)
|
if (++npc->count1 > 300)
|
||||||
{
|
{
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "MyChar.h"
|
#include "MyChar.h"
|
||||||
#include "NpChar.h"
|
#include "NpChar.h"
|
||||||
|
@ -617,9 +618,9 @@ void ActNpc231(NPCHAR *npc)
|
||||||
++npc->act_wait;
|
++npc->act_wait;
|
||||||
|
|
||||||
if (npc->act_wait % 2 == 0)
|
if (npc->act_wait % 2 == 0)
|
||||||
SetCaret(npc->x - (10 * 0x200), npc->y + (8 * 0x200), 7, 3);
|
SetCaret(npc->x - (10 * 0x200), npc->y + (8 * 0x200), CARET_EXHAUST, DIR_DOWN);
|
||||||
if (npc->act_wait % 2 == 1)
|
if (npc->act_wait % 2 == 1)
|
||||||
SetCaret(npc->x + (10 * 0x200), npc->y + (8 * 0x200), 7, 3);
|
SetCaret(npc->x + (10 * 0x200), npc->y + (8 * 0x200), CARET_EXHAUST, DIR_DOWN);
|
||||||
|
|
||||||
if (npc->act_wait % 4 == 1)
|
if (npc->act_wait % 4 == 1)
|
||||||
PlaySoundObject(34, SOUND_MODE_PLAY);
|
PlaySoundObject(34, SOUND_MODE_PLAY);
|
||||||
|
@ -647,10 +648,10 @@ void ActNpc231(NPCHAR *npc)
|
||||||
if (npc->ym < 0)
|
if (npc->ym < 0)
|
||||||
{
|
{
|
||||||
if (npc->act_wait % 8 == 0)
|
if (npc->act_wait % 8 == 0)
|
||||||
SetCaret(npc->x - (10 * 0x200), npc->y + (8 * 0x200), 7, 3);
|
SetCaret(npc->x - (10 * 0x200), npc->y + (8 * 0x200), CARET_EXHAUST, DIR_DOWN);
|
||||||
|
|
||||||
if (npc->act_wait % 8 == 4)
|
if (npc->act_wait % 8 == 4)
|
||||||
SetCaret(npc->x + (10 * 0x200), npc->y + (8 * 0x200), 7, 3);
|
SetCaret(npc->x + (10 * 0x200), npc->y + (8 * 0x200), CARET_EXHAUST, DIR_DOWN);
|
||||||
|
|
||||||
if (npc->act_wait % 16 == 1)
|
if (npc->act_wait % 16 == 1)
|
||||||
PlaySoundObject(34, SOUND_MODE_PLAY);
|
PlaySoundObject(34, SOUND_MODE_PLAY);
|
||||||
|
@ -1153,7 +1154,7 @@ void ActNpc237(NPCHAR *npc)
|
||||||
if (bHit)
|
if (bHit)
|
||||||
{
|
{
|
||||||
for (i = 0; i < 5; ++i)
|
for (i = 0; i < 5; ++i)
|
||||||
SetCaret(npc->x, npc->y, 1, 0);
|
SetCaret(npc->x, npc->y, CARET_BUBBLE, DIR_LEFT);
|
||||||
|
|
||||||
PlaySoundObject(21, SOUND_MODE_PLAY);
|
PlaySoundObject(21, SOUND_MODE_PLAY);
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Frame.h"
|
#include "Frame.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
|
@ -338,7 +339,7 @@ void ActNpc244(NPCHAR *npc)
|
||||||
if (bHit)
|
if (bHit)
|
||||||
{
|
{
|
||||||
for (i = 0; i < 3; ++i)
|
for (i = 0; i < 3; ++i)
|
||||||
SetCaret(npc->x, npc->y + (4 * 0x200), 1, 2);
|
SetCaret(npc->x, npc->y + (4 * 0x200), CARET_BUBBLE, DIR_RIGHT);
|
||||||
|
|
||||||
if (npc->x > gMC.x - (256 * 0x200) && npc->x < gMC.x + (256 * 0x200) && npc->y > gMC.y - (160 * 0x200) && npc->y < gMC.y + (160 * 0x200))
|
if (npc->x > gMC.x - (256 * 0x200) && npc->x < gMC.x + (256 * 0x200) && npc->y > gMC.y - (160 * 0x200) && npc->y < gMC.y + (160 * 0x200))
|
||||||
PlaySoundObject(21, SOUND_MODE_PLAY);
|
PlaySoundObject(21, SOUND_MODE_PLAY);
|
||||||
|
@ -831,7 +832,7 @@ void ActNpc248(NPCHAR *npc)
|
||||||
if (npc->flag & 0xFF)
|
if (npc->flag & 0xFF)
|
||||||
{
|
{
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->y += npc->ym;
|
npc->y += npc->ym;
|
||||||
|
@ -856,7 +857,7 @@ void ActNpc248(NPCHAR *npc)
|
||||||
if (++npc->count1 > 300)
|
if (++npc->count1 > 300)
|
||||||
{
|
{
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Frame.h"
|
#include "Frame.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
|
@ -1527,15 +1528,15 @@ void ActNpc271(NPCHAR *npc)
|
||||||
if (npc->ym < 0 && npc->y - npc->hit.top < 8 * 0x200)
|
if (npc->ym < 0 && npc->y - npc->hit.top < 8 * 0x200)
|
||||||
{
|
{
|
||||||
npc->ym *= -1;
|
npc->ym *= -1;
|
||||||
SetCaret(npc->x, npc->y - (8 * 0x200), 13, 0);
|
SetCaret(npc->x, npc->y - (8 * 0x200), CARET_TINY_PARTICLES, DIR_LEFT);
|
||||||
SetCaret(npc->x, npc->y - (8 * 0x200), 13, 0);
|
SetCaret(npc->x, npc->y - (8 * 0x200), CARET_TINY_PARTICLES, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc->ym > 0 && npc->y + npc->hit.bottom > 232 * 0x200)
|
if (npc->ym > 0 && npc->y + npc->hit.bottom > 232 * 0x200)
|
||||||
{
|
{
|
||||||
npc->ym *= -1;
|
npc->ym *= -1;
|
||||||
SetCaret(npc->x, npc->y + (8 * 0x200), 13, 0);
|
SetCaret(npc->x, npc->y + (8 * 0x200), CARET_TINY_PARTICLES, DIR_LEFT);
|
||||||
SetCaret(npc->x, npc->y + (8 * 0x200), 13, 0);
|
SetCaret(npc->x, npc->y + (8 * 0x200), CARET_TINY_PARTICLES, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->x += npc->xm;
|
npc->x += npc->xm;
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "Boss.h"
|
#include "Boss.h"
|
||||||
#include "Bullet.h"
|
#include "Bullet.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Frame.h"
|
#include "Frame.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
|
@ -27,7 +28,7 @@ void ActNpc300(NPCHAR *npc)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++npc->ani_wait % 8 == 1)
|
if (++npc->ani_wait % 8 == 1)
|
||||||
SetCaret(npc->x + (Random(-8, 8) * 0x200), npc->y + (8 * 0x200), 13, 1);
|
SetCaret(npc->x + (Random(-8, 8) * 0x200), npc->y + (8 * 0x200), CARET_TINY_PARTICLES, DIR_UP);
|
||||||
|
|
||||||
npc->rect = rc;
|
npc->rect = rc;
|
||||||
}
|
}
|
||||||
|
@ -89,7 +90,7 @@ void ActNpc301(NPCHAR *npc)
|
||||||
if (++npc->ani_wait > 2)
|
if (++npc->ani_wait > 2)
|
||||||
{
|
{
|
||||||
npc->ani_wait = 0;
|
npc->ani_wait = 0;
|
||||||
SetCaret(npc->x, npc->y, 7, 4);
|
SetCaret(npc->x, npc->y, CARET_EXHAUST, DIR_AUTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->ani_no = (npc->count1 + 0x10) / 0x20;
|
npc->ani_no = (npc->count1 + 0x10) / 0x20;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "Bullet.h"
|
#include "Bullet.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Frame.h"
|
#include "Frame.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "KeyControl.h"
|
#include "KeyControl.h"
|
||||||
|
@ -167,7 +168,7 @@ void ActNpc321(NPCHAR *npc)
|
||||||
if (g_GameFlags & 2 && CountBulletNum(43) < 2 && gKeyTrg & gKeyShot)
|
if (g_GameFlags & 2 && CountBulletNum(43) < 2 && gKeyTrg & gKeyShot)
|
||||||
{
|
{
|
||||||
SetBullet(43, npc->pNpc->x, npc->pNpc->y, direct);
|
SetBullet(43, npc->pNpc->x, npc->pNpc->y, direct);
|
||||||
SetCaret(npc->pNpc->x, npc->pNpc->y, 3, 0);
|
SetCaret(npc->pNpc->x, npc->pNpc->y, CARET_SHOOT, DIR_LEFT);
|
||||||
PlaySoundObject(117, SOUND_MODE_PLAY);
|
PlaySoundObject(117, SOUND_MODE_PLAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,7 +768,7 @@ void ActNpc331(NPCHAR *npc)
|
||||||
if (npc->flag & 8)
|
if (npc->flag & 8)
|
||||||
{
|
{
|
||||||
npc->cond = 0;
|
npc->cond = 0;
|
||||||
SetCaret(npc->x, npc->y, 2, 0);
|
SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1917,7 +1917,7 @@ void ActNpc357(NPCHAR *npc)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc->act_wait % 8 == 1)
|
if (npc->act_wait % 8 == 1)
|
||||||
SetCaret(npc->x + (Random(-8, 8) * 0x200), npc->y + 0x1000, 13, 1);
|
SetCaret(npc->x + (Random(-8, 8) * 0x200), npc->y + 0x1000, CARET_TINY_PARTICLES, DIR_UP);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Misery (stood in the wind during the credits)
|
// Misery (stood in the wind during the credits)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "Back.h"
|
#include "Back.h"
|
||||||
#include "Bullet.h"
|
#include "Bullet.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Flags.h"
|
#include "Flags.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
|
@ -591,9 +592,9 @@ void HitNpCharBullet(void)
|
||||||
{
|
{
|
||||||
if (gNPC[n].shock < 14)
|
if (gNPC[n].shock < 14)
|
||||||
{
|
{
|
||||||
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0);
|
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, CARET_HURT_PARTICLES, DIR_LEFT);
|
||||||
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0);
|
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, CARET_HURT_PARTICLES, DIR_LEFT);
|
||||||
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0);
|
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, CARET_HURT_PARTICLES, DIR_LEFT);
|
||||||
PlaySoundObject(gNPC[n].hit_voice, SOUND_MODE_PLAY);
|
PlaySoundObject(gNPC[n].hit_voice, SOUND_MODE_PLAY);
|
||||||
gNPC[n].shock = 16;
|
gNPC[n].shock = 16;
|
||||||
}
|
}
|
||||||
|
@ -614,7 +615,7 @@ void HitNpCharBullet(void)
|
||||||
else if (!(gBul[b].bbits & 0x10))
|
else if (!(gBul[b].bbits & 0x10))
|
||||||
{
|
{
|
||||||
// Hit invulnerable NPC
|
// Hit invulnerable NPC
|
||||||
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 2, 2);
|
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, CARET_PROJECTILE_DISSIPATION, DIR_RIGHT);
|
||||||
PlaySoundObject(31, SOUND_MODE_PLAY);
|
PlaySoundObject(31, SOUND_MODE_PLAY);
|
||||||
gBul[b].life = 0;
|
gBul[b].life = 0;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -157,12 +157,12 @@ ATTRIBUTE_HOT BOOL MakePixelWaveData(const PIXTONEPARAMETER *ptp, unsigned char
|
||||||
+ 128;
|
+ 128;
|
||||||
|
|
||||||
if (gWaveModelTable[ptp->oPitch.model][b] < 0)
|
if (gWaveModelTable[ptp->oPitch.model][b] < 0)
|
||||||
dMain = d1 - d1 * 0.5 * -gWaveModelTable[ptp->oPitch.model][b] * ptp->oPitch.top / 64.0 / 64.0 + dMain;
|
dMain += d1 - d1 * 0.5 * -gWaveModelTable[ptp->oPitch.model][b] * ptp->oPitch.top / 64.0 / 64.0;
|
||||||
else
|
else
|
||||||
dMain = d1 + d1 * 2.0 * gWaveModelTable[ptp->oPitch.model][b] * ptp->oPitch.top / 64.0 / 64.0 + dMain;
|
dMain += d1 + d1 * 2.0 * gWaveModelTable[ptp->oPitch.model][b] * ptp->oPitch.top / 64.0 / 64.0;
|
||||||
|
|
||||||
dPitch = dPitch + d2;
|
dPitch += d2;
|
||||||
dVolume = dVolume + d3;
|
dVolume += d3;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -42,7 +42,7 @@ BOOL IsProfile(void)
|
||||||
BOOL SaveProfile(const char *name)
|
BOOL SaveProfile(const char *name)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
PROFILE profile;
|
PROFILEDATA profile;
|
||||||
const char *FLAG = "FLAG";
|
const char *FLAG = "FLAG";
|
||||||
|
|
||||||
std::string path;
|
std::string path;
|
||||||
|
@ -59,7 +59,7 @@ BOOL SaveProfile(const char *name)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// Set up profile
|
// Set up profile
|
||||||
memset(&profile, 0, sizeof(PROFILE));
|
memset(&profile, 0, sizeof(PROFILEDATA));
|
||||||
memcpy(profile.code, gProfileCode, sizeof(profile.code));
|
memcpy(profile.code, gProfileCode, sizeof(profile.code));
|
||||||
memcpy(profile.FLAG, FLAG, sizeof(profile.FLAG));
|
memcpy(profile.FLAG, FLAG, sizeof(profile.FLAG));
|
||||||
profile.stage = gStageNo;
|
profile.stage = gStageNo;
|
||||||
|
@ -123,7 +123,7 @@ BOOL SaveProfile(const char *name)
|
||||||
BOOL LoadProfile(const char *name)
|
BOOL LoadProfile(const char *name)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
PROFILE profile;
|
PROFILEDATA profile;
|
||||||
std::string path;
|
std::string path;
|
||||||
|
|
||||||
// Get path
|
// Get path
|
||||||
|
@ -149,7 +149,7 @@ BOOL LoadProfile(const char *name)
|
||||||
|
|
||||||
// Read data
|
// Read data
|
||||||
fseek(fp, 0, SEEK_SET);
|
fseek(fp, 0, SEEK_SET);
|
||||||
memset(&profile, 0, sizeof(PROFILE));
|
memset(&profile, 0, sizeof(PROFILEDATA));
|
||||||
fread(profile.code, 8, 1, fp);
|
fread(profile.code, 8, 1, fp);
|
||||||
profile.stage = File_ReadLE32(fp);
|
profile.stage = File_ReadLE32(fp);
|
||||||
profile.music = (MusicID)File_ReadLE32(fp);
|
profile.music = (MusicID)File_ReadLE32(fp);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include "SelStage.h"
|
#include "SelStage.h"
|
||||||
#include "Stage.h"
|
#include "Stage.h"
|
||||||
|
|
||||||
typedef struct PROFILE
|
typedef struct PROFILEDATA
|
||||||
{
|
{
|
||||||
char code[8];
|
char code[8];
|
||||||
int stage;
|
int stage;
|
||||||
|
@ -29,7 +29,7 @@ typedef struct PROFILE
|
||||||
signed char permit_mapping[0x80];
|
signed char permit_mapping[0x80];
|
||||||
char FLAG[4];
|
char FLAG[4];
|
||||||
unsigned char flags[1000];
|
unsigned char flags[1000];
|
||||||
} PROFILE;
|
} PROFILEDATA;
|
||||||
|
|
||||||
extern const char* const gDefaultName;
|
extern const char* const gDefaultName;
|
||||||
extern const char* const gProfileCode;
|
extern const char* const gProfileCode;
|
||||||
|
|
131
src/Shoot.cpp
131
src/Shoot.cpp
|
@ -5,6 +5,7 @@
|
||||||
#include "ArmsItem.h"
|
#include "ArmsItem.h"
|
||||||
#include "Bullet.h"
|
#include "Bullet.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "KeyControl.h"
|
#include "KeyControl.h"
|
||||||
#include "MyChar.h"
|
#include "MyChar.h"
|
||||||
#include "MycParam.h"
|
#include "MycParam.h"
|
||||||
|
@ -47,12 +48,12 @@ void ShootBullet_Frontia1(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y - (10 * 0x200), 1);
|
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y - (10 * 0x200), 1);
|
||||||
SetCaret(gMC.x - (3 * 0x200), gMC.y - (10 * 0x200), 3, 0);
|
SetCaret(gMC.x - (3 * 0x200), gMC.y - (10 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y - (10 * 0x200), 1);
|
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y - (10 * 0x200), 1);
|
||||||
SetCaret(gMC.x + (3 * 0x200), gMC.y - (10 * 0x200), 3, 0);
|
SetCaret(gMC.x + (3 * 0x200), gMC.y - (10 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gMC.down)
|
else if (gMC.down)
|
||||||
|
@ -60,12 +61,12 @@ void ShootBullet_Frontia1(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y + (10 * 0x200), 3);
|
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y + (10 * 0x200), 3);
|
||||||
SetCaret(gMC.x - (3 * 0x200), gMC.y + (10 * 0x200), 3, 0);
|
SetCaret(gMC.x - (3 * 0x200), gMC.y + (10 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y + (10 * 0x200), 3);
|
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y + (10 * 0x200), 3);
|
||||||
SetCaret(gMC.x + (3 * 0x200), gMC.y + (10 * 0x200), 3, 0);
|
SetCaret(gMC.x + (3 * 0x200), gMC.y + (10 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -73,12 +74,12 @@ void ShootBullet_Frontia1(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (2 * 0x200), 0);
|
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (2 * 0x200), 0);
|
||||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
SetCaret(gMC.x - (12 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (2 * 0x200), 2);
|
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (2 * 0x200), 2);
|
||||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
SetCaret(gMC.x + (12 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,12 +123,12 @@ void ShootBullet_PoleStar(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gMC.down)
|
else if (gMC.down)
|
||||||
|
@ -135,12 +136,12 @@ void ShootBullet_PoleStar(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -148,12 +149,12 @@ void ShootBullet_PoleStar(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,12 +207,12 @@ void ShootBullet_FireBall(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x - (4 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (4 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x + (4 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (4 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gMC.down)
|
else if (gMC.down)
|
||||||
|
@ -219,12 +220,12 @@ void ShootBullet_FireBall(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x - (4 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (4 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x + (4 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (4 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -232,12 +233,12 @@ void ShootBullet_FireBall(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (2 * 0x200), 0);
|
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (2 * 0x200), 0);
|
||||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
SetCaret(gMC.x - (12 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (2 * 0x200), 2);
|
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (2 * 0x200), 2);
|
||||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
SetCaret(gMC.x + (12 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +286,7 @@ void ShootBullet_Machinegun1(int level)
|
||||||
|
|
||||||
if (empty == 0)
|
if (empty == 0)
|
||||||
{
|
{
|
||||||
SetCaret(gMC.x, gMC.y, 16, 0);
|
SetCaret(gMC.x, gMC.y, CARET_EMPTY, DIR_LEFT);
|
||||||
empty = 50;
|
empty = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,12 +301,12 @@ void ShootBullet_Machinegun1(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gMC.down)
|
else if (gMC.down)
|
||||||
|
@ -326,12 +327,12 @@ void ShootBullet_Machinegun1(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -339,12 +340,12 @@ void ShootBullet_Machinegun1(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 0);
|
SetBullet(bul_no, gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 2);
|
SetBullet(bul_no, gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,7 +487,7 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
||||||
|
|
||||||
if (empty == 0)
|
if (empty == 0)
|
||||||
{
|
{
|
||||||
SetCaret(gMC.x, gMC.y, 16, 0);
|
SetCaret(gMC.x, gMC.y, CARET_EMPTY, DIR_LEFT);
|
||||||
empty = 50;
|
empty = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,12 +499,12 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gMC.down)
|
else if (gMC.down)
|
||||||
|
@ -511,12 +512,12 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -524,12 +525,12 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y, 0);
|
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y, 0);
|
||||||
SetCaret(gMC.x - (12 * 0x200), gMC.y, 3, 0);
|
SetCaret(gMC.x - (12 * 0x200), gMC.y, CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y, 2);
|
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y, 2);
|
||||||
SetCaret(gMC.x + (12 * 0x200), gMC.y, 3, 0);
|
SetCaret(gMC.x + (12 * 0x200), gMC.y, CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -541,7 +542,7 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
||||||
|
|
||||||
if (empty == 0)
|
if (empty == 0)
|
||||||
{
|
{
|
||||||
SetCaret(gMC.x, gMC.y, 16, 0);
|
SetCaret(gMC.x, gMC.y, CARET_EMPTY, DIR_LEFT);
|
||||||
empty = 50;
|
empty = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,14 +554,14 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 1);
|
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 1);
|
||||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 1);
|
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 1);
|
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 1);
|
||||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 1);
|
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 1);
|
||||||
}
|
}
|
||||||
|
@ -570,14 +571,14 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 3);
|
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 3);
|
||||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 3);
|
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 3);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 3);
|
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 3);
|
||||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 3);
|
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 3);
|
||||||
}
|
}
|
||||||
|
@ -587,14 +588,14 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (1 * 0x200), 0);
|
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (1 * 0x200), 0);
|
||||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (1 * 0x200), 3, 0);
|
SetCaret(gMC.x - (12 * 0x200), gMC.y + (1 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
SetBullet(bul_no, gMC.x, gMC.y - (8 * 0x200), 0);
|
SetBullet(bul_no, gMC.x, gMC.y - (8 * 0x200), 0);
|
||||||
SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y - (1 * 0x200), 0);
|
SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y - (1 * 0x200), 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (1 * 0x200), 2);
|
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (1 * 0x200), 2);
|
||||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (1 * 0x200), 3, 0);
|
SetCaret(gMC.x + (12 * 0x200), gMC.y + (1 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
SetBullet(bul_no, gMC.x, gMC.y - (8 * 0x200), 2);
|
SetBullet(bul_no, gMC.x, gMC.y - (8 * 0x200), 2);
|
||||||
SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y - (1 * 0x200), 2);
|
SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y - (1 * 0x200), 2);
|
||||||
}
|
}
|
||||||
|
@ -620,7 +621,7 @@ void ShootBullet_Bubblin1(void)
|
||||||
|
|
||||||
if (empty == 0)
|
if (empty == 0)
|
||||||
{
|
{
|
||||||
SetCaret(gMC.x, gMC.y, 16, 0);
|
SetCaret(gMC.x, gMC.y, CARET_EMPTY, DIR_LEFT);
|
||||||
empty = 50;
|
empty = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -632,12 +633,12 @@ void ShootBullet_Bubblin1(void)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(19, gMC.x - (1 * 0x200), gMC.y - (2 * 0x200), 1);
|
SetBullet(19, gMC.x - (1 * 0x200), gMC.y - (2 * 0x200), 1);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (2 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y - (2 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(19, gMC.x + (1 * 0x200), gMC.y - (2 * 0x200), 1);
|
SetBullet(19, gMC.x + (1 * 0x200), gMC.y - (2 * 0x200), 1);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (2 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y - (2 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gMC.down)
|
else if (gMC.down)
|
||||||
|
@ -645,12 +646,12 @@ void ShootBullet_Bubblin1(void)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(19, gMC.x - (1 * 0x200), gMC.y + (2 * 0x200), 3);
|
SetBullet(19, gMC.x - (1 * 0x200), gMC.y + (2 * 0x200), 3);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(19, gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), 3);
|
SetBullet(19, gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), 3);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -658,12 +659,12 @@ void ShootBullet_Bubblin1(void)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(19, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
SetBullet(19, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(19, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
SetBullet(19, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -701,7 +702,7 @@ void ShootBullet_Bubblin2(int level)
|
||||||
|
|
||||||
if (empty == 0)
|
if (empty == 0)
|
||||||
{
|
{
|
||||||
SetCaret(gMC.x, gMC.y, 16, 0);
|
SetCaret(gMC.x, gMC.y, CARET_EMPTY, DIR_LEFT);
|
||||||
empty = 50;
|
empty = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -713,12 +714,12 @@ void ShootBullet_Bubblin2(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(level, gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(level, gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x - (3 * 0x200), gMC.y - (16 * 0x200), 3, 0);
|
SetCaret(gMC.x - (3 * 0x200), gMC.y - (16 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(level, gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(level, gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x + (3 * 0x200), gMC.y - (16 * 0x200), 3, 0);
|
SetCaret(gMC.x + (3 * 0x200), gMC.y - (16 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gMC.down)
|
else if (gMC.down)
|
||||||
|
@ -726,12 +727,12 @@ void ShootBullet_Bubblin2(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(level, gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(level, gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x - (3 * 0x200), gMC.y + (16 * 0x200), 3, 0);
|
SetCaret(gMC.x - (3 * 0x200), gMC.y + (16 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(level, gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(level, gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x + (3 * 0x200), gMC.y + (16 * 0x200), 3, 0);
|
SetCaret(gMC.x + (3 * 0x200), gMC.y + (16 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -739,12 +740,12 @@ void ShootBullet_Bubblin2(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(level, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
SetBullet(level, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(level, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
SetBullet(level, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -842,12 +843,12 @@ void ShootBullet_Nemesis(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (12 * 0x200), 1);
|
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (12 * 0x200), 1);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (12 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y - (12 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (12 * 0x200), 1);
|
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (12 * 0x200), 1);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (12 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y - (12 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gMC.down)
|
else if (gMC.down)
|
||||||
|
@ -855,12 +856,12 @@ void ShootBullet_Nemesis(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (12 * 0x200), 3);
|
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (12 * 0x200), 3);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (12 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y + (12 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (12 * 0x200), 3);
|
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (12 * 0x200), 3);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (12 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y + (12 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -868,12 +869,12 @@ void ShootBullet_Nemesis(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (22 * 0x200), gMC.y + (3 * 0x200), 0);
|
SetBullet(bul_no, gMC.x - (22 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||||
SetCaret(gMC.x - (16 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x - (16 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (22 * 0x200), gMC.y + (3 * 0x200), 2);
|
SetBullet(bul_no, gMC.x + (22 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||||
SetCaret(gMC.x + (16 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x + (16 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1000,12 +1001,12 @@ void ShootBullet_Spur(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gMC.down)
|
else if (gMC.down)
|
||||||
|
@ -1013,12 +1014,12 @@ void ShootBullet_Spur(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1026,12 +1027,12 @@ void ShootBullet_Spur(int level)
|
||||||
if (gMC.direct == 0)
|
if (gMC.direct == 0)
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ enum SoundEffectNames
|
||||||
SND_SILLY_EXPLOSION = 25,
|
SND_SILLY_EXPLOSION = 25,
|
||||||
SND_LARGE_OBJECT_HIT_GROUND = 26,
|
SND_LARGE_OBJECT_HIT_GROUND = 26,
|
||||||
// To be continued
|
// To be continued
|
||||||
SND_ENEMY_SHOOT_PROJETILE = 39,
|
SND_ENEMY_SHOOT_PROJECTILE = 39,
|
||||||
// To be continued
|
// To be continued
|
||||||
SND_BEHEMOTH_LARGE_HURT = 52,
|
SND_BEHEMOTH_LARGE_HURT = 52,
|
||||||
// To be continued
|
// To be continued
|
||||||
|
|
Loading…
Add table
Reference in a new issue