Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void ZukanDataHtPut(u16 num, u8 x, u8 y)
- {
- // localspecmark murakawa インチ・フィート表示はUS版のみ
- #if (PM_LANG == LANG_ENGLISH) // localspecmark euro 多分OK。
- u32 m, n;
- u8 str[16],f;
- m = (num * 10000) / 254; // (インチ * 10) に変換
- if (m%10 >= 5) { // 四捨五入処理
- m += 10;
- }
- n = m / 120; // フィート部計算
- m = (m - n * 120) / 10; // インチ部計算
- f = 0;
- str[f++] = CTRL_;
- str[f++] = C_BLANK_;
- if (n/10 == 0) {
- str[f++] = 18;
- str[f++] = n + n0_;
- } else {
- str[f++] = 12;
- str[f++] = n/10 + n0_;
- str[f++] = n%10 + n0_;
- }
- str[f++] = kakot_;
- str[f++] = m/10 + n0_;
- str[f++] = m%10 + n0_;
- str[f++] = kakot2_;
- str[f++] = EOM_;
- ZukanDataMsgPrint(str,x,y);
- #else
- ZukanDataMsgPrint(Z_Datainfo2str_2, x, y);
- ZukanDataNumPut(ZKN_DATAWIN, num, x, y);
- #endif
- }
- /* localize_spec_mark(LANG_ALL) itoyu
- * ルビーサファイア(z_tool.c)からコピー、修正。
- */
- static void ZukanDataWtPut(u16 num, u8 x, u8 y)
- {
- // localspecmark murakawa ポンド表示はUS版のみ
- #if (PM_LANG == LANG_ENGLISH) // localspecmark euro 多分OK。
- u32 m;
- u8 str[16],f,w;
- m = (num * 100000) / 4536; // (ポンド * 100) に変換
- if (m%10 >= 5) { // 四捨五入処理
- m += 10;
- }
- f = 0;
- w = 0;
- if ((str[f] = m/100000 + n0_) == n0_ && w == 0) {
- str[f++] = spcn_;
- } else {
- w = 1;
- f++;
- }
- m %= 100000;
- if ((str[f] = m/10000 + n0_) == n0_ && w == 0) {
- str[f++] = spcn_;
- } else {
- w = 1;
- f++;
- }
- m %= 10000;
- if ((str[f] = m/1000 + n0_) == n0_ && w == 0) {
- str[f++] = spcn_;
- } else {
- w = 1;
- f++;
- }
- m %= 1000;
- str[f++] = m/100 + n0_;
- m %= 100;
- str[f++] = kten_;
- str[f++] = m/10 + n0_;
- str[f++] = spc_,
- str[f++] = l__,
- str[f++] = b__,
- str[f++] = s__,
- str[f++] = kten_,
- str[f++] = EOM_;
- ZukanDataMsgPrint(str,x,y);
- #else
- ZukanDataMsgPrint(Z_Datainfo3str_2, x, y);
- ZukanDataNumPut(ZKN_DATAWIN, num, x, y);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement