mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 12:10:53 +00:00
- add printcoords as an ADD_STAT()
define and move string code into static function for shared use between CCMD and ADD_STAT.
This commit is contained in:
parent
b08d571be9
commit
8817914744
1 changed files with 24 additions and 5 deletions
|
@ -108,13 +108,32 @@ int32_t circlewall=-1;
|
||||||
int16_t editstatus = 0;
|
int16_t editstatus = 0;
|
||||||
static fix16_t global100horiz; // (-100..300)-scale horiz (the one passed to drawrooms)
|
static fix16_t global100horiz; // (-100..300)-scale horiz (the one passed to drawrooms)
|
||||||
|
|
||||||
|
static FString printcoords(void)
|
||||||
|
{
|
||||||
|
FString str;
|
||||||
|
|
||||||
|
str.Format(
|
||||||
|
"pos.x: %d\n"
|
||||||
|
"pos.y: %d\n"
|
||||||
|
"pos.z: %d\n"
|
||||||
|
"ang : %d\n"
|
||||||
|
"horiz: %d\n",
|
||||||
|
globalposx, globalposy,
|
||||||
|
globalposz, globalang,
|
||||||
|
fix16_to_int(global100horiz)
|
||||||
|
);
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
CCMD(printcoords)
|
CCMD(printcoords)
|
||||||
{
|
{
|
||||||
Printf("pos.x: %d\n", globalposx);
|
Printf("%s", printcoords().GetChars());
|
||||||
Printf("pos.y: %d\n", globalposy);
|
}
|
||||||
Printf("pos.z: %d\n", globalposz);
|
|
||||||
Printf("ang: %d\n" , globalang);
|
ADD_STAT(printcoords)
|
||||||
Printf("horiz: %d\n", fix16_to_int(global100horiz));
|
{
|
||||||
|
return printcoords();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t(*getpalookup_replace)(int32_t davis, int32_t dashade) = NULL;
|
int32_t(*getpalookup_replace)(int32_t davis, int32_t dashade) = NULL;
|
||||||
|
|
Loading…
Reference in a new issue