*RENAMED THE TOSTRING
SYMBOL TO TO_STRING
!!!
This commit is contained in:
parent
f010c1d94b
commit
f966400979
3
HISTORY
3
HISTORY
@ -1,3 +1,6 @@
|
|||||||
|
Nov. 8 2017
|
||||||
|
Renamed the TOSTRING symbol to TO_STRING
|
||||||
|
|
||||||
Nov. 7 2017
|
Nov. 7 2017
|
||||||
Fixed a bug with single-line nested IF statement
|
Fixed a bug with single-line nested IF statement
|
||||||
|
|
||||||
|
Binary file not shown.
@ -322,7 +322,7 @@ MBCONST static const char* const _ERR_DESC[] = {
|
|||||||
"Incomplete routine",
|
"Incomplete routine",
|
||||||
"Routine expected",
|
"Routine expected",
|
||||||
"Duplicate routine",
|
"Duplicate routine",
|
||||||
"To many routines",
|
"Too many routines",
|
||||||
"Invalid class",
|
"Invalid class",
|
||||||
"Incomplete class",
|
"Incomplete class",
|
||||||
"Class expected",
|
"Class expected",
|
||||||
@ -551,7 +551,7 @@ typedef struct _label_t {
|
|||||||
|
|
||||||
#define _CLASS_HASH_FUNC "HASH"
|
#define _CLASS_HASH_FUNC "HASH"
|
||||||
#define _CLASS_COMPARE_FUNC "COMPARE"
|
#define _CLASS_COMPARE_FUNC "COMPARE"
|
||||||
#define _CLASS_TOSTRING_FUNC "TOSTRING"
|
#define _CLASS_TO_STRING_FUNC "TO_STRING"
|
||||||
|
|
||||||
#define _CLASS_OVERRIDE_FMT "_%s"
|
#define _CLASS_OVERRIDE_FMT "_%s"
|
||||||
|
|
||||||
@ -8390,7 +8390,7 @@ static int _format_class_to_string(mb_interpreter_t* s, void** l, _class_t* inst
|
|||||||
|
|
||||||
mb_assert(s && l && instance && out);
|
mb_assert(s && l && instance && out);
|
||||||
|
|
||||||
tsn = _search_identifier_in_class(s, instance, _CLASS_TOSTRING_FUNC, 0, 0);
|
tsn = _search_identifier_in_class(s, instance, _CLASS_TO_STRING_FUNC, 0, 0);
|
||||||
if(got_tostr) *got_tostr = false;
|
if(got_tostr) *got_tostr = false;
|
||||||
if(tsn) {
|
if(tsn) {
|
||||||
_object_t* tso = (_object_t*)tsn->data;
|
_object_t* tso = (_object_t*)tsn->data;
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ class entity
|
|||||||
|
|
||||||
var dead_handler = nil
|
var dead_handler = nil
|
||||||
|
|
||||||
def tostring()
|
def to_string()
|
||||||
return "Entity [" + name + "]"
|
return "Entity [" + name + "]"
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import "entity.bas"
|
|||||||
class goal(entity)
|
class goal(entity)
|
||||||
var take_handler = nil
|
var take_handler = nil
|
||||||
|
|
||||||
def tostring()
|
def to_string()
|
||||||
return "Goal [" + name + "]"
|
return "Goal [" + name + "]"
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@ class map_node
|
|||||||
var valid_dirs = dirs.none_dir
|
var valid_dirs = dirs.none_dir
|
||||||
var entities = list()
|
var entities = list()
|
||||||
|
|
||||||
def tostring()
|
def to_string()
|
||||||
s = pos.tostring()
|
s = pos.to_string()
|
||||||
return "Map Node " + s
|
return "Map Node " + s
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ class map
|
|||||||
|
|
||||||
var nodes = dict()
|
var nodes = dict()
|
||||||
|
|
||||||
def tostring()
|
def to_string()
|
||||||
return "Map"
|
return "Map"
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
import "entity.bas"
|
import "entity.bas"
|
||||||
|
|
||||||
class monster(entity)
|
class monster(entity)
|
||||||
def tostring()
|
def to_string()
|
||||||
return "Monster [" + name + "]"
|
return "Monster [" + name + "]"
|
||||||
enddef
|
enddef
|
||||||
endclass
|
endclass
|
||||||
|
@ -8,7 +8,7 @@ import "entity.bas"
|
|||||||
class npc(entity)
|
class npc(entity)
|
||||||
var talk_handler = nil
|
var talk_handler = nil
|
||||||
|
|
||||||
def tostring()
|
def to_string()
|
||||||
return "NPC [" + name + "]"
|
return "NPC [" + name + "]"
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import "utils.bas"
|
|||||||
class player(entity)
|
class player(entity)
|
||||||
var pos = new(point)
|
var pos = new(point)
|
||||||
|
|
||||||
def tostring()
|
def to_string()
|
||||||
return "Player [" + name + "]"
|
return "Player [" + name + "]"
|
||||||
enddef
|
enddef
|
||||||
endclass
|
endclass
|
||||||
|
@ -72,7 +72,7 @@ class point
|
|||||||
var x = 0
|
var x = 0
|
||||||
var y = 0
|
var y = 0
|
||||||
|
|
||||||
def tostring()
|
def to_string()
|
||||||
return "[" + str(x) + ", " + str(y) + "]"
|
return "[" + str(x) + ", " + str(y) + "]"
|
||||||
enddef
|
enddef
|
||||||
endclass
|
endclass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user