GIRL.CPP
资源名称:tc3d.zip [点击查看]
上传用户:abcdshs
上传日期:2007-01-07
资源大小:1858k
文件大小:2k
源码类别:
游戏
开发平台:
Visual C++
- // (C) Copyright 1996 by Anthony J. Carin. All Rights Reserved.
- #include <stdafx.h>
- #include <girl.h>
- girl::girl(personal *p) : dude(p)
- {
- lchest = new attachment(coordinate(0.13f,-0.03f,0.1f));
- rchest = new attachment(coordinate(-0.13f,-0.03f,0.1f));
- pelvis = new attachment(coordinate(0.0f,-0.65f,-0.12f));
- m_lboob = new baseobject(m_personal.boob());
- m_rboob = new baseobject(m_personal.boob());
- m_butt = new baseobject(m_personal.gluts());
- lchest->attachto(m_lboob);
- rchest->attachto(m_rboob);
- pelvis->attachto(m_butt);
- delete m_head;
- m_head = new girlhead(&m_personal);
- neck->attachto(m_head);
- shirtcolor(RGB(0,148,0));
- pantscolor(RGB(0,0,200));
- skincolor(RGB(240,200,0));
- haircolor(RGB(240,0,0));
- personaleffect();
- }
- girl::~girl()
- {
- delete lchest;
- delete rchest;
- delete pelvis;
- delete m_lboob;
- delete m_rboob;
- delete m_butt;
- delete m_head;
- m_head = 0;
- }
- void girl::shirtcolor(COLORREF c)
- {
- dude::shirtcolor(c);
- m_lboob->setcolor(c);
- m_rboob->setcolor(c);
- }
- void girl::pantscolor(COLORREF c)
- {
- dude::pantscolor(c);
- m_butt->setcolor(c);
- }
- void girl::haircolor(COLORREF c)
- {
- m_head->haircolor(c);
- }
- void girl::draw()
- {
- lchest->setto(m_view);
- rchest->setto(m_view);
- pelvis->setto(m_view);
- dude::draw();
- lchest->draw();
- rchest->draw();
- pelvis->draw();
- }
- void girl::setto(view& v)
- {
- dude::setto(v);
- }
- void girl::personaleffect()
- {
- haircolor(m_personal.haircolor());
- dude::personaleffect();
- }
- girlhead::girlhead(personal *p) : head(p)
- {
- roots = new attachment(coordinate(0.0f,0.05f,0.04f));
- hair = new baseobject(p->hair());
- roots->attachto(hair);
- haircolor(RGB(255,255,0));
- }
- girlhead::~girlhead()
- {
- delete roots;
- delete hair;
- }
- void girlhead::haircolor(COLORREF c)
- {
- hair->setcolor(c);
- }
- void girlhead::draw()
- {
- head::draw();
- roots->draw();
- }
- void girlhead::setto(view &v)
- {
- head::setto(v);
- roots->setxoff(xposition);
- roots->setyoff(yposition);
- roots->setzoff(zposition);
- roots->setto(v);
- }