git repos / blockattack-game

blame: source/code/DialogBox.cpp

normal view · raw

59dcb571 sago007 2016-02-14 15:34 1
/*
7a956470 sago007 2016-02-14 17:09 2
===========================================================================
7a956470 sago007 2016-02-14 17:09 3
blockattack - Block Attack - Rise of the Blocks
7a956470 sago007 2016-02-14 17:09 4
Copyright (C) 2005-2016 Poul Sander
7a956470 sago007 2016-02-14 17:09 5
7a956470 sago007 2016-02-14 17:09 6
This program is free software: you can redistribute it and/or modify
7a956470 sago007 2016-02-14 17:09 7
it under the terms of the GNU General Public License as published by
7a956470 sago007 2016-02-14 17:09 8
the Free Software Foundation, either version 2 of the License, or
7a956470 sago007 2016-02-14 17:09 9
(at your option) any later version.
7a956470 sago007 2016-02-14 17:09 10
7a956470 sago007 2016-02-14 17:09 11
This program is distributed in the hope that it will be useful,
7a956470 sago007 2016-02-14 17:09 12
but WITHOUT ANY WARRANTY; without even the implied warranty of
7a956470 sago007 2016-02-14 17:09 13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7a956470 sago007 2016-02-14 17:09 14
GNU General Public License for more details.
7a956470 sago007 2016-02-14 17:09 15
7a956470 sago007 2016-02-14 17:09 16
You should have received a copy of the GNU General Public License
7a956470 sago007 2016-02-14 17:09 17
along with this program.  If not, see http://www.gnu.org/licenses/
7a956470 sago007 2016-02-14 17:09 18
7a956470 sago007 2016-02-14 17:09 19
Source information and contacts persons can be found at
7a956470 sago007 2016-02-14 17:09 20
http://www.blockattack.net
7a956470 sago007 2016-02-14 17:09 21
===========================================================================
7a956470 sago007 2016-02-14 17:09 22
*/
59dcb571 sago007 2016-02-14 15:34 23
59dcb571 sago007 2016-02-14 15:34 24
#include "DialogBox.hpp"
59dcb571 sago007 2016-02-14 15:34 25
#include "global.hpp"
59dcb571 sago007 2016-02-14 15:34 26
#include "common.h"
59dcb571 sago007 2016-02-14 15:34 27
#include "ReadKeyboard.h"
fc425e41 Poul Sander 2019-08-14 18:10 28
#include "utf8.h"
59dcb571 sago007 2016-02-14 15:34 29
d2ba3cf5 sago007 2018-05-13 15:00 30
static void setButtonFont(const sago::SagoDataHolder* holder, sago::SagoTextField& field, const char* text) {
34f6ec6d sago007 2018-03-29 16:17 31
	field.SetHolder(holder);
34f6ec6d sago007 2018-03-29 16:17 32
	field.SetFont("freeserif");
34f6ec6d sago007 2018-03-29 16:17 33
	field.SetColor({255,255,255,255});
34f6ec6d sago007 2018-03-29 16:17 34
	field.SetFontSize(24);
34f6ec6d sago007 2018-03-29 16:17 35
	field.SetOutline(1, {0,0,0,255});
34f6ec6d sago007 2018-03-29 16:17 36
	field.SetText(text);
34f6ec6d sago007 2018-03-29 16:17 37
}
34f6ec6d sago007 2018-03-29 16:17 38
41f037b2 sago007 2016-04-17 16:37 39
static void DrawRect(SDL_Renderer* target, int topx, int topy, int height, int width, const std::string& name) {
daa660ab sago007 2016-04-16 18:13 40
	const int size = 32;
daa660ab sago007 2016-04-16 18:13 41
	SDL_Rect bounds_ns = {topx, topy+size, width, height-2*size};  //bounds for south
daa660ab sago007 2016-04-16 18:13 42
	SDL_Rect bounds_e = {topx, topy, width-size, height};
72383a9e sago007 2016-10-30 11:56 43
	const sago::SagoSprite& n = globalData.spriteHolder->GetSprite(name+"n");
72383a9e sago007 2016-10-30 11:56 44
	const sago::SagoSprite& s = globalData.spriteHolder->GetSprite(name+"s");
72383a9e sago007 2016-10-30 11:56 45
	const sago::SagoSprite& e = globalData.spriteHolder->GetSprite(name+"e");
72383a9e sago007 2016-10-30 11:56 46
	const sago::SagoSprite& w = globalData.spriteHolder->GetSprite(name+"w");
72383a9e sago007 2016-10-30 11:56 47
	const sago::SagoSprite& fill = globalData.spriteHolder->GetSprite(name+"fill");
daa660ab sago007 2016-04-16 18:13 48
	for (int i = 1; i < width/size; ++i) {
daa660ab sago007 2016-04-16 18:13 49
		n.DrawBounded(target, SDL_GetTicks(), topx+i*size, topy, bounds_e);
daa660ab sago007 2016-04-16 18:13 50
		for (int j = 1; j < height/size; ++j) {
daa660ab sago007 2016-04-16 18:13 51
			w.DrawBounded(target, SDL_GetTicks(), topx, topy+j*size, bounds_ns);
daa660ab sago007 2016-04-16 18:13 52
			fill.Draw(target, SDL_GetTicks(),topx+i*size, topy+j*size);
daa660ab sago007 2016-04-16 18:13 53
			e.DrawBounded(target, SDL_GetTicks(), topx+width-size, topy+j*size, bounds_ns);
daa660ab sago007 2016-04-16 18:13 54
		}
daa660ab sago007 2016-04-16 18:13 55
		s.DrawBounded(target, SDL_GetTicks(), topx+i*size, topy+height-size, bounds_e);
daa660ab sago007 2016-04-16 18:13 56
	}
daa660ab sago007 2016-04-16 18:13 57
	//Corners
72383a9e sago007 2016-10-30 11:56 58
	const sago::SagoSprite& nw = globalData.spriteHolder->GetSprite(name+"nw");
72383a9e sago007 2016-10-30 11:56 59
	const sago::SagoSprite& ne = globalData.spriteHolder->GetSprite(name+"ne");
72383a9e sago007 2016-10-30 11:56 60
	const sago::SagoSprite& se = globalData.spriteHolder->GetSprite(name+"se");
72383a9e sago007 2016-10-30 11:56 61
	const sago::SagoSprite& sw = globalData.spriteHolder->GetSprite(name+"sw");
daa660ab sago007 2016-04-16 18:13 62
	nw.Draw(target, SDL_GetTicks(), topx, topy);
daa660ab sago007 2016-04-16 18:13 63
	ne.Draw(target, SDL_GetTicks(), topx+width-size, topy);
daa660ab sago007 2016-04-16 18:13 64
	se.Draw(target, SDL_GetTicks(), topx+width-size, topy+height-size);
daa660ab sago007 2016-04-16 18:13 65
	sw.Draw(target, SDL_GetTicks(), topx, topy+height-size);
41f037b2 sago007 2016-04-17 16:37 66
}
41f037b2 sago007 2016-04-17 16:37 67
41f037b2 sago007 2016-04-17 16:37 68
static void DrawRectWhite(SDL_Renderer* target, int topx, int topy, int height, int width) {
41f037b2 sago007 2016-04-17 16:37 69
	std::string name = "ui_rect_white_";
41f037b2 sago007 2016-04-17 16:37 70
	DrawRect(target, topx, topy, height, width, name);
41f037b2 sago007 2016-04-17 16:37 71
}
41f037b2 sago007 2016-04-17 16:37 72
db2f559e sago007 2018-05-10 10:36 73
void DrawRectYellow(SDL_Renderer* target, int topx, int topy, int height, int width) {
41f037b2 sago007 2016-04-17 16:37 74
	std::string name = "ui_rect_yellow_";
41f037b2 sago007 2016-04-17 16:37 75
	DrawRect(target, topx, topy, height, width, name);
daa660ab sago007 2016-04-16 18:13 76
}
daa660ab sago007 2016-04-16 18:13 77
96e759d9 sago007 2016-04-17 18:45 78
bool OpenDialogbox(int x, int y, std::string& name, const std::string& header) {
96e759d9 sago007 2016-04-17 18:45 79
	DialogBox d(x, y, name, header);
59dcb571 sago007 2016-02-14 15:34 80
	RunGameState(d);
59dcb571 sago007 2016-02-14 15:34 81
	if (d.IsUpdated()) {
59dcb571 sago007 2016-02-14 15:34 82
		name = d.GetName();
59dcb571 sago007 2016-02-14 15:34 83
		return true;
59dcb571 sago007 2016-02-14 15:34 84
	}
59dcb571 sago007 2016-02-14 15:34 85
	return false;
59dcb571 sago007 2016-02-14 15:34 86
}
59dcb571 sago007 2016-02-14 15:34 87
96e759d9 sago007 2016-04-17 18:45 88
DialogBox::DialogBox(int x, int y, const std::string& name, const std::string& header) : header(header) {
59dcb571 sago007 2016-02-14 15:34 89
	this->x = x;
59dcb571 sago007 2016-02-14 15:34 90
	this->y = y;
59dcb571 sago007 2016-02-14 15:34 91
	SetName(name);
34f6ec6d sago007 2018-03-29 16:17 92
	setButtonFont(&globalData.spriteHolder->GetDataHolder(), headerLabel, header.c_str());
34f6ec6d sago007 2018-03-29 16:17 93
	setButtonFont(&globalData.spriteHolder->GetDataHolder(), enterLabel, _("Enter to accept"));
34f6ec6d sago007 2018-03-29 16:17 94
	setButtonFont(&globalData.spriteHolder->GetDataHolder(), cancelLabel, _("Esc to cancel"));
bd788178 sago007 2018-03-31 16:03 95
	sagoTextSetBlueFont(textField);
bd788178 sago007 2018-03-31 16:03 96
	sagoTextSetBlueFont(cursorLabel);
bd788178 sago007 2018-03-31 16:03 97
	cursorLabel.SetText("|");
fc425e41 Poul Sander 2019-08-14 18:10 98
	for (auto position = alphabet.begin(); position != alphabet.end() ; utf8::advance(position, 1, alphabet.end())) {
fc425e41 Poul Sander 2019-08-14 18:10 99
		auto endPosition = position;
fc425e41 Poul Sander 2019-08-14 18:10 100
		utf8::advance(endPosition, 1, alphabet.end());
fc425e41 Poul Sander 2019-08-14 18:10 101
		std::string theChar(position, endPosition);
fc425e41 Poul Sander 2019-08-14 18:10 102
		gamePadChars.push_back(theChar);
fc425e41 Poul Sander 2019-08-14 18:10 103
		gamePadCharFields.emplace_back();
fc425e41 Poul Sander 2019-08-14 18:10 104
		sago::SagoTextField& tf = gamePadCharFields.back();
fc425e41 Poul Sander 2019-08-14 18:10 105
		setButtonFont(&globalData.spriteHolder->GetDataHolder(), tf, theChar.c_str());
fc425e41 Poul Sander 2019-08-14 18:10 106
		std::cout << *position << "\n";
fc425e41 Poul Sander 2019-08-14 18:10 107
	}
59dcb571 sago007 2016-02-14 15:34 108
}
59dcb571 sago007 2016-02-14 15:34 109
59dcb571 sago007 2016-02-14 15:34 110
59dcb571 sago007 2016-02-14 15:34 111
DialogBox::~DialogBox() {
59dcb571 sago007 2016-02-14 15:34 112
}
59dcb571 sago007 2016-02-14 15:34 113
59dcb571 sago007 2016-02-14 15:34 114
bool DialogBox::IsActive() {
59dcb571 sago007 2016-02-14 15:34 115
	return isActive;
59dcb571 sago007 2016-02-14 15:34 116
}
59dcb571 sago007 2016-02-14 15:34 117
610539a5 Poul Sander 2019-12-04 16:47 118
static bool insideRect (int x, int y, int height, int width) {
610539a5 Poul Sander 2019-12-04 16:47 119
	if (globalData.mousex < x) {
610539a5 Poul Sander 2019-12-04 16:47 120
		return false;
610539a5 Poul Sander 2019-12-04 16:47 121
	}
610539a5 Poul Sander 2019-12-04 16:47 122
	if (globalData.mousex > x+width) {
610539a5 Poul Sander 2019-12-04 16:47 123
		return false;
610539a5 Poul Sander 2019-12-04 16:47 124
	}
610539a5 Poul Sander 2019-12-04 16:47 125
	if (globalData.mousey < y) {
610539a5 Poul Sander 2019-12-04 16:47 126
		return false;
610539a5 Poul Sander 2019-12-04 16:47 127
	}
610539a5 Poul Sander 2019-12-04 16:47 128
	if (globalData.mousey > y+height) {
610539a5 Poul Sander 2019-12-04 16:47 129
		return false;
610539a5 Poul Sander 2019-12-04 16:47 130
	}
610539a5 Poul Sander 2019-12-04 16:47 131
	return true;
610539a5 Poul Sander 2019-12-04 16:47 132
}
610539a5 Poul Sander 2019-12-04 16:47 133
afe1bac4 Poul Sander 2020-05-24 18:34 134
// For use with the mouse/gamepad keyboard
afe1bac4 Poul Sander 2020-05-24 18:34 135
int keyboardRowLimit = 20;
afe1bac4 Poul Sander 2020-05-24 18:34 136
59dcb571 sago007 2016-02-14 15:34 137
void DialogBox::Draw(SDL_Renderer* target) {
72383a9e sago007 2016-10-30 11:56 138
	DrawBackground(globalData.screen);
72383a9e sago007 2016-10-30 11:56 139
	this->x = globalData.xsize/2-300;
72383a9e sago007 2016-10-30 11:56 140
	this->y = globalData.ysize/2-100;
647f12da sago007 2016-09-12 20:07 141
	DrawRectYellow(target, x, y, 200, 600);
34f6ec6d sago007 2018-03-29 16:17 142
	headerLabel.Draw(target, x+300, y+20, sago::SagoTextField::Alignment::center);
610539a5 Poul Sander 2019-12-04 16:47 143
	DrawRectYellow(target, x+25, y+128, 50, 250);
34f6ec6d sago007 2018-03-29 16:17 144
	enterLabel.Draw(target, x+150, y+140, sago::SagoTextField::Alignment::center);
610539a5 Poul Sander 2019-12-04 16:47 145
	DrawRectYellow(target, x+325, y+128, 50, 250);
34f6ec6d sago007 2018-03-29 16:17 146
	cancelLabel.Draw(target, x+450, y+140, sago::SagoTextField::Alignment::center);
647f12da sago007 2016-09-12 20:07 147
	DrawRectWhite(target, x+26, y+64, 54, 600-2*26);
0b8fb137 sago007 2018-03-31 19:53 148
	textField.SetText(rk->GetString());
bd788178 sago007 2018-03-31 16:03 149
	textField.Draw(target, x+40, y+76);
59dcb571 sago007 2016-02-14 15:34 150
	std::string strHolder = rk->GetString();
59dcb571 sago007 2016-02-14 15:34 151
	strHolder.erase((int)rk->CharsBeforeCursor());
59dcb571 sago007 2016-02-14 15:34 152
59dcb571 sago007 2016-02-14 15:34 153
	if (((SDL_GetTicks()/600)%2)==1) {
bd788178 sago007 2018-03-31 16:03 154
		int width = 0;
bd788178 sago007 2018-03-31 16:03 155
		textField.GetRenderedSize( strHolder.c_str(), &width);
bd788178 sago007 2018-03-31 16:03 156
		width -= 2;
bd788178 sago007 2018-03-31 16:03 157
		cursorLabel.Draw(target, x+40+width,y+76);
59dcb571 sago007 2016-02-14 15:34 158
	}
c5cd33e7 Poul Sander 2019-12-04 19:54 159
	const sago::SagoSprite& marked = globalData.spriteHolder->GetSprite("i_level_check_box_marked");
fc425e41 Poul Sander 2019-08-14 18:10 160
	for (size_t i = 0; i<gamePadCharFields.size(); ++i) {
c5cd33e7 Poul Sander 2019-12-04 19:54 161
		if (selectedChar == static_cast<int>(i)) {
afe1bac4 Poul Sander 2020-05-24 18:34 162
			marked.Draw(target, SDL_GetTicks(), globalData.xsize/2-400+(i%keyboardRowLimit)*40-5, globalData.ysize/2+150+(i/keyboardRowLimit)*40-5);
c5cd33e7 Poul Sander 2019-12-04 19:54 163
		}
fc425e41 Poul Sander 2019-08-14 18:10 164
		sago::SagoTextField& f = gamePadCharFields.at(i);
afe1bac4 Poul Sander 2020-05-24 18:34 165
		f.Draw(target, globalData.xsize/2-400+(i%keyboardRowLimit)*40, globalData.ysize/2+150+(i/keyboardRowLimit)*40);
fc425e41 Poul Sander 2019-08-14 18:10 166
	}
59dcb571 sago007 2016-02-14 15:34 167
}
59dcb571 sago007 2016-02-14 15:34 168
c7f2082f sago007 2016-03-13 11:48 169
void DialogBox::ProcessInput(const SDL_Event& event, bool& processed) {
59dcb571 sago007 2016-02-14 15:34 170
	if (event.type == SDL_TEXTINPUT) {
72383a9e sago007 2016-10-30 11:56 171
		if ((rk->ReadKey(event))&&(globalData.SoundEnabled)&&(!globalData.NoSound)) {
524f188c sago007 2017-04-22 09:01 172
			Mix_PlayChannel(1, globalData.typingChunk.get(), 0);
59dcb571 sago007 2016-02-14 15:34 173
		}
59dcb571 sago007 2016-02-14 15:34 174
	}
59dcb571 sago007 2016-02-14 15:34 175
59dcb571 sago007 2016-02-14 15:34 176
	if ( event.type == SDL_KEYDOWN ) {
59dcb571 sago007 2016-02-14 15:34 177
		if ( (event.key.keysym.sym == SDLK_RETURN)||(event.key.keysym.sym == SDLK_KP_ENTER) ) {
59dcb571 sago007 2016-02-14 15:34 178
			name = rk->GetString();
59dcb571 sago007 2016-02-14 15:34 179
			updated = true;
59dcb571 sago007 2016-02-14 15:34 180
			isActive = false;
59dcb571 sago007 2016-02-14 15:34 181
		}
59dcb571 sago007 2016-02-14 15:34 182
		else if ( (event.key.keysym.sym == SDLK_ESCAPE) ) {
59dcb571 sago007 2016-02-14 15:34 183
			isActive = false;
59dcb571 sago007 2016-02-14 15:34 184
		}
59dcb571 sago007 2016-02-14 15:34 185
		else {
72383a9e sago007 2016-10-30 11:56 186
			if ((rk->ReadKey(event))&&(globalData.SoundEnabled)&&(!globalData.NoSound)) {
524f188c sago007 2017-04-22 09:01 187
				Mix_PlayChannel(1, globalData.typingChunk.get(), 0);
59dcb571 sago007 2016-02-14 15:34 188
			}
59dcb571 sago007 2016-02-14 15:34 189
		}
59dcb571 sago007 2016-02-14 15:34 190
	}
7a956470 sago007 2016-02-14 17:09 191
	processed = true;
610539a5 Poul Sander 2019-12-04 16:47 192
	if ( !(SDL_GetMouseState(nullptr, nullptr)&SDL_BUTTON(1)) ) {
610539a5 Poul Sander 2019-12-04 16:47 193
		bMouseUp=true;
610539a5 Poul Sander 2019-12-04 16:47 194
	}
610539a5 Poul Sander 2019-12-04 16:47 195
610539a5 Poul Sander 2019-12-04 16:47 196
	if (SDL_GetMouseState(nullptr,nullptr)&SDL_BUTTON(1) && bMouseUp) {
610539a5 Poul Sander 2019-12-04 16:47 197
		bMouseUp = false;
610539a5 Poul Sander 2019-12-04 16:47 198
		std::cout << "Mouse pressed\n";
610539a5 Poul Sander 2019-12-04 16:47 199
		if (insideRect(x+25, y+128, 50, 250)) {
610539a5 Poul Sander 2019-12-04 16:47 200
			name = rk->GetString();
610539a5 Poul Sander 2019-12-04 16:47 201
			updated = true;
610539a5 Poul Sander 2019-12-04 16:47 202
			isActive = false;
610539a5 Poul Sander 2019-12-04 16:47 203
		}
610539a5 Poul Sander 2019-12-04 16:47 204
		if (insideRect(x+325, y+128, 50, 250)) {
610539a5 Poul Sander 2019-12-04 16:47 205
			isActive = false;
610539a5 Poul Sander 2019-12-04 16:47 206
		}
afe1bac4 Poul Sander 2020-05-24 18:34 207
		for (size_t i = 0; i<gamePadCharFields.size(); ++i) {
afe1bac4 Poul Sander 2020-05-24 18:34 208
			sago::SagoTextField& f = gamePadCharFields.at(i);
afe1bac4 Poul Sander 2020-05-24 18:34 209
			auto topx = globalData.xsize/2-400+(i%keyboardRowLimit)*40-5;
afe1bac4 Poul Sander 2020-05-24 18:34 210
			auto topy = globalData.ysize/2+150+(i/keyboardRowLimit)*40-5;
afe1bac4 Poul Sander 2020-05-24 18:34 211
			if (insideRect(topx, topy, 30, 30)) {
c634a901 Poul Sander 2020-05-24 19:37 212
				std::string insertChar = f.GetText();
c634a901 Poul Sander 2020-05-24 19:37 213
				std::cout << insertChar << " pressed\n";
c634a901 Poul Sander 2020-05-24 19:37 214
				if (insertChar == backspace) {
c634a901 Poul Sander 2020-05-24 19:37 215
					rk->emulateBackspace();
c634a901 Poul Sander 2020-05-24 19:37 216
				}
c634a901 Poul Sander 2020-05-24 19:37 217
				else if (insertChar == leftChar) {
c634a901 Poul Sander 2020-05-24 19:37 218
					rk->cursorLeft();
c634a901 Poul Sander 2020-05-24 19:37 219
				}
c634a901 Poul Sander 2020-05-24 19:37 220
				else if (insertChar == rightChar) {
c634a901 Poul Sander 2020-05-24 19:37 221
					rk->cursorRight();
c634a901 Poul Sander 2020-05-24 19:37 222
				}
c634a901 Poul Sander 2020-05-24 19:37 223
				else {
c634a901 Poul Sander 2020-05-24 19:37 224
					rk->putchar(f.GetText());
c634a901 Poul Sander 2020-05-24 19:37 225
				}
afe1bac4 Poul Sander 2020-05-24 18:34 226
			}
afe1bac4 Poul Sander 2020-05-24 18:34 227
		}
afe1bac4 Poul Sander 2020-05-24 18:34 228
	}
afe1bac4 Poul Sander 2020-05-24 18:34 229
afe1bac4 Poul Sander 2020-05-24 18:34 230
	if (1 /*TODO: Changed to only when mouse moves*/) {
afe1bac4 Poul Sander 2020-05-24 18:34 231
		for (size_t i = 0; i<gamePadCharFields.size(); ++i) {
afe1bac4 Poul Sander 2020-05-24 18:34 232
			auto topx = globalData.xsize/2-400+(i%keyboardRowLimit)*40-5;
afe1bac4 Poul Sander 2020-05-24 18:34 233
			auto topy = globalData.ysize/2+150+(i/keyboardRowLimit)*40-5;
afe1bac4 Poul Sander 2020-05-24 18:34 234
			if (insideRect(topx, topy, 30, 30)) {
afe1bac4 Poul Sander 2020-05-24 18:34 235
				selectedChar = i;
afe1bac4 Poul Sander 2020-05-24 18:34 236
			}
afe1bac4 Poul Sander 2020-05-24 18:34 237
		}
610539a5 Poul Sander 2019-12-04 16:47 238
	}
59dcb571 sago007 2016-02-14 15:34 239
}
59dcb571 sago007 2016-02-14 15:34 240
59dcb571 sago007 2016-02-14 15:34 241
void DialogBox::SetName(const std::string& name) {
59dcb571 sago007 2016-02-14 15:34 242
	this->name = name;
59dcb571 sago007 2016-02-14 15:34 243
	rk = std::make_shared<ReadKeyboard>(name.c_str());
59dcb571 sago007 2016-02-14 15:34 244
}
59dcb571 sago007 2016-02-14 15:34 245
59dcb571 sago007 2016-02-14 15:34 246
std::string DialogBox::GetName() const {
59dcb571 sago007 2016-02-14 15:34 247
	return name;
59dcb571 sago007 2016-02-14 15:34 248
}
59dcb571 sago007 2016-02-14 15:34 249
59dcb571 sago007 2016-02-14 15:34 250
bool DialogBox::IsUpdated() const {
59dcb571 sago007 2016-02-14 15:34 251
	return updated;
b1a7bd3e Poul Sander 2016-12-19 21:53 252
}
1970-01-01 00:00 253