#include <dwc.h>
BOOL DWC_CheckProfanityAsync(const u16 **words,
int wordsnum,
const char *reserved,
int timeout,
char *result
int *badwordsnum);
BOOL DWC_CheckProfanityExAsync(const u16 **words,
int wordsnum,
const char *reserved,
int timeout,
char *result
int *badwordsnum,
DWCProfRegion region);
Starts the process of checking for illegal strings. This function always returns FALSE if called during a check for illegal strings.
The check for illegal strings is performed by communicating with the Authentication server. The content of the check is the same as the check performed by the DWC_LoginAsync function.
In addition to being able to check for individual illegal strings, this function can check multiple strings at once within the following limits:
After calling this function, proceed with the check for illegal strings. Call the DWC_CheckProfanityProcess function about once every game frame. If the process terminates successfully, the result of the check for illegal strings gets stored as an array in result.
Different strings are targeted by the illegal string check in different markets (regions). The target region can be determined by using the DWC_CheckProfanityAsync function to evaluate the last character of the game code in the data registered in ROM, or forcibly specified as "A"—indicating all markets—using the DWC_CheckProfanityExAsync function.
Keep in mind that only individual words get checked. The syntax and the sentence structure are not analyzed.
The check result stored in result will differ if A is specified for an all-market check.
When "A" is specified for an all-region check:
A value of 1 (for illegal results) or 0 (for everything else) will be inserted into the bit field defined for each market, in the same order that the strings to check are given in words.result is the logical sum of the following values:
DWC_PROF_REGION_JP |
0x01 Illegal string in Japanese market |
DWC_PROF_REGION_US |
0x02 Illegal string in North American market |
DWC_PROF_REGION_EU |
0x04 Illegal string in European market |
DWC_PROF_REGION_KR |
0x08 Illegal string in Korean market |
Example:
words[4] = { L"goodword1", L"goodword2", L"badword", L"goodword3" }
If the check of this group of strings reveals that the third string, badword, is illegal, the function will return
result[4] = { 0, 0, 0x0f, 0 }
badwordsnum = 1
When "A" is not specified:
A value of 1 (for illegal results) or 0 (for everything else) will be inserted, in the same order that the strings to check are given in words.
Example:
words[4] = { L"goodword1", L"goodword2", L"badword", L"goodword3" }
If the check on this group of strings reveals that the 3rd string, badword, is illegal, the function will return the following:
result[4] = { 0, 0, 1, 0 }
badwordsnum = 1
The following words are registered as illegal strings with the authentication server, in order to test that a string can be checked and determined to be illegal.
| Word | Target Market |
|---|---|
| badword | All markets |
| わるもし "warumoshi" (Hiragana) | Japanese market |
| ワルモシ "warumoshi" (Katakana) | Japanese market |
| 나쁜단어 | Korean market |
| 나쁜문장 | Korean market |
words |
Pointer to the string array that is being checked.
|
wordsnum |
Number of elements in the string array specified by words (1 to 50). |
reserved |
Specifies NULL. |
timeout |
The time (in milliseconds) to response timeout by the server. (If 0 is specified here, the default value of 10000 will be used.) |
result |
Pointer to the location of storage for the check result (must be a region of wordsnum bytes). |
badwordsnum |
Pointer to the location of storage for the number of illegal characters included in the check result. |
region |
Specifies the target region. Set to either DWC_PROF_REGION_ALL, which specifies A to forcibly check all regions, or to DWC_PROF_REGION_SELF, which checks for the region indicated by the ending of game code in the data registered in ROM. |
TRUE |
The process of checking for illegal strings has started. |
FALSE |
The process of checking for illegal strings failed to start. |
DWC_CheckProfanityProcess
DWC_LoginAsync
2008/06/25 Added words used to test that a string can be checked and determined to be illegal.
2008/01/08 Revised.
2007/03/16 Initial version.
CONFIDENTIAL