// *********************************************** // ENEMIES.C - header file for enemy initialisation + control // *********************************************** // **** includes #include "global.h" #include "enemies.h" #include "calcs.h" #include "render.h" #include "text.h" #include "pad.h" #include "init.h" #include "addrs.h" void UpdateCharZero(u_long); void UpdateCharOne(u_long); void UpdateCharTwo(u_long); void UpdateCharThree(u_long); void UpdateCharFour(u_long); void UpdateCharFive(u_long); void UpdateCharSix(u_long); void UpdateCharSeven(u_long); void UpdateCharEight(u_long); void UpdateCharNine(u_long); void UpdateCharTen(u_long); void UpdateCharEleven(u_long); void UpdateCharTwelve(u_long); void UpdateCharThirteen(u_long); void UpdateCharFourteen(u_long); void UpdateCharFifteen(u_long); void UpdateCharSixteen(u_long); void UpdateCharSeventeen(u_long); void UpdateCharEighteen(u_long); void UpdateCharNineteen(u_long); void UpdateCharTwenty(u_long); void UpdateCharTwentythree(u_long); void UpdateCharTwentyfour(u_long); void UpdateCharTwentyfive(u_long); void UpdateCharTwentyseven(u_long); void UpdateCharTwentyeight(u_long); void UpdateCharTwentynine(u_long); void UpdateCharBat(u_long); void DrawTextLoop(u_long, u_char); void UpdateEnemies() { u_long counter; for (counter = 1; counter<21; counter++) { if (CHARINFO[counter].state != 0) { switch(CHARINFO[counter].type) { case 0: UpdateCharZero(counter); break; case 1: UpdateCharOne(counter); break; case 2: UpdateCharTwo(counter); break; case 3: UpdateCharThree(counter); break; case 4: UpdateCharFour(counter); break; case 5: UpdateCharFive(counter); break; case 6: UpdateCharSix(counter); break; case 7: UpdateCharSeven(counter); break; case 8: UpdateCharEight(counter); break; case 9: UpdateCharNine(counter); break; case 10: UpdateCharTen(counter); break; case 11: UpdateCharEleven(counter); break; case 12: UpdateCharTwelve(counter); break; case 13: UpdateCharThirteen(counter); break; case 14: UpdateCharFourteen(counter); break; case 15: UpdateCharFifteen(counter); break; case 16: UpdateCharSixteen(counter); break; case 17: UpdateCharSeventeen(counter); break; case 18: UpdateCharEighteen(counter); break; case 19: UpdateCharNineteen(counter); break; case 20: UpdateCharTwenty(counter); break; case 23: UpdateCharTwentythree(counter); break; case 24: UpdateCharTwentyfour(counter); break; case 25: UpdateCharTwentyfive(counter); break; case 26: UpdateCharBat(counter); break; case 27: UpdateCharTwentyseven(counter); break; case 28: UpdateCharTwentyeight(counter); break; case 29: UpdateCharTwentynine(counter); break; } } } } void UpdateCharZero(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Hi there, how are you? #"; u_char tText2[] = "Go away. #"; u_char tText3[] = "Hang on, all I said was hello... #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); break;} case 2: { u_char tText1[] = "Look mate, just sod off and leave me alone. #"; u_char tText2[] = "All I was going to do was ask what the hell I was supposed to be doing, seeing as I just haven't got a clue. #"; u_char tText3[] = "Typical. You stand next to a river, and talk to the person nearest expecting them to be the ferryman. #"; u_char tText4[] = "You adventurers are so predictable. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(2, tChar); break;} case 3: { u_char tText1[] = "The man tries his best to ignore you, but... #"; u_char tText2[] = "...well, I wasn't really going to ask about the river, but while we're on the subject, who do I ask to cross it? #"; u_char tText3[] = "Well, as it turns out, I am the ferryman. But I won't do nuffink without permission from the king. #"; CreateText(tText1); DrawTextLoop(1, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 4: { u_char tText1[] = "Let me guess; I have to go find someone else in order to get something for you to help me? #"; u_char tText2[] = "Yep, that just about sums it up, sir. #"; u_char tText3[] = "Hmm, and I thought the days of running back and forth to hide a lack of gameplay were over... #"; u_char tText4[] = "I wouldn't know, I'm just a bit part in this game. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); CreateText(tText4); DrawTextLoop(2, tChar); break;} case 5:{ u_char tText1[] = "Come back with permission from the king and I might let you get across. #"; u_char tText2[] = "You agree with the ferryman to do such a thing, secretly wondering why you would even bother crossing the river. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(1, tChar); break;} case 6:{ u_char tText1[] = "Hi, you are the ferryman, aren't you? #"; u_char tText2[] = "Who wants to know? #"; u_char tText3[] = "I got a message off some bloke in some town, and he said to let me across. #"; u_char tText4[] = "Ah, ok then. Just walk down to the jetty and the raft will get you across no problems. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); CreateText(tText4); DrawTextLoop(2, tChar); break;} case 7:{ u_char tText1[] = "You mean that message was enough to get you to help me? #"; u_char tText2[] = "Well, you have authority, don't you? #"; u_char tText3[] = "Yes, but I could have lied earlier and said I had when I hadn't! #"; u_char tText4[] = "Not my problem. If people want to lie, then I'll let it be on their consciences. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); CreateText(tText4); DrawTextLoop(2, tChar); break;} case 8:{ u_char tText1[] = "Get down to the jetty so you can travel to Misty Forest. #"; CreateText(tText1); DrawTextLoop(2, tChar); break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<5)) CHARINFO[tChar].state++; if ((CHARINFO[tChar].state>5) && (CHARINFO[tChar].state<8)) CHARINFO[tChar].state++; } } void UpdateCharOne(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "What be your business in yon city? #"; u_char tText2[] = "Not sure, I think I probably have to talk to someone and they'll give me an item I can pass on to someone else who will give me another item, etc. etc. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); break;} case 2: { u_char tText1[] = "Sounds exciting. #"; u_char tText2[] = "It would do to an imbecile like you, but I want more from life than that. #"; u_char tText3[] = "Ah, thanks for the compliment. #"; u_char tText4[] = "No problem. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(0, 0); break;} case 3: { u_char tText1[] = "You can feel your brain warning you not to talk to him, so you think maybe it's better not to bother #"; CreateText(tText1); DrawTextLoop(1, tChar); break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<3)) CHARINFO[tChar].state++; } } void UpdateCharTwo(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Hi there. #"; u_char tText2[] = "The guard ignores you. #"; u_char tText3[] = "HELLO THERE? (calmer) hello, care to chat? #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(1, tChar); CreateText(tText3); DrawTextLoop(0, 0); break;} case 2: { u_char tText1[] = "The guard refuses to respond. Maybe he is a true professional, only talking when asked to by a commanding officer. #"; u_char tText2[] = "Hello? #"; u_char tText3[] = "You dismiss that idea in favour or thinking the guy is very, very dumb. #"; CreateText(tText1); DrawTextLoop(1, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(1, tChar); break;} case 3: { u_char tText1[] = "You wave your hands in front of the guard's face but he does nothing, so you leave him be. #"; CreateText(tText1); DrawTextLoop(1, tChar); break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<3)) CHARINFO[tChar].state++; } } void UpdateCharThree(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Wotcha. Cor cup a love, darling, apples and pears. #"; u_char tText2[] = "Ah, you think, the innocence of the cockney banter. #"; u_char tText3[] = "Blimey, guv'nor, jellied eels, an' it ain't 'arf hot mum. #"; u_char tText4[] = "You quickly remember how annoying this sort of cheap stereotyping is. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(1, tChar); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(1, 0); break;} case 2: { u_char tText1[] = "Please shut up, you irritating man, or I may be forced to hit you hard. #"; u_char tText2[] = "Oh, ok. #"; u_char tText3[] = "Sorry about that, just that we all try to be different here and so I chose to talk in a fake East End fashion. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 3: { u_char tText1[] = "Talk how you like, but just be aware that I may have to berate you physically if you come out with more rubbish. #"; u_char tText2[] = "Deary me, as sure as eggs is eggs you're a real gennelman, squire, an' thats the truth. #"; u_char tText3[] = "You hit the guard, and derive immense satisfaction from it. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(1, tChar); break;} case 4: { u_char tText1[] = "You simply hit the guard, as it is more fun than talking to him. #"; CreateText(tText1); DrawTextLoop(1, tChar); break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<4)) CHARINFO[tChar].state++; } } void UpdateCharFour(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "May I apologise on behalf of the others; they are suffering from terminal stupidity... #"; u_char tText2[] = "You think that finally here is a normal person. #"; u_char tText3[] = "...and as a token of just how sorry I am I will bow down before you and your family. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(1, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 2: { u_char tText1[] = "I feel unable to bring myself to even look at such a wondrous presence as your own, sir. #"; u_char tText2[] = "Oh dear, you're as annoying as the others, arent you? #"; u_char tText3[] = "Henceforth, I shall disembowel myself daily for thinking that someone such as me should occupy, nay breath the very same air. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 3: { u_char tText1[] = "The man appears to be attempting to slice open his own stomach, but you decide not to be a good samaritan and instead leave him to it. #"; CreateText(tText1); DrawTextLoop(1, tChar); break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<3)) CHARINFO[tChar].state++; } } void UpdateCharFive(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Im just a wee country idiot, me. #"; u_char tText2[] = "But this is the gaming equivalent of a town... #"; u_char tText3[] = "That proves just how stupid I am then, doesn't it? #"; u_char tText4[] = "Tell me, do you like hospital food? #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(0, 0); break;} case 2: { u_char tText1[] = "Why are you pretending to be an idiot? #"; u_char tText2[] = "Well, we all have to say something to you, and I couldn't think of anything, so I decided on being the idiot; I don't have to say much then. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); break;} case 3: { u_char tText1[] = "I consider it ironic myself that you are the idiot and have said more than everyone else in this crummy town. #"; u_char tText2[] = "I might do too if I knew what 'ironic' meant. #"; u_char tText3[] = "Shut up fool. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); break;} case 4: { u_char tText1[] = "I'm an idiot, do you really want to keep talking to me? #"; u_char tText2[] = "You decide the man is indeed an idiot and walk away from him rather than wasting time with him. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(1, 0); break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<4)) CHARINFO[tChar].state++; } } void UpdateCharSix(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "I wonder if you can tell me anything important? #"; u_char tText2[] = "The villager pulls out a piece of paper and reads slowly from it. #"; u_char tText3[] = "Ooh, this place has a nasty curse on it. I don't think we can take much more. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(1, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 2: { u_char tText1[] = "What curse? #"; u_char tText2[] = "(Starting to read from the next page) We have been blighted by the terror of some birds. #"; u_char tText3[] = "Birds? Is that all? Thats pathetic. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); break;} case 3: { u_char tText1[] = "You realise the villager has no mind of her own and so you leave her alone. #"; CreateText(tText1); DrawTextLoop(1, tChar); break;} } if (CHARINFO[tChar].state < 3) CHARINFO[tChar].state++; } } void UpdateCharSeven(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "I know almost everyone in this village. #"; u_char tText2[] = "Really? That is so exciting. #"; u_char tText3[] = "Go on, let me prove it? As far as computer characters go, I'm popular. #"; u_char tText4[] = "Not with me your not. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(0, 0); break;} case 2: { u_char tText1[] = "Everyone who knows me in the village, say ''Hello'. #"; u_char tText2[] = "Hello #"; u_char tText3[] = "Ok, point taken you tedious individual. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(2, 10); CreateText(tText2); DrawTextLoop(2, 11); CreateText(tText2); DrawTextLoop(2, 8); CreateText(tText2); DrawTextLoop(2, 13); CreateText(tText2); DrawTextLoop(2, 2); CreateText(tText2); DrawTextLoop(2, 15); CreateText(tText2); DrawTextLoop(2, 7); CreateText(tText2); DrawTextLoop(2, 17); CreateText(tText3); DrawTextLoop(0, 0); break;} case 3: { u_char tText1[] = "Yet another person you want to avoid. Maybe one day someone will tell you something useful. #"; CreateText(tText1); DrawTextLoop(1, tChar); break;} } if (CHARINFO[tChar].state < 3) CHARINFO[tChar].state++; } } void UpdateCharEight(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "It appears you have arrived at the right time for us. We need someone to help rid us of our problem. #"; u_char tText2[] = "What problem would that be? #"; u_char tText3[] = "We have some birds that regularly cause a nuisance, and would thus like them taken care of. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 2: { u_char tText1[] = "Surely that's not a coincidence is it? I mean, how long have you had this problem? #"; u_char tText2[] = "Since you started playing the game. #"; u_char tText3[] = "What do you suggest I do about these birds? #"; u_char tText4[] = "Well, you'll have to kill them otherwise you'll be stuck in this game for ever. I'd talk to the important looking fellow in the town square. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); CreateText(tText4); DrawTextLoop(2, tChar); break;} case 3: { u_char tText1[] = "You remember this person as being helpful, so you thank them. If you've forgotten what they said, Im sure they would repeat it. #"; CreateText(tText1); DrawTextLoop(1, tChar); break;} } CHARINFO[tChar].state = (CHARINFO[tChar].state)%3+1; } } void UpdateCharNine(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { u_char tText1[] = "They refuse to talk to you, but you don't feel as though you are missing much. #"; CreateText(tText1); DrawTextLoop(1, tChar); } } void UpdateCharTen(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "How come none of you people walk around? #"; u_char tText2[] = "Its not our fault, just that the programmer wasn't good enough at getting the models done properly. #"; u_char tText3[] = "What suffered was the animation, so it means basically most of us just stand around a lot. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 2: { u_char tText1[] = "Surely thats awful, having to stand around all day doing nothing? #"; u_char tText2[] = "Well, I was thinking of moving into the civil service, but they had no vacancies. #"; u_char tText3[] = "...besides, it could be worse. Look at the kids in South Park, they haven't even got a third dimension. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 3: { u_char tText1[] = "The man appears to be mad, so you decide you would rather talk to Cujo than him again. #"; CreateText(tText1); DrawTextLoop(1, tChar); break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<3)) CHARINFO[tChar].state++; } } void UpdateCharEleven(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "If you go visiting around here, watch out for the forest, I've heard it is always foggy and easy to lose your way around. #"; u_char tText2[] = "Have you got any advice on how to find myself around in the fog? #"; u_char tText3[] = "Cleverly you realise you will have to encounter this fog for yourself later, as it seems unlikely that it would be mentioned otherwise. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(1, 0); break;} case 2: { u_char tText1[] = "There isn't much I can say about the fog, except walk slowly and remember where you came from. #"; u_char tText4[] = "I've heard there is a wise man living in a cave in there, and the entrance is near a red tree... #"; u_char tText2[] = "Thank you, I will. #"; u_char tText3[] = "Again you realise that the fog must exist, even if only as a cheap special effect put in by the programmer to try to impress people. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(1, 0); break;} } CHARINFO[tChar].state = (CHARINFO[tChar].state)%2+1; } } void UpdateCharTwelve(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Have you noticed how the role of the X button changes in the game? #"; u_char tText2[] = "Up until now, you have probably just used it to talk to people, but in other rooms it can be used to fight. #"; u_char tText3[] = "When you can use it to fight, you will see a sword icon on the right if the screen, otherwise it is a speech bubble. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 2: { u_char tText1[] = "You regret not being able to use your sword on the people inhabiting this town. #"; CreateText(tText1); DrawTextLoop(1, 0); break;} } CHARINFO[tChar].state = (CHARINFO[tChar].state)%2+1; } } void UpdateCharThirteen(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "If only I was more attractive. #"; u_char tText2[] = "The person sags in front of you. #"; u_char tText3[] = "What's the matter. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(1, tChar); CreateText(tText3); DrawTextLoop(0, 0); break;} case 2: { u_char tText1[] = "Noone will look at me anymore. Gone are the days when gouraud shading was something new and attractive. #"; u_char tText2[] = "Now it's all z-buffer rendering and higher polygon counts. An old'timer like me just can't cut the mustard. #"; u_char tText3[] = "Ah well, at least I've got a few more polygons than you! #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); break;} } CHARINFO[tChar].state = (CHARINFO[tChar].state)%2+1; } } void UpdateCharFourteen(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Hi there, how are you? #"; u_char tText2[] = "You are stunned by the politeness of this individual. #"; u_char tText3[] = "Fine thanks, how are you? #"; u_char tText4[] = "My life would be so much better if it wasn't for those birds attacking us all the time. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(1, tChar); CreateText(tText3); DrawTextLoop(0, 0); CreateText(tText4); DrawTextLoop(2, tChar); break;} case 2: { u_char tText1[] = "What do these birds do precisely? #"; u_char tText2[] = "Well, sometimes they fly overhead and make loud noises. #"; u_char tText3[] = "Really? Is that all? #"; u_char tText4[] = "Sometimes they will swoop low over our village and (shudder) pick up crumbs to eat. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); CreateText(tText4); DrawTextLoop(2, tChar); break;} case 3: { u_char tText1[] = "Sounds like a rather tenuous reason to send me out to kill them. #"; u_char tText2[] = "Give us a break, mate; this ain't no 3 year, team of 35 developers type game. Remember there was only one poor guy doing nearly all this. #"; u_char tText3[] = "As the game is a small demo, it doesn't require a huge storyline. #"; u_char tText4[] = "Besides, all the dragons and wizards have been booked to work on all the new hack 'n slash PC games. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(2, tChar); break;} case 4: { u_char tText1[] = "You decide that you have been moaned at enough by this person, so decide to avoid it happening again. #"; CreateText(tText1); DrawTextLoop(1, 0); break;} } if (CHARINFO[tChar].state < 5) CHARINFO[tChar].state++; } } void UpdateCharFifteen(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { u_char tText1[] = "You listen to the old man mutter to himself. #"; u_char tText2[] = "What are we going to do with this menace to our lives? If only an adventurer would turn up and offer to free us from this evil. #"; CreateText(tText1); DrawTextLoop(1, 0); CreateText(tText2); DrawTextLoop(2, tChar); } } void UpdateCharSixteen(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { u_char tText1[] = "Dear me, even the wise men of the town can not find someone to deliver us from the scourge of birds. #"; u_char tText2[] = "You sympathise with the townspeople. Not being able to move or walk around must have disadvantages when birds fly low overhead regularly. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(1, tChar); } } void UpdateCharSeventeen(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { u_char tText1[] = "Wow, you look big and strong. Perhaps you will travel over the river to the forest and kill the birds? #"; u_char tText2[] = "I have a feeling I will have to, freak woman, seeing as this game is far too linear to allow me to do anything else. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); } } void UpdateCharEighteen(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "At a guess, you appear to be more important than other people around here. Can you help me? #"; u_char tText2[] = "I think the question is more, \"How can you help us?\" #"; u_char tText3[] = "No, you can't have been listening, you imbecile. I said \"Can you help me?\" #"; u_char tText4[] = "The guard does not look impressed. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); CreateText(tText4); DrawTextLoop(1, 0); break;} case 2: { u_char tText1[] = "You try to think of something intellectual to say, perhaps translated from another language. #"; u_char tText2[] = "You are tenacious. But I am very very scary. #"; u_char tText3[] = "You blush and apologise as you wonder where those words came from. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(1, 0); break;} case 3: { u_char tText1[] = "If you help us remove the threat of the birds then we can help you with whatever problem you have. #"; u_char tText2[] = "Sounds fair. I want to break out of this dodgy game, short of pressing the RESET button. #"; u_char tText3[] = "There is a friend of mine living within a cave in the 'Misty Woods', which lies on the other side of the river. #"; u_char tText4[] = "You marvel to yourself on the intelligence that led to the creative naming of all places such as the 'Rocky Mountains'. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(1, 0); break;} case 4: { u_char tText1[] = "If you go to the river and simply tell the ferryman that I want you to get to the other side, Im sure he'll oblige. #"; u_char tText2[] = "Why not, I ask myself? I've got nothing better to do. #"; u_char tText3[] = "Good luck. #"; u_char tText4[] = "You mumble to yourself under your breath and head off to the river, back the way you came. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(1, 0); Maps[1].characters[0].state = 6; Maps[3].characters[13].state = 5; break;} case 5: { u_char tText1[] = "Don't waste time, go to the forest and start killing things like a maniac. #"; CreateText(tText1); DrawTextLoop(2, tChar); break;} } if (CHARINFO[tChar].state < 5) CHARINFO[tChar].state++; } } void UpdateCharNineteen(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { u_char tText1[] = "If you got rid of our tormentors, maybe the king would let you marry his daughter! #"; u_char tText2[] = "Don't do it, have you seen the king's daughter? Been hit with an ugly stick, she has. #"; u_char tText3[] = "You silently promise yourself that whatever game you play next, it won't involve medieval peasants. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(2, 13); CreateText(tText3); DrawTextLoop(1, 0); } } void UpdateCharTwenty(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { u_char tText1[] = "Do you know what you have to do yet? #"; u_char tText2[] = "Not really. Have you got any ideas? #"; u_char tText3[] = "No, just thought I'd ask. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); } } void UpdateCharTwentythree(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Boy, do we like to waste time talking around here. #"; u_char tText2[] = "She's right you know, talk is what we like. #"; u_char tText3[] = "Ooh yes, I'd agree. Of course, in the old days we could talk inanely much better. #"; CreateText(tText1); DrawTextLoop(2, 15); CreateText(tText2); DrawTextLoop(2, 19); CreateText(tText3); DrawTextLoop(2, 16); break;} case 2: { u_char tText1[] = "Gossip gossip gossip. #"; CreateText(tText1); DrawTextLoop(2, 15); CreateText(tText1); DrawTextLoop(2, 19); CreateText(tText1); DrawTextLoop(2, 16); break;} } if (CHARINFO[tChar].state == 1) CHARINFO[tChar].state++; } } void UpdateCharTwentyfour(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (900<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (900<<4))) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Please, please sir, spare us a copper. #"; u_char tText2[] = "\"How wonderful,\" you think. \"The programmer thoughtfully put in some whingeing beggers.\" #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(1, 0); break;} } if (CHARINFO[tChar].state==1) CHARINFO[tChar].state++; } if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 2: { u_char tText1[] = "Look mate, if I give you any money, not only will you not leave me alone, but all your dirty friends will hassle me too. #"; u_char tText2[] = "But I'm an orphan (admittedly an old one)!!!! #"; u_char tText3[] = "The man screams and wails pitifully. You almost feel sorry for him, but would definately still rather kick him out of sight. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(1, tChar); break;} case 3: { u_char tText1[] = "But if I don't get any money then my father will beat me to within an inch of my life! (sobs loudly) #"; u_char tText2[] = "I thought you were an orphan? #"; u_char tText3[] = "The man gulps hastily, and looks plain embarassed. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(1, tChar); break;} case 4: { u_char tText1[] = "Look, how about a copper and then I'll be off, sir... #"; u_char tText2[] = "How about I instead use that money to pay for some nasty bloke to throw you into the river? #"; u_char tText3[] = "(concluding his chat quickly) ...or shall I just walk away and leave your field of vision? #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 5: { u_char tText1[] = "Sorry if I scared you. #"; u_char tText2[] = "The man just shakes and refuses to say a word, but keeps running in a circle. #"; u_char tText3[] = "Actually, I'm not that sorry. (You stick your tongue out at him) #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<5)) CHARINFO[tChar].state++; } if (CHARINFO[tChar].state != 5) { switch(CheckEnemyRotation(tChar, 0)) { case 0: UpdateCharacterPosition(tChar, 0, 40); break; case 1: RotateModel(&CHARINFO[tChar].charModel, &CHARINFO[tChar].charVector, 0, -96, 0); UpdateCharacterPosition(tChar, 0, 24); break; case 2: RotateModel(&CHARINFO[tChar].charModel, &CHARINFO[tChar].charVector, 0, 96, 0); UpdateCharacterPosition(tChar, 0, 24); break; } } else { RotateModel(&CHARINFO[tChar].charModel, &CHARINFO[tChar].charVector, 0, -64, 0); UpdateCharacterPosition(tChar, -2, 16); } } void UpdateCharTwentyfive(u_long tChar) { // printf("desired Z = %d ", (14*512-100)); // printf("calculated Z = %d\n", (CHARINFO[0].scaleZ>>4)); if (((CHARINFO[0].scaleZ>>4) < (14*512-100)) && ((CHARINFO[1].state == 7) || (CHARINFO[1].state == 8))) { u_long counter; u_char tText1[] = "The raft begins to move as if by magic. #"; u_char tText2[] = "You vow never to get on such a rubbish raft again in your life. #"; u_char tText3[] = "But at least you are over the river, and can now head out to find the wise old man. #"; CHARINFO[1].state = 9; // make sure this check isnt done again! CHARINFO[0].charVector.vy = 0; RotateModel(&CHARINFO[0].charModel, &CHARINFO[0].charVector, 0, 2048, 0); CreateText(tText1); DrawTextLoop(1, 0); for (counter=0; counter<(3*512); counter+=16) { OBJECTMODEL[0].Object_Coord.coord.t[2] += 16; OBJECTMODEL[0].Object_Coord.flg = 0; CalculateCamera(CameraMode, &ViewPoint, 0); GsSetRefView2(&ViewPoint); RenderProgram(0); } for (counter=0; counter<(1.2*512); counter+=16) { u_long *tMemAddress = (u_long *) (PLAYANIMFRAMES[PLAYERANIM>>2]); GsLinkObject4((u_long) (tMemAddress+3), &CHARINFO[0].charModel.Object_Handler, 0); PLAYERANIM = (PLAYERANIM+1) % 16; CHARINFO[0].charModel.Object_Coord.coord.t[2] -= 16; CHARINFO[0].charModel.Object_Coord.flg = 0; CalculateCamera(CameraMode, &ViewPoint, 0); GsSetRefView2(&ViewPoint); RenderProgram(0); } for (counter=0; counter<(3*512); counter+=16) { OBJECTMODEL[0].Object_Coord.coord.t[2] -= 16; OBJECTMODEL[0].Object_Coord.flg = 0; CHARINFO[0].charModel.Object_Coord.coord.t[2] -= 16; CHARINFO[0].charModel.Object_Coord.flg = 0; CalculateCamera(CameraMode, &ViewPoint, 0); GsSetRefView2(&ViewPoint); RenderProgram(0); } for (counter=0; counter<(1.8*512); counter+=16) { u_long *tMemAddress = (u_long *) (PLAYANIMFRAMES[PLAYERANIM>>2]); GsLinkObject4((u_long) (tMemAddress+3), &CHARINFO[0].charModel.Object_Handler, 0); PLAYERANIM = (PLAYERANIM+1) % 16; CHARINFO[0].charModel.Object_Coord.coord.t[2] -= 16; CHARINFO[0].charModel.Object_Coord.flg = 0; CalculateCamera(CameraMode, &ViewPoint, 0); GsSetRefView2(&ViewPoint); RenderProgram(0); } CreateText(tText2); DrawTextLoop(1, 0); CreateText(tText3); DrawTextLoop(1, 0); CHARINFO[0].scaleZ = CHARINFO[0].charModel.Object_Coord.coord.t[2] << (4); } } void UpdateCharTwentyseven(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Welcome. I've been expecting you. #"; u_char tText2[] = "I bet you have. Been praying for me to turn up more likely just to relieve the boredom. #"; u_char tText3[] = "(coughs) And you can cut that biting sarcasm out right this minute. #"; u_char tText4[] = "You blush. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(1, 0); break;} case 2: { u_char tText1[] = "You are here to help rid us of the birds? #"; u_char tText2[] = "Ooh yes please. #"; u_char tText3[] = "The answer you seek is in one of the Great Pyramids, but there are problems getting there. #"; u_char tText4[] = "But to get to the pyramid, you must travel across the desert, whose shifting sands have disoriented many a traveller. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText4); DrawTextLoop(2, tChar); break;} case 3: { u_char tText1[] = "Step through the left transporter which will take you to a friend of mine... #"; u_char tText2[] = "You look at the crudely painted star on the ground that passes for a transporter these days. #"; u_char tText3[] = "Don't get lost in the blizzard around his place, just be careful and ask him the way to the pyramids. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(1, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 4: { u_char tText1[] = "Of course, if you're such a hero, you could try finding the pyramid yourself! #"; u_char tText2[] = "Um, no, it's Ok, thanks. I'll find your friend. #"; u_char tText3[] = "Say hi to his wife for me please. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 5: { u_char tText1[] = "Get going. Step into one of the transporters. #"; CreateText(tText1); DrawTextLoop(2, tChar); break;} case 6: { u_char tText1[] = "Silly me, I knew all along how to find it, I just wanted you to pass a message on to Gerald. #"; u_char tText2[] = "You curse to yourself loudly. #"; u_char tText3[] = "When you step into the desert simply walk straight forwards. As long as you don't turn you should find the true path. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 7: { u_char tText1[] = "Get your backside into gear and go to the pyramid. #"; CreateText(tText1); DrawTextLoop(2, tChar); break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<5)) CHARINFO[tChar].state++; if ((CHARINFO[tChar].state>5) && (CHARINFO[tChar].state<7)) CHARINFO[tChar].state++; } } void UpdateCharTwentyeight(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Hi there, I need to ask for some information. #"; u_char tText2[] = "Sounds fine. How can I help? #"; u_char tText3[] = "I need to know how to get to the 'Great Pyramid'. Do you know the way? #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); break;} case 2: { u_char tText1[] = "You mean the great big pyramid on the other side of the desert? #"; u_char tText2[] = "Yes. #"; u_char tText3[] = "The one that people can never find because noone really knows how to get there? #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); break;} case 3: { u_char tText1[] = "Can't help you, I'm afraid. I don't know myself. Who told you to ask me? #"; u_char tText2[] = "Some really annoying wierd old man in a cave. #"; u_char tText3[] = "Oh, you mean my dad? Yes, he is annoying. He's also a bit cheeky. He's the only living person who does know how to get there! #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 4: { u_char tText1[] = "Nice talking to you, but talk to my father again. Ask him if he is senile yet! #"; u_char tText2[] = "You already know the answer to that one. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(1, 0); Maps[8].characters[0].state = 6; break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<4)) CHARINFO[tChar].state++; } } void UpdateCharTwentynine(u_long tChar) { if ((abs(CHARINFO[0].scaleX - CHARINFO[tChar].scaleX) < (300<<4)) && (abs(CHARINFO[0].scaleZ - CHARINFO[tChar].scaleZ) < (300<<4)) && (PAD& PADcross)) { switch(CHARINFO[tChar].state) { case 1: { u_char tText1[] = "Have you got something to do with the birds that are harassing the local townspeople? #"; u_char tText2[] = "Well, seeing as I'm hanging around in a pyramid, you can safely assume I'm up to no good one way or another. #"; u_char tText3[] = "Don't be smart; are you controlling the birds? #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); break;} case 2: { u_char tText1[] = "Well, I suppose I should own up. Yes, I look after them. Why, is there something wrong? #"; u_char tText2[] = "Apparently they have been flying around the town annoying people. This really must stop. #"; u_char tText3[] = "Well, the birds are at that age, you know. They get a mind of their own and they really won't listen to me. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(2, tChar); break;} case 3: { u_char tText1[] = "Thats not good enough. Some sort of solution will have to be made, otherwise its the Spanish Inquisition for you. #"; u_char tText2[] = "Ok, how about the birds have to back in bed by 10pm every night. #"; u_char tText3[] = "Sounds quite good. If I put you down for some community service, I should be able to let you off the hook. #"; CreateText(tText1); DrawTextLoop(0, 0); CreateText(tText2); DrawTextLoop(2, tChar); CreateText(tText3); DrawTextLoop(0, 0); break;} case 4: { u_char tText1[] = "Ta very much. Promise they won't bother a soul again. By the way, have you looked at the hieroglyphs? #"; u_char tText2[] = "Don't distract me, I've done my part of the bargain, now I can leave this dodgy game. #"; u_char tText3[] = "-- WELL DONE -- You have completed this part of the game, and also probably got a headache. #"; u_char tText4[] = "This game will now reset back to the title screen. Cheers, Robert. #"; CreateText(tText1); DrawTextLoop(2, tChar); CreateText(tText2); DrawTextLoop(0, 0); CreateText(tText3); DrawTextLoop(1, 0); CreateText(tText4); DrawTextLoop(1, 0); Maps[8].characters[0].state = 6; GameRunning = FALSE; break;} } if ((CHARINFO[tChar].state>0) && (CHARINFO[tChar].state<4)) CHARINFO[tChar].state++; } } void UpdateCharBat(u_long tChar) { // printf("cat "); if (CHARINFO[tChar].state != 0) { switch(CheckEnemyRotation(tChar, 0)) { case 0: UpdateCharacterPosition(tChar, 0, 80); break; case 1: RotateModel(&CHARINFO[tChar].charModel, &CHARINFO[tChar].charVector, 0, -96, 0); UpdateCharacterPosition(tChar, 0, 64); break; case 2: RotateModel(&CHARINFO[tChar].charModel, &CHARINFO[tChar].charVector, 0, 96, 0); UpdateCharacterPosition(tChar, 0, 64); break; } CHARINFO[tChar].charModel.Object_Coord.coord.t[1] -= 350; CHARINFO[tChar].state = (CHARINFO[tChar].state)%10+1; if (CHARINFO[tChar].state == 1) GsLinkObject4((u_long) ((u_long *)(BAT1_TMD)+3), &CHARINFO[tChar].charModel.Object_Handler, 0); if (CHARINFO[tChar].state == 6) GsLinkObject4((u_long) ((u_long *)(BAT2_TMD)+3), &CHARINFO[tChar].charModel.Object_Handler, 0); } if (SWORDHURT == TRUE) { if ((abs(SwordPlace[0] - CHARINFO[tChar].charModel.Object_Coord.coord.t[0]) < 250) && (abs(SwordPlace[1] - CHARINFO[tChar].charModel.Object_Coord.coord.t[1]) < 600) && (abs(SwordPlace[2] - CHARINFO[tChar].charModel.Object_Coord.coord.t[2]) < 250)) { CHARINFO[tChar].state = 0; CHARINFO[tChar].charModel.Object_Coord.coord.t[1] += 400; } } } void DrawTextLoop(u_long tPos, u_char tChar) { while (PAD& PADcross) { PAD = ReadPad(); CalculateCamera(CameraMode, &ViewPoint, tChar); GsSetRefView2(&ViewPoint); RenderProgramText(tPos); } while (!(PAD& PADcross)) { PAD = ReadPad(); CalculateCamera(CameraMode, &ViewPoint, tChar); GsSetRefView2(&ViewPoint); RenderProgramText(tPos); } while (PAD& PADcross) { PAD = ReadPad(); CalculateCamera(CameraMode, &ViewPoint, tChar); GsSetRefView2(&ViewPoint); RenderProgramText(tPos); } }