(svn r27754) -Codechange: Add GetStringTab(), GetStringIndex() and MakeStringID() to access the structure of StringIDs.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "script_error.hpp"
|
||||
#include "../../core/bitmath_func.hpp"
|
||||
#include "../../string_func.h"
|
||||
#include "../../strings_func.h"
|
||||
|
||||
#include "../../safeguards.h"
|
||||
|
||||
@@ -31,8 +32,8 @@ ScriptError::ScriptErrorMapString ScriptError::error_map_string = ScriptError::S
|
||||
|
||||
/* static */ ScriptErrorType ScriptError::StringToError(StringID internal_string_id)
|
||||
{
|
||||
uint index = GB(internal_string_id, 11, 5);
|
||||
switch (GB(internal_string_id, 11, 5)) {
|
||||
uint index = GetStringIndex(internal_string_id);
|
||||
switch (GetStringTab(internal_string_id)) {
|
||||
case 26: case 28: case 29: case 30: // NewGRF strings.
|
||||
return ERR_NEWGRF_SUPPLIED_ERROR;
|
||||
|
||||
|
Reference in New Issue
Block a user