mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
use PRC_DESC
This commit is contained in:
parent
dfb734893d
commit
07c1718ec9
@ -246,10 +246,10 @@ make_global_clock() {
|
|||||||
|
|
||||||
ConfigVariableEnum<ClockObject::Mode> clock_mode
|
ConfigVariableEnum<ClockObject::Mode> clock_mode
|
||||||
("clock-mode", ClockObject::M_normal,
|
("clock-mode", ClockObject::M_normal,
|
||||||
"Specifies the mode of the global clock. The default mode, normal, "
|
PRC_DESC("Specifies the mode of the global clock. The default mode, normal, "
|
||||||
"is a real-time clock; other modes allow non-real-time special "
|
"is a real-time clock; other modes allow non-real-time special "
|
||||||
"effects like simulated reduced frame rate. See "
|
"effects like simulated reduced frame rate. See "
|
||||||
"ClockObject::set_mode().");
|
"ClockObject::set_mode()."));
|
||||||
|
|
||||||
_global_clock = new ClockObject;
|
_global_clock = new ClockObject;
|
||||||
_global_clock->set_mode(clock_mode);
|
_global_clock->set_mode(clock_mode);
|
||||||
|
@ -57,9 +57,10 @@ ConfigVariableInt patchfile_zone_size
|
|||||||
|
|
||||||
ConfigVariableBool keep_temporary_files
|
ConfigVariableBool keep_temporary_files
|
||||||
("keep-temporary-files", false,
|
("keep-temporary-files", false,
|
||||||
"Set this true to keep around the temporary files from downloading, "
|
PRC_DESC("Set this true to keep around the temporary files from "
|
||||||
"decompressing, and patching, or false (the default) to delete "
|
"downloading, decompressing, and patching, or false (the "
|
||||||
"these. Mainly useful for debugging when the process goes wrong.");
|
"default) to delete these. Mainly useful for debugging "
|
||||||
|
"when the process goes wrong."));
|
||||||
|
|
||||||
ConfigVariableDouble average_frame_rate_interval
|
ConfigVariableDouble average_frame_rate_interval
|
||||||
("average-frame-rate-interval", 1.0);
|
("average-frame-rate-interval", 1.0);
|
||||||
@ -73,61 +74,61 @@ ConfigVariableDouble max_dt
|
|||||||
|
|
||||||
ConfigVariableDouble sleep_precision
|
ConfigVariableDouble sleep_precision
|
||||||
("sleep-precision", 0.01,
|
("sleep-precision", 0.01,
|
||||||
"This is the accuracy within which we can expect select() to return "
|
PRC_DESC("This is the accuracy within which we can expect select() to "
|
||||||
"precisely. That is, if we use select() to request a timeout of 1.0 "
|
"return precisely. That is, if we use select() to request a "
|
||||||
"seconds, we can expect to actually sleep for somewhere between 1.0 "
|
"timeout of 1.0 seconds, we can expect to actually sleep for "
|
||||||
"and 1.0 + sleep-precision seconds.");
|
"somewhere between 1.0 and 1.0 + sleep-precision seconds."));
|
||||||
|
|
||||||
ConfigVariableString encryption_algorithm
|
ConfigVariableString encryption_algorithm
|
||||||
("encryption-algorithm", "bf-cbc",
|
("encryption-algorithm", "bf-cbc",
|
||||||
"This defines the OpenSSL encryption algorithm which is used to "
|
PRC_DESC("This defines the OpenSSL encryption algorithm which is used to "
|
||||||
"encrypt any streams created by the current runtime. The default is "
|
"encrypt any streams created by the current runtime. The default is "
|
||||||
"Blowfish; the complete set of available algorithms is defined by "
|
"Blowfish; the complete set of available algorithms is defined by "
|
||||||
"the current version of OpenSSL. This value is used only to control "
|
"the current version of OpenSSL. This value is used only to control "
|
||||||
"encryption; the correct algorithm will automatically be selected on "
|
"encryption; the correct algorithm will automatically be selected on "
|
||||||
"decryption.");
|
"decryption."));
|
||||||
|
|
||||||
ConfigVariableInt encryption_key_length
|
ConfigVariableInt encryption_key_length
|
||||||
("encryption-key-length", 0,
|
("encryption-key-length", 0,
|
||||||
"This defines the key length, in bits, for the selected encryption "
|
PRC_DESC("This defines the key length, in bits, for the selected encryption "
|
||||||
"algorithm. Some algorithms have a variable key length. Specifying "
|
"algorithm. Some algorithms have a variable key length. Specifying "
|
||||||
"a value of 0 here means to use the default key length for the "
|
"a value of 0 here means to use the default key length for the "
|
||||||
"algorithm as defined by OpenSSL. This value is used only to "
|
"algorithm as defined by OpenSSL. This value is used only to "
|
||||||
"control encryption; the correct key length will automatically be "
|
"control encryption; the correct key length will automatically be "
|
||||||
"selected on decryption.");
|
"selected on decryption."));
|
||||||
|
|
||||||
ConfigVariableInt encryption_iteration_count
|
ConfigVariableInt encryption_iteration_count
|
||||||
("encryption-iteration-count", 100000,
|
("encryption-iteration-count", 100000,
|
||||||
"This defines the number of times a password is hashed to generate a "
|
PRC_DESC("This defines the number of times a password is hashed to generate a "
|
||||||
"key when encrypting. Its purpose is to make it computationally "
|
"key when encrypting. Its purpose is to make it computationally "
|
||||||
"more expensive for an attacker to search the key space "
|
"more expensive for an attacker to search the key space "
|
||||||
"exhaustively. This should be a multiple of 1,000 and should not "
|
"exhaustively. This should be a multiple of 1,000 and should not "
|
||||||
"exceed about 65 million; the value 0 indicates just one application "
|
"exceed about 65 million; the value 0 indicates just one application "
|
||||||
"of the hashing algorithm. This value is used only to control "
|
"of the hashing algorithm. This value is used only to control "
|
||||||
"encryption; the correct count will automatically be selected on "
|
"encryption; the correct count will automatically be selected on "
|
||||||
"decryption.");
|
"decryption."));
|
||||||
|
|
||||||
ConfigVariableInt multifile_encryption_iteration_count
|
ConfigVariableInt multifile_encryption_iteration_count
|
||||||
("multifile-encryption-iteration-count", 0,
|
("multifile-encryption-iteration-count", 0,
|
||||||
"This is a special value of encryption-iteration-count used to encrypt "
|
PRC_DESC("This is a special value of encryption-iteration-count used to encrypt "
|
||||||
"subfiles within a multifile. It has a default value of 0 (just one "
|
"subfiles within a multifile. It has a default value of 0 (just one "
|
||||||
"application), on the assumption that the files from a multifile must "
|
"application), on the assumption that the files from a multifile must "
|
||||||
"be loaded quickly, without paying the cost of an expensive hash on "
|
"be loaded quickly, without paying the cost of an expensive hash on "
|
||||||
"each subfile in order to decrypt it.");
|
"each subfile in order to decrypt it."));
|
||||||
|
|
||||||
ConfigVariableBool use_vfs
|
ConfigVariableBool use_vfs
|
||||||
("use-vfs", true,
|
("use-vfs", true,
|
||||||
"Set this true to use the VirtualFileSystem mechanism for loading "
|
PRC_DESC("Set this true to use the VirtualFileSystem mechanism for loading "
|
||||||
"models, etc. Since the VirtualFileSystem maps to the same as the "
|
"models, etc. Since the VirtualFileSystem maps to the same as the "
|
||||||
"actual file system by default, there is probably no reason to set "
|
"actual file system by default, there is probably no reason to set "
|
||||||
"this false, except for testing or if you mistrust the new code.");
|
"this false, except for testing or if you mistrust the new code."));
|
||||||
|
|
||||||
ConfigVariableBool collect_tcp
|
ConfigVariableBool collect_tcp
|
||||||
("collect-tcp", false,
|
("collect-tcp", false,
|
||||||
"Set this true to enable accumulation of several small consecutive "
|
PRC_DESC("Set this true to enable accumulation of several small consecutive "
|
||||||
"TCP datagrams into one large datagram before sending it, to reduce "
|
"TCP datagrams into one large datagram before sending it, to reduce "
|
||||||
"overhead from the TCP/IP protocol. See "
|
"overhead from the TCP/IP protocol. See "
|
||||||
"Connection::set_collect_tcp() or SocketStream::set_collect_tcp().");
|
"Connection::set_collect_tcp() or SocketStream::set_collect_tcp()."));
|
||||||
|
|
||||||
ConfigVariableDouble collect_tcp_interval
|
ConfigVariableDouble collect_tcp_interval
|
||||||
("collect-tcp-interval", 0.2);
|
("collect-tcp-interval", 0.2);
|
||||||
@ -172,13 +173,13 @@ get_leak_memory() {
|
|||||||
if (leak_memory == (ConfigVariableBool *)NULL) {
|
if (leak_memory == (ConfigVariableBool *)NULL) {
|
||||||
leak_memory = new ConfigVariableBool
|
leak_memory = new ConfigVariableBool
|
||||||
("leak-memory", false,
|
("leak-memory", false,
|
||||||
"Set leak-memory true to disable the actual deletion of "
|
PRC_DESC("Set leak-memory true to disable the actual deletion of "
|
||||||
"ReferenceCount-derived objects. This is sometimes useful to track "
|
"ReferenceCount-derived objects. This is sometimes useful to track "
|
||||||
"a reference counting bug, since the formerly deleted objects will "
|
"a reference counting bug, since the formerly deleted objects will "
|
||||||
"still remain (with a reference count of -100) without being "
|
"still remain (with a reference count of -100) without being "
|
||||||
"overwritten with a newly-allocated object, and the assertion tests "
|
"overwritten with a newly-allocated object, and the assertion tests "
|
||||||
"in ReferenceCount may more accurately detect the first instance of "
|
"in ReferenceCount may more accurately detect the first instance of "
|
||||||
"an error.");
|
"an error."));
|
||||||
}
|
}
|
||||||
|
|
||||||
return *leak_memory;
|
return *leak_memory;
|
||||||
@ -191,13 +192,13 @@ get_never_destruct() {
|
|||||||
if (never_destruct == (ConfigVariableBool *)NULL) {
|
if (never_destruct == (ConfigVariableBool *)NULL) {
|
||||||
never_destruct = new ConfigVariableBool
|
never_destruct = new ConfigVariableBool
|
||||||
("never-destruct", false,
|
("never-destruct", false,
|
||||||
"never-destruct is similar to leak-memory, except that not "
|
PRC_DESC("never-destruct is similar to leak-memory, except that not "
|
||||||
"only will memory not be freed, but the destructor will not even be "
|
"only will memory not be freed, but the destructor will not even be "
|
||||||
"called (on ReferenceCount objects, at least). This will leak gobs "
|
"called (on ReferenceCount objects, at least). This will leak gobs "
|
||||||
"of memory, but ensures that every pointer to a ReferenceCount "
|
"of memory, but ensures that every pointer to a ReferenceCount "
|
||||||
"object will always be valid, and may be useful for tracking down "
|
"object will always be valid, and may be useful for tracking down "
|
||||||
"certain kinds of errors. "
|
"certain kinds of errors. "
|
||||||
"never-destruct is only respected if leak-memory is true.");
|
"never-destruct is only respected if leak-memory is true."));
|
||||||
}
|
}
|
||||||
|
|
||||||
return *never_destruct;
|
return *never_destruct;
|
||||||
@ -210,8 +211,8 @@ get_use_high_res_clock() {
|
|||||||
if (use_high_res_clock == (ConfigVariableBool *)NULL) {
|
if (use_high_res_clock == (ConfigVariableBool *)NULL) {
|
||||||
use_high_res_clock = new ConfigVariableBool
|
use_high_res_clock = new ConfigVariableBool
|
||||||
("use-high-res-clock", true,
|
("use-high-res-clock", true,
|
||||||
"Set this to false to avoid using the high-precision clock, even if "
|
PRC_DESC("Set this to false to avoid using the high-precision clock, even if "
|
||||||
"it is available.");
|
"it is available."));
|
||||||
}
|
}
|
||||||
|
|
||||||
return *use_high_res_clock;
|
return *use_high_res_clock;
|
||||||
@ -224,9 +225,9 @@ get_paranoid_clock() {
|
|||||||
if (paranoid_clock == (ConfigVariableBool *)NULL) {
|
if (paranoid_clock == (ConfigVariableBool *)NULL) {
|
||||||
paranoid_clock = new ConfigVariableBool
|
paranoid_clock = new ConfigVariableBool
|
||||||
("paranoid-clock", false,
|
("paranoid-clock", false,
|
||||||
"Set this to true to double-check the results of the high-resolution "
|
PRC_DESC("Set this to true to double-check the results of the high-resolution "
|
||||||
"clock against the system clock. This has no effect if NDEBUG is "
|
"clock against the system clock. This has no effect if NDEBUG is "
|
||||||
"defined.");
|
"defined."));
|
||||||
}
|
}
|
||||||
|
|
||||||
return *paranoid_clock;
|
return *paranoid_clock;
|
||||||
@ -239,9 +240,9 @@ get_paranoid_inheritance() {
|
|||||||
if (paranoid_inheritance == (ConfigVariableBool *)NULL) {
|
if (paranoid_inheritance == (ConfigVariableBool *)NULL) {
|
||||||
paranoid_inheritance = new ConfigVariableBool
|
paranoid_inheritance = new ConfigVariableBool
|
||||||
("paranoid-inheritance", true,
|
("paranoid-inheritance", true,
|
||||||
"Set this to true to double-check the test for inheritance of "
|
PRC_DESC("Set this to true to double-check the test for inheritance of "
|
||||||
"TypeHandles, e.g. via is_of_type(). This has no effect if NDEBUG "
|
"TypeHandles, e.g. via is_of_type(). This has no effect if NDEBUG "
|
||||||
"is defined.");
|
"is defined."));
|
||||||
}
|
}
|
||||||
|
|
||||||
return *paranoid_inheritance;
|
return *paranoid_inheritance;
|
||||||
@ -254,9 +255,9 @@ get_verify_dcast() {
|
|||||||
if (verify_dcast == (ConfigVariableBool *)NULL) {
|
if (verify_dcast == (ConfigVariableBool *)NULL) {
|
||||||
verify_dcast = new ConfigVariableBool
|
verify_dcast = new ConfigVariableBool
|
||||||
("verify-dcast", true,
|
("verify-dcast", true,
|
||||||
"Set this to true to verify that every attempted DCAST operation in "
|
PRC_DESC("Set this to true to verify that every attempted DCAST operation in "
|
||||||
"fact references the correct type, or false otherwise. This has no "
|
"fact references the correct type, or false otherwise. This has no "
|
||||||
"effect if NDEBUG is defined, in which case it is never tested.");
|
"effect if NDEBUG is defined, in which case it is never tested."));
|
||||||
}
|
}
|
||||||
|
|
||||||
return *verify_dcast;
|
return *verify_dcast;
|
||||||
@ -268,4 +269,3 @@ ConfigExpress &
|
|||||||
get_config_express() {
|
get_config_express() {
|
||||||
return config_express;
|
return config_express;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,16 +381,16 @@ MemoryUsage() {
|
|||||||
|
|
||||||
_track_memory_usage = ConfigVariableBool
|
_track_memory_usage = ConfigVariableBool
|
||||||
("track-memory-usage", false,
|
("track-memory-usage", false,
|
||||||
"Set this to true to enable full-force tracking of C++ allocations "
|
PRC_DESC("Set this to true to enable full-force tracking of C++ allocations "
|
||||||
"and recordkeeping by type. It's quite expensive.");
|
"and recordkeeping by type. It's quite expensive."));
|
||||||
|
|
||||||
#if defined(WIN32_VC) && defined(_DEBUG)
|
#if defined(WIN32_VC) && defined(_DEBUG)
|
||||||
_count_memory_usage = ConfigVariableBool
|
_count_memory_usage = ConfigVariableBool
|
||||||
("count-memory-usage", _track_memory_usage,
|
("count-memory-usage", _track_memory_usage,
|
||||||
"This is a much lighter-weight version of track-memory-usage, and it "
|
PRC_DESC("This is a much lighter-weight version of track-memory-usage, and it "
|
||||||
"only tracks the total memory allocation. However, it only exists in "
|
"only tracks the total memory allocation. However, it only exists in "
|
||||||
"certain build environments (in particular, only in an Opt1 or "
|
"certain build environments (in particular, only in an Opt1 or "
|
||||||
"Opt2 build on Windows.");
|
"Opt2 build on Windows."));
|
||||||
|
|
||||||
#else
|
#else
|
||||||
_count_memory_usage = false;
|
_count_memory_usage = false;
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
TypeHandle TextEncoder::_type_handle;
|
TypeHandle TextEncoder::_type_handle;
|
||||||
ConfigVariableEnum<TextEncoder::Encoding> TextEncoder::_default_encoding
|
ConfigVariableEnum<TextEncoder::Encoding> TextEncoder::_default_encoding
|
||||||
("default-encoding", TextEncoder::E_iso8859,
|
("default-encoding", TextEncoder::E_iso8859,
|
||||||
"Specifies how international characters are represented in strings "
|
PRC_DESC("Specifies how international characters are represented in strings "
|
||||||
"of 8-byte characters presented to Panda. See TextEncoder::set_encoding().");
|
"of 8-byte characters presented to Panda. See TextEncoder::set_encoding()."));
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: TextEncoder::make_upper
|
// Function: TextEncoder::make_upper
|
||||||
|
@ -505,7 +505,7 @@ get_global_ptr() {
|
|||||||
// Then, we add whatever mounts are listed in the Configrc file.
|
// Then, we add whatever mounts are listed in the Configrc file.
|
||||||
ConfigVariableList mounts
|
ConfigVariableList mounts
|
||||||
("vfs-mount",
|
("vfs-mount",
|
||||||
"vfs-mount system-filename mount-point [options]");
|
PRC_DESC("vfs-mount system-filename mount-point [options]"));
|
||||||
|
|
||||||
int num_unique_values = mounts.get_num_unique_values();
|
int num_unique_values = mounts.get_num_unique_values();
|
||||||
for (int i = 0; i < num_unique_values; i++) {
|
for (int i = 0; i < num_unique_values; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user