Extra characters added to fontset

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent 00279a44b1
commit 768b010016
  1. BIN
      C++ProjectTemplate
  2. BIN
      assets/additionalFont.png
  3. 38
      ideas
  4. 36
      main.cpp
  5. 2
      pixelGameEngine.h
  6. 1
      references.h

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

38
ideas

@ -68,4 +68,40 @@ Heat - Increases the power of fire/hot weather powers while causing trees to bur
Cold - Causes enemies to be slowed, prioritizing PC characters to go first. Prevents seed growth.
"Town Climate"
Does not get affected as quickly by weather affects during battles, but field effects will dramatically affect them as it will be concentrated. Changing the weather in areas may trigger new paths or close off certain ones.
Does not get affected as quickly by weather affects during battles, but field effects will dramatically affect them as it will be concentrated. Changing the weather in areas may trigger new paths or close off certain ones.
Characters have ATB bars which fill based on speed. When ATB is full, character can perform an action. During the time you are picking an action, the game action will almost come to a full stop (1 frame every 1 second) giving you plenty of time to plan out the next move. Once you selected an action a "queue" starts for the move selected. When the queue/cast time ends the move is performed and the ATB resets to 0 and begins filling again.
Positioning: Players can adjust their positions while in a battle. Certain spells have certain ranges and players may need to get in range to target something with certain abilities. They may also need to move out of the way of attacks as some abilities (particularly hard-hitting ones) will have pre-casts.
Anytime an enemy pre-casts an ability you will see a giant targeting marker appear. This is used in the first tutorial to teach you how to dodge attacks.
(There's a hint man in the game if you ever get stuck).
Your first stop will be the library where you find a map among the bookshelves and a Pizza Pass.
The map helps reveal names of different landmarks throughout the game for the player to use.
When you exit the building and go outside you see three gang members who decide to pick a fight with you.
This is the first real tutorial battle of the game, and you're taught how to position to avoid the "Trickster" (the main leader's) attacks as they are all big channels. You are also taught about how to use positioning to make sure you are in the right places when fighting.
You are also taught to use the Defend command.
You start off with some Cookies in your inventory, which are used to lightly heal the player.
Starting abilities:
Main Character
- Hailstorm
- Hurricane
- Meteor Rain
Anna
- PK Freeze a
- PK Shield
Battle Commands:
Power Item Move
Attack Defend Run
The Defend command will provide 80% damage reduction.

@ -129,6 +129,8 @@ public:
int messageBoxStopMarker=0; //End of text display for current printout.
int messageBoxFrameWaitTime=1;
bool messageBoxLoad=false; //Set to true when ready to load a message in.
std::map<int,vi2d> additionalChars;
bool MOUSE_PRESSED_DOWN=false,MOUSE_DOWN=false,MOUSE_RELEASED=false; //TODO Implement Mouse things.
@ -161,17 +163,24 @@ public:
GAME_FLAGS[Flag::TEST_FLAG2]=false;
GAME_FLAGS[Flag::TEST_FLAG3]=true;
additionalChars[0x391]={0,0};
additionalChars[0x392]={8,0};
additionalChars[0x3b3]={16,0};
additionalChars[0x3a3]={24,0};
additionalChars[0x3a9]={32,0};
MAP_ONETT=new Map("map0","map0_2","map0_3","map0_4","map0_5",SPRITES["terrainmap.png"]);
CURRENT_MAP=MAP_ONETT;
//OBJ_INFO["PLAYER"]=PLAYER_ANIMATION;
LoadMap(MAP_ONETT);
DisplayMessageBox(R"(Hello World!
/*DisplayMessageBox(R"(Hello World!
This is a rather long message, but I hope it reaches you well
in some form or capacity or another. Even though it
goes on a very long time, I hope you can understand this is only for testing purposes!
)");
)");*/
return true;
}
@ -557,8 +566,30 @@ goes on a very long time, I hope you can understand this is only for testing pur
DrawDialogBox({1,1},{WIDTH/2,HEIGHT/4},Pixel(70, 33, 105,128),Pixel(62, 54, 69,128),Pixel(185, 148, 255,128));
DrawStringPropDecal({6,6},messageBoxText);
}
SetDrawTarget(layer::INTERFACE);
DrawFancyStringDecal({8,8},L"Testing βtesting α\ntesting",RED);
DrawFancyStringDecal({36,64},L"TesΣting testing γ\ntestingΩ",RED,{2,2});
};
void DrawFancyStringDecal(const olc::vf2d& pos, const std::wstring& sText, const Pixel col = olc::WHITE, const olc::vf2d& scale = { 1.0f, 1.0f }) {
vf2d newpos=pos;
for (int i=0;i<sText.length();i++) {
if (sText[i]>=128) {
newpos.x+=8*scale.x;
DrawPartialDecal(newpos,SPRITES["additionalFont.png"],additionalChars[sText[i]],{8,8},scale,col);
} else
if (sText[i]!='\n') {
newpos.x+=8*scale.x;
DrawStringDecal(newpos,std::string(1,sText[i]),col,scale);
} else
if (sText[i]=='\n') {
newpos.x=pos.x;
newpos.y+=8*scale.y;
DrawStringDecal(newpos,std::string(1,sText[i]),col,scale);
}
}
}
void LoadMap(Map*map) {
std::ifstream f("assets/maps/"+map->filename,std::ios::binary);
std::ifstream f2("assets/maps/"+map->l2filename,std::ios::binary);
@ -772,6 +803,7 @@ goes on a very long time, I hope you can understand this is only for testing pur
void SetupAnimations() {
CreateSprite("terrainmap.png");
CreateSprite("additionalFont.png");
}
void SetupObjectInfo() {

@ -1151,6 +1151,7 @@ namespace olc
#endif
public: // Branding
std::string sAppName;
Renderable fontRenderable;
private: // Inner mysterious workings
olc::Sprite* pDrawTarget = nullptr;
@ -1177,7 +1178,6 @@ namespace olc
float fLastElapsed = 0.0f;
int nFrameCount = 0;
bool bSuspendTextureTransfer = false;
Renderable fontRenderable;
std::vector<LayerDesc> vLayers;
uint8_t nTargetLayer = 0;
uint32_t nLastFPS = 0;

@ -1,6 +1,5 @@
enum Reference{
PLAYER,
TILESET1,
NPC1,
NPC2,
NPC3,

Loading…
Cancel
Save