mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
Compare commits
4 Commits
1fb0c84aff
...
d955876d14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d955876d14 | ||
|
|
817cec99fe | ||
|
|
6675586a29 | ||
|
|
c12a79d6e6 |
@ -84,6 +84,26 @@ CONSOLELINE::~CONSOLELINE() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CONSOLELINE::Backspace() {
|
||||||
|
if (this->inputpos > this->inputstart) {
|
||||||
|
if (this->chars <= this->inputpos) {
|
||||||
|
this->buffer[this->inputpos - 1] = '\0';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
memcpy(
|
||||||
|
&this->buffer[this->inputpos - 1],
|
||||||
|
&this->buffer[this->inputpos],
|
||||||
|
this->chars - this->inputpos + 1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
this->inputpos--;
|
||||||
|
this->chars--;
|
||||||
|
|
||||||
|
SetInputString(this->buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DrawBackground() {
|
void DrawBackground() {
|
||||||
uint16_t indices[] = {
|
uint16_t indices[] = {
|
||||||
0, 1, 2, 3
|
0, 1, 2, 3
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class CONSOLELINE : public TSLinkedNode<CONSOLELINE> {
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
~CONSOLELINE();
|
~CONSOLELINE();
|
||||||
|
void Backspace();
|
||||||
};
|
};
|
||||||
|
|
||||||
void ConsoleScreenAnimate(float elapsedSec);
|
void ConsoleScreenAnimate(float elapsedSec);
|
||||||
|
|||||||
@ -80,6 +80,10 @@ void CGCamera::SetupWorldProjection(const CRect& projRect) {
|
|||||||
this->SetGxProjectionAndView(projRect);
|
this->SetGxProjectionAndView(projRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
C3Vector CGCamera::Target() const {
|
||||||
|
return this->m_position + this->Forward();
|
||||||
|
}
|
||||||
|
|
||||||
C3Vector CGCamera::Up() const {
|
C3Vector CGCamera::Up() const {
|
||||||
if (this->m_relativeTo) {
|
if (this->m_relativeTo) {
|
||||||
return this->CSimpleCamera::Up() * this->ParentToWorld();
|
return this->CSimpleCamera::Up() * this->ParentToWorld();
|
||||||
|
|||||||
@ -27,6 +27,7 @@ class CGCamera : public CSimpleCamera {
|
|||||||
CGCamera();
|
CGCamera();
|
||||||
C33Matrix ParentToWorld() const;
|
C33Matrix ParentToWorld() const;
|
||||||
void SetupWorldProjection(const CRect& projRect);
|
void SetupWorldProjection(const CRect& projRect);
|
||||||
|
C3Vector Target() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Private member variables
|
// Private member variables
|
||||||
|
|||||||
@ -84,6 +84,10 @@ C3Vector CSimpleCamera::Right() const {
|
|||||||
return { this->m_facing.b0, this->m_facing.b1, this->m_facing.b2 };
|
return { this->m_facing.b0, this->m_facing.b1, this->m_facing.b2 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const C3Vector& CSimpleCamera::Position() const {
|
||||||
|
return this->m_position;
|
||||||
|
}
|
||||||
|
|
||||||
void CSimpleCamera::SetFacing(const C3Vector& forward) {
|
void CSimpleCamera::SetFacing(const C3Vector& forward) {
|
||||||
BuildBillboardMatrix(forward, this->m_facing);
|
BuildBillboardMatrix(forward, this->m_facing);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ class CSimpleCamera {
|
|||||||
// Public member functions
|
// Public member functions
|
||||||
CSimpleCamera(float nearZ, float farZ, float fov);
|
CSimpleCamera(float nearZ, float farZ, float fov);
|
||||||
CM2Scene* GetScene();
|
CM2Scene* GetScene();
|
||||||
|
const C3Vector& Position() const;
|
||||||
void SetFacing(const C3Vector& forward);
|
void SetFacing(const C3Vector& forward);
|
||||||
void SetFacing(const C3Vector& forward, const C3Vector& up);
|
void SetFacing(const C3Vector& forward, const C3Vector& up);
|
||||||
void SetFacing(float yaw, float pitch, float roll);
|
void SetFacing(float yaw, float pitch, float roll);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user