home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Japan / NTT / DM- / hotjava / classes / src / Opening.jpp < prev    next >
Encoding:
Text File  |  2017-09-21  |  27.4 KB  |  863 lines

  1. import browser.*;
  2. import browser.audio.*;
  3. import awt.*;
  4. import net.www.html.*;
  5. import java.io.*;
  6. import net.www.*;
  7. import java.util.*;
  8.  
  9. #include "anim.h";
  10. #include "opening.h";
  11.  
  12. class Opening extends AnimationPlayer implements Runnable {
  13.  
  14. static String    backgroundFile[] = null;
  15. int        timeArea = -1;
  16.  
  17. // static data
  18.  
  19. static int sound_frame[] = {-1,-1};
  20. static int dummy_frame[] = {-1,-1};
  21. static String imgdir = "images";
  22. static String snddir = "audio";
  23.  
  24. // ==================================================
  25. // Animation data for DayTime
  26. // ==================================================
  27. static int yane_d_frame[] = {0,-1};
  28. static int yane_d_x[] = {171,0};
  29. static int yane_d_y[] = {34,0};
  30. static int map_d_frame[] = {0,1,2,3};
  31. static int map_d_x[] = {170,177,183,199};
  32. static int map_d_y[] = {140,137,115,89};
  33. static int kumo_d_frame[] = {0,1,2,3,4,5,6,7,8,-1};            //1+8+1
  34. static int kumo_d_x[] = {297,297,298,295,295,295,293,288,287,0};    //1+8+1
  35. static int kumo_d_y[] = {25,25,26,26,27,27,28,32,37,0};            //1+8+1
  36. static int dog_d_frame[] = {-1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,1,    // 1+20
  37.         8,7,6,6,6,5,4,3,                    // 8
  38.         9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10,9, //23
  39.         -1};
  40. static int dog_d_x[] = {0,                        //1
  41.         434,428,420,414,406,400,392,386,378,372,
  42.         363,357,349,343,335,329,321,315,307,300,        //20
  43.         299,298,300,300,300,301,299,299,            // 8
  44.         300,307,312,319,324,331,337,344,349,356,    
  45.         361,368,373,380,385,392,397,405,410,417,
  46.         422,429,434,0};                        //23+1
  47. static int dog_d_y[] = {0,                        //1
  48.         160,159,160,158,159,158,159,158,158,157,
  49.         158,157,157,156,157,156,157,155,156,156,        //20
  50.         155,156,156,156,156,156,156,156,            //8
  51.         157,156,157,156,158,157,158,157,158,157,
  52.         158,158,159,158,159,158,159,158,159,159,
  53.         160,159,160,0};                        //23+1
  54. static int dog_d_time[] = {10000,125,125,125,125,125,125,125,125,125,125,
  55.         125,125,125,125,125,125,125,125,125,125,    // 1+19
  56.         300,300,300,300,300,300,300,300,        //8
  57.         125,125,125,125,125,125,125,125,125,125,
  58.         125,125,125,125,125,125,125,125,125,125,
  59.         125,125,125};                    // 23
  60. static int fish_d_frame[] = {-1,1,2,3,4,5,-1};    
  61. static int fish_d_x[] = {0,303,298,296,293,290,0};
  62. static int fish_d_y[] = {0,191,184,183,180,187,0};
  63. static int kaede_d_frame[] = {0,1,2,3,4,5,4,3,2,1,2,3,4,5,4,3,2,-1};
  64. static int kaede_d_x[] = {307,302,299,296,295,307,295,296,299,    // 1+8
  65.                   302,299,296,295,307,295,296,299,0};//8+1
  66. static int kaede_d_y[] = {144,146,148,145,147,148,147,145,148,    // 1+8
  67.                   146,148,145,147,148,147,145,148,0}; // 8+1
  68.  
  69. static int kouyo_d_frame[] = {-1,1,2,3,4,3,2,1,2,3,4,3,2,1,-1};    //1+13+1
  70. static int kouyo_d_x[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
  71. static int kouyo_d_y[] = {0,53,53,53,53,53,53,53,53,53,53,53,53,53,0}; //1+13+1
  72. static int man_d_frame[] = {-1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,    //1+20
  73.               1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,    //20
  74.               3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,    //20
  75.               3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,    //20
  76.               3,4,3,4,3,-1};
  77. static int man_d_x[] = {0,                    //1
  78.         156,154,152,149,146,143,141,138,135,133,    //40
  79.         130,127,124,122,119,116,114,111,108,105,
  80.         103,100,97,94,92,89,86,84,81,78,
  81.         75,73,70,67,65,62,59,56,53,50,
  82.         188,191,194,198,202,206,209,213,217,221,    //45+1
  83.         224,228,232,235,239,243,247,250,254,258,
  84.         262,265,269,273,276,280,284,288,291,295,
  85.         299,303,306,310,314,317,321,325,329,332,
  86.         336,340,344,347,352,0};
  87. static int man_d_y[] = {0,                    // 1
  88.         120,120,119,119,119,118,118,118,117,117,    // 40
  89.         117,116,116,116,115,115,115,114,114,114,
  90.         113,113,113,112,112,112,111,111,111,110,
  91.         110,110,109,109,109,108,108,108,107,107,
  92.         119,119,119,119,119,119,119,119,119,119,    // 45+1
  93.         119,118,118,118,118,118,118,118,118,118,
  94.         118,118,117,117,117,117,117,117,117,117,
  95.         117,117,117,116,116,116,116,116,116,116,
  96.         116,116,116,116,116,0};
  97. static int tombo_d_frame[] = {-1,1,2,3,4,5,6,7,8,9,10,11,-1};    //1+11+1
  98. static int tombo_d_x[] = {0,194,181,164,153,136,135,135,106,76,50,13,0};
  99. static int tombo_d_y[] = {0,269,240,225,210,200,191,190,178,180,182,188,0};
  100. static int tori_d_frame[] = {-1,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,
  101.         1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,
  102.         1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,-1};
  103. static int tori_d_x[] = {0,403,396,389,382,374,369,362,356,349,
  104.         343,336,328,322,314,308,302,296,288,
  105.         283,276,268,262,254,248,242,236,228,
  106.         223,216,208,202,194,188,181,176,168,
  107.         162,156,148,141,134,128,121,116,108,
  108.         102,96,88,81,74,68,61,55,48, 42,35,28,21,13,8,1,0};
  109. static int tori_d_y[] = {0,18,20,21,20,19,20,20,20,18,
  110.         18,20,21,20,19,20,20,20,18, 18,20,21,20,19,20,20,20,18,
  111.         18,20,21,20,19,20,20,20,18, 18,20,21,20,19,20,20,20,18,
  112.         18,20,21,20,19,20,20,20,18, 18,20,21,20,19,20,20,0};
  113.  
  114.  
  115.  
  116. // ==================================================
  117. // Animation data for Evening (!!!dummy data)
  118. // ==================================================
  119. static int yane_e_frame[] = {0,-1};
  120. static int yane_e_x[] = {171,0};
  121. static int yane_e_y[] = {34,0};
  122. static int map_e_frame[] = {0,1,2,3};
  123. static int map_e_x[] = {170,177,183,199};
  124. static int map_e_y[] = {140,137,115,89};
  125. static int kumo_e_frame[] = {0,1,2,3,4,5,6,7,8,-1};            //1+8+1
  126. static int kumo_e_x[] = {297,297,298,295,295,295,293,288,287,0};    //1+8+1
  127. static int kumo_e_y[] = {25,25,26,26,27,27,28,32,37,0};            //1+8+1
  128. static int dog_e_frame[] = {-1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,1,    // 1+20
  129.         8,7,6,6,6,5,4,3,                    // 8
  130.         9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10,9,10,9, //23
  131.         -1};
  132. static int dog_e_x[] = {0,                        //1
  133.         434,428,420,414,406,400,392,386,378,372,
  134.         363,357,349,343,335,329,321,315,307,300,        //20
  135.         299,298,300,300,300,301,299,299,            // 8
  136.         300,307,312,319,324,331,337,344,349,356,    
  137.         361,368,373,380,385,392,397,405,410,417,
  138.         422,429,434,0};                        //23+1
  139. static int dog_e_y[] = {0,                        //1
  140.         160,159,160,158,159,158,159,158,158,157,
  141.         158,157,157,156,157,156,157,155,156,156,        //20
  142.         155,156,156,156,156,156,156,156,            //8
  143.         157,156,157,156,158,157,158,157,158,157,
  144.         158,158,159,158,159,158,159,158,159,159,
  145.         160,159,160,0};                        //23+1
  146. static int dog_e_time[] = {10000,125,125,125,125,125,125,125,125,125,125,
  147.         125,125,125,125,125,125,125,125,125,125,    // 1+19
  148.         300,300,300,300,300,300,300,300,        //8
  149.         125,125,125,125,125,125,125,125,125,125,
  150.         125,125,125,125,125,125,125,125,125,125,
  151.         125,125,125};                    // 23
  152. static int fish_e_frame[] = {-1,1,2,3,4,5,-1};    
  153. static int fish_e_x[] = {0,303,298,296,293,290,0};
  154. static int fish_e_y[] = {0,191,184,183,180,187,0};
  155. static int kaede_e_frame[] = {-1,1,2,3,4,5,4,3,2,1,2,3,4,5,4,3,2,-1};
  156. static int kaede_e_x[] = {0,307,302,299,296,295,296,299,302,    // 1+8
  157.             307,302,299,296,295,296,299,302,0};    // 8+1
  158. static int kaede_e_y[] = {0,144,146,148,145,147,145,148,146,    // 1+8
  159.             144,146,148,145,147,145,148,146,0};    // 8+1
  160.  
  161. static int kouyo_e_frame[] = {-1,1,2,3,4,3,2,1,2,3,4,3,2,1,-1};    //1+13+1
  162. static int kouyo_e_x[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
  163. static int kouyo_e_y[] = {0,53,53,53,53,53,53,53,53,53,53,53,53,53,0}; //1+13+1
  164. static int man_e_frame[] = {-1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,    //1+20
  165.               1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,    //20
  166.               3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,    //20
  167.               3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,    //20
  168.               3,4,3,4,3,-1};
  169. static int man_e_x[] = {0,                    //1
  170.         156,154,152,149,146,143,141,138,135,133,    //40
  171.         130,127,124,122,119,116,114,111,108,105,
  172.         103,100,97,94,92,89,86,84,81,78,
  173.         75,73,70,67,65,62,59,56,53,50,
  174.         188,191,194,198,202,206,209,213,217,221,    //45+1
  175.         224,228,232,235,239,243,247,250,254,258,
  176.         262,265,269,273,276,280,284,288,291,295,
  177.         299,303,306,310,314,317,321,325,329,332,
  178.         336,340,344,347,352,0};
  179. static int man_e_y[] = {0,                    // 1
  180.         120,120,119,119,119,118,118,118,117,117,    // 40
  181.         117,116,116,116,115,115,115,114,114,114,
  182.         113,113,113,112,112,112,111,111,111,110,
  183.         110,110,109,109,109,108,108,108,107,107,
  184.         119,119,119,119,119,119,119,119,119,119,    // 45+1
  185.         119,118,118,118,118,118,118,118,118,118,
  186.         118,118,117,117,117,117,117,117,117,117,
  187.         117,117,117,116,116,116,116,116,116,116,
  188.         116,116,116,116,116,0};
  189. static int tombo_e_frame[] = {-1,1,2,3,4,5,6,7,8,9,10,11,-1};    //1+11+1 ?
  190. static int tombo_e_x[] = {0,194,181,164,153,136,135,135,106,76,50,13,0};
  191. static int tombo_e_y[] = {0,269,240,225,210,200,191,190,178,180,182,188,0};
  192. static int tori_e_frame[] = {-1,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,
  193.         1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,
  194.         1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,-1};
  195. static int tori_e_x[] = {0,403,396,389,382,374,369,362,356,349,
  196.         343,336,328,322,314,308,302,296,288,
  197.         283,276,268,262,254,248,242,236,228,
  198.         223,216,208,202,194,188,181,176,168,
  199.         162,156,148,141,134,128,121,116,108,
  200.         102,96,88,81,74,68,61,55,48, 42,35,28,21,13,8,1,0};
  201. static int tori_e_y[] = {0,18,20,21,20,19,20,20,20,18,
  202.         18,20,21,20,19,20,20,20,18, 18,20,21,20,19,20,20,20,18,
  203.         18,20,21,20,19,20,20,20,18, 18,20,21,20,19,20,20,20,18,
  204.         18,20,21,20,19,20,20,20,18, 18,20,21,20,19,20,20,0};
  205.  
  206.  
  207. // ==================================================
  208. // Animation data for Night (!!!dummy data)
  209. // ==================================================
  210. static int yane_n_frame[] = {0,-1};
  211. static int yane_n_x[] = {171,0};
  212. static int yane_n_y[] = {34,0};
  213. static int map_n_frame[] = {0,1,2,3};
  214. static int map_n_x[] = {170,177,183,199};
  215. static int map_n_y[] = {140,137,115,89};
  216. static int kumo_n_frame[] = {0,1,2,3,4,5,6,7,8,-1};            //1+8+1
  217. static int kumo_n_x[] = {297,297,298,295,295,295,293,288,287,0};    //1+8+1
  218. static int kumo_n_y[] = {25,25,26,26,27,27,28,32,37,0};            //1+8+1
  219. static int fish_n_frame[] = {-1,1,2,3,4,5,-1};    
  220. static int fish_n_x[] = {0,303,298,296,293,290,0};
  221. static int fish_n_y[] = {0,191,184,183,180,187,0};
  222.  
  223. #if 0
  224. static int moon_n_frame[] = {0,1,2,3,4,5,6,7,8,-1};            //1+8+1
  225. static int moon_n_x[] = {297,297,298,295,295,295,293,288,287,0};    //1+8+1
  226. static int moon_n_y[] = {25,25,26,26,27,27,28,32,37,0};            //1+8+1
  227. static int light_n_frame[] = {0,1};
  228. static int light_n_x[] = {100,100};
  229. static int light_n_y[] = {100,100};
  230. #endif
  231.  
  232. static {
  233.     backgroundFile = new String[3];
  234.     String fname[] = {"dy","ev","nt"};
  235.     int i;
  236.     for (i = 0; i < 3; i++) {        // day, evening, night
  237.     backgroundFile[i] = imgdir + "/OP_" + fname[i] + "4.gif";
  238.     }
  239.  
  240.     // various animation data
  241. }
  242.  
  243. public void init() {
  244.     int h = (new GMTTime()).getHour(9);    // JST 9
  245. #if 0
  246.     if (h >= 6 && h < 17) {
  247.     timeArea = TM_DAY;
  248.     } else if (h >= 17 && h < 19) {
  249.     timeArea = TM_EVENING;
  250.     } else {
  251.     timeArea = TM_NIGHT;
  252.     }
  253. #endif
  254.     timeArea = TM_DAY;
  255.  
  256.     background = getImage(new URL(documentURL,backgroundFile[timeArea]));
  257.     width  = background.width;
  258.     height = background.height;
  259.     resize(width,height);
  260.  
  261.     maxAnimation = MAX_ANIMATION;
  262.     adList = new AnimationData[maxAnimation];
  263.     int i;
  264.     for (i=0; i < maxAnimation; i++) {
  265.     adList[i] = null;
  266.     }
  267.  
  268.     maxSchedular = MAX_SCHEDULAR;    
  269.     sched = new Schedular[maxSchedular];
  270.     for (i=0; i < maxSchedular; i++) {
  271.     sched[i] = null;
  272.     }
  273.     
  274.     dispobj = new IDChain();
  275.     im = createImage(width,height);
  276.     offscreen = new Graphics(im);
  277.  
  278.     initialize();
  279.     repaint();
  280. }
  281.  
  282. void initialize () {
  283.     // initialize 
  284.     if (!initialized) {
  285.     initialized = true;
  286.     Math.srandom(System.currentTime());
  287.     loadAnimationData();
  288.     setupDisplayObject();
  289.     adList[ID_MAP].Reverse();
  290.     }
  291. }
  292.  
  293. void loadAnimationData() {
  294.     if (timeArea == TM_DAY) {
  295.     loadAnimationDataDay();
  296.     } else if (timeArea == TM_EVENING) {
  297.     loadAnimationDataEvening();
  298.     } else if (timeArea == TM_EVENING) {
  299.     loadAnimationDataNight();
  300.     }
  301. }
  302.  
  303. // Ñ¬í╝Ñ╫Ñ╦Ñ≤Ñ░í╓├δí╫ñ╬▒Θ╜╨
  304. // ╣╚═╒, ┤╟╚─, ╕ñ, ñ╚ñ≤ñ▄, ╡√, ñµñ∞ñδ╠┌, ┐═, ─╗, ▒└, (╗■╖╫)
  305. void loadAnimationDataDay() {
  306.     AnimationData ad;
  307.  
  308.     // ▓░║¼(└┼╗▀▓Φ, ─╗ñΦñΩñΓ╝Ω┴░ñ╦ñóñδ)
  309.     ad = new AnimationData(this,ID_YANE,TY_STATIC,DP_D_YANE,
  310.         imgdir+"/yane_d_",0,yane_d_frame,yane_d_x,yane_d_y);
  311.     adList[ID_YANE] = ad;
  312.  
  313.     // ╣╚═╒(Ñ»ÑΩÑ├Ñ»)
  314.     ad = new AnimationData(this,ID_KOUYO,TY_CLICK,DP_D_KOUYO,
  315.         imgdir+"/kouyo_d_",4,kouyo_d_frame,kouyo_d_x,kouyo_d_y);
  316.     ad.setFrameTime(300);
  317.     adList[ID_KOUYO] = ad;
  318.  
  319.     // ┤╟╚─(Ñ»ÑΩÑ├Ñ»)
  320.     ad = new AnimationData(this,ID_MAP,TY_TOGGLE,DP_D_MAP,
  321.         imgdir+"/map_d_",2,map_d_frame,map_d_x,map_d_y);
  322.     ad.setFrameTime(100);
  323.     adList[ID_MAP] = ad;
  324.  
  325.     // ╕ñ(╝½╞░)
  326.     ad = new AnimationData(this,ID_DOG,TY_AUTO,DP_D_DOG,
  327.         imgdir+"/dog_d_",10,dog_d_frame,dog_d_x,dog_d_y);
  328.     ad.setFrameTime(dog_d_time,0,20000,30000,30000);
  329.     ad.setSound(snddir+"/Dog.au",28);
  330.     adList[ID_DOG] = ad;
  331.  
  332.     // ñ╚ñ≤ñ▄(╝½╞░)
  333.     ad = new AnimationData(this,ID_TOMBO,TY_AUTO,DP_D_TOMBO,
  334.         imgdir+"/tombo_d_",12,tombo_d_frame,tombo_d_x,tombo_d_y);
  335.     ad.setFrameTime(200,0,20000,30000,30000);
  336.     adList[ID_TOMBO] = ad;
  337.  
  338.     // ╡√(Ñ»ÑΩÑ├Ñ»)
  339.     ad = new AnimationData(this,ID_FISH,TY_CLICK,DP_D_FISH,
  340.         imgdir+"/fish_d_",5,fish_d_frame,fish_d_x,fish_d_y);
  341.     ad.setFrameTime(125);
  342.     ad.setSound(snddir+"/water.au",1);
  343.     adList[ID_FISH] = ad;
  344.  
  345.     // ñµñ∞ñδ╠┌(Ñ»ÑΩÑ├Ñ»)
  346.     ad = new AnimationData(this,ID_KAEDE,TY_CLICK,DP_D_KAEDE,
  347.         imgdir+"/kaede_d_",5,kaede_d_frame,kaede_d_x,kaede_d_y);
  348.     ad.setFrameTime(125);
  349.     adList[ID_KAEDE] = ad;
  350.  
  351.     // ┐═(╝½╞░)
  352.     ad = new AnimationData(this,ID_MAN,TY_AUTO,DP_D_MAN,
  353.         imgdir+"/man_d_",4,man_d_frame,man_d_x,man_d_y);
  354.     ad.setFrameTime(100,0,20000,30000,30000);
  355.     adList[ID_MAN] = ad;
  356.  
  357.     // ─╗(╝½╞░)    
  358.     ad = new AnimationData(this,ID_TORI,TY_AUTO,DP_D_TORI,
  359.         imgdir+"/tori_d_",9,tori_d_frame,tori_d_x,tori_d_y);
  360.     ad.setFrameTime(167,0,20000,30000,30000);
  361.     adList[ID_TORI] = ad;
  362.  
  363.     // ▒└(╝½╞░)
  364.     ad = new AnimationData(this,ID_KUMO,TY_ONCE,DP_D_KUMO,
  365.         imgdir+"/kumo_d_",8,kumo_d_frame,kumo_d_x,kumo_d_y);
  366.     ad.setFrameTime(250,0,20000,30000,30000);
  367.     adList[ID_KUMO] = ad;
  368.  
  369.     // dummy ╬δ├ε (ding.au)
  370.     ad = new AnimationData(this,ID_MUSHI1,TY_CLICK,DP_NOIMAGE,null,0,
  371.             dummy_frame,null,null);
  372.     ad.setSound(snddir+"/ding.au",0);
  373.     adList[ID_MUSHI1] = ad;
  374.     
  375. }
  376.  
  377. // Ñ¬í╝Ñ╫Ñ╦Ñ≤Ñ░í╓═╝í╫ñ╬▒Θ╜╨
  378. // ╣╚═╒, ┤╟╚─, ╕ñ, ñ╚ñ≤ñ▄, ╬δ├εíó╡√, ñµñ∞ñδ╠┌, ┐═, ─╗, ▒└, (╗■╖╫)
  379. void loadAnimationDataEvening() {
  380.     AnimationData ad;
  381.  
  382.     // ▓░║¼(└┼╗▀▓Φ, ─╗ñΦñΩñΓ╝Ω┴░ñ╦ñóñδ)
  383.     ad = new AnimationData(this,ID_YANE,TY_STATIC,DP_E_YANE,
  384.         imgdir+"/yane_e_",0,yane_e_frame,yane_e_x,yane_e_y);
  385.     adList[ID_YANE] = ad;
  386.  
  387.     // ╣╚═╒(Ñ»ÑΩÑ├Ñ»)
  388.     ad = new AnimationData(this,ID_KOUYO,TY_CLICK,DP_E_KOUYO,
  389.         imgdir+"/kouyo_e_",4,kouyo_e_frame,kouyo_e_x,kouyo_e_y);
  390.     ad.setFrameTime(300);
  391.     adList[ID_KOUYO] = ad;
  392.  
  393.     // ┤╟╚─(Ñ»ÑΩÑ├Ñ»)
  394.     ad = new AnimationData(this,ID_MAP,TY_TOGGLE,DP_E_MAP,
  395.         imgdir+"/map_e_",2,map_e_frame,map_e_x,map_e_y);
  396.     ad.setFrameTime(100);
  397.     adList[ID_MAP] = ad;
  398.  
  399.     // ╕ñ(╝½╞░)
  400.     ad = new AnimationData(this,ID_DOG,TY_AUTO,DP_E_DOG,
  401.         imgdir+"/dog_e_",10,dog_e_frame,dog_e_x,dog_e_y);
  402.     ad.setFrameTime(dog_e_time,0,20000,30000,30000);
  403.     ad.setSound(snddir+"/Dog.au",28);
  404.     adList[ID_DOG] = ad;
  405.  
  406.     // ñ╚ñ≤ñ▄(╝½╞░)
  407.     ad = new AnimationData(this,ID_TOMBO,TY_AUTO,DP_E_TOMBO,
  408.         imgdir+"/tombo_e_",12,tombo_e_frame,tombo_e_x,tombo_e_y);
  409.     ad.setFrameTime(200,0,20000,30000,30000);
  410.     adList[ID_TOMBO] = ad;
  411.  
  412.     // ╡√(Ñ»ÑΩÑ├Ñ»)
  413.     ad = new AnimationData(this,ID_FISH,TY_CLICK,DP_E_FISH,
  414.         imgdir+"/fish_e_",5,fish_e_frame,fish_e_x,fish_e_y);
  415.     ad.setFrameTime(125);
  416.     ad.setSound(snddir+"/water.au",1);
  417.     adList[ID_FISH] = ad;
  418.  
  419.     // ñµñ∞ñδ╠┌(Ñ»ÑΩÑ├Ñ»)
  420.     ad = new AnimationData(this,ID_KAEDE,TY_CLICK,DP_E_KAEDE,
  421.         imgdir+"/kaede_e_",5,kaede_e_frame,kaede_e_x,kaede_e_y);
  422.     ad.setFrameTime(125);
  423.     adList[ID_KAEDE] = ad;
  424.  
  425.     // ┐═(╝½╞░)
  426.     ad = new AnimationData(this,ID_MAN,TY_AUTO,DP_E_MAN,
  427.         imgdir+"/man_e_",4,man_e_frame,man_e_x,man_e_y);
  428.     ad.setFrameTime(100,0,20000,30000,30000);
  429.     adList[ID_MAN] = ad;
  430.  
  431.     // ─╗(╝½╞░)    
  432.     ad = new AnimationData(this,ID_TORI,TY_AUTO,DP_E_TORI,
  433.         imgdir+"/tori_e_",9,tori_e_frame,tori_e_x,tori_e_y);
  434.     ad.setFrameTime(167,0,20000,30000,30000);
  435.     adList[ID_TORI] = ad;
  436.  
  437.     // ▒└(╝½╞░)
  438.     ad = new AnimationData(this,ID_KUMO,TY_AUTO,DP_E_KUMO,
  439.         imgdir+"/kumo_e_",8,kumo_e_frame,kumo_e_x,kumo_e_y);
  440.     ad.setFrameTime(250,0,20000,30000,30000);
  441.     adList[ID_KUMO] = ad;
  442.  
  443.     // ├ε1 (!!!)dummy: ding.au
  444.     ad = new AnimationData(this,ID_MUSHI1,TY_CLICK,DP_NOIMAGE,null,0,
  445.             dummy_frame,null,null);
  446.     ad.setSound(snddir+"/ding.au",0);    // (!!!)
  447.     adList[ID_MUSHI1] = ad;
  448.  
  449.     // ├ε2 (!!!)dummy: ding.au
  450.     ad = new AnimationData(this,ID_MUSHI2,TY_CLICK,DP_NOIMAGE,null,0,
  451.             dummy_frame,null,null);
  452.     ad.setSound(snddir+"/ding.au",0);    // (!!!)
  453.     adList[ID_MUSHI2] = ad;
  454.  
  455.     // ├ε3 (!!!)dummy: ding.au
  456.     ad = new AnimationData(this,ID_MUSHI3,TY_CLICK,DP_NOIMAGE,null,0,
  457.             dummy_frame,null,null);
  458.     ad.setSound(snddir+"/ding.au",0);    // (!!!)
  459.     adList[ID_MUSHI3] = ad;
  460. }
  461.  
  462.  
  463. // Ñ¬í╝Ñ╫Ñ╦Ñ≤Ñ░í╓╠δí╫ñ╬▒Θ╜╨
  464. // ┤╟╚─, ╬δ├εíó╡√, ┼⌠Σ╞, ┐σ╠╠ñ╬╖ε, ▒└, (╗■╖╫)
  465.  
  466. void loadAnimationDataNight() {
  467.     AnimationData ad;
  468.  
  469.     // ▓░║¼(└┼╗▀▓Φ, ─╗ñΦñΩñΓ╝Ω┴░ñ╦ñóñδ)
  470.     ad = new AnimationData(this,ID_YANE,TY_STATIC,DP_N_YANE,
  471.         imgdir+"/yane_n_",0,yane_n_frame,yane_n_x,yane_n_y);
  472.     adList[ID_YANE] = ad;
  473.  
  474.     // ┤╟╚─(Ñ»ÑΩÑ├Ñ»)
  475.     ad = new AnimationData(this,ID_MAP,TY_TOGGLE,DP_N_MAP,
  476.         imgdir+"/map_n_",2,map_n_frame,map_n_x,map_n_y);
  477.     ad.setFrameTime(100);
  478.     adList[ID_MAP] = ad;
  479.  
  480.     // ╡√(Ñ»ÑΩÑ├Ñ»)
  481.     ad = new AnimationData(this,ID_FISH,TY_CLICK,DP_N_FISH,
  482.         imgdir+"/fish_n_",5,fish_n_frame,fish_n_x,fish_n_y);
  483.     ad.setFrameTime(125);
  484.     ad.setSound(snddir+"/water.au",1);
  485.     adList[ID_FISH] = ad;
  486.  
  487.     // ▒└(╝½╞░)
  488.     ad = new AnimationData(this,ID_KUMO,TY_AUTO,DP_N_KUMO,
  489.         imgdir+"/kumo_n_",8,kumo_n_frame,kumo_n_x,kumo_n_y);
  490.     ad.setFrameTime(250,0,20000,30000,30000);
  491.     adList[ID_KUMO] = ad;
  492.  
  493. #if 0
  494.     // ┐σ╠╠ñ╬╖ε(╝½╞░)
  495.     ad = new AnimationData(this,ID_MOON,TY_AUTO,DP_N_MOON,
  496.         imgdir+"/moon_n_",8,moon_n_frame,moon_n_x,moon_n_y);
  497.     ad.setFrameTime(250,0,20000,30000,30000);
  498.     adList[ID_KUMO] = ad;
  499.  
  500.     // ┼⌠Σ╞(Ñ»ÑΩÑ├Ñ»)
  501.     ad = new AnimationData(this,ID_LIGHT,TY_TOGGLE,DP_N_LIGHT,
  502.         imgdir+"/light_n_",0,light_n_frame,light_n_x,light_n_y);
  503.     ad.setFrameTime(250);
  504.     adList[ID_LIGHT] = ad;
  505. #endif
  506.  
  507.     // ├ε1 (!!!)dummy: ding.au
  508.     ad = new AnimationData(this,ID_MUSHI1,TY_CLICK,DP_NOIMAGE,null,0,
  509.             dummy_frame,null,null);
  510.     ad.setSound(snddir+"/ding.au",0);    // (!!!)
  511.     adList[ID_MUSHI1] = ad;
  512.  
  513.     // ├ε2 (!!!)dummy: ding.au
  514.     ad = new AnimationData(this,ID_MUSHI2,TY_CLICK,DP_NOIMAGE,null,0,
  515.             dummy_frame,null,null);
  516.     ad.setSound(snddir+"/ding.au",0);    // (!!!)
  517.     adList[ID_MUSHI2] = ad;
  518.  
  519.     // ├ε3 (!!!)dummy: ding.au
  520.     ad = new AnimationData(this,ID_MUSHI3,TY_CLICK,DP_NOIMAGE,null,0,
  521.             dummy_frame,null,null);
  522.     ad.setSound(snddir+"/ding.au",0);    // (!!!)
  523.     adList[ID_MUSHI3] = ad;
  524. }
  525.  
  526. private boolean isInside(int x, int y, int xs, int ys, int xe, int ye) {
  527.     return (x >= xs && x <= xe && y >= ys && y <= ye);
  528. }
  529.  
  530. public void mouseDown(int x, int y) {
  531.     if (timeArea == TM_DAY) {
  532.     mouseDownDay(x,y);
  533.     } else if (timeArea == TM_EVENING) {
  534.     mouseDownEvening(x,y);
  535.     } else if (timeArea == TM_EVENING) {
  536.     mouseDownNight(x,y);
  537.     }
  538. }
  539.  
  540. public void mouseDownDay(int x, int y) {
  541.     // ▒└
  542.     if (isInside(x,y,297,25,432,78) &&
  543.     sched[ID_KUMO] == null &&
  544.     adList[ID_KUMO].getCurFrame() == 0) {
  545.     insertSchedular(ID_KUMO);
  546.     }
  547.     
  548.     // ╡√
  549.     if (isInside(x,y,295,188,340,202) && sched[ID_FISH] == null) {
  550.     insertSchedular(ID_FISH);
  551.     }
  552.  
  553.     // ñµñ∞ñδ╠┌(ñ½ñ¿ñ╟)
  554.     if (isInside(x,y,353,195,499,399) && sched[ID_KAEDE] == null) {
  555.     insertSchedular(ID_KAEDE);
  556.     }
  557.  
  558.     // ╣╚═╒
  559.     if ((isInside(x,y,0,48,133,83) || isInside(x,y,0,83,24,105) ||
  560.          isInside(x,y,95,83,133,105)) && sched[ID_KOUYO] == null) {
  561.     insertSchedular(ID_KOUYO);
  562.     }
  563.  
  564.     // ┤╟╚─ (│╚┬τ)
  565.     if (isInside(x,y,169,139,197,163) &&
  566.     sched[ID_MAP] == null && adList[ID_MAP].getCurFrame() == 0) {
  567.     adList[ID_MAP].Reverse();
  568.     insertSchedular(ID_MAP);
  569.     }
  570.  
  571.     // ┤╟╚─ (╜╠╛«ñ╬ñ▀)
  572.     if (isInside(x,y,192,80,300,158) && sched[ID_MAP] == null &&
  573.     adList[ID_MAP].getCurFrame() == adList[ID_MAP].getLastFrame()) {
  574.     adList[ID_MAP].Reverse();
  575.     insertSchedular(ID_MAP);
  576.     }
  577.  
  578.     if (isInside(x,y,25,90,92,123)) {
  579.     showDocument(new URL(documentURL,  STUDY_BLD));
  580.     } else if (isInside(x,y,352,102,499,129)) {
  581.     showDocument(new URL(documentURL, CULTURE_BLD));
  582.     } else if (isInside(x,y,125,56,347,129)) {
  583.     showDocument(new URL(documentURL, MAIN_BLD));
  584.     }
  585. }
  586.  
  587. public void mouseDownEvening(int x, int y) {
  588.     // ╡√
  589.     if (isInside(x,y,295,188,340,202) && sched[ID_FISH] == null) {
  590.     insertSchedular(ID_FISH);
  591.     }
  592.  
  593.     // ñµñ∞ñδ╠┌
  594.     if (isInside(x,y,353,195,499,399) && sched[ID_KAEDE] == null) {
  595.     insertSchedular(ID_KAEDE);
  596.     }
  597.  
  598.     // ╣╚═╒
  599.     if ((isInside(x,y,0,48,133,83) || isInside(x,y,0,83,24,105) ||
  600.          isInside(x,y,95,83,133,105)) && sched[ID_KOUYO] == null) {
  601.     insertSchedular(ID_KOUYO);
  602.     }
  603.  
  604.     // ┤╟╚─ (│╚┬τ)
  605.     if (isInside(x,y,177,142,205,158) && 
  606.     sched[ID_MAP] == null && adList[ID_MAP].getCurFrame() == 0) {
  607.     adList[ID_MAP].Reverse();
  608.     insertSchedular(ID_MAP);
  609.     }
  610.  
  611.     // ┤╟╚─ (╜╠╛« or ╩╕╜±╕╞ñ╙╜╨ñ╖) (!!! dummy data)
  612.     if (isInside(x,y,192,80,300,158) && sched[ID_MAP] == null &&
  613.     adList[ID_MAP].getCurFrame() == adList[ID_MAP].getLastFrame()) {
  614.     adList[ID_MAP].Reverse();
  615.     insertSchedular(ID_MAP);
  616.     }
  617.     if (isInside(x,y,25,90,92,123)) {
  618.     showDocument(new URL(documentURL, STUDY_BLD));
  619.     } else if (isInside(x,y,352,102,499,129)) {
  620.     showDocument(new URL(documentURL, CULTURE_BLD));
  621.     } else if (isInside(x,y,125,56,347,129)) {
  622.     showDocument(new URL(documentURL, MAIN_BLD));
  623.     }
  624.  
  625.     // ├ε1 (!!!)dummy: ding.au
  626.     if (isInside(x,y,0,0,100,100)) {
  627.     adList[ID_MUSHI1].playSound();
  628.     }
  629.     // ├ε2 (!!!)dummy: ding.au
  630.     if (isInside(x,y,100,0,200,100)) {
  631.     adList[ID_MUSHI2].playSound();
  632.     }
  633.     // ├ε3 (!!!)dummy: ding.au
  634.     if (isInside(x,y,200,0,300,100)) {
  635.     adList[ID_MUSHI3].playSound();
  636.     }
  637.  
  638. };
  639. public void mouseDownNight(int x, int y) {
  640.     // ╡√
  641.     if (isInside(x,y,295,188,340,202) && sched[ID_FISH] == null) {
  642.     insertSchedular(ID_FISH);
  643.     }
  644.  
  645. #if 0
  646.     // ┼⌠Σ╞ (╕≈ñ╬ON/OFF)
  647.     if (isInside(x,y,177,142,205,158) && sched[ID_LIGHT] == null) {
  648.     adList[ID_LIGHT].Reverse();
  649.     insertSchedular(ID_LIGHT);
  650.     }
  651. #endif
  652.  
  653.  
  654.     // ┤╟╚─ (│╚┬τ)
  655.     if (isInside(x,y,177,142,205,158) && 
  656.     sched[ID_MAP] == null && adList[ID_MAP].getCurFrame() == 0) {
  657.     adList[ID_MAP].Reverse();
  658.     insertSchedular(ID_MAP);
  659.     }
  660.  
  661.     // ┤╟╚─ (╜╠╛« or ╩╕╜±╕╞ñ╙╜╨ñ╖) (!!! dummy data)
  662.     if (isInside(x,y,192,80,300,158) && sched[ID_MAP] == null &&
  663.     adList[ID_MAP].getCurFrame() == adList[ID_MAP].getLastFrame()) {
  664.     adList[ID_MAP].Reverse();
  665.     insertSchedular(ID_MAP);
  666.     }
  667.     if (isInside(x,y,25,90,92,123)) {
  668.     showDocument(new URL(documentURL, STUDY_BLD));
  669.     } else if (isInside(x,y,352,102,499,129)) {
  670.     showDocument(new URL(documentURL, CULTURE_BLD));
  671.     } else if (isInside(x,y,125,56,347,129)) {
  672.     showDocument(new URL(documentURL, MAIN_BLD));
  673.     }
  674.  
  675.     // ├ε1 (!!!)dummy: ding.au
  676.     if (isInside(x,y,0,0,100,100)) {
  677.     adList[ID_MUSHI1].playSound();
  678.     }
  679.     // ├ε2 (!!!)dummy: ding.au
  680.     if (isInside(x,y,100,0,200,100)) {
  681.     adList[ID_MUSHI2].playSound();
  682.     }
  683.     // ├ε3 (!!!)dummy: ding.au
  684.     if (isInside(x,y,200,0,300,100)) {
  685.     adList[ID_MUSHI3].playSound();
  686.     }
  687. }
  688.  
  689. public void mouseMove(int x, int y) {
  690.     if (timeArea == TM_DAY) {
  691.     mouseMoveDay(x,y);
  692.     } else if (timeArea == TM_EVENING) {
  693.     mouseMoveEvening(x,y);
  694.     } else if (timeArea == TM_NIGHT) {
  695.     mouseMoveNight(x,y);
  696.     }
  697. }
  698.  
  699.  
  700. public void mouseMoveDay(int x, int y) {
  701.     // ▒└
  702.     if (isInside(x,y,297,25,432,78) &&
  703.     !isInside(last_x,last_y,297,25,432,78) &&
  704.     sched[ID_KUMO] == null &&
  705.     adList[ID_KUMO].getCurFrame() == 0) {
  706.     insertSchedular(ID_KUMO);
  707.     }
  708.     
  709.     // ╡√
  710.     if (isInside(x,y,295,188,340,202) &&
  711.     !isInside(last_x,last_y,295,188,340,202) &&
  712.     sched[ID_FISH] == null) {
  713.     insertSchedular(ID_FISH);
  714.     }
  715.  
  716.     // ñµñ∞ñδ╠┌
  717.     if (isInside(x,y,353,195,499,399) &&
  718.     !isInside(last_x,last_y,353,195,499,399) &&
  719.     sched[ID_KAEDE] == null) {
  720.     insertSchedular(ID_KAEDE);
  721.     }
  722.  
  723.     // ╣╚═╒
  724.     if ((isInside(x,y,0,48,133,83) || isInside(x,y,0,83,24,105) ||
  725.          isInside(x,y,95,83,133,105)) &&
  726.     !(isInside(last_x,last_y,0,48,133,83) || 
  727.       isInside(last_x,last_y,0,83,24,105) ||
  728.       isInside(last_x,last_y,95,83,133,105)) && sched[ID_KOUYO] == null) {
  729.     insertSchedular(ID_KOUYO);
  730.     }
  731.  
  732.     // ┤╟╚─ (│╚┬τ)
  733.     if (isInside(x,y,177,142,205,158) && 
  734.     !isInside(last_x,last_y,177,142,205,158) && 
  735.     sched[ID_MAP] == null && adList[ID_MAP].getCurFrame() == 0) {
  736.     adList[ID_MAP].Reverse();
  737.     insertSchedular(ID_MAP);
  738.     }
  739.  
  740.     // ┤╟╚─ (╜╠╛« or ╩╕╜±╕╞ñ╙╜╨ñ╖) (!!! dummy data)
  741.     if (isInside(x,y,192,80,300,158) && 
  742.     !isInside(last_x,last_y,192,80,300,158) && sched[ID_MAP] == null &&
  743.     adList[ID_MAP].getCurFrame() == adList[ID_MAP].getLastFrame()) {
  744.     if (!isInside(x,y,177,80,240,158)) {
  745.         adList[ID_MAP].Reverse();
  746.         insertSchedular(ID_MAP);
  747.     }
  748.     }
  749.  
  750.     last_x = x;
  751.     last_y = y;
  752. }
  753.  
  754. public void mouseMoveEvening(int x, int y) {
  755.     // ╡√
  756.     if (isInside(x,y,295,188,340,202) &&
  757.     !isInside(last_x,last_y,295,188,340,202) &&
  758.     sched[ID_FISH] == null) {
  759.     insertSchedular(ID_FISH);
  760.     }
  761.  
  762.     // ñµñ∞ñδ╠┌
  763.     if (isInside(x,y,353,195,499,399) &&
  764.     !isInside(last_x,last_y,353,195,499,399) &&
  765.     sched[ID_KAEDE] == null) {
  766.     insertSchedular(ID_KAEDE);
  767.     }
  768.  
  769.     // ╣╚═╒
  770.     if ((isInside(x,y,0,48,133,83) || isInside(x,y,0,83,24,105) ||
  771.          isInside(x,y,95,83,133,105)) &&
  772.     !(isInside(last_x,last_y,0,48,133,83) || 
  773.       isInside(last_x,last_y,0,83,24,105) ||
  774.       isInside(last_x,last_y,95,83,133,105)) && sched[ID_KOUYO] == null) {
  775.     insertSchedular(ID_KOUYO);
  776.     }
  777.  
  778.     // ┤╟╚─ (│╚┬τ)
  779.     if (isInside(x,y,177,142,205,158) && 
  780.     !isInside(last_x,last_y,177,142,205,158) && 
  781.     sched[ID_MAP] == null && adList[ID_MAP].getCurFrame() == 0) {
  782.     adList[ID_MAP].Reverse();
  783.     insertSchedular(ID_MAP);
  784.     }
  785.  
  786.     // ┤╟╚─ (╜╠╛« or ╩╕╜±╕╞ñ╙╜╨ñ╖) (!!! dummy data)
  787.     if (isInside(x,y,192,80,300,158) && 
  788.     !isInside(last_x,last_y,192,80,300,158) && sched[ID_MAP] == null &&
  789.     adList[ID_MAP].getCurFrame() == adList[ID_MAP].getLastFrame()) {
  790.     if (!isInside(x,y,177,80,240,158)) {
  791.         adList[ID_MAP].Reverse();
  792.         insertSchedular(ID_MAP);
  793.     }
  794.     }
  795.     // ├ε1 (!!!)dummy: ding.au
  796.     if (isInside(x,y,0,0,100,100) && !isInside(last_x,last_y,0,0,100,100)) {
  797.     adList[ID_MUSHI1].playSound();
  798.     }
  799.     // ├ε2 (!!!)dummy: ding.au
  800.     if (isInside(x,y,100,0,200,100) && !isInside(last_x,last_y,100,0,200,100)){
  801.     adList[ID_MUSHI2].playSound();
  802.     }
  803.     // ├ε3 (!!!)dummy: ding.au
  804.     if (isInside(x,y,200,0,300,100) && !isInside(last_x,last_y,200,0,300,100)){
  805.     adList[ID_MUSHI3].playSound();
  806.     }
  807.  
  808.     last_x = x;
  809.     last_y = y;
  810. }
  811.  
  812. public void mouseMoveNight(int x, int y) {
  813.     // ╡√
  814.     if (isInside(x,y,295,188,340,202) &&
  815.     !isInside(last_x,last_y,295,188,340,202) &&
  816.     sched[ID_FISH] == null) {
  817.     insertSchedular(ID_FISH);
  818.     }
  819.  
  820. #if 0
  821.     // ┼⌠Σ╞ (╕≈ñ╬ON/OFF)
  822.     if (isInside(x,y,177,142,205,158) &&
  823.     !isInside(last_x,last_y,177,142,205,158) &&
  824.     sched[ID_LIGHT] == null) {
  825.     adList[ID_LIGHT].Reverse();
  826.     insertSchedular(ID_LIGHT);
  827.     }
  828. #endif
  829.     // ┤╟╚─ (│╚┬τ)
  830.     if (isInside(x,y,177,142,205,158) && 
  831.     !isInside(last_x,last_y,177,142,205,158) && 
  832.     sched[ID_MAP] == null && adList[ID_MAP].getCurFrame() == 0) {
  833.     adList[ID_MAP].Reverse();
  834.     insertSchedular(ID_MAP);
  835.     }
  836.  
  837.     // ┤╟╚─ (╜╠╛« or ╩╕╜±╕╞ñ╙╜╨ñ╖) (!!! dummy data)
  838.     if (isInside(x,y,192,80,300,158) && 
  839.     !isInside(last_x,last_y,192,80,300,158) && sched[ID_MAP] == null &&
  840.     adList[ID_MAP].getCurFrame() == adList[ID_MAP].getLastFrame()) {
  841.     if (!isInside(x,y,177,80,240,158)) {
  842.         adList[ID_MAP].Reverse();
  843.         insertSchedular(ID_MAP);
  844.     }
  845.     }
  846.     // ├ε1 (!!!)dummy: ding.au
  847.     if (isInside(x,y,0,0,100,100) && !isInside(last_x,last_y,0,0,100,100)) {
  848.     adList[ID_MUSHI1].playSound();
  849.     }
  850.     // ├ε2 (!!!)dummy: ding.au
  851.     if (isInside(x,y,100,0,200,100) && !isInside(last_x,last_y,100,0,200,100)){
  852.     adList[ID_MUSHI2].playSound();
  853.     }
  854.     // ├ε3 (!!!)dummy: ding.au
  855.     if (isInside(x,y,200,0,300,100) && !isInside(last_x,last_y,200,0,300,100)){
  856.     adList[ID_MUSHI3].playSound();
  857.     }
  858.     last_x = x;
  859.     last_y = y;
  860. }
  861.  
  862. }
  863.