*** ETERNAL_STRIKER_M5_SOUND_SD_BINARY (wPAD)  Private edition. 2019/6/23 ***

*Overview

-Works that ported STG [ETERNAL STRIKER Rr], which was operating in MIDP environment.
-When using the [M5Stack-SD-Menu] system, set [ETERNAL_STRIKER_M5_S_wPAD.bin] and [[mp3][jpg][json]FOLDER] to SD
 If you write it to [Root folder], it works only by selecting from [Menu].
-Sound /NEOPIXEL additional version.
-Redistribution is impossible due to the circumstances of license.
-It is for testing.
 Because of the copyright of MP3 data, we will not redistribute it.

*Commentary

 This is a porting work of the work [ETERNAL STRIKER Rr] made in the early days of Galaq, Doja 2.1-3.0, or MIDP.
 Insert the [M5Stack-SD-Menu] system and copy include [~.bin] to the SD root,
 I think I can start it. I do not use SPIFFS other than score save.
 The minimal version of the former game was running at a total of 30 kb including resources (they were paid for a while).
 I adjust the vertical STG to force only horizontal movement, but personally I prefer to make it under such restrictions.
 As long as there is a time-recovery barrier, [ENE], we have decided that the system is safe to be hit.
 You can also use the [B] button or [A] and [C] simultaneously to consume a little [ENE] and enter the invincible mode spontaneously. 

*Files

-[ETERNAL_STRIKER_M5_S_wPAD.bin]
 -For [M5Stack-SD-Menu] system.
  +[M5Stack-SD-Menu] > Copyright 2018 tobozo http://github.com/tobozo
 -It corresponds to "FIRE (16 Mb aircraft)h and gESP 32 Arduino SDK V 1.0.1 Versionh from 2019/2/11 edition.
 -A version that corresponds to "thumb joystick".
 -Corresponds to yM5 unitz stick of I2C connection.
 -2019/3/30 GROVE [B] / ANALOG connection "thumb joystick" has been discontinued.
 -2019/3/17 Added a function to transfer voice data from SD to SPIFFS at startup.
  If there is not enough space, format SPIFFS using [SPIFFS_FORMAT_TOOL.bin].
  (Caution: Do not delete data of other apps by mistake!)
 -In the bonus, corresponding to the light emission of [GO BOTTOM]'s NEOPIXEL.
  By pressing the [A] and [C] buttons at the same time on the title screen, you can switch the LED off and on.
  However, at present, the malfunction of the 0 light is confirmed.
  under investigation.

-[[mp3][jpg][json]FOLDER]
 -Please place the entire folder at the root of SD.
 -Notes : Since it is not a free material, redistribution is prohibited.

-[SPIFFS_FORMAT_TOOL.bin]
 -For [M5Stack-SD-Menu] system.
  +[M5Stack-SD-Menu] > Copyright 2018 tobozo http://github.com/tobozo
 -SPIFFS format TOOL.
 -Erases all data in virtual disk space.
  (Caution: Do not delete data of other apps by mistake!)

*Excerpt of changes in [M5Stack library].

 +[const] version only. [8bitColor] specialized.
 +0 value handled transparently, Clipping supported, single color replacement supported.
 +Probably so fast processing.
 +Hopefully it will be helpful.

//[Sprite.h]
//2018/10/5 T.K Add Function selector
#define SPR_ZERO_T (1<<4) //Transparent color(0) ON
#define SPR_CLIP (1<<5) //Clipping ON
#define SPR_COLOR (1<<6) //Color Replacement ON (SPR_ZERO_T ONLY)
//
  void     pushImage_D8AD(int32_t x0, int32_t y0, uint32_t w, uint32_t h, const uint8_t *data ,uint16_t mode,uint16_t cl=0xffff);//Add Function Color data for replacement. (uint16_t cl)
// Write an Part of image (colour bitmap) to the sprite 8bit DIRECT 2018/10/5 T.K Add
//Add src x,y size w,h src max_w...
//Valid only for const version. Comment out dynamic pointer version.
  void     pushPartImage_D8(int32_t x0, int32_t y0, uint16_t sx, uint16_t sy, uint16_t w, uint16_t h, uint16_t sw, const uint8_t *data ,uint16_t mode, uint16_t cl=0xffff);
//

//[Sprite.cpp]
*/
/***************************************************************************************
** Function name:           pushImage 8bitDIRECT ADVANCE Clipping/Transparent 2018/10/5 T.K Add
*************************************************************************************x*/
// TODO Need to add more area boundary checks
void  TFT_eSprite::pushImage_D8AD(int32_t x, int32_t y, uint32_t w, uint32_t h, const uint8_t *data ,uint16_t mode,uint16_t cl)
{
  if (!_created ||_bpp != 8 || (x >= _iwidth) || (y >= _iheight) || (w == 0) || (h == 0) ) return;
	int yp2,dx,dx2,dt;
	byte color;
	if(mode&SPR_CLIP)//Clipping MODE
	for (int32_t yp = 0; yp < h; yp++)
	{
		//Cliping
		if(y+yp>=_iheight){break;}
		else
		if(y+yp<0){data+=w;continue;}
		yp2=(y+yp)*_iwidth;dx=x;dx2=x+w;
		if(dx<0){data+=dx*-1;dx=0;}
		if(dx2>=_iwidth){dt=dx2-_iwidth;dx2=_iwidth;}
		else
		dt=0;
		if(mode&SPR_ZERO_T)//Transparent color(0) ON >Run
		{
			if(mode&SPR_COLOR)
			for (int32_t xp = dx; xp < dx2; xp++){
				color = pgm_read_byte(data++);
			 	if(color)_img8[xp + yp2] = cl;
			}
			else
			for (int32_t xp = dx; xp < dx2; xp++){
				color = pgm_read_byte(data++);
			 	if(color)_img8[xp + yp2] = color;
			}
		}
		else
		for (int32_t xp = dx; xp < dx2; xp++){
			_img8[xp + yp2] = pgm_read_byte(data++);
		}
		data+=dt;
	}
	else//NORMAL
	if(mode&SPR_ZERO_T)//Transparent color(0) ON >Run
		for (uint32_t yp = y; yp < y + h; yp++)
		{
			yp2=yp * _iwidth;
		  for (uint32_t xp = x; xp < x + w; xp++)
		  {
			color = pgm_read_byte(data++);
			if(color)_img8[xp + yp2] = color;
		  }
		}
		else//NO EFFECT
		for (uint32_t yp = y; yp < y + h; yp++)
		{
			yp2=yp * _iwidth;
		  for (uint32_t xp = x; xp < x + w; xp++)
		  {
			_img8[xp + yp2]= pgm_read_byte(data++);
		  }
		}
}
/***************************************************************************************
** Function name:           pushImage 8bitDIRECT Partial transfer 2018/10/5 T.K Add
** Description:             push 565 colour FLASH (PROGMEM) image into a defined area
*************************************************************************************x*/
// TODO Need to add more area boundary checks
void  TFT_eSprite::pushPartImage_D8(int32_t x, int32_t y, uint16_t sx, uint16_t sy, uint16_t w, uint16_t h, uint16_t sw, const uint8_t *data,uint16_t m ,uint16_t cl)
{
  if (!_created ||_bpp != 8 || (x >= _iwidth) || (y >= _iheight) || (w == 0) || (h == 0) ) return;
	uint32_t bp,sbp;
	byte color;
		if(mode&SPR_CLIP);//Clipping MODE //Not supported
		else
		if(mode&SPR_ZERO_T)//Transparent color(0) ON >Run
		for (uint32_t yp = 0; yp < h; yp++)
		{
			bp=(y+yp) * _iwidth +x;sbp=(uint32_t)data+(sy+yp) * sw+sx;
			if(mode&SPR_COLOR)
			  for (uint32_t xp = 0; xp < w; xp++)
			  {
				 color=pgm_read_byte(xp + sbp);
				 if(color!=0)_img8[xp + bp] =cl; 
			  }
			else
			  for (uint32_t xp = 0; xp < w; xp++)
			  {
				 color=pgm_read_byte(xp + sbp);
				 if(color!=0)_img8[xp + bp] =color; 
				}
			}
			else//NOT T
			for (uint32_t yp = 0; yp < h; yp++)
			{
				bp=(y+yp) * _iwidth +x;sbp=(sy+yp) * sw+sx;
				for (uint32_t xp = 0; xp < w; xp++)
                	_img8[xp + bp] = pgm_read_byte(xp + sbp);
			}
}

*Contact Information

Copyright TETUBUN KATAKOTO (Team Redherring)

Team Redherring/STUDIO Sequence
https://twitter.com/TEAM_REDHERRING
Follow me.

The recent work is here.

[Wrathgrave's detective story (RASUGUREIVU TANTEI TAN)]
http://opera-house.jp/wds/

Application:
https://play.google.com/store/apps/details?id=com.team_rh.ADV_DR_HG_EX1
https://play.google.com/store/apps/details?id=com.team_rh.ADV_DR_HG_G0
https://play.google.com/store/apps/details?id=com.team_rh.ADV_DR_HG_G1

An old type of reasoning adventure game.
Sorry, the application is only available in Japanese.

Others:
Somewhat old work. There are other new projects planned.

[ETARNAL STRIKER Ad]
https://play.google.com/store/apps/details?id=com.studiosequence.ESad_Lite
https://www.amazon.co.jp/Team-Redherring-STUDIO-Sequence-ETERNAL/dp/B00V591ZN6/

[BLOCK BREAKER AT]
https://play.google.com/store/apps/details?id=com.studiosequence.BB_AT
https://www.amazon.co.jp/Team-Redherring-STUDIO-Sequence-BRAEKER/dp/B019B4NAVQ/

