blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 5
146
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
7
| license_type
stringclasses 2
values | repo_name
stringlengths 6
79
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 4
values | visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.07k
426M
⌀ | star_events_count
int64 0
27
| fork_events_count
int64 0
12
| gha_license_id
stringclasses 3
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 6
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 1
class | length_bytes
int64 20
6.28M
| extension
stringclasses 20
values | content
stringlengths 20
6.28M
| authors
listlengths 1
16
| author_lines
listlengths 1
16
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d19dd1dab978b82d5f9abc8c28f887783778b76 | 463c3b62132d215e245a097a921859ecb498f723 | /lib/dlib/smart_pointers/shared_ptr_abstract.h | ecaa3de3ee56bc228d5c153be405153f736e1200 | [
"BSL-1.0",
"LicenseRef-scancode-unknown-license-reference"
]
| permissive | athulan/cppagent | 58f078cee55b68c08297acdf04a5424c2308cfdc | 9027ec4e32647e10c38276e12bcfed526a7e27dd | refs/heads/master | 2021-01-18T23:34:34.691846 | 2009-05-05T00:19:54 | 2009-05-05T00:19:54 | 197,038 | 4 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 12,189 | h | // Copyright (C) 2007 Davis E. King ([email protected])
// License: Boost Software License See LICENSE.txt for the full license.
#undef DLIB_SHARED_PTr_ABSTRACT_
#ifdef DLIB_SHARED_PTr_ABSTRACT_
#include "weak_ptr_abstract.h"
#include <exception>
namespace dlib
{
// ----------------------------------------------------------------------------------------
class bad_weak_ptr: public std::exception {}
// ----------------------------------------------------------------------------------------
template <
typename T
>
class shared_ptr
{
/*!
INITIAL VALUE
defined by constructors
WHAT THIS OBJECT REPRESENTS
This object represents a reference counted smart pointer. Each shared_ptr
contains a pointer to some object and when the last shared_ptr that points
to the object is destructed or reset() then the object is guaranteed to be
deleted.
This is an implementation of the std::tr1::shared_ptr template from the
document ISO/IEC PDTR 19768, Proposed Draft Technical Report on C++
Library Extensions. The only deviation from that document is that this
shared_ptr is declared inside the dlib namespace rather than std::tr1.
THREAD SAFETY
This object is not thread safe. Especially so since it is
reference counted. So you should take care to not have two shared_ptr
objects in different threads that point to the same object.
If you want a thread safe version of this object you should use the
dlib::shared_ptr_thread_safe object instead.
!*/
public:
typedef T element_type;
shared_ptr(
);
/*!
ensures
- #get() == 0
- #use_count() == 0
!*/
template<typename Y>
explicit shared_ptr(
Y* p
);
/*!
requires
- p is convertible to a T* type pointer
- p can be deleted by calling "delete p;" and doing so will not throw exceptions
- p != 0
ensures
- #get() == p
- #use_count() == 1
- #*this object owns the pointer p
throws
- std::bad_alloc
if this exception is thrown then "delete p;" is called
!*/
template<typename Y, typename D>
shared_ptr(
Y* p,
const D& d
);
/*!
requires
- p is convertible to a T* type pointer
- D is copy constructable (and the copy constructor of D doesn't throw)
- p can be deleted by calling "d(p);" and doing so will not throw exceptions
- p != 0
ensures
- #get() == p
- #use_count() == 1
- #*this object owns the pointer p
throws
- std::bad_alloc
if this exception is thrown then "d(p);" is called
!*/
shared_ptr(
const shared_ptr& r
);
/*!
ensures
- #get() == #r.get()
- #use_count() == #r.use_count()
- If r is empty, constructs an empty shared_ptr object; otherwise, constructs
a shared_ptr object that shares ownership with r.
!*/
template<typename Y>
shared_ptr(
const shared_ptr<Y>& r
);
/*!
requires
- Y* is convertible to T*
ensures
- #get() == #r.get()
- #use_count() == #r.use_count()
- If r is empty, constructs an empty shared_ptr object; otherwise, constructs
a shared_ptr object that shares ownership with r.
!*/
template<typename Y>
explicit shared_ptr(
const weak_ptr<Y>& r
);
/*!
requires
- Y* is convertible to T*
ensures
- #get() == #r.get()
- #use_count() == #r.use_count()
- If r is empty, constructs an empty shared_ptr object; otherwise, constructs
a shared_ptr object that shares ownership with r.
throws
- bad_weak_ptr
this exception is thrown if r.expired() == true
!*/
template<typename Y>
explicit shared_ptr(
std::auto_ptr<Y>& r
);
/*!
requires
- p.get() != 0
- p.release() is convertible to a T* type pointer
- p.release() can be deleted by calling "delete p.release();" and doing so will not throw exceptions
ensures
- #get() == p.release()
- #use_count() == 1
- #r.get() == 0
- #*this object owns the pointer p.release()
throws
- std::bad_alloc
!*/
~shared_ptr(
);
/*!
ensures
- if (use_count() > 1)
- this object destroys itself but otherwise has no effect (i.e.
the pointer get() is still valid and shared between the remaining
shared_ptr objects)
- else if (use_count() == 1)
- deletes the pointer get() by calling delete (or using the deleter passed
to the constructor if one was passed in)
- else
- in this case get() == 0 so there is nothing to do so nothing occurs
!*/
shared_ptr& operator= (
const shared_ptr& r
);
/*!
ensures
- equivalent to shared_ptr(r).swap(*this).
- returns #*this
!*/
template<typename Y>
shared_ptr& operator= (
const shared_ptr<Y>& r
);
/*!
requires
- Y* is convertible to T*
ensures
- equivalent to shared_ptr(r).swap(*this).
- returns #*this
!*/
template<typename Y>
shared_ptr& operator= (
std::auto_ptr<Y>& r
);
/*!
requires
- p.get() != 0
- p.release() is convertible to a T* type pointer
- p.release() can be deleted by calling "delete p.release();" and doing so will not throw exceptions
ensures
- equivalent to shared_ptr(r).swap(*this).
- returns #*this
!*/
void reset(
);
/*!
ensures
- equivalent to shared_ptr().swap(*this)
!*/
template<typename Y>
void reset(
Y* p
);
/*!
requires
- p is convertible to a T* type pointer
- p can be deleted by calling "delete p;" and doing so will not throw exceptions
- p != 0
ensures
- equivalent to shared_ptr(p).swap(*this)
!*/
template<typename Y, typename D>
void reset(
Y* p,
const D& d
);
/*!
requires
- p is convertible to a T* type pointer
- D is copy constructable (and the copy constructor of D doesn't throw)
- p can be deleted by calling "d(p);" and doing so will not throw exceptions
- p != 0
ensures
- equivalent to shared_ptr(p,d).swap(*this)
!*/
T* get(
) const;
/*!
ensures
- returns the stored pointer
!*/
T& operator*(
) const;
/*!
requires
- get() != 0
ensures
- returns a reference to *get()
!*/
T* operator->(
) const;
/*!
requires
- get() != 0
ensures
- returns get()
!*/
bool unique(
) const;
/*!
ensures
- returns (use_count() == 1)
!*/
long use_count(
) const;
/*!
ensures
- The number of shared_ptr objects, *this included, that share ownership with *this, or 0 when *this
is empty.
!*/
operator bool(
) const;
/*!
ensures
- returns (get() != 0)
!*/
void swap(
shared_ptr& b
);
/*!
ensures
- swaps *this and item
!*/
};
// ----------------------------------------------------------------------------------------
template<typename T, typename U>
bool operator== (
const shared_ptr<T>& a,
const shared_ptr<U>& b
);
/*!
ensures
- returns a.get() == b.get()
!*/
template<typename T, typename U>
bool operator!= (
const shared_ptr<T>& a,
const shared_ptr<U>& b
) { return a.get() != b.get(); }
/*!
ensures
- returns a.get() != b.get()
!*/
template<typename T, typename U>
bool operator< (
const shared_ptr<T>& a,
const shared_ptr<U>& b
);
/*!
ensures
- Defines an operator< on shared_ptr types appropriate for use in the associative
containers.
!*/
template<typename T>
void swap(
shared_ptr<T>& a,
shared_ptr<T>& b
) { a.swap(b); }
/*!
provides a global swap function
!*/
template<typename T, typename U>
shared_ptr<T> static_pointer_cast(
const shared_ptr<U>& r
);
/*!
- if (r.get() == 0) then
- returns shared_ptr<T>()
- else
- returns a shared_ptr<T> object that stores static_cast<T*>(r.get()) and shares
ownership with r.
!*/
template<typename T, typename U>
shared_ptr<T> const_pointer_cast(
const shared_ptr<U>& r
);
/*!
- if (r.get() == 0) then
- returns shared_ptr<T>()
- else
- returns a shared_ptr<T> object that stores const_cast<T*>(r.get()) and shares
ownership with r.
!*/
template<typename T, typename U>
shared_ptr<T> dynamic_pointer_cast(
const shared_ptr<U>& r
);
/*!
ensures
- if (dynamic_cast<T*>(r.get()) returns a nonzero value) then
- returns a shared_ptr<T> object that stores a copy of
dynamic_cast<T*>(r.get()) and shares ownership with r
- else
- returns an empty shared_ptr<T> object.
!*/
template<typename E, typename T, typename Y>
std::basic_ostream<E, T> & operator<< (
std::basic_ostream<E, T> & os,
const shared_ptr<Y>& p
);
/*!
ensures
- performs os << p.get()
- returns os
!*/
template<typename D, typename T>
D* get_deleter(
const shared_ptr<T>& p
);
/*!
ensures
- if (*this owns a deleter d of type cv-unqualified D) then
- returns &d
- else
- returns 0
!*/
// ----------------------------------------------------------------------------------------
}
#endif // DLIB_SHARED_PTr_ABSTRACT_
| [
"jimmy@DGJ3X3B1.(none)"
]
| [
[
[
1,
406
]
]
]
|
d7d69268fec117a4eba8dd7e74cb5ef8b57a165c | 26b6f15c144c2f7a26ab415c3997597fa98ba30a | /sdp/src/BandwidthField.cpp | 4e2b36f343a458c6eca174cd1c313fec9506b3cd | []
| no_license | wangscript007/rtspsdk | fb0b52e63ad1671e8b2ded1d8f10ef6c3c63fddf | f5b095f0491e5823f50a83352945acb88f0b8aa0 | refs/heads/master | 2022-03-09T09:25:23.988183 | 2008-12-27T17:23:31 | 2008-12-27T17:23:31 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,517 | cpp | /*****************************************************************************
// SDP Parser Classes
//
// Bandwidth Field Class
//
// revision of last commit:
// $Rev$
// author of last commit:
// $Author$
// date of last commit:
// $Date$
//
// created by Argenet {[email protected]}
//
// Permission is hereby granted, free of charge, to any person or organization
// obtaining a copy of the software and accompanying documentation covered by
// this license (the "Software") to use, reproduce, display, distribute,
// execute, and transmit the Software, and to prepare derivative works of the
// Software, and to permit third-parties to whom the Software is furnished to
// do so, all subject to the following:
//
// The copyright notices in the Software and this entire statement, including
// the above license grant, this restriction and the following disclaimer,
// must be included in all copies of the Software, in whole or in part, and
// all derivative works of the Software, unless such copies or derivative
// works are solely in the form of machine-executable object code generated by
// a source language processor.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
******************************************************************************/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Includes
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// PoCo headers
#include "Poco/NumberParser.h"
#include "Poco/NumberFormatter.h"
#include "Poco/Util/OptionException.h"
#include "BandwidthField.h"
using std::string;
using Poco::NumberParser;
using Poco::NumberFormatter;
using Poco::Util::InvalidArgumentException;
namespace SDP {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// BandwidthField class implementation
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Public methods
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BandwidthField :: BandwidthField()
: Field("b", "")
, _bandwidth(0)
{
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BandwidthField :: BandwidthField(const string & value)
: Field("b", value)
{
StringVec parts = split(_value, ':');
if(2 != parts.size())
{
throw new InvalidArgumentException("BandwidthField ctor - invalid bandwidth field!");
}
_modifier = parts[0];
_bandwidth = NumberParser::parse(parts[1]);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BandwidthField :: BandwidthField(const string & modifier, int bandwidth)
: Field("b", modifier + ":" + NumberFormatter::format(bandwidth))
, _modifier(modifier)
, _bandwidth(bandwidth)
{
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BandwidthField :: BandwidthField(const BandwidthField & bandwidthField)
: Field(bandwidthField)
, _modifier(bandwidthField._modifier)
, _bandwidth(bandwidthField._bandwidth)
{
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BandwidthField & BandwidthField :: operator=(const BandwidthField & bandwidthField)
{
if(&bandwidthField != this)
{
_modifier = bandwidthField._modifier;
_bandwidth = bandwidthField._bandwidth;
Field::operator=(bandwidthField);
}
return *this;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inline std::string BandwidthField :: getModifier() const
{
return _modifier;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inline int BandwidthField :: getBandwidth() const
{
return _bandwidth;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inline std::string BandwidthField :: getValue() const
{
return (_modifier + ":" + NumberFormatter::format(_bandwidth));
}
} // namespace SDP
| [
"[email protected]",
"[email protected]"
]
| [
[
[
1,
139
]
],
[
[
140,
142
]
]
]
|
35ffab0c0f07d153c6a8c0c289dd5b6dd6db0ef8 | c2abb873c8b352d0ec47757031e4a18b9190556e | /src/vortex-server/TCPServer.cpp | 450c2939f8e53e3e28cfe7d8ccd065863abf9133 | []
| no_license | twktheainur/vortex-ee | 70b89ec097cd1c74cde2b75f556448965d0d345d | 8b8aef42396cbb4c9ce063dd1ab2f44d95e994c6 | refs/heads/master | 2021-01-10T02:26:21.913972 | 2009-01-30T12:53:21 | 2009-01-30T12:53:21 | 44,046,528 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,283 | cpp | /*"The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.*/
#include "TCPServer.h"
#include "ClientManagerOut.h"
#include "Server.h"
TCPServer::TCPServer(int maxClients,string service,ConnectionManager * mgr)
{
this->mgr=mgr;
nClients=0;
this->maxClients = maxClients;
socket = new TCPSocket("",service,ANY_F,maxClients);
struct addrinfo * p=NULL;
p = socket->getInfo();
for(;p!=NULL;p=p->ai_next)
{
try
{
int yes=1;
socket->socket(p);
socket->setSockOpt(SOL_SOCKET,SO_REUSEADDR,&yes,sizeof yes);
socket->setSockOpt(IPPROTO_TCP,TCP_NODELAY ,&yes,sizeof yes);
//socket->setNblock();
socket->bind(p);
break;
}
catch(exception * e)
{
printf("TCPServer:%s\n",e->what());
delete e;
}
}
if(p==NULL)
throw new ExTCPServer(E_SOCKET_ERROR);
socket->setInfo(p);
}
TCPServer::~TCPServer()
{
socket->free();
delete socket;
}
void TCPServer::startListener()
{
TCPSocket * new_socket;
try
{
socket->listen();
}
catch (exception * e)
{
printf("TCPServer::startListener()(listen):%s\n",e->what());
delete e;
throw new ExTCPServer(E_LISTEN_ERROR);
}
while(1)
{
try
{
new_socket = socket->accept();
try
{
ClientManagerOut * cmo = new ClientManagerOut(*new_socket);
struct cthreads ct = {new ClientManagerIn(*new_socket,cmo),cmo};
mgr->addServerClient(ct);
delete new_socket;
}
catch(vortex::Exception * e)
{
cout << "TCPServer::startListener()(incoming_handler):%s\n" << e->what() << endl;
delete e;
}
}
catch (vortex::Exception * e)
{
printf("Polling: No new clients:%s\n",e->what());
Event::usleep(10000);
delete e;
}
}
}
| [
"twk.theainur@37e2baaa-b253-11dd-9381-bf584fb1fa83"
]
| [
[
[
1,
91
]
]
]
|
d972c0714bb1c5b1de2fa675e319409ee8256a27 | f177993b13e97f9fecfc0e751602153824dfef7e | /ImProSln/MyLib/ARTagCameraDS.h | f359b50608d4b6d5e252619dbe0c20bae3d23bfa | []
| no_license | svn2github/imtophooksln | 7bd7412947d6368ce394810f479ebab1557ef356 | bacd7f29002135806d0f5047ae47cbad4c03f90e | refs/heads/master | 2020-05-20T04:00:56.564124 | 2010-09-24T09:10:51 | 2010-09-24T09:10:51 | 11,787,598 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 854 | h | #pragma once
#include "DSBaseClass.h"
#include "camerads.h"
#include "IARTagFilter.h"
class DSBASECLASSES_API ARTagCameraDS :
public CCameraDS
{
protected:
CComPtr<IBaseFilter> m_pARTagFilter;
CComPtr<IARTagFilter> m_pIARTagFilter;
CComPtr<IPin> m_pARTagInputPin;
CComPtr<IPin> m_pARTagOutputPin;
CComPtr<IBaseFilter> m_pSmartTee;
CComPtr<IPin> m_pSmartTeeInputPin;
CComPtr<IPin> m_pSmartTeeCapturePin;
CComPtr<IPin> m_pSmartTeePreviewPin;
//overwrite CCameraDS function
virtual HRESULT ConnectGraph();
virtual HRESULT CreateFilters(int nCamID, bool bDisplayProperties, int nWidth, int nHeight);
public:
ARTagCameraDS(void);
virtual ~ARTagCameraDS(void);
virtual void CloseCamera();
virtual BOOL SetARCallback(IARTagFilter::CallbackFuncPtr pcallback, int argc, void* argv[]);
virtual BOOL ShowARProp();
};
| [
"ndhumuscle@fa729b96-8d43-11de-b54f-137c5e29c83a"
]
| [
[
[
1,
28
]
]
]
|
7fa66a292e3cbdf24e1ba632a3f8ae67e23ce592 | 8c234510906db9ae4e724c8efb0238892cb3a128 | /otherlibs/GestRec/FindHandCtl.h | 78240da5e7beedb1f371226140e14773104214af | [
"BSD-3-Clause"
]
| permissive | hcl3210/opencv | 7b8b752982afaf402a361eb8475c24e7f4c08671 | b34b1c3540716a3dadfd2b9e3bbc4253774c636d | refs/heads/master | 2020-05-19T12:45:52.864577 | 2008-08-20T01:57:54 | 2008-08-20T01:57:54 | 177,025 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,129 | h | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// Intel License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of Intel Corporation may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/#if !defined(_GESTURE_RECOGNIZER_H_)
#define _GESTURE_RECOGNIZER_H_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#pragma warning(disable:4786)
#if defined(GESTREC_EXPORTS)
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT
#endif
// FindHandCtl.h : Declaration of the CFindHandCtrl ActiveX Control class.
/////////////////////////////////////////////////////////////////////////////
// CFindHandCtrl : See FindHandCtl.cpp for implementation.
#define GR_NOTHING 0
#define GR_TRAIN 1
#define GR_RECOGNIZE 2
#define GR_RESEACH 1
#define GR_LINE
//#define GR_CONTOUR
//#define GR_IMPROVING // improving of the initial hand mask by the using previous result hand mask
#include "cv.h"
#include <vector>
using namespace std;
typedef vector<CvHuMoments> feature_vector;
typedef vector<float> fvector;
typedef struct _gr_pose : public fvector
{
__int64 time;
CvHuMoments pose;
} gr_pose;
class DLL_EXPORT CFindHandCtrl
{
// Constructor
public:
CFindHandCtrl();
~CFindHandCtrl();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFindHandCtrl)
public:
/* virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);*/
//}}AFX_VIRTUAL
// Implementation
public:
/* Some user stuff*/
vector<feature_vector> m_features;
feature_vector m_avgs;
vector<string> m_gestureNames;
vector<fvector> m_covMatrices;
vector<bool> m_isCovMatCalculated;
long m_gestureCode;
vector<IplImage*> m_dgMasks;
vector<gr_pose> m_geomParams;
long m_minPointCount;
CvPoint3D32f* m_pointCloudBuffer;
long m_pointCount;
long m_handImage;
long m_errNo;
string m_errString;
long m_rawImage;
long m_task;
string m_path;
BOOL m_dynamicGesture;
string m_dGestureName;
string GetGestureName();
void SetGestureName(std::string name);
BOOL m_dynGestureFixed;
BOOL m_saveDynGest;
long GetGestureCode();
void SetGestureCode(long nNewValue);
long GetRecognizedCode();
void SetRecognizedCode(long nNewValue);
BOOL FitLine();
BOOL FindHand(_int64 _time, BOOL ForCenterOnly);
BOOL LoadGestures(LPCTSTR FileName);
BOOL SaveGestures(LPCTSTR FileName);
void UpdateDynGest();
public:
CvMemStorage* m_storage;
void StoreDynGesture(IplImage* mask_rez, __int64 _time);
string GetRecognizedName();
string m_recognizedGesture;
int m_segThresh;
int m_trainFrameCount;
IplImage* m_mask;
void ClearGesture(string name);
BOOL IsGestureFixed() {return m_dynGestureFixed; }
void ReleaseFixedGesture() { m_dynGestureFixed = FALSE; ClearDynGest(); }
void SetTask(long task);
BOOL m_staticGesture;
float m_center[3];
IplImage* m_disparityImage;
IplImage* m_outputImage;
IplImage* m_inputImage;
float m_line[6];
void SetPointBuffer(CvPoint3D32f* buffer);
//int m_dgFrameCount;
BOOL m_dgFrameFound;
BOOL _FindHand(_int64 _time, BOOL ForCenterOnly);
BOOL _RectifyInputMask(BOOL ForCenterOnly);
void CalculateCovarianceMatrix();
int m_maskImprovigFlag; // flag for the initial mask improving (0 for default)
int m_convexDefCount; // counter of the convexity defects
vector<float> m_DefectsDepth;
private:
long m_time;
void ClearDynGest();
int m_dgFrameThreshold;
string m_num;
BOOL InitModulePath();
FILE* m_dgHandle;
void SaveDynGestures();
float* m_linePre;
IplImage* m_maskPre; // pointer to the previous initial hand mask
IplImage* m_resPre; // pointer to the previous result hand mask
int m_gestureIndex;
string Recognize(IplImage* image);
string LogClassification(); // logical classification of the static gestures
long m_recognizedCode;
CvHuMoments CalculateHuMoments(IplImage* image);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(_GESTURE_RECOGNIZER_H_)
| [
"[email protected]"
]
| [
[
[
1,
191
]
]
]
|
dd232889aac87357ac62e6f57e191e95f26abe5f | 87ff03fd1b5a4642773a5a001165b595cfacd60d | /WinampRemoteMedia/winampplugin/Cajun/writer.cpp | 9432aff5021f84a40860f3243be459749c8891ac | []
| no_license | jubbynox/googlegadets | f7f16b2eb417871601a33d2f1f5615b3a007780a | 79e94a0af754b0f3dfed59f73aeaa3bff39dafa5 | refs/heads/master | 2021-01-10T21:46:45.901272 | 2010-02-06T13:38:25 | 2010-02-06T13:38:25 | 32,803,954 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,826 | cpp | /**********************************************
License: BSD
Project Webpage: http://cajun-jsonapi.sourceforge.net/
Author: Terry Caton, tcaton(a)hotmail.com
TODO: additional documentation.
***********************************************/
#include "writer.h"
#include <iostream>
/*
TODO:
* better documentation
* unicode character encoding
*/
namespace json
{
void Writer::Write(const Element& elementRoot, std::ostream& ostr) {
Writer writer(ostr);
elementRoot.Accept(writer);
ostr.flush(); // all done
}
void Writer::Visit(const Array& array) {
if (array.Empty())
m_ostr << "[]";
else
{
m_ostr << '[' << std::endl;
++m_nTabDepth;
Array::const_iterator it(array.Begin()),
itEnd(array.End());
while (it != itEnd) {
m_ostr << std::string(m_nTabDepth, '\t');
it->Accept(*this);
if (++it != itEnd)
m_ostr << ',';
m_ostr << std::endl;
}
--m_nTabDepth;
m_ostr << std::string(m_nTabDepth, '\t') << ']';
}
}
void Writer::Visit(const Object& object) {
if (object.Empty())
m_ostr << "{}";
else
{
m_ostr << '{' << std::endl;
++m_nTabDepth;
Object::const_iterator it(object.Begin()),
itEnd(object.End());
while (it != itEnd) {
m_ostr << std::string(m_nTabDepth, '\t') << '"' << it->name << "\" : ";
it->element.Accept(*this);
if (++it != itEnd)
m_ostr << ',';
m_ostr << std::endl;
}
--m_nTabDepth;
m_ostr << std::string(m_nTabDepth, '\t') << '}';
}
}
void Writer::Visit(const Number& number) {
m_ostr << number;
}
void Writer::Visit(const Boolean& booleanElement) {
m_ostr << (booleanElement ? "true" : "false");
}
void Writer::Visit(const Null& nullElement) {
m_ostr << "null";
}
void Writer::Visit(const String& stringElement) {
m_ostr << '"';
const std::string& s = stringElement;
std::string::const_iterator it(s.begin()),
itEnd(s.end());
for (; it != itEnd; ++it)
{
switch (*it)
{
case '"': m_ostr << "\\\""; break;
case '\\': m_ostr << "\\\\"; break;
case '\b': m_ostr << "\\b"; break;
case '\f': m_ostr << "\\f"; break;
case '\n': m_ostr << "\\n"; break;
case '\r': m_ostr << "\\r"; break;
case '\t': m_ostr << "\\t"; break;
//case '\u': m_ostr << ""; break; ??
default: m_ostr << *it; break;
}
}
m_ostr << '"';
}
} // End namespace | [
"jubbynox@9a519766-8835-0410-a643-67b8b61f6624"
]
| [
[
[
1,
120
]
]
]
|
8827fe25f1d9895a7d6ca712b584167d35a06dc4 | 68127d36b179fd5548a1e593e2c20791db6b48e3 | /programacaoC/trab2.cpp | 5a8d1982bb97da92e8e320611a0014236e6ab247 | []
| no_license | renatomb/engComp | fa50b962dbdf4f9387fd02a28b3dc130b683ed02 | b533c876b50427d44cfdb92c507a6e74b1b7fa79 | refs/heads/master | 2020-04-11T06:22:05.209022 | 2006-04-26T13:40:08 | 2018-12-13T04:25:08 | 161,578,821 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,646 | cpp | #include <iostream.h>
#include <stdio.h>
#include <string.h>
#define f 1
class ccheque {
private:
char fulano[40];
int inscricao;
float salhn, salhe, deducao, liquido;
public:
void init(int ins,int cla,int hno,int hex,char nome[]);
void imprime();
};
float sref;
void main() {
char nome[40];
int ins, cla, hno, hex;
cout << "Entre com o valor do salario de referencia: ";
cin >> sref;
ccheque vetor[f];
for (int i=0;i<f;i++){
cout << "\nEntre com os dados do funcionario " << (i+1) << ": ";
cout << "\nInscricao: ";
cin >> ins;
cout << "Nome: ";
gets(nome);
cout << "Classe: ";
cin >> cla;
cout << "Horas normais: ";
cin >> hno;
cout << "Horas extras: ";
cin >> hex;
vetor[i].init(ins,cla,hno,hex,nome);
}
for (i=0;i<f;i++){
vetor[i].imprime();
}
}
void ccheque::init(int ins,int cla,int hno,int hex,char nome[]) {
float base, bruto;
inscricao=ins;
switch (cla) {
case 1:
base=1.3*sref;
break;
case 2:
base=1.9*sref;
break;
}
salhn=hno*base;
salhe=hex*1.3*base;
bruto=salhn+salhe;
deducao=bruto*(0.08);
liquido=bruto-deducao;
strcpy(fulano,nome);
}
void ccheque::imprime() {
cout << "\n************************************************************************";
cout << "\n* N. Insc.: " << inscricao << " Nome: " << fulano;
cout << "\n* Salario horas normais: " << salhn;
cout << "\n* Salario horas extras: " << salhe;
cout << "\n* Deducao INSS: " << deducao;
cout << "\n* Salario liquido: " << liquido;
cout << "\n************************************************************************";
}
| [
"[email protected]"
]
| [
[
[
1,
70
]
]
]
|
e311c1e9cd8c716889dcc20bdf93cbf411b7fb8d | 4891542ea31c89c0ab2377428e92cc72bd1d078f | /GameEditor/Oblong.h | 7ef86be11af11f5798eb6be0b248d11467863192 | []
| no_license | koutsop/arcanoid | aa32c46c407955a06c6d4efe34748e50c472eea8 | 5bfef14317e35751fa386d841f0f5fa2b8757fb4 | refs/heads/master | 2021-01-18T14:11:00.321215 | 2008-07-17T21:50:36 | 2008-07-17T21:50:36 | 33,115,792 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,463 | h | /*
*author: koutsop
*/
#ifndef OBLONG_H
#define OBLONG_H
#include "Point.h"
class Oblong{
Point pointUpLeft, pointDownRight;
int width, height;
public:
Oblong( const int _x1 = 0,
const int _y1 = 0,
const int _x2 = 0,
const int _y2 = 0,
const int _width = 0,
const int _height = 0);
Oblong( const Point _pointUpLeft,
const Point _pointDownRight,
const int _width,
const int _height);
Oblong( const Point * const _pointUpLeft,
const Point * const _pointDownRight,
const int _width,
const int _height);
//copy constructor
Oblong(const Oblong &oblong);
//destructor
virtual~Oblong() {}
/* @target: Na epistrefei weigth apo ena object Oblong.
* @return: thn thmh pou exei to width.
*/
int GetWidth(void) const { return width; }
/* @target: Na epistrefei height apo ena object Oblong.
* @return: thn thmh pou exei to height.
*/
int GetHeight(void) const { return height; }
/* @target: Na epistrefei to panw aristera point enos object Oblong.
* @return: thn thmh pou exei to panw aristera point.
*/
Point GetPointUpLeft() const { return pointUpLeft; }
/* @target: Na epistrefei to katw de3ia point enos object Oblong.
* @return: thn thmh pou exei to katw de3ia point.
*/
Point GetPointDownRight() const { return pointDownRight; }
/* @target: Na 8etei thn thmh tou width apo ena object Oblong.
* @param : Thn thmh pou 8a parei to width.
*/
void SetWidth(int width) { this->width = width; }
/* @target: Na 8etei thn thmh tou height apo ena object Oblong.
* @param : Thn thmh pou 8a parei to width.
*/
void SetHeight(int height) { this->height = height; }
/* @target: Na 8etei thn thmh tou panw aristero point
* @param : Ena point me thn thmh pou 8a parei to panw aristero point
*/
void SetPointUpLeft(Point );
/* @target: Na 8etei thn thmh tou katw de3ia point
* @param : Ena point me thn thmh pou 8a parei to katw de3ia point
*/
void SetPointDownRight(Point );
/* @target: Na 8etei thn thmh tou panw aristera point
* @param : Duo sentetagmenes x,y me ths times pou 8a parei to panw aristera point
*/
void SetPointUpLeft(int , int);
/* @target: Na 8etei thn thmh tou katw de3ia point
* @param : Duo sentetagmenes x,y me ths times pou 8a parei to katw de3ia point
*/
void SetPointDownRight(int , int );
};
#endif //define OBLONG_H
| [
"koutsop@5c4dd20e-9542-0410-abe3-ad2d610f3ba4"
]
| [
[
[
1,
90
]
]
]
|
458b8b144aaf5f0059487c80a8158a72464cbff9 | 1736474d707f5c6c3622f1cd370ce31ac8217c12 | /ClrHost/Main.cpp | 37afa0a8397983df338085fb5f1885f0f9c8fd99 | []
| no_license | arlm/pseudo | 6d7450696672b167dd1aceec6446b8ce137591c0 | 27153e50003faff31a3212452b1aec88831d8103 | refs/heads/master | 2022-11-05T23:38:08.214807 | 2011-02-18T23:18:36 | 2011-02-18T23:18:36 | 275,132,368 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,426 | cpp | /*
This is a simple CLR hosting program. It shows how Pseudo classes can be used to greatly simplify the work
required to write a simple shim program such as this. The code is more readable and much smaller than
it would otherwise be. johnls-5/9/2008
*/
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#include <Pseudo\ValueType.hpp>
#include <Pseudo\String.hpp>
#include <Pseudo\\StringBuilder.hpp>
#include <Pseudo\Environment.hpp>
#include <Pseudo\Path.hpp>
#include <Pseudo\File.hpp>
#include <Pseudo\Console.hpp>
#include <Pseudo\ComPtr.hpp>
#include <Pseudo\Exception.hpp>
#include <Pseudo\Trace.hpp>
#include <mscoree.h>
#include <corhlpr.h>
#include <ole2.h>
#include <oleauto.h>
#include <metahost.h>
#import <mscorlib.tlb> raw_interfaces_only high_property_prefixes("get_","put_","putref_") rename("ReportEvent", "ReportEvent2")
#pragma comment(lib, "mscoree.lib")
using namespace Pseudo;
Int _cdecl wmain(Int argc, Char* argv[])
{
Trace::get_Listeners().Add(new DefaultTraceListener());
const Char *configExt = L".config";
Int ret = 0;
// Check that we have a program to run
if (argc < 5)
{
Console::WriteLine(L"usage: clrhost <assemblyName> <typeName> <methodName> <argument>]");
return 0;
}
// Find the program to run based in the PATH. When we find it we have
// enough info to start the CLR and launch the program in it.
String path;
Environment::GetVariable(L"PATH", path);
Array<String> dirs;
path.Split(';', dirs);
String assemblyName(argv[1]);
String typeName(argv[2]);
String methodName(argv[3]);
String argument(argv[4]);
Int i = 0;
for (; i < dirs.get_Count(); i++)
{
if (File::Exists(assemblyName))
{
break;
}
}
if (i == dirs.get_Count())
{
// We didn't find a .config file
Console::WriteLine(L"error: Could not find '%s' in PATH", (const Char*)assemblyName);
}
String assemblyConfig(Path::Combine(dirs[i], configExt));
Trace::WriteLine(String::Format(L"Running '%s'", assemblyName.get_Ptr()));
Trace::WriteLine(String::Format(L"DEVPATH=%s", Environment::GetVariable(L"DEVPATH").get_Ptr()));
try
{
// Load the .config and create an IStream for it
Array<Byte> config;
File::ReadAllBytes(assemblyConfig, config);
ComPtr<IStream> piCfgStream;
HGLOBAL hGlobal = GlobalAlloc(0, config.get_Count());
memcpy((void*)hGlobal, config.get_Ptr(), config.get_Count());
::CreateStreamOnHGlobal(hGlobal, TRUE, (LPSTREAM*)&piCfgStream);
typedef HRESULT (WINAPI *PFNCLRCREATEINSTANCE)(REFCLSID rclsid, REFIID riid, LPVOID *ppInterface);
HMODULE hMscoree = LoadLibrary(L"mscoree.dll");
// Check if any CLR is installed
if (hMscoree == NULL || hMscoree == INVALID_HANDLE_VALUE)
{
Console::WriteLine(L"error: Unable to load mscoree.dll. .NET must be installed.");
return -1;
}
PFNCLRCREATEINSTANCE pfnCLRCreateInstance = (PFNCLRCREATEINSTANCE)(::GetProcAddress(hMscoree, "CLRCreateInstance"));
if (pfnCLRCreateInstance == NULL)
{
Console::WriteLine(L"error: Unable to find correct entry point in mscoree.dll. .NET 4.0 required.");
return -1;
}
// CLR v4.0 must have been installed at one point.
ComPtr<ICLRMetaHostPolicy> piClrMetaHostPolicy;
HRESULT hr = pfnCLRCreateInstance(CLSID_CLRMetaHostPolicy, IID_ICLRMetaHostPolicy, (void**)&piClrMetaHostPolicy);
if (FAILED(hr) || piClrMetaHostPolicy == NULL)
{
throw Pseudo::ComException(hr);
}
ComPtr<ICLRRuntimeInfo> piClrRuntimeInfo;
StringBuilder version(128);
DWORD versionLength = (DWORD)version.get_Capacity();
StringBuilder imageVersion(128);
DWORD imageVersionLength = (DWORD)imageVersion.get_Capacity();
DWORD configFlags = 0;
THROW_BAD_HRESULT(piClrMetaHostPolicy->GetRequestedRuntime(
METAHOST_POLICY_HIGHCOMPAT,
assemblyName.get_Ptr(),
piCfgStream,
version.get_Ptr(),
&versionLength,
imageVersion.get_Ptr(),
&imageVersionLength,
&configFlags,
IID_ICLRRuntimeInfo,
(void**)&piClrRuntimeInfo));
ComPtr<ICLRRuntimeHost> piClrRuntimeHost;
THROW_BAD_HRESULT(piClrRuntimeInfo->GetInterface(CLSID_CLRRuntimeHost, IID_ICLRRuntimeHost, (void**)&piClrRuntimeHost));
ComPtr<mscorlib::_AppDomain> piAppDomain;
DWORD retVal;
THROW_BAD_HRESULT(piClrRuntimeHost->ExecuteInDefaultAppDomain(
assemblyName.get_Ptr(),
typeName.get_Ptr(),
methodName.get_Ptr(),
argument.get_Ptr(),
&retVal));
ret = (Int)retVal;
}
catch (ComException& e)
{
Console::WriteLine(L"error: Unable to start CLR and execute application (0x%x)", e.get_HResult());
return -1;
}
return ret;
} | [
"[email protected]"
]
| [
[
[
1,
169
]
]
]
|
58483bd547bd9c02702b9ddcea2a4d6f888b30c8 | 2112057af069a78e75adfd244a3f5b224fbab321 | /branches/refactor/src_root/src/common/config.cpp | d8349c56d2dbcf971921ae687d2dacf22e31c1c7 | []
| no_license | blockspacer/ireon | 120bde79e39fb107c961697985a1fe4cb309bd81 | a89fa30b369a0b21661c992da2c4ec1087aac312 | refs/heads/master | 2023-04-15T00:22:02.905112 | 2010-01-07T20:31:07 | 2010-01-07T20:31:07 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,880 | cpp | /**
* @file config.cpp
* Configuration options storage class
*/
/* Copyright (C) 2005 ireon.org developers council
* $Id: config.cpp 317 2005-11-29 11:34:39Z zak $
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#include "stdafx.h"
#include "config.h"
#include "file/file.h"
CConfig::CConfig()
{
// we add sections in setSetting, so we shouldn't need this
// mSettings[BLANK_STRING] = new SettingsMultiMap();
}
//-----------------------------------------------------------------------
CConfig::~CConfig()
{
SettingsBySection::iterator seci, secend;
secend = mSettings.end();
for (seci = mSettings.begin(); seci != secend; ++seci)
{
delete seci->second;
}
}
//-----------------------------------------------------------------------
void CConfig::clear(void)
{
for (SettingsBySection::iterator seci = mSettings.begin();
seci != mSettings.end(); ++seci)
{
delete seci->second;
}
mSettings.clear();
}
//-----------------------------------------------------------------------
void CConfig::load(const String& filename, const String& separators)
{
/* Open the configuration file */
FilePtr f(new CFile);
if( !f )
return;
f->open(filename.c_str(),"r");
if( !f->isOpen() )
return;
CData d(f.get());
load(d,separators);
}
//-----------------------------------------------------------------------
void CConfig::load(CData& d, const String& separators)
{
assert( separators.length() > 0 );
String currentSection = BLANK_STRING;
SettingsMultiMap* currentSettings = addSection(currentSection);
/*
if( mSettings.find(currentSection) == mSettings.end() )
{
currentSettings = new SettingsMultiMap();
mSettings[currentSection] = currentSettings;
} else
currentSettings = mSettings[currentSection];
*/
/* Process the file line for line */
String line, optName, optVal;
while (!d.end())
{
d.getS(2048,line);
boost::algorithm::trim(line);
/* Ignore comments & blanks */
if (line.length() > 0 && line.at(0) != '#' && line.at(0) != '@')
{
if (line.at(0) == '[' && line.at(line.length()-1) == ']')
{
// Section
currentSection = line.substr(1, line.length() - 2);
boost::algorithm::trim(currentSection);
currentSettings = addSection(currentSection);
SettingsBySection::const_iterator seci = mSettings.find(currentSection);
if (seci == mSettings.end())
{
currentSettings = new SettingsMultiMap();
mSettings[currentSection] = currentSettings;
}
else
{
currentSettings = seci->second;
}
}
else
{
/* Find the first seperator character and split the string there */
uint i = 0;
uint separator_pos = 0;
do {
separator_pos = line.find(separators.at(i), 0);
++i;
} while ((i < separators.length()) && (separator_pos == std::string::npos));
if (separator_pos != std::string::npos)
{
optName = line.substr(0, separator_pos);
/* Find the first non-seperator character following the name */
// int nonseparator_pos = line.find_first_not_of(separators, separator_pos);
/* ... and extract the value */
/* Make sure we don't crash on an empty setting (it might be a valid value) */
// optVal = (nonseparator_pos == std::string::npos) ? "" : line.substr(nonseparator_pos);
optVal = line.substr(separator_pos+1);
boost::algorithm::trim(optVal);
boost::algorithm::trim(optName);
//setSetting(optName, optVal, currentSection);
currentSettings->insert(std::multimap<String, String>::value_type(optName, optVal));
}
}
}
}
}
//-----------------------------------------------------------------------
CConfig::SettingsMultiMap* CConfig::addSection(const String& sectionName)
{
SettingsMultiMap* currentSettings;
SettingsBySection::const_iterator seci = mSettings.find(sectionName);
if (seci == mSettings.end())
{
currentSettings = new SettingsMultiMap();
mSettings[sectionName] = currentSettings;
}
else
{
currentSettings = seci->second;
}
return currentSettings;
}
//-----------------------------------------------------------------------
void CConfig::setSetting(const String& key, const String& value, const String& sect)
{
addSection(sect);
if( mSettings.find(sect) == mSettings.end() ) {
assert(1); // hey, we added section, this can't be true:)
return;
}
if( mSettings[sect]->find(key) != mSettings[sect]->end())
(*mSettings[sect]->find(key)).second = value;
else
mSettings[sect]->insert(std::multimap<String, String>::value_type(key, value));
};
//-----------------------------------------------------------------------
String CConfig::getSetting(const String& key, const String& section) const
{
SettingsBySection::const_iterator seci = mSettings.find(section);
if (seci == mSettings.end())
{
return BLANK_STRING;
}
else
{
SettingsMultiMap::const_iterator i = seci->second->find(key);
if (i == seci->second->end())
{
return BLANK_STRING;
}
else
{
return i->second;
}
}
}
//-----------------------------------------------------------------------
StringVector CConfig::getMultiSetting(const String& key, const String& section) const
{
StringVector ret;
SettingsBySection::const_iterator seci = mSettings.find(section);
if (seci != mSettings.end())
{
SettingsMultiMap::const_iterator i;
i = seci->second->find(key);
// Iterate over matches
while (i != seci->second->end() && i->first == key)
{
ret.push_back(i->second);
++i;
}
}
return ret;
}
//-----------------------------------------------------------------------
bool CConfig::checkRequiredOptions(std::vector<const char*>* requiredOptions)
{
for( std::vector<const char*>::iterator i = requiredOptions->begin(); i != requiredOptions->end(); i++ )
if( getSetting(*i) == "" ) {
CLog::instance()->log(CLog::msgFlagResources, CLog::msgLvlCritical, _("Can't find required option '%s' in config file.\n"),*i);
return false;
}
return true;
}
| [
"[email protected]"
]
| [
[
[
1,
237
]
]
]
|
02770db419e510aafaec0ee8ca602131b7d7b1e4 | 07f0b2dcc8370ab0adfe9bf2abebcaffdd1d618c | /wordgenerator.cpp | 662d73e70e13759172591ff738f9b089c00ecb43 | []
| no_license | piotrjan01/pwaalproject | e01f7956e2e2acb3722215695b05371bc328b809 | dd81bd128c6073c3eb29efbf902edde74c4d8138 | refs/heads/master | 2020-04-17T06:07:51.173243 | 2010-01-12T18:20:20 | 2010-01-12T18:20:20 | 33,796,679 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 504 | cpp | #include "wordgenerator.h"
#include <ctime>
#include <cstdlib>
#include <sstream>
WordGenerator::WordGenerator()
{
}
QString WordGenerator::generateWord(int alfaSize, int length) {
string alfabet = "abcdefghijklmnopqrstuvwxyz";
stringstream ss;
if (alfaSize > (int)alfabet.size()) alfaSize = alfabet.size();
srand((unsigned)time(0));
for (int i=0; i<length; i++) {
ss<<alfabet[(rand() % alfaSize)];
}
return QString(ss.str().c_str());
}
| [
"gwizdek@ff063b32-fc41-11de-b5bc-ffd2847a4b57"
]
| [
[
[
1,
24
]
]
]
|
b45da2e0cf58e17b4c5128cbe11e7ea59e9ef6b7 | 38741e44bb5ad550ea7327d2b75b96b487a0c912 | /ui_password.cpp | 3ca0ef8b8f834dc373b3e26d485272bb003fd9af | []
| no_license | jemyzhang/SmsSync | f755991df1b21564c0f92cfd1888b1682be0ae1c | 3c622a35a7a293dc37a58a0d4f07062380d772fb | refs/heads/master | 2018-12-28T21:20:55.539154 | 2009-10-17T01:53:54 | 2009-10-17T01:53:54 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,283 | cpp | #include "ui_password.h"
#include "ui_ui_password.h"
#include "LocalDataBase.h"
#include <QMessageBox>
extern wchar_t g_password[256];
extern int g_password_len;
Ui_PasswordWnd::Ui_PasswordWnd(QWidget *parent) :
QDialog(parent),
m_ui(new Ui::Ui_PasswordWnd)
{
m_ui->setupUi(this);
m_ui->EditPassword->setEchoMode(QLineEdit::Password);
}
Ui_PasswordWnd::~Ui_PasswordWnd()
{
delete m_ui;
}
void Ui_PasswordWnd::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
m_ui->retranslateUi(this);
break;
default:
break;
}
}
void Ui_PasswordWnd::on_btnOK_clicked()
{
LocalDataBase ldb;
QString s = m_ui->EditPassword->text();
wchar_t defaultpwd[6] = {0x10,0x15,0x13,0x18,0x08,0x01};
if(s.isEmpty()){
g_password_len = 6;
memcpy(g_password,defaultpwd,sizeof(wchar_t)*6);
}else{
g_password_len = s.toWCharArray(g_password);
}
if(!ldb.checkpwd(g_password,g_password_len)){
QMessageBox::critical(this,"Password","Password Invalid...");
}else{
done(QDialog::Accepted);
}
}
void Ui_PasswordWnd::on_btnCancel_clicked()
{
done(QDialog::Rejected);
}
| [
"jemyzhang@05e1e486-4114-9245-ba8c-4c24bf553a5c"
]
| [
[
[
1,
55
]
]
]
|
fde2f5687d5bc893b45b3e877a512abd97abeb37 | 478570cde911b8e8e39046de62d3b5966b850384 | /apicompatanamdw/bcdrivers/mw/classicui/uifw/apps/bctestutil/src/bctestutil.cpp | 6ae1c0aa5eb8d2e852615b56067b40539f6d8e13 | []
| no_license | SymbianSource/oss.FCL.sftools.ana.compatanamdw | a6a8abf9ef7ad71021d43b7f2b2076b504d4445e | 1169475bbf82ebb763de36686d144336fcf9d93b | refs/heads/master | 2020-12-24T12:29:44.646072 | 2010-11-11T14:03:20 | 2010-11-11T14:03:20 | 72,994,432 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,429 | cpp | /*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: Test utility, the interface of test framework.
*
*/
#include <eikenv.h>
#include "bctestutil.h"
#include "bctestsuite.h"
#include "bctestlogger.h"
#include "bctestkeyfeeder.h"
// ======== MEMBER FUNCTIONS ========
// ---------------------------------------------------------------------------
// C++ default Constructor
// ---------------------------------------------------------------------------
//
CBCTestUtil::CBCTestUtil()
{
}
// ---------------------------------------------------------------------------
// 2nd Constructor
// ---------------------------------------------------------------------------
//
void CBCTestUtil::ConstructL()
{
CEikonEnv* eikonEnv = CEikonEnv::Static();
iLogger = CBCTestLogger::NewL( eikonEnv );
iTestSuite = new( ELeave ) CBCTestSuite( iLogger );
iKeyFeeder = new( ELeave ) CBCTestKeyFeeder();
iKeyFeeder->SetSuite( iTestSuite );
iAutoTest.scripts = NULL;
iAutoTest.countArray = NULL;
iAutoTest.scriptCount = 0;
}
// ---------------------------------------------------------------------------
// static ConstructL
// ---------------------------------------------------------------------------
//
EXPORT_C CBCTestUtil* CBCTestUtil::NewL()
{
CBCTestUtil* util = new( ELeave ) CBCTestUtil();
CleanupStack::PushL( util );
util->ConstructL();
CleanupStack::Pop( util );
return util;
}
// ---------------------------------------------------------------------------
// Destructor
// ---------------------------------------------------------------------------
//
EXPORT_C CBCTestUtil::~CBCTestUtil()
{
delete iKeyFeeder;
delete [] iAutoTest.countArray;
delete [] iAutoTest.scripts;
iAutoTest.nameArray.Close();
delete iTestSuite;
delete iLogger;
}
// ---------------------------------------------------------------------------
// CBCTestUtil::RunL
// Execute automatic test.
// ---------------------------------------------------------------------------
//
EXPORT_C void CBCTestUtil::RunL()
{
iTestSuite->BuildScriptsL( &iAutoTest );
iKeyFeeder->StartAutoTestL( &iAutoTest );
}
// ---------------------------------------------------------------------------
// CBCTestUtil::RunL
// Execute a command specified by the command.
// ---------------------------------------------------------------------------
//
EXPORT_C void CBCTestUtil::RunL( TInt aCmd )
{
iTestSuite->RunL( aCmd );
}
// ---------------------------------------------------------------------------
// CBCTestUtil::AddTestCaseL
// Add test case to test suite.
// ---------------------------------------------------------------------------
//
EXPORT_C void CBCTestUtil::AddTestCaseL( CBCTestCase* aTestCase, const TDesC& aName )
{
iTestSuite->AddTestCaseL( aTestCase, aName );
}
| [
"none@none"
]
| [
[
[
1,
110
]
]
]
|
0845451e40be9288b762ae61b6ade8d374de3bf0 | 65dee2b7ed8a91f952831525d78bfced5abd713f | /winmob/XfMobile_WM5/Gamepe/ImageButton.cpp | 9969cee0560c43b8ea3bc2ec3b2fbde5e766742b | []
| no_license | felixnicitin1968/XFMobile | 0249f90f111f0920a423228691bcbef0ecb0ce23 | 4a442d0127366afa9f80bdcdaaa4569569604dac | refs/heads/master | 2016-09-06T05:02:18.589338 | 2011-07-05T17:25:39 | 2011-07-05T17:25:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,425 | cpp | // ImageButton.cpp : implementation file
//
#include "stdafx.h"
#include "ImageButton.h"
#include "global.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CImageButton
CImageButton::CImageButton(UINT up, UINT down, UINT disabled, BOOL fill)
{
this->up = up;
this->down = down;
this->disabled = disabled;
this->m_fill = fill;
}
CImageButton::~CImageButton()
{
}
BEGIN_MESSAGE_MAP(CImageButton, CButton)
//{{AFX_MSG_MAP(CImageButton)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CImageButton message handlers
/****************************************************************************
* CImageButton::SetVPos
* Inputs:
* DWORD newstyle: Vertical style, one of BS_TOP, BS_BOTTOM, BS_VCENTER
* Result: DWORD
* Previous style
* Effect:
* Sets the style
****************************************************************************/
DWORD CImageButton::SetVPos(DWORD newstyle)
{
DWORD style = GetStyle();
DWORD result = style;
style &= ~ (BS_TOP | BS_BOTTOM | BS_VCENTER);
style |= newstyle;
::SetWindowLong(m_hWnd, GWL_STYLE, (long)style);
InvalidateRect(NULL);
return result & (BS_TOP | BS_BOTTOM | BS_VCENTER);
} // CImageButton::SetVPos
/****************************************************************************
* CImageButton::SetHPos
* Inputs:
* DWORD newstyle: Horizontal style, one of BS_LEFT, BS_RIGHT, BS_CENTER
* Result: DWORD
* Previous style
* Effect:
* Sets the style
****************************************************************************/
DWORD CImageButton::SetHPos(DWORD newstyle)
{
DWORD style = GetStyle();
DWORD result = style;
style &= ~ (BS_LEFT | BS_RIGHT | BS_CENTER);
style |= newstyle;
::SetWindowLong(m_hWnd, GWL_STYLE, (long)style);
InvalidateRect(NULL);
return result & (BS_LEFT | BS_RIGHT | BS_CENTER);
} // CImageButton::SetHPos
void CImageButton::DrawItem(LPDRAWITEMSTRUCT dis)
{
DisplayImage(GetSafeHwnd(),dis->hDC);
return;
}
| [
"[email protected]"
]
| [
[
[
1,
88
]
]
]
|
7cadb983a538e7801a407b272dca5460c434b701 | 8c234510906db9ae4e724c8efb0238892cb3a128 | /apps/StereoGR/StereoGR.h | a892d6ca13fb05474cb5ce86cee881731c3e6597 | [
"BSD-3-Clause"
]
| permissive | hcl3210/opencv | 7b8b752982afaf402a361eb8475c24e7f4c08671 | b34b1c3540716a3dadfd2b9e3bbc4253774c636d | refs/heads/master | 2020-05-19T12:45:52.864577 | 2008-08-20T01:57:54 | 2008-08-20T01:57:54 | 177,025 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,657 | h | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// Intel License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of Intel Corporation may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/// StereoGR.h : main header file for the STEREOGR application
//
#if !defined(AFX_STEREOGR_H__2B3C951D_D27D_4C2E_983A_8EC824753946__INCLUDED_)
#define AFX_STEREOGR_H__2B3C951D_D27D_4C2E_983A_8EC824753946__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
#include "DGProp.h"
#include "FindHandCtl.h"
#include "GestMan.h"
#include "PGControl.h"
#include "PTOptions.h"
#include "HMMParams.h"
#include "DGStat.h"
#include "GROptions.h"
#include "DynGestServer.h"
/////////////////////////////////////////////////////////////////////////////
// CStereoGRApp:
// See StereoGR.cpp for the implementation of this class
//
#define VIEWS_COUNT ID_VIEW12 - ID_VIEW1 + 1
#define IS_PTGREY_DATATYPE(x) ((x) >= 0 && (x) < PG_IMAGE_MAX)
#define GR_MASK_VIEW PT_POINTCLOUD_IMAGE + 1
#define GR_MAGICCUBE GR_MASK_VIEW + 1
class CStereoGRView;
class CStereoGRApp : public CWinApp
{
private:
BOOL m_isNewData;
CGestRec m_gestRec;
CDGProp* m_dgProp;
CStereoGRView* m_views[VIEWS_COUNT];
int m_viewIds[VIEWS_COUNT];
CString m_modulePath;
int m_docType;
void InitModulePath();
void CreatePropertyPages();
public:
BOOL m_isClosingView;
void Zoom();
void Segment();
HANDLE m_glThread;
vector<POINT> m_TopLefts;
vector<POINT> m_TopLefts3D;
CDynGestServer m_dgServer;
CGROptions* m_grOptions;
CPTOptions* m_ptOptions;
CHMMParams* m_hmmParams;
CDGStat* m_dgStat;
BOOL LoadSettings();
BOOL SaveSettings();
BOOL IsNewData();
void ValidateData(BOOL flag = TRUE);
BOOL m_doRecog;
// void SetImage(int dataType, IplImage* image, BOOL copy = FALSE);
IplImage* GetImage(int dataType);
void Update();
void CloseView(int dataType);
void SetView(int dataType, CStereoGRView* pView);
CStereoGRView* GetView(int dataType) const {return m_views[dataType];};
int* GetViewIDs() const {return (int*)m_viewIds;};
void OpenView(int dataType);
void Process();
CFindHandCtrl m_findHand;
void SetDocType(int docType);
int GetDocType();
CStereoGRApp();
~CStereoGRApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CStereoGRApp)
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CStereoGRApp)
afx_msg void OnAppAbout();
afx_msg void OnFileNew();
afx_msg void OnUpdateFileNew(CCmdUI* pCmdUI);
afx_msg void OnView();
afx_msg void OnPtProp();
afx_msg void OnPtWhitebalance();
afx_msg void OnPtoffline();
afx_msg void OnCaptureBack();
afx_msg void OnRungestrec();
afx_msg void OnSettings();
afx_msg void OnTrain();
afx_msg void OnSaveDynamicGestures();
afx_msg void OnLoadDynamicGestures();
afx_msg void OnSaveBase();
afx_msg void OnLoadBase();
afx_msg void OnRecogFileDg();
afx_msg void OnDeleteHmm();
afx_msg void OnRemoveAllDg();
afx_msg void OnUpdateRungestrec(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#define STEREOGRAPP(x) CStereoGRApp* (x) = (CStereoGRApp*)AfxGetApp();
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STEREOGR_H__2B3C951D_D27D_4C2E_983A_8EC824753946__INCLUDED_)
| [
"[email protected]"
]
| [
[
[
1,
166
]
]
]
|
509afc14b2cd27c90acd7c6461e8d6ed92ac7a93 | 7476d2c710c9a48373ce77f8e0113cb6fcc4c93b | /RakNet/SimpleMutex.cpp | 6b6bc5beffcd4c2d897e53c92a5c35dd5e17c362 | []
| no_license | CmaThomas/Vault-Tec-Multiplayer-Mod | af23777ef39237df28545ee82aa852d687c75bc9 | 5c1294dad16edd00f796635edaf5348227c33933 | refs/heads/master | 2021-01-16T21:13:29.029937 | 2011-10-30T21:58:41 | 2011-10-30T22:00:12 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,280 | cpp | /// \file
///
/// This file is part of RakNet Copyright 2003 Jenkins Software LLC
///
/// Usage of RakNet is subject to the appropriate license agreement.
#include "SimpleMutex.h"
#include "RakAssert.h"
using namespace RakNet;
SimpleMutex::SimpleMutex() //: isInitialized(false)
{
// Prior implementation of Initializing in Lock() was not threadsafe
Init();
}
SimpleMutex::~SimpleMutex()
{
// if (isInitialized==false)
// return;
#ifdef _WIN32
// CloseHandle(hMutex);
DeleteCriticalSection(&criticalSection);
#else
pthread_mutex_destroy(&hMutex);
#endif
}
#ifdef _WIN32
#ifdef _DEBUG
#include <stdio.h>
#endif
#endif
void SimpleMutex::Lock(void)
{
// if (isInitialized==false)
// Init();
#ifdef _WIN32
/*
DWORD d = WaitForSingleObject(hMutex, INFINITE);
#ifdef _DEBUG
if (d==WAIT_FAILED)
{
LPVOID messageBuffer;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &messageBuffer,
0,
NULL
);
// Process any inserts in messageBuffer.
// ...
// Display the string.
//MessageBox( NULL, (LPCTSTR)messageBuffer, "Error", MB_OK | MB_ICONINFORMATION );
RAKNET_DEBUG_PRINTF("SimpleMutex error: %s", messageBuffer);
// Free the buffer.
LocalFree( messageBuffer );
}
RakAssert(d==WAIT_OBJECT_0);
*/
EnterCriticalSection(&criticalSection);
#else
int error = pthread_mutex_lock(&hMutex);
(void) error;
RakAssert(error==0);
#endif
}
void SimpleMutex::Unlock(void)
{
// if (isInitialized==false)
// return;
#ifdef _WIN32
// ReleaseMutex(hMutex);
LeaveCriticalSection(&criticalSection);
#else
int error = pthread_mutex_unlock(&hMutex);
(void) error;
RakAssert(error==0);
#endif
}
void SimpleMutex::Init(void)
{
#ifdef _WIN32
// hMutex = CreateMutex(NULL, FALSE, 0);
// RakAssert(hMutex);
InitializeCriticalSection(&criticalSection);
#else
int error = pthread_mutex_init(&hMutex, 0);
(void) error;
RakAssert(error==0);
#endif
// isInitialized=true;
}
| [
"[email protected]"
]
| [
[
[
1,
167
]
]
]
|
e18d5487a2a40648c2666691c5311d6c744b6d02 | 00fdb9c8335382401ee0a8c06ad6ebdcaa136b40 | /ARM9/source/libs/strpcm.cpp | c3d58100ec3976498eb9789a6e7b290f3d5e42b9 | []
| no_license | Mbmax/ismart-kernel | d82633ba0864f9f697c3faa4ebc093a51b8463b2 | f80d8d7156897d019eb4e16ef9cec8a431d15ed3 | refs/heads/master | 2016-09-06T13:28:25.260481 | 2011-03-29T10:31:04 | 2011-03-29T10:31:04 | 35,029,299 | 1 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 9,220 | cpp |
#include <NDS.h>
//#include <NDS/ARM9/CP15.h>
#include "_console.h"
#include "_consoleWriteLog.h"
#include "_const.h"
#include <stdio.h>
#include <stdlib.h>
#include "memtool.h"
#include "../../ipc6.h"
#include "arm9tcm.h"
#include "maindef.h"
#include "strpcm.h"
#include "splash.h"
#include "plugin/plug_mp2.h"
DATA_IN_DTCM vu64 DPGAudioStream_SyncSamples;
DATA_IN_DTCM u32 DPGAudioStream_PregapSamples;
DATA_IN_DTCM volatile bool VBlankPassedFlag;
DATA_IN_DTCM volatile u32 VBlankPassedCount;
DATA_IN_DTCM static int strpcmVolume64;
DATA_IN_DTCM volatile bool strpcmRequestStop;
DATA_IN_DTCM volatile bool strpcmRingEmptyFlag;
DATA_IN_DTCM volatile u32 strpcmRingBufReadIndex;
DATA_IN_DTCM volatile u32 strpcmRingBufWriteIndex;
DATA_IN_DTCM s16 *strpcmRingLBuf=NULL;
DATA_IN_DTCM s16 *strpcmRingRBuf=NULL;
DATA_IN_DTCM s16 *strpcmSilentBuf=NULL;
static void strpcmUpdate(void);
#include "strpcm_ARM7_SelfCheck.h"
static volatile bool VBlank_AutoFlip=false;
static CODE_IN_ITCM void InterruptHandler_VBlank(void)
{
ARM7_SelfCheck_Check();
VBlankPassedFlag=true;
VBlankPassedCount++;
Splash_IRQVSYNC();
CallBack_ExecuteVBlankHandler();
if(VBlank_AutoFlip==true) pScreenMain->FlipForVSyncAuto();
}
void VBlank_AutoFlip_Enabled(void)
{
VBlank_AutoFlip=true;
}
void VBlank_AutoFlip_Disabled(void)
{
if(VBlank_AutoFlip==false) return;
VBlank_AutoFlip=false;
pScreenMain->Flip(true);
}
// ------------------------------------------
extern void IRQSYNC_MP2_flash(void);
extern void IRQSYNC_MP2_fread(void);
static CODE_IN_ITCM void InterruptHandler_IPC_SYNC(void)
{
// _consolePrintf("CallIPC(%d)\n",IPC6->IR);
switch(IPC6->IR){
case IR_NULL: {
} break;
case IR_NextSoundData: {
strpcmUpdate();
const u32 Samples=IPC6->strpcmSamples;
const u32 Channels=IPC6->strpcmChannels;
DCache_CleanRangeOverrun(IPC6->strpcmLBuf,Samples*2);
if(Channels==2) DCache_CleanRangeOverrun(IPC6->strpcmRBuf,Samples*2);
IPC6->strpcmWriteRequest=0;
} break;
case IR_Flash: {
IRQSYNC_MP2_flash();
} break;
case IR_MP2_fread: {
IRQSYNC_MP2_fread();
} break;
case IR_SyncSamples: {
u64 curs=IPC6->IR_SyncSamples_SendToARM9;
u64 bufs=IPC6->strpcmSamples;
curs+=DPGAudioStream_PregapSamples*4; // gap 4 frames
if(curs<bufs){
curs=0;
}else{
curs-=bufs;
}
DPGAudioStream_SyncSamples=curs;
} break;
}
IPC6->IR=IR_NULL;
}
extern "C" {
extern struct IntTable irqTable[16];
}
void InitInterrupts(void)
{
REG_IME = 0;
irqInit();
irqSet_u32(IRQ_VBLANK,(u32)InterruptHandler_VBlank);
irqSet_u32(IRQ_IPC_SYNC,(u32)InterruptHandler_IPC_SYNC);
irqEnable(IRQ_VBLANK);
REG_IPC_SYNC=IPC_SYNC_IRQ_ENABLE;
VBlankPassedFlag=false;
VBlankPassedCount=0;
{
_consoleLogPause();
_consolePrint("IRQ jump table.\n");
u32 *p=(u32*)irqTable;
while(1){
if(p[1]==0) break;
_consolePrintf("adr=0x%x trig=%x\n",p[0],p[1]);
p+=2;
}
_consolePrint("----------\n");
_consoleLogResume();
}
REG_IME = 1;
}
void strpcmStart(bool FastStart,u32 SampleRate,u32 SamplePerBuf,u32 ChannelCount,EstrpcmFormat strpcmFormat)
{
#ifdef notuseSound
return;
#endif
while(IPC6->strpcmControl!=ESC_NOP){
ARM7_SelfCheck_Check();
}
switch(strpcmFormat){
case SPF_PCMx1: _consolePrintf("strpcm: set format SPF_PCMx1.\n"); break;
case SPF_PCMx2: _consolePrintf("strpcm: set format SPF_PCMx2.\n"); break;
case SPF_PCMx4: _consolePrintf("strpcm: set format SPF_PCMx4.\n"); break;
case SPF_MP2: _consolePrintf("strpcm: set format SPF_MP2.\n"); break;
default: {
_consolePrintf("Fatal error: strpcm unknown format. (%d)\n",strpcmFormat); break;
}
}
switch(strpcmFormat){
case SPF_PCMx1: case SPF_PCMx2: case SPF_PCMx4: case SPF_MP2: {
strpcmRequestStop=false;
u32 Samples=SamplePerBuf;
u32 RingSamples=Samples*strpcmRingBufCount;
strpcmRingEmptyFlag=false;
strpcmRingBufReadIndex=0;
if(FastStart==false){
strpcmRingBufWriteIndex=strpcmRingBufCount-1;
}else{
strpcmRingBufWriteIndex=1;
}
strpcmRingLBuf=(s16*)safemalloc(RingSamples*2);
strpcmRingRBuf=(s16*)safemalloc(RingSamples*2);
strpcmSilentBuf=(s16*)safemalloc(RingSamples*2);
MemSet16CPU(0,strpcmRingLBuf,RingSamples*2);
MemSet16CPU(0,strpcmRingRBuf,RingSamples*2);
MemSet16CPU(0,strpcmSilentBuf,RingSamples*2);
IPC6->strpcmFreq=SampleRate;
IPC6->strpcmSamples=Samples;
IPC6->strpcmChannels=ChannelCount;
IPC6->strpcmFormat=strpcmFormat;
// ------
/*
IPC6->strpcmLBuf=(s16*)safemalloc(Samples*2);
IPC6->strpcmRBuf=(s16*)safemalloc(Samples*2);
MemSet16CPU(0,IPC6->strpcmLBuf,Samples*2);
MemSet16CPU(0,IPC6->strpcmRBuf,Samples*2);
*/
IPC6->strpcmLBuf=NULL;
IPC6->strpcmRBuf=NULL;
} break;
}
// ------
#define _REG_WAIT_CR (*(vuint16*)0x04000204)
// _REG_WAIT_CR|=1 << 7;
IPC6->strpcmControl=ESC_Play;
while(IPC6->strpcmControl!=ESC_NOP){
ARM7_SelfCheck_Check();
}
}
void strpcmStop(void)
{
#ifdef notuseSound
return;
#endif
strpcmRequestStop=true;
// _consolePrint("Wait for terminate. (0)\n");
while(IPC6->strpcmControl!=ESC_NOP){
ARM7_SelfCheck_Check();
}
IPC6->strpcmControl=ESC_Stop;
// _consolePrint("Wait for terminate. (1)\n");
while(IPC6->strpcmControl!=ESC_NOP){
ARM7_SelfCheck_Check();
}
_consolePrint("ARM7 strpcm terminated.\n");
switch(IPC6->strpcmFormat){
case SPF_PCMx1: case SPF_PCMx2: case SPF_PCMx4: case SPF_MP2: {
strpcmRequestStop=false;
strpcmRingEmptyFlag=false;
strpcmRingBufReadIndex=0;
strpcmRingBufWriteIndex=0;
if(strpcmRingLBuf!=NULL){
safefree((void*)strpcmRingLBuf); strpcmRingLBuf=NULL;
}
if(strpcmRingRBuf!=NULL){
safefree((void*)strpcmRingRBuf); strpcmRingRBuf=NULL;
}
if(strpcmSilentBuf!=NULL){
safefree((void*)strpcmSilentBuf); strpcmSilentBuf=NULL;
}
IPC6->strpcmFreq=0;
IPC6->strpcmSamples=0;
IPC6->strpcmChannels=0;
/*
if(IPC6->strpcmLBuf!=NULL){
safefree(IPC6->strpcmLBuf); IPC6->strpcmLBuf=NULL;
}
if(IPC6->strpcmRBuf!=NULL){
safefree(IPC6->strpcmRBuf); IPC6->strpcmRBuf=NULL;
}
*/
IPC6->strpcmLBuf=NULL;
IPC6->strpcmRBuf=NULL;
} break;
}
_consolePrint("strpcm stopped.\n");
}
// ----------------------------------------------
static inline void ins_MemSet16CPU(u16 v,void *dst,u32 len)
{
len>>=1;
if(len==0) return;
u16 *_dst=(u16*)dst;
for(u32 cnt=0;cnt<len;cnt++){
_dst[cnt]=v;
}
}
static inline void ins_MemCopy16CPU(void *src,void *dst,u32 len)
{
len>>=1;
if(len==0) return;
u16 *_src=(u16*)src;
u16 *_dst=(u16*)dst;
for(u32 idx=0;idx<len;idx++){
_dst[idx]=_src[idx];
}
return;
}
void strpcmUpdate(void)
{
#ifdef notuseSound
strpcmRingBufReadIndex=(strpcmRingBufReadIndex+1) & strpcmRingBufBitMask;
return;
#endif
u32 Samples=IPC6->strpcmSamples;
const u32 Channels=IPC6->strpcmChannels;
/*
s16 *ldst=IPC6->strpcmLBuf;
s16 *rdst=IPC6->strpcmRBuf;
if((ldst==NULL)||(rdst==NULL)) return;
*/
/*
if((strpcmRingLBuf==NULL)||(strpcmRingRBuf==NULL)){
ins_MemSet16CPU(0,ldst,Samples*2);
if(Channels==2) ins_MemSet16CPU(0,rdst,Samples*2);
return;
}
*/
if((strpcmRingLBuf==NULL)||(strpcmRingRBuf==NULL)){
IPC6->strpcmLBuf=strpcmSilentBuf;
IPC6->strpcmRBuf=strpcmSilentBuf;
return;
}
bool IgnoreFlag=false;
u32 CurIndex=(strpcmRingBufReadIndex+1) & strpcmRingBufBitMask;
s16 *lsrc=&strpcmRingLBuf[Samples*CurIndex];
s16 *rsrc=&strpcmRingRBuf[Samples*CurIndex];
// if(strpcmRequestStop==true) IgnoreFlag=true;
if(CurIndex==strpcmRingBufWriteIndex){
strpcmRingEmptyFlag=true;
IgnoreFlag=true;
}
/*
if(IgnoreFlag==true){
ins_MemSet16CPU(0,ldst,Samples*2);
if(Channels==2) ins_MemSet16CPU(0,rdst,Samples*2);
}else{
ins_MemCopy16CPU(lsrc,ldst,Samples*2);
if(Channels==2) ins_MemCopy16CPU(rsrc,rdst,Samples*2);
}
*/
if(IgnoreFlag==true){
IPC6->strpcmLBuf=strpcmSilentBuf;
IPC6->strpcmRBuf=strpcmSilentBuf;
}else{
IPC6->strpcmLBuf=lsrc;
if(Channels==1){
IPC6->strpcmRBuf=lsrc;
}else{
IPC6->strpcmRBuf=rsrc;
}
}
strpcmRingBufReadIndex=CurIndex;
}
void strpcmSetVolume64(int v)
{
if(v<0) v=0;
if(128<v) v=128;
strpcmVolume64=v;
IPC6->strpcmVolume64=strpcmVolume64;
}
int strpcmGetVolume64(void)
{
return(strpcmVolume64);
}
| [
"feng.flash@4bd7f34a-4c62-84e7-1fb2-5fbc975ebfb2"
]
| [
[
[
1,
397
]
]
]
|
455f14c257923515ec811428858f4a37521be245 | 197ac28d1481843225f35aff4aa85f1909ef36bf | /examples/FormatWriter/FormatWriterTest.cpp | f03b01819cc6e875abc6fc58b2cc9c78df85da5c | [
"BSD-3-Clause"
]
| permissive | xandroalmeida/Mcucpp | 831e1088eb38dfcf65bfb6fb3205d4448666983c | 6fc5c8d5b9839ade60b3f57acc78a0ed63995fca | refs/heads/master | 2020-12-24T12:13:53.497692 | 2011-11-21T15:36:03 | 2011-11-21T15:36:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 898 | cpp | #include <avr/io.h>
#include <usart.h>
#include <tiny_ostream.h>
#include <format_parser.h>
#include <flashptr.h>
FLASH char str1[] = "Str = %|-12|\nPORTA = %|-x10|\n";
FLASH char str2[] = "Hello world!!";
typedef Usart<16, 16> MyUsart;
ISR(USART_UDRE_vect)
{
MyUsart::TxHandler();
}
template<class Src>
struct RawWriter
{
void put(char c)
{
while(!Src::Putch(c));
}
};
typedef IO::basic_ostream<RawWriter<MyUsart> > ostream;
ostream& operator<<(ostream &s, ProgmemPtr<char> str)
{
s.puts(str);
return s;
}
ostream cout;
#include <iopins.h>
#include <pinlist.h>
int main()
{
MyUsart::Init<115200>();
sei ();
// Format string stored in flash
cout % IO::Format(FLASH_PTR(str1)) % FLASH_PTR(str2) % PORTA;
// Format string stored in ram
// cout % IO::Format("%|-20| -- %|10|\n") % "Hello world" % 12345;
while(1)
{
}
}
| [
"[email protected]"
]
| [
[
[
1,
53
]
]
]
|
7be22ad3ee2d7ecd8f63e4a5993f9d16434b21bf | 1b2eb18a7d77e160bf992f952767198fe00fe10e | /trunk/096/pkg/items/keys/include/key.inc | 78bcd293d5c78e31d4c30ad3e9998518bcd1b722 | []
| no_license | BackupTheBerlios/poldistro-svn | 96fd832f9a7479bdc4d00501af45a14a3c571c0f | 251f022debb3e4d4ff3c9c43f3bf1029f15e47b1 | refs/heads/master | 2020-05-18T14:11:44.348758 | 2006-05-20T16:06:44 | 2006-05-20T16:06:44 | 40,800,663 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,798 | inc | /*
* $Id$
*
*/
use uo;
include ":itemutils:itemdesc";
/*
* KP_ToggleLock(object)
*
* Purpose
* Toggles the locked member of an object.
*
* Parameters
* object: Container or door to toggle the locked status on.
* mobile: Optional - Mobile to show the locked status to.
*
* Return value
* Returns 1
*
*/
function KP_ToggleLock(object, mobile:=0)
if ( object.locked )
PrintTextAbovePrivate(object, "*unlocked*", mobile);
object.locked := 0;
else
PrintTextAbovePrivate(object, "*locked*", mobile);
object.locked := 1;
endif
return 1;
endfunction
/*
* KP_IsLockable(object)
*
* Purpose
* Determines if an item is lockable or not.
*
* Parameters
* Object: Object to check.
*
* Return value
* Returns 1 if the object is lockable
* Returns 0 if the object is not lockable.
*
*/
function KP_IsLockable(object)
if ( object.IsA(POLCLASS_ITEM) )
object := object.objtype;
endif
return GetItemDescInfo(object).Lockable;
endfunction
/*
* KP_HasKeyForLock(container, lock_id)
*
* Purpose
* Determines if a container has a key that matches a lock_id
*
* Parameters
* container: Container to search for keys in.
* lock_id: Lock ID to match.
*
* Return value
* Returns 1 if a match was found.
* Returns 0 if no keys match the lock.
*
*/
function KP_HasKeyForLock(container, lock_id)
if ( container.IsA(POLCLASS_MOBILE) )
container := container.backpack;
endif
if ( lock_id.IsA(POLCLASS_ITEM) )
lock_id := GetObjProperty(lock_id, "LockId");
endif
foreach item in ( EnumerateItemsInContainer(container) )
if ( item.IsKey() )
if ( item.KeyMatchesLock(lock_id) )
return 1;
endif
endif
sleepms(2);
endforeach
return 0;
endfunction | [
"austin@9d346cd0-66fc-0310-bdc5-e57197e5a75e"
]
| [
[
[
1,
91
]
]
]
|
8f828efe51f6c56fdc73392c27554766c230c875 | 57f014e835e566614a551f70f2da15145c7683ab | /src/contour/GeneratedFiles/Release/moc_colorruler.cpp | fd98c0e14f89be6db245e2cdbcdefc2728ceb30b | []
| no_license | vcer007/contour | d5c3a1bbd7f5c948fbda9d9bbc7d40333640568d | 6917e4b4f24882df2111ca4af5634645cb2700eb | refs/heads/master | 2020-05-30T05:35:15.107140 | 2011-05-23T12:59:00 | 2011-05-23T12:59:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,838 | cpp | /****************************************************************************
** Meta object code from reading C++ file 'colorruler.h'
**
** Created: Fri May 15 11:19:01 2009
** by: The Qt Meta Object Compiler version 59 (Qt 4.4.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../../dialog/colorruler.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'colorruler.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 59
#error "This file was generated using the moc from 4.4.3. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_ColorFrame[] = {
// content:
1, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0 // eod
};
static const char qt_meta_stringdata_ColorFrame[] = {
"ColorFrame\0"
};
const QMetaObject ColorFrame::staticMetaObject = {
{ &QFrame::staticMetaObject, qt_meta_stringdata_ColorFrame,
qt_meta_data_ColorFrame, 0 }
};
const QMetaObject *ColorFrame::metaObject() const
{
return &staticMetaObject;
}
void *ColorFrame::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_ColorFrame))
return static_cast<void*>(const_cast< ColorFrame*>(this));
return QFrame::qt_metacast(_clname);
}
int ColorFrame::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QFrame::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_END_MOC_NAMESPACE
| [
"[email protected]"
]
| [
[
[
1,
62
]
]
]
|
67c639ba9a8d0d1f229fd0cd22bcd82cb6942e37 | c3531ade6396e9ea9c7c9a85f7da538149df2d09 | /Param/src/Numerical/matrix.h | 77a9207038a848b3535d607a1fbd5e37fde6b17b | []
| no_license | feengg/MultiChart-Parameterization | ddbd680f3e1c2100e04c042f8f842256f82c5088 | 764824b7ebab9a3a5e8fa67e767785d2aec6ad0a | refs/heads/master | 2020-03-28T16:43:51.242114 | 2011-04-19T17:18:44 | 2011-04-19T17:18:44 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 5,844 | h | //////////////////////////////////////////////////////////////////////
// Matrix.h
//
// 操作矩阵的类 CMatrix 的声明接口
//
// 周长发编制, 2002/8
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MATRIX_H__ACEC32EA_5254_4C23_A8BD_12F9220EF43A__INCLUDED_)
#define AFX_MATRIX_H__ACEC32EA_5254_4C23_A8BD_12F9220EF43A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <math.h>
#include "../Common/BasicDataType.h"
// #if !defined(_BITSET_)
// # include <bitset>
// #endif // !defined(_BITSET_)
//////////////////////////////////////////////////////////////////////////////////////
//
//(-- class CMatrix
//
class CMatrix
{
//
// 公有接口函数
//
public:
bool SetRotation2Matrix(float angle, Coord axis);
bool SetScale2Matrix(Coord scale);
bool SetTrans2Matrix(Coord trans);
bool TransformVector(Coord& coord);
void Matrix2Array(double * data);
void Array2Matrix(double * data);
void Array2Matrix(double data[3][3]);
void SetRowCol(int nRows, int nCols);
//
// 构造与析构
//
CMatrix(); // 基础构造函数
CMatrix(int nRows, int nCols); // 指定行列构造函数
CMatrix(int nRows, int nCols, double value[]); // 指定数据构造函数
CMatrix(int nSize); // 方阵构造函数
CMatrix(int nSize, double value[]); // 指定数据方阵构造函数
CMatrix(const CMatrix& other); // 拷贝构造函数
bool Init(int nRows, int nCols); // 初始化矩阵
bool MakeUnitMatrix(int nSize); // 将方阵初始化为单位矩阵
bool MakeZeroMatrix(int nSize); // 将方阵初始化为零矩阵
virtual ~CMatrix(); // 析构函数
void Matrix2Array(double** data);
void Array2Matrix(double** data);
//
// 元素与值操作
//
bool SetElement(int nRow, int nCol, double value); // 设置指定元素的值
double GetElement(int nRow, int nCol) const; // 获取指定元素的值
void SetData(double value[]); // 设置矩阵的值
int GetNumColumns() const; // 获取矩阵的列数
int GetNumRows() const; // 获取矩阵的行数
int GetRowVector(int nRow, double* pVector) const; // 获取矩阵的指定行矩阵
std::vector<double> GetRowVector(int nRow);
int GetColVector(int nCol, double* pVector) const; // 获取矩阵的指定列矩阵
double* GetData() const; // 获取矩阵的值
//
// 数学操作
//
CMatrix& operator=(const CMatrix& other);
bool operator==(const CMatrix& other) const;
bool operator!=(const CMatrix& other) const;
CMatrix operator+(const CMatrix& other) const;
CMatrix operator-(const CMatrix& other) const;
CMatrix operator*(double value) const;
CMatrix operator*(const CMatrix& other) const;
// 复矩阵乘法
bool CMul(const CMatrix& AR, const CMatrix& AI, const CMatrix& BR, const CMatrix& BI, CMatrix& CR, CMatrix& CI) const;
// 矩阵的转置
CMatrix Transpose() const;
//
// 算法
//
// 实矩阵求逆的全选主元高斯-约当法
bool InvertGaussJordan();
// 复矩阵求逆的全选主元高斯-约当法
bool InvertGaussJordan(CMatrix& mtxImag);
// 对称正定矩阵的求逆
bool InvertSsgj();
// 托伯利兹矩阵求逆的埃兰特方法
bool InvertTrench();
// 求行列式值的全选主元高斯消去法
double DetGauss();
// 求矩阵秩的全选主元高斯消去法
int RankGauss();
// 对称正定矩阵的乔里斯基分解与行列式的求值
bool DetCholesky(double* dblDet);
// 矩阵的三角分解
bool SplitLU(CMatrix& mtxL, CMatrix& mtxU);
// 一般实矩阵的QR分解
bool SplitQR(CMatrix& mtxQ);
// 一般实矩阵的奇异值分解
bool SplitUV(CMatrix& mtxU, CMatrix& mtxV, double eps = 0.000001);
// 求广义逆的奇异值分解法
bool GInvertUV(CMatrix& mtxAP, CMatrix& mtxU, CMatrix& mtxV, double eps = 0.000001);
// 约化对称矩阵为对称三对角阵的豪斯荷尔德变换法
bool MakeSymTri(CMatrix& mtxQ, CMatrix& mtxT, double dblB[], double dblC[]);
// 实对称三对角阵的全部特征值与特征向量的计算
bool SymTriEigenv(double dblB[], double dblC[], CMatrix& mtxQ, int nMaxIt = 60, double eps = 0.000001);
// 约化一般实矩阵为赫申伯格矩阵的初等相似变换法
void MakeHberg();
// 求赫申伯格矩阵全部特征值的QR方法
bool HBergEigenv(double dblU[], double dblV[], int nMaxIt = 60, double eps = 0.000001);
// 求实对称矩阵特征值与特征向量的雅可比法
bool JacobiEigenv(double dblEigenValue[], CMatrix& mtxEigenVector, int nMaxIt = 60, double eps = 0.000001);
// 求实对称矩阵特征值与特征向量的雅可比过关法
bool JacobiEigenv2(double dblEigenValue[], CMatrix& mtxEigenVector, double eps = 0.000001);
//
// 保护性数据成员
//
protected:
int m_nNumColumns; // 矩阵列数
int m_nNumRows; // 矩阵行数
double* m_pData; // 矩阵数据缓冲区
//
// 内部函数
//
private:
void ppp(double a[], double e[], double s[], double v[], int m, int n);
void sss(double fg[2], double cs[2]);
};
//
//--) // class CMatrix
//
//////////////////////////////////////////////////////////////////////////////////////
#endif // !defined(AFX_MATRIX_H__ACEC32EA_5254_4C23_A8BD_12F9220EF43A__INCLUDED_)
| [
"[email protected]"
]
| [
[
[
1,
149
]
]
]
|
759358102f991d581d5d15a504fae559ffb75435 | 5ac13fa1746046451f1989b5b8734f40d6445322 | /minimangalore/Nebula2/code/nebula2/src/microtcl/tclPanic.cc | fc1d35331bca726cb4d65518dd2280c6142f27b9 | []
| no_license | moltenguy1/minimangalore | 9f2edf7901e7392490cc22486a7cf13c1790008d | 4d849672a6f25d8e441245d374b6bde4b59cbd48 | refs/heads/master | 2020-04-23T08:57:16.492734 | 2009-08-01T09:13:33 | 2009-08-01T09:13:33 | 35,933,330 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,108 | cc | /*
* tclPanic.c --
*
* Source code for the "Tcl_Panic" library procedure for Tcl;
* individual applications will probably override this with
* an application-specific panic procedure.
*
* Copyright (c) 1988-1993 The Regents of the University of California.
* Copyright (c) 1994 Sun Microsystems, Inc.
* Copyright (c) 1998-1999 by Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
*/
#include "microtcl/tclInt.h"
/*
* The panicProc variable contains a pointer to an application
* specific panic procedure.
*/
void (*panicProc) _ANSI_ARGS_(TCL_VARARGS(char *,format)) = NULL;
/*
*----------------------------------------------------------------------
*
* Tcl_SetPanicProc --
*
* Replace the default panic behavior with the specified functiion.
*
* Results:
* None.
*
* Side effects:
* Sets the panicProc variable.
*
*----------------------------------------------------------------------
*/
void
Tcl_SetPanicProc(proc)
void (*proc) _ANSI_ARGS_(TCL_VARARGS(char *,format));
{
panicProc = proc;
}
/*
*----------------------------------------------------------------------
*
* Tcl_PanicVA --
*
* Print an error message and kill the process.
*
* Results:
* None.
*
* Side effects:
* The process dies, entering the debugger if possible.
*
*----------------------------------------------------------------------
*/
void
Tcl_PanicVA (format, argList)
char *format; /* Format string, suitable for passing to
* fprintf. */
va_list argList; /* Variable argument list. */
{
char *arg1, *arg2, *arg3, *arg4; /* Additional arguments (variable in
* number) to pass to fprintf. */
char *arg5, *arg6, *arg7, *arg8;
arg1 = va_arg(argList, char *);
arg2 = va_arg(argList, char *);
arg3 = va_arg(argList, char *);
arg4 = va_arg(argList, char *);
arg5 = va_arg(argList, char *);
arg6 = va_arg(argList, char *);
arg7 = va_arg(argList, char *);
arg8 = va_arg(argList, char *);
if (panicProc != NULL) {
(void) (*panicProc)(format, arg1, arg2, arg3, arg4,
arg5, arg6, arg7, arg8);
} else {
(void) fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6,
arg7, arg8);
(void) fprintf(stderr, "\n");
(void) fflush(stderr);
abort();
}
}
/*
*----------------------------------------------------------------------
*
* panic --
*
* Print an error message and kill the process.
*
* Results:
* None.
*
* Side effects:
* The process dies, entering the debugger if possible.
*
*----------------------------------------------------------------------
*/
/* VARARGS ARGSUSED */
void
panic TCL_VARARGS_DEF(char *,arg1)
{
va_list argList;
char *format;
format = TCL_VARARGS_START(char *,arg1,argList);
Tcl_PanicVA(format, argList);
va_end (argList);
}
| [
"BawooiT@d1c0eb94-fc07-11dd-a7be-4b3ef3b0700c"
]
| [
[
[
1,
122
]
]
]
|
1986d40817d2780d7af92778da757c9526bd21d0 | 91b964984762870246a2a71cb32187eb9e85d74e | /SRC/OFFI SRC!/CACHESERVER/StdAfx.h | 2abb6d9540bbd490799cd6a82e6bafe961f1e334 | []
| no_license | willrebuild/flyffsf | e5911fb412221e00a20a6867fd00c55afca593c7 | d38cc11790480d617b38bb5fc50729d676aef80d | refs/heads/master | 2021-01-19T20:27:35.200154 | 2011-02-10T12:34:43 | 2011-02-10T12:34:43 | 32,710,780 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,457 | h | // stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _WIN32_WINNT 0x0500
#define WINVER 0x0500
#define __CACHESERVER
#define MASSIVE
#include <afxwin.h>
#include <d3dx9math.h>
#include <mmsystem.h>
#pragma warning(disable:4786)
#include <map>
#include <list>
#include <vector>
using namespace std;
//#include "Compile.h"
#include "VersionCommon.h"
#include "memtrace.h"
#include "DefineCommon.h"
#include "CmnHdr.h"
#include <afxdisp.h> // MFC Automation classes
#include "vutil.h"
#include "DXUtil.h"
#include "Data.h"
#include "File.h"
#include "Scanner.h"
#include "Debug.h"
#include "Timer.h"
#include "d3dfont.h"
//#include "targa.h"
#include "xutil.h"
//#include "exceptionhandler.h"
// TODO: reference additional headers your program requires here
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
| [
"[email protected]@e2c90bd7-ee55-cca0-76d2-bbf4e3699278"
]
| [
[
[
1,
63
]
]
]
|
854aa82c9c3dafaabcaf2c79a282eb2c16858ec5 | b0a95bd03ad64103a80df14c9ea89faf8466670e | /mystring/main.cpp | 286069aad933fd49da5aa902486ed5aa551d57a9 | []
| no_license | hernad/FIT_PR2 | f6348c2b8e0f03f6cfdebc4ff0aae7dc21f62c4d | 389a98037ca5a7a33b31471089ea198268865d22 | refs/heads/master | 2016-09-05T17:41:25.493122 | 2011-01-25T23:30:13 | 2011-01-25T23:30:13 | 1,119,441 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 461 | cpp | #include <iostream>
using namespace std;
#include "my_string.h"
int main() {
MyString ss1("klakla");
MyString ss2;
ss2.get(cin, '\n');
MyString ss3;
ss3 = ss1 + ss2;
MyString ss4(ss3);
MyString ss5 = ss4 + MyString("kraj");
cout << "ss1=" << ss1 << endl;
cout << "ss2=" << ss2 << endl;
cout << "ss3=" << ss3 << endl;
cout << "ss4=" << ss4 << endl;
cout << "ss5=" << ss5 << endl;
system("pause");
return 0;
} | [
"[email protected]"
]
| [
[
[
1,
30
]
]
]
|
833df887f64846254a17ee98ae0a72435ff07a36 | bfdfb7c406c318c877b7cbc43bc2dfd925185e50 | /common/test/Test_hyArray.cpp | 1c265c0c87c7cda13ee8871fc4a7480e0e69f227 | [
"MIT"
]
| permissive | ysei/Hayat | 74cc1e281ae6772b2a05bbeccfcf430215cb435b | b32ed82a1c6222ef7f4bf0fc9dedfad81280c2c0 | refs/heads/master | 2020-12-11T09:07:35.606061 | 2011-08-01T12:38:39 | 2011-08-01T12:38:39 | null | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 8,623 | cpp | /* -*- coding: sjis-dos; -*- */
/*
* copyright 2010 FUKUZAWA Tadashi. All rights reserved.
*/
#include "hyArray.h"
#include <cppunit/extensions/HelperMacros.h>
using namespace Hayat::Common;
class Test_Array : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(Test_Array);
CPPUNIT_TEST(test_array);
CPPUNIT_TEST(test_insert_remove);
CPPUNIT_TEST(test_deleteVal);
CPPUNIT_TEST(test_replace);
CPPUNIT_TEST(test_external_data);
CPPUNIT_TEST_SUITE_END();
public:
Test_Array(void) {}
void* hayatMemory;
void setUp(void)
{
hayatMemory = HMD_ALLOC(10240);
MemPool::initGMemPool(hayatMemory, 10240);
}
void tearDown(void)
{
HMD_FREE(hayatMemory);
}
void test_array(void)
{
int dat[10] = { 100, 110, 120, -130, 140, -15000, 16000, 1700, 18, 19000 };
TArray<int> arr;
arr.initialize(0);
CPPUNIT_ASSERT_EQUAL((int*)NULL, arr.m_contents);
CPPUNIT_ASSERT_EQUAL((hyu32)0, arr.size());
CPPUNIT_ASSERT_EQUAL((hyu32)0, arr.m_capacity);
arr.initialize(2);
CPPUNIT_ASSERT(arr.m_contents != NULL);
CPPUNIT_ASSERT_EQUAL((hyu32)0, arr.size());
CPPUNIT_ASSERT_EQUAL((hyu32)2, arr.m_capacity);
arr.add(dat, 5);
CPPUNIT_ASSERT_EQUAL((hyu32)5, arr.size());
CPPUNIT_ASSERT_EQUAL(100, arr[0]);
CPPUNIT_ASSERT_EQUAL(140, arr[4]);
arr.fill(7);
CPPUNIT_ASSERT_EQUAL(7, arr[0]);
CPPUNIT_ASSERT_EQUAL(7, arr[4]);
CPPUNIT_ASSERT(arr.checkIndex(100));
CPPUNIT_ASSERT(arr.checkIndex(-5));
CPPUNIT_ASSERT(! arr.checkIndex(-6));
arr[2] = 222;
CPPUNIT_ASSERT_EQUAL(222, *(arr.nthAddr(2)));
arr.subst(20, 202020, -1);
CPPUNIT_ASSERT_EQUAL((hyu32)21, arr.size());
CPPUNIT_ASSERT_EQUAL(-1, arr[5]);
CPPUNIT_ASSERT_EQUAL(-1, arr[19]);
CPPUNIT_ASSERT_EQUAL(202020, arr[20]);
arr.add(&dat[5], 5);
arr.add(123);
arr.add(456);
CPPUNIT_ASSERT_EQUAL((hyu32)28, arr.size());
CPPUNIT_ASSERT_EQUAL(-15000, arr[21]);
CPPUNIT_ASSERT_EQUAL(19000, arr[25]);
CPPUNIT_ASSERT_EQUAL(123, arr[26]);
CPPUNIT_ASSERT_EQUAL(456, arr[27]);
int x = 222;
CPPUNIT_ASSERT_EQUAL(2, arr.issue(x));
x = 202020;
CPPUNIT_ASSERT_EQUAL(20, arr.issue(x));
x = 123;
CPPUNIT_ASSERT_EQUAL(26, arr.issue(x));
CPPUNIT_ASSERT_EQUAL((hyu32)28, arr.size());
x = 98765;
CPPUNIT_ASSERT_EQUAL(28, arr.issue(x));
CPPUNIT_ASSERT_EQUAL(98765, arr[28]);
arr.clear();
CPPUNIT_ASSERT_EQUAL((hyu32)0, arr.size());
hyu32 capa = arr.m_capacity;
arr.reserve(capa);
CPPUNIT_ASSERT(capa != arr.m_capacity);
}
void test_insert_remove(void)
{
TArray<int> arr;
arr.initialize(2);
CPPUNIT_ASSERT_EQUAL((hyu32)0, arr.size());
HMD_ASSERT_HALT(arr.insert(1));
arr.insert(0) = 10;
CPPUNIT_ASSERT_EQUAL((hyu32)1, arr.size());
CPPUNIT_ASSERT_EQUAL(10, arr[0]);
arr.insert(0) = 20;
CPPUNIT_ASSERT_EQUAL((hyu32)2, arr.size());
CPPUNIT_ASSERT_EQUAL(20, arr[0]);
CPPUNIT_ASSERT_EQUAL(10, arr[1]);
arr.insert(1) = 30;
CPPUNIT_ASSERT_EQUAL((hyu32)3, arr.size());
CPPUNIT_ASSERT_EQUAL(20, arr[0]);
CPPUNIT_ASSERT_EQUAL(30, arr[1]);
CPPUNIT_ASSERT_EQUAL(10, arr[2]);
arr.insert(3) = 40;
CPPUNIT_ASSERT_EQUAL((hyu32)4, arr.size());
CPPUNIT_ASSERT_EQUAL(20, arr[0]);
CPPUNIT_ASSERT_EQUAL(30, arr[1]);
CPPUNIT_ASSERT_EQUAL(10, arr[2]);
CPPUNIT_ASSERT_EQUAL(40, arr[3]);
arr.insert(-1) = 50;
CPPUNIT_ASSERT_EQUAL((hyu32)5, arr.size());
CPPUNIT_ASSERT_EQUAL(20, arr[0]);
CPPUNIT_ASSERT_EQUAL(30, arr[1]);
CPPUNIT_ASSERT_EQUAL(10, arr[2]);
CPPUNIT_ASSERT_EQUAL(50, arr[3]);
CPPUNIT_ASSERT_EQUAL(40, arr[4]);
arr.remove(2);
CPPUNIT_ASSERT_EQUAL((hyu32)4, arr.size());
CPPUNIT_ASSERT_EQUAL(20, arr[0]);
CPPUNIT_ASSERT_EQUAL(30, arr[1]);
CPPUNIT_ASSERT_EQUAL(50, arr[2]);
CPPUNIT_ASSERT_EQUAL(40, arr[3]);
arr.remove(-3);
CPPUNIT_ASSERT_EQUAL((hyu32)3, arr.size());
CPPUNIT_ASSERT_EQUAL(20, arr[0]);
CPPUNIT_ASSERT_EQUAL(50, arr[1]);
CPPUNIT_ASSERT_EQUAL(40, arr[2]);
HMD_ASSERT_HALT(arr.remove(3));
HMD_ASSERT_HALT(arr.remove(-4));
int* p = arr.nthAddr(3);
int* q = arr.addSpaces(2);
CPPUNIT_ASSERT_EQUAL((hyu32)5, arr.size());
CPPUNIT_ASSERT_EQUAL(p, q);
}
void test_deleteVal(void)
{
TArray<int> arr;
arr.initialize(10);
for (int i = 0; i < 10; ++i)
arr.add(i * 10);
arr[3] = 80;
arr[6] = 80;
CPPUNIT_ASSERT_EQUAL((hyu32)10, arr.size());
arr.deleteVal(20);
CPPUNIT_ASSERT_EQUAL((hyu32)9, arr.size());
arr.deleteVal(80);
CPPUNIT_ASSERT_EQUAL((hyu32)6, arr.size());
CPPUNIT_ASSERT_EQUAL(0, arr[0]);
CPPUNIT_ASSERT_EQUAL(10, arr[1]);
CPPUNIT_ASSERT_EQUAL(40, arr[2]);
CPPUNIT_ASSERT_EQUAL(50, arr[3]);
CPPUNIT_ASSERT_EQUAL(70, arr[4]);
CPPUNIT_ASSERT_EQUAL(90, arr[5]);
}
void test_replace(void)
{
TArray<int> arr;
arr.initialize(10);
for (int i = 0; i < 10; ++i)
arr.add(i * 10);
CPPUNIT_ASSERT_EQUAL(30, arr.replace(3, -10));
CPPUNIT_ASSERT_EQUAL(50, arr.replace(5, -10));
CPPUNIT_ASSERT_EQUAL(80, arr.replace(8, 800));
CPPUNIT_ASSERT_EQUAL(-10, arr.replace(5, 10));
CPPUNIT_ASSERT_EQUAL(-10, arr.replace(3, 10));
CPPUNIT_ASSERT_EQUAL(800, arr.replace(8, 10));
CPPUNIT_ASSERT_EQUAL((hyu32)10, arr.size());
arr.deleteVal(10);
CPPUNIT_ASSERT_EQUAL((hyu32)6, arr.size());
}
void test_external_data(void)
{
// 外部参照状態から通常状態に移行する関数のテスト
TArray<int> arr(0);
int data[8] = { 1, 11, 21, 31, 41, -1, -1, -1 };
int x;
arr.initialize(data, 5);
CPPUNIT_ASSERT_EQUAL((hyu32)0, arr.capacity());
CPPUNIT_ASSERT_EQUAL((hyu32)5, arr.size());
CPPUNIT_ASSERT(data == arr.top());
CPPUNIT_ASSERT_EQUAL(21, arr[2]);
arr.subst(2, 201, 999);
CPPUNIT_ASSERT(arr.capacity() >= 5);
CPPUNIT_ASSERT_EQUAL((hyu32)5, arr.size());
CPPUNIT_ASSERT(data != arr.top());
CPPUNIT_ASSERT_EQUAL(201, arr[2]);
CPPUNIT_ASSERT_EQUAL(21, data[2]);
arr.finalize();
arr.initialize(data, 5);
arr.insert(1,1) = 88;
CPPUNIT_ASSERT_EQUAL((hyu32)6, arr.size());
CPPUNIT_ASSERT(arr.capacity() >= 6);
CPPUNIT_ASSERT_EQUAL(88, arr[1]);
CPPUNIT_ASSERT_EQUAL(11, arr[2]);
arr.finalize();
arr.initialize(data, 5);
arr.remove(3);
CPPUNIT_ASSERT_EQUAL(41, arr[3]);
CPPUNIT_ASSERT_EQUAL(31, data[3]);
arr.finalize();
arr.initialize(data, 5);
arr.fill(99);
CPPUNIT_ASSERT_EQUAL(99, arr[1]);
CPPUNIT_ASSERT_EQUAL(11, data[1]);
arr.finalize();
arr.initialize(data, 5);
arr.clear();
CPPUNIT_ASSERT(NULL == arr.top());
arr.finalize();
arr.initialize(data, 5);
arr.addSpaces(2);
CPPUNIT_ASSERT_EQUAL((hyu32)7, arr.size());
CPPUNIT_ASSERT(arr.capacity() >= 7);
arr.finalize();
arr.initialize(data, 5);
x = 21;
CPPUNIT_ASSERT_EQUAL((hys32)2, arr.issue(x));
CPPUNIT_ASSERT(data == arr.top());
x = 55;
CPPUNIT_ASSERT_EQUAL((hys32)5, arr.issue(x));
CPPUNIT_ASSERT(data != arr.top());
arr.finalize();
CPPUNIT_ASSERT_EQUAL( 1, data[0]);
CPPUNIT_ASSERT_EQUAL(11, data[1]);
CPPUNIT_ASSERT_EQUAL(21, data[2]);
CPPUNIT_ASSERT_EQUAL(31, data[3]);
CPPUNIT_ASSERT_EQUAL(41, data[4]);
CPPUNIT_ASSERT_EQUAL(-1, data[5]);
CPPUNIT_ASSERT_EQUAL(-1, data[6]);
CPPUNIT_ASSERT_EQUAL(-1, data[7]);
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(Test_Array);
| [
"[email protected]"
]
| [
[
[
1,
265
]
]
]
|
6c69b2136ea99b7075199c20bd4976dc85a30a8e | 906e87b1936397339734770be45317f06fe66e6e | /src/TGFont.cpp | 510e55893f94635a8cea8d0215464237dc5f781e | []
| no_license | kcmohanprasad/tgui | 03c1ab47e9058bc763b7e6ffc21a37b4358369bf | 9f9cf391fa86b99c7d606c4d196e512a7b06be95 | refs/heads/master | 2021-01-10T08:52:18.629088 | 2007-05-17T04:42:58 | 2007-05-17T04:42:58 | 52,069,498 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,933 | cpp | //-----------------------------------------------------------------------------
// This source file is part of TGUI (Tiny GUI)
//
// Copyright (c) 2006-2007 Tubras Software, Ltd
// Also see acknowledgements in Readme.html
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to
// do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "tgui.h"
namespace TGUI
{
//-----------------------------------------------------------------------
// T G F o n t
//-----------------------------------------------------------------------
TGFont::TGFont(TGString fontName,TGString resourceGroup)
{
if(resourceGroup.empty())
resourceGroup = Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME.c_str();
m_font = (Ogre::FontPtr) Ogre::FontManager::getSingleton().getByName(fontName);
if (m_font.isNull())
{
Ogre::Exception(Ogre::Exception::ERR_ITEM_NOT_FOUND, "Could not find font " + fontName, "TGFont::TGFont");
return;
}
m_font->load();
m_material = m_font->getMaterial();
//m_material->setTextureFiltering(Ogre::TextureFilterOptions::TFO_BILINEAR);
m_material->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureFiltering(Ogre::TFO_TRILINEAR);
Ogre::TexturePtr tp = m_material->getTechnique(0)->getPass(0)->getTextureUnitState(0)->_getTexturePtr();
m_texture = TGSystem::getSingleton().getRenderer()->createTexture();
m_texture->setOgreTexture(tp);
m_height = 14;
}
//-----------------------------------------------------------------------
// ~ T G F o n t
//-----------------------------------------------------------------------
TGFont::~TGFont()
{
}
} | [
"pc0der@a5263bde-0223-0410-8bbb-1954fdd97a2f"
]
| [
[
[
1,
65
]
]
]
|
e62b873feac9ad08aa51ac31d82d6826c01ee569 | c86338cfb9a65230aa7773639eb8f0a3ce9d34fd | /MNCudaMemPool.h | 8a21b09cf535e91ccd8eaf2307e8ff477685bb46 | []
| no_license | jonike/mnrt | 2319fb48d544d58984d40d63dc0b349ffcbfd1dd | 99b41c3deb75aad52afd0c315635f1ca9b9923ec | refs/heads/master | 2021-08-24T05:52:41.056070 | 2010-12-03T18:31:24 | 2010-12-03T18:31:24 | 113,554,148 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 22,345 | h | ////////////////////////////////////////////////////////////////////////////////////////////////////
// MNRT License
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2010 Mathias Neumann, www.maneumann.com.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation and/or
// other materials provided with the distribution.
//
// 3. Neither the name Mathias Neumann, nor the names of contributors may be
// used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \file MNRT\MNCudaMemPool.h
///
/// \brief Declares the MNCudaMemPool and MNCudaMemory classes.
/// \author Mathias Neumann
/// \date 19.03.2010
/// \ingroup cudautil
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef __MN_CUDA_MEMPOOL_H__
#define __MN_CUDA_MEMPOOL_H__
#pragma once
#include <list>
#include "MNCudaUtil.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \class MNCudaMemPool
///
/// \brief Manages device memory by preallocating a large amount of device memory and handling
/// out chunks to requesters.
///
/// This avoids multiple calls to \c cudaMalloc and therefore reduces CUDA API overhead. Was
/// suggested by \ref lit_wang "[Wang et al. 2009]" and \ref lit_zhou "[Zhou et al. 2008]".
///
/// Class is designed as singleton and might need optimizations for when used from
/// multiple CPU-threads.
///
/// \author Mathias Neumann
/// \date 19.03.2010
////////////////////////////////////////////////////////////////////////////////////////////////////
class MNCudaMemPool
{
private:
/// Keeps track of assigned device memory segments.
class AssignedSegment
{
public:
AssignedSegment(size_t _offset, size_t _size, void* _buffer, const std::string& _strCategory)
{
offset = _offset;
size_bytes = _size;
d_buffer = _buffer;
strCategory = _strCategory;
}
// Byte offset. Relative to owning chunk base offset.
// Has to be aligned.
size_t offset;
// Number of bytes.
size_t size_bytes;
// Pointer to the device memory segment.
void* d_buffer;
// Memory category.
std::string strCategory;
};
/// Keeps track of allocated device or pinned host memory.
class MemoryChunk
{
public:
MemoryChunk(size_t _size, bool pinnedHost, cudaError_t& outError);
~MemoryChunk();
// If true, the chunk can be killed when not used for some time. Default: true.
bool isRemoveable;
// If true, this is a pinned host memory chunk. Else it's a device memory chunk.
bool isHostPinned;
// Size in bytes.
size_t sizeChunk;
// Memory of *sizeChunk* bytes.
void* d_buffer;
// Assigned segments. Ordered by offsets.
std::list<AssignedSegment> lstAssigned;
// Time of last use (time(), seconds). Used to detect obsolete chunks.
time_t tLastUse;
public:
// Returns a pointer to the requested memory space within this chunk, if any.
// Else NULL is returned. In the first case the free range list is updated.
void* Request(size_t size_bytes, size_t alignment, const std::string& strCategory);
// Releases the given buffer if it is assigned within this chunk. Number of
// free'd bytes is returned, else 0.
size_t Release(void* d_buffer);
// Returns the assigned size within this segment.
size_t GetAssignedSize() const;
// Sets whether the chunk is removeable or not.
void SetRemoveable(bool b) { isRemoveable = b; }
// Returns true when this chunk is obsolete and can be destroyed.
bool IsObsolete(time_t tCurrent) const;
// Tests this chunk for errors, e.g. non disjoint segments.
bool Test(FILE* stream) const;
};
// Singleton. Hide constructors.
private:
MNCudaMemPool(void);
MNCudaMemPool(const MNCudaMemPool& other);
public:
~MNCudaMemPool(void);
private:
/// If true, we are initialized.
bool m_bInited;
/// Number of bytes currently assigned.
size_t m_nBytesAssigned;
/// Texture alignment requirement for current device.
size_t m_texAlignment;
/// Last obsolete check time.
time_t m_tLastObsoleteCheck;
/// Initial segment size in bytes.
size_t m_sizeInitial_bytes;
/// The only pinned host memory chunk.
MemoryChunk* m_pHostChunk;
/// Device memory chunks.
std::list<MemoryChunk*> m_DevChunks;
public:
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn MNCudaMemPool& GetInstance()
///
/// \brief Returns the only memory pool instance.
///
/// \warning Not thread-safe!
///
/// \author Mathias Neumann
/// \date 19.03.2010
///
/// \return The instance.
////////////////////////////////////////////////////////////////////////////////////////////////////
static MNCudaMemPool& GetInstance();
public:
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn cudaError_t Initialize(size_t sizeInitial_bytes, size_t sizePinnedHost_bytes)
///
/// \brief Initializes the memory pool.
///
/// \author Mathias Neumann
/// \date 19.03.2010
///
/// \param sizeInitial_bytes The size of the initial device chunk in bytes.
/// \param sizePinnedHost_bytes The size of the only pinned host chunk in bytes.
///
/// \return \c cudaSuccess, else some error value.
////////////////////////////////////////////////////////////////////////////////////////////////////
cudaError_t Initialize(size_t sizeInitial_bytes, size_t sizePinnedHost_bytes);
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn cudaError_t Request(void** d_buffer, size_t size_bytes,
/// const std::string& strCategory = "General", size_t alignment = 64)
///
/// \brief Requests a device buffer of a given size.
///
/// You can specify an alignment for the memory segment. This allows using the segment
/// for coalesced access or for linear memory to texture mappings. For example, coalesced
/// access to 64 bit words on 1.1 computing capability devices require an alignment of
/// 128 bytes (16 * 8).
///
/// \author Mathias Neumann
/// \date 19.03.2010
/// \see RequestTexture(), RequestHost()
///
/// \param [out] d_buffer The allocated device memory buffer.
/// \param size_bytes The requested size in bytes.
/// \param strCategory Category of the request. Used for bookkeeping only.
/// \param alignment The alignment in bytes.
///
/// \return \c cudaSuccess, else some error value.
////////////////////////////////////////////////////////////////////////////////////////////////////
cudaError_t Request(void** d_buffer, size_t size_bytes,
const std::string& strCategory = "General", size_t alignment = 64);
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn cudaError_t RequestTexture(void** d_buffer, size_t size_bytes,
/// const std::string& strCategory = "General")
///
/// \brief Requests a buffer of a given size to use as linear memory to map to textures.
///
/// It is aligned according to the CUDA device properties to avoid using offsets
/// returned by \c cudaBindTexture(). This method equals the Request() method with
/// a special alignment parameter.
///
/// \author Mathias Neumann
/// \date 26.03.2010
/// \see Request(), RequestHost()
///
/// \param [out] d_buffer The allocated buffer.
/// \param size_bytes The size in bytes.
/// \param strCategory Category the string belongs to.
///
/// \return \c cudaSuccess, else some error value.
////////////////////////////////////////////////////////////////////////////////////////////////////
cudaError_t RequestTexture(void** d_buffer, size_t size_bytes,
const std::string& strCategory = "General");
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn cudaError_t Release(void* d_buffer)
///
/// \brief Releases the given device buffer.
///
/// This will only work if the buffer has been allocated in this pool. After this call
/// the buffer is no more valid.
///
/// \author Mathias Neumann
/// \date 19.03.2010
/// \see ReleaseHost()
///
/// \param [in] d_buffer The buffer to release.
///
/// \return \c cudaSuccess, else some error value.
////////////////////////////////////////////////////////////////////////////////////////////////////
cudaError_t Release(void* d_buffer);
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn cudaError_t RequestHost(void** h_buffer, size_t size_bytes)
///
/// \brief Requests pinned host memory of given size.
///
/// Note that pinned host memory is limited as we currently only provide a fixed chunk of
/// chosen size. This was done due to the fact that lots of pinned host memory can reduce
/// system performance significantly. Check the CUDA SDK programming guide for more
/// information.
///
/// \author Mathias Neumann
/// \date 01.08.2010
/// \see Request(), RequestTexture()
///
/// \param [out] h_buffer Pinned host memory of \a size_bytes bytes.
/// \param size_bytes The size in bytes.
///
/// \return \c cudaSuccess, else some error value.
////////////////////////////////////////////////////////////////////////////////////////////////////
cudaError_t RequestHost(void** h_buffer, size_t size_bytes);
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn cudaError_t ReleaseHost(void* h_buffer)
///
/// \brief Releases the given assigned buffer of pinned host memory.
///
/// This will only work if the buffer has been allocated in this pool. After this call
/// the buffer is no more valid.
///
/// \author Mathias Neumann
/// \date 01.08.2010
/// \see Release()
///
/// \param [in] h_buffer The pinned host buffer to release.
///
/// \return \c cudaSuccess, else some error value.
////////////////////////////////////////////////////////////////////////////////////////////////////
cudaError_t ReleaseHost(void* h_buffer);
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn void PrintState(FILE* stream = stdout) const
///
/// \brief Prints the state of the memory pool to the given file.
///
/// \author Mathias Neumann
/// \date 20.03.2010
///
/// \param [in] stream The file stream to print to.
////////////////////////////////////////////////////////////////////////////////////////////////////
void PrintState(FILE* stream = stdout) const;
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn void UpdatePool()
///
/// \brief Updates the pool by removing any chunks that are unused for a long time.
///
/// Call this on a regular base if you want to avoid stealing to much GPU memory for the
/// lifetime of your application. In most cases, there are peaks of pool usage where
/// big new chunks of device memory are added. After that, these chunks are completely
/// unused. This method tries to eliminate those chunks after some time has passed.
///
/// \author Mathias Neumann
/// \date 05.10.2010
////////////////////////////////////////////////////////////////////////////////////////////////////
void UpdatePool();
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn void TestPool(FILE* stream = stdout) const
///
/// \brief Tests the memory pool by checking all memory chunks managed.
///
/// Checks memory chunks for errors, e.g. non-disjoint assigned segments.
///
/// \author Mathias Neumann
/// \date 05.10.2010
///
/// \param [in] stream File for result output.
////////////////////////////////////////////////////////////////////////////////////////////////////
void TestPool(FILE* stream = stdout) const;
// Accessors
public:
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn size_t GetTextureAlignment() const
///
/// \brief Gets the texture alignment for the current device.
///
/// Linear device memory that is mapped to texture memory has to be aligned using this
/// alignment. Else offsets have to be used when binding the texture using the CUDA API.
///
/// \author Mathias Neumann
/// \date 26.03.2010
///
/// \return The texture alignment in bytes.
////////////////////////////////////////////////////////////////////////////////////////////////////
size_t GetTextureAlignment() const { return m_texAlignment; }
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn size_t GetDeviceChunkCount() const
///
/// \brief Gets the device chunk count.
///
/// This is the number of device chunks currently managed by this pool.
///
/// \author Mathias Neumann
/// \date 20.03.2010
///
/// \return The device chunk count.
////////////////////////////////////////////////////////////////////////////////////////////////////
size_t GetDeviceChunkCount() const { return m_DevChunks.size(); }
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn size_t GetAllocatedSize() const
///
/// \brief Gets the size of the allocated device memory in bytes.
///
/// \author Mathias Neumann
/// \date 20.03.2010
///
/// \return The allocated device memory size in bytes.
////////////////////////////////////////////////////////////////////////////////////////////////////
size_t GetAllocatedSize() const;
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn size_t GetAssignedSegmentCount() const
///
/// \brief Gets the assigned device memory segment count.
///
/// This is the number of assigned segments within the device memory chunks. Each
/// Request() or RequestTexture() creates a new assigned segment.
///
/// \author Mathias Neumann
/// \date 20.03.2010
///
/// \return The assigned segment count.
////////////////////////////////////////////////////////////////////////////////////////////////////
size_t GetAssignedSegmentCount() const;
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn size_t GetAssignedSize() const
///
/// \brief Gets the assigned device memory size in bytes.
///
/// \author Mathias Neumann
/// \date 20.03.2010
///
/// \return The assigned memory size in bytes.
////////////////////////////////////////////////////////////////////////////////////////////////////
size_t GetAssignedSize() const;
private:
// Frees all memory. Called on destruction.
void Free();
// Allocates a new chunk of device memory. Used for pool resizing.
cudaError_t AllocChunk(size_t size_bytes);
// Kills obsolete chunks.
void KillObsoleteChunks();
};
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \class MNCudaMemory
///
/// \brief Device memory wrapper class that uses the memory pool to request device memory.
///
/// Releasing is performed within destructor, so this is an easy way to use the memory pool.
/// Automatic conversion operator avoids the use of GetPtr(). It however might create
/// compiler errors when used in conjunction with template function parameters. Then an
/// explicit cast to (T*) might be required. Use it the following way:
///
/// \code
/// {
/// MNCudaMemory<uint> d_temp(1000); // Creates temporary device memory.
/// ...
/// // Use d_temp, if required with an explicit cast (uint*)d_temp.
/// ...
/// } // Destructor releases memory automatically.
/// \endcode
///
/// \author Mathias Neumann
/// \date 30.03.2010
///
/// \tparam T Element type of the memory requested. Allows requesting arrays of integers
/// or floats.
////////////////////////////////////////////////////////////////////////////////////////////////////
template <class T>
class MNCudaMemory
{
public:
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn MNCudaMemory(size_t numElements, const std::string& strCategory = "Temporary",
/// size_t alignment = 64)
///
/// \brief Constructor. Requests memory from MNCudaMemPool.
///
/// \author Mathias Neumann
/// \date 30.03.2010
/// \see MNCudaMemPool::Request()
///
/// \param numElements Number of elements.
/// \param strCategory Category of memory. For bookkeeping only.
/// \param alignment The alignment in bytes.
////////////////////////////////////////////////////////////////////////////////////////////////////
MNCudaMemory(size_t numElements, const std::string& strCategory = "Temporary", size_t alignment = 64)
{
MNCudaMemPool& pool = MNCudaMemPool::GetInstance();
mncudaSafeCallNoSync(pool.Request((void**)&d_buffer, numElements*sizeof(T), strCategory, alignment));
numElems = numElements;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn ~MNCudaMemory()
///
/// \brief Destructor. Releases requested device memory.
///
/// \author Mathias Neumann
/// \date 30.03.2010
/// \see MNCudaMemPool::Release()
////////////////////////////////////////////////////////////////////////////////////////////////////
~MNCudaMemory()
{
MNCudaMemPool& pool = MNCudaMemPool::GetInstance();
mncudaSafeCallNoSync(pool.Release(d_buffer));
}
private:
/// Number of elements.
size_t numElems;
/// The device memory.
T* d_buffer;
public:
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn T* GetPtr() const
///
/// \brief To retrieve the device memory pointer.
///
/// \author Mathias Neumann
/// \date 30.03.2010
///
/// \return Device memory pointer of type \a T.
////////////////////////////////////////////////////////////////////////////////////////////////////
T* GetPtr() const { return d_buffer; }
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn operator T* ()
///
/// \brief Automatic conversion operator. Avoids GetPtr().
///
/// Might not suffice in some cases, e.g. when this object is used as parameter for a
/// template function. In this case an explicit cast with (T*) would be required.
///
/// \author Mathias Neumann
/// \date 30.03.2010
///
/// \return Device memory pointer of type \a T.
////////////////////////////////////////////////////////////////////////////////////////////////////
operator T* () { return d_buffer; }
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn T Read(size_t idx)
///
/// \brief Reads an entry of the device memory.
///
/// Use sparely since it uses a \c cudaMemcpy to copy from device to host. This can be
/// quite slow.
///
/// \author Mathias Neumann
/// \date 14.04.2010
///
/// \param idx Zero-based index of the entry.
///
/// \return The entry.
////////////////////////////////////////////////////////////////////////////////////////////////////
T Read(size_t idx)
{
if(idx >= numElems)
MNFatal("MNCudaMemory - Illegal element index.");
T res;
mncudaSafeCallNoSync(cudaMemcpy(&res, d_buffer + idx, sizeof(T), cudaMemcpyDeviceToHost));
return res;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \fn void InitConstant(const T& constant)
///
/// \brief Initialises the memory with the given constant.
///
/// \c cudaMemset might be faster than this method. But it does not allow to initialize the
/// \em elements in most cases. Only trivial cases, e.g. with a constant of zero, might
/// work.
///
/// \author Mathias Neumann
/// \date 08.07.2010
/// \see ::mncudaInitConstant()
///
/// \param constant The constant (type of element) to initialize each element with.
////////////////////////////////////////////////////////////////////////////////////////////////////
void InitConstant(const T& constant)
{
mncudaInitConstant((T*)d_buffer, numElems, constant);
}
};
#endif // __MN_CUDA_MEMPOOL_H__ | [
"[email protected]"
]
| [
[
[
1,
561
]
]
]
|
b445a759ecc8e5db6da052df3e082834b71c47b6 | 011359e589f99ae5fe8271962d447165e9ff7768 | /src/burn/pgm/pgm_crypt.cpp | 940a0ad4b084c283c3a45d660f61d64c5c36a539 | []
| no_license | PS3emulators/fba-next-slim | 4c753375fd68863c53830bb367c61737393f9777 | d082dea48c378bddd5e2a686fe8c19beb06db8e1 | refs/heads/master | 2021-01-17T23:05:29.479865 | 2011-12-01T18:16:02 | 2011-12-01T18:16:02 | 2,899,840 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 48,354 | cpp | /* IGS PGM System Encryptions */
#include "pgm.h"
#include "bitswap.h"
void pgm_decrypt_dw2()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i<nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x020890) == 0x000000) x ^= 0x0002;
if ((i & 0x020000) == 0x020000 && (i & 0x001500) != 0x001400) x ^= 0x0002;
if ((i & 0x020400) == 0x000000 && (i & 0x002010) != 0x002010) x ^= 0x0400;
if ((i & 0x020000) == 0x020000 && (i & 0x000148) != 0x000140) x ^= 0x0400;
src[i] = swapWord(x);
}
}
void pgm_decrypt_dw3()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x005460) == 0x001400) x ^= 0x0100;
if ((i & 0x005450) == 0x001040) x ^= 0x0100;
if ((i & 0x005e00) == 0x001c00) x ^= 0x0040;
if ((i & 0x005580) == 0x001100) x ^= 0x0040;
src[i] = swapWord(x);
}
}
void pgm_decrypt_killbld()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x006d00) == 0x000400) x ^= 0x0008;
if ((i & 0x006c80) == 0x000880) x ^= 0x0008;
if ((i & 0x007500) == 0x002400) x ^= 0x1000;
if ((i & 0x007600) == 0x003200) x ^= 0x1000;
src[i] = swapWord(x);
}
}
static const unsigned char kov_tab[256] = {
0x17, 0x1c, 0xe3, 0x02, 0x62, 0x59, 0x97, 0x4a, 0x67, 0x4d, 0x1f, 0x11, 0x76, 0x64, 0xc1, 0xe1,
0xd2, 0x41, 0x9f, 0xfd, 0xfa, 0x04, 0xfe, 0xab, 0x89, 0xeb, 0xc0, 0xf5, 0xac, 0x2b, 0x64, 0x22,
0x90, 0x7d, 0x88, 0xc5, 0x8c, 0xe0, 0xd9, 0x70, 0x3c, 0xf4, 0x7d, 0x31, 0x1c, 0xca, 0xe2, 0xf1,
0x31, 0x82, 0x86, 0xb1, 0x55, 0x95, 0x77, 0x01, 0x77, 0x3b, 0xab, 0xe6, 0x88, 0xef, 0x77, 0x11,
0x56, 0x01, 0xac, 0x55, 0xf7, 0x6d, 0x9b, 0x6d, 0x92, 0x14, 0x23, 0xae, 0x4b, 0x80, 0xae, 0x6a,
0x43, 0xcc, 0x35, 0xfe, 0xa1, 0x0d, 0xb3, 0x21, 0x4e, 0x4c, 0x99, 0x80, 0xc2, 0x3d, 0xce, 0x46,
0x9b, 0x5d, 0x68, 0x75, 0xfe, 0x1e, 0x25, 0x41, 0x24, 0xa0, 0x79, 0xfd, 0xb5, 0x67, 0x93, 0x07,
0x3a, 0x78, 0x24, 0x64, 0xe1, 0xa3, 0x62, 0x75, 0x38, 0x65, 0x8a, 0xbf, 0xf9, 0x7c, 0x00, 0xa0,
0x6d, 0xdb, 0x1f, 0x80, 0x37, 0x37, 0x8e, 0x97, 0x1a, 0x45, 0x61, 0x0e, 0x10, 0x24, 0x8a, 0x27,
0xf2, 0x44, 0x91, 0x3e, 0x62, 0x44, 0xc5, 0x55, 0xe6, 0x8e, 0x5a, 0x25, 0x8a, 0x90, 0x25, 0x74,
0xa0, 0x95, 0x33, 0xf7, 0x51, 0xce, 0xe4, 0xa0, 0x13, 0xcf, 0x33, 0x1e, 0x59, 0x5b, 0xec, 0x42,
0xc5, 0xb8, 0xe4, 0xc5, 0x71, 0x38, 0xc5, 0x6b, 0x8d, 0x1d, 0x84, 0xf8, 0x4e, 0x21, 0x6d, 0xdc,
0x2c, 0xf1, 0xae, 0xad, 0x19, 0xc5, 0xed, 0x8e, 0x36, 0xb5, 0x81, 0x94, 0xfe, 0x62, 0x3a, 0xe8,
0xc9, 0x95, 0x84, 0xbd, 0x65, 0x15, 0x16, 0x15, 0xd2, 0xe7, 0x16, 0xd7, 0x9c, 0xd3, 0xd2, 0x66,
0xf6, 0x46, 0xe3, 0x32, 0x62, 0x51, 0x86, 0x4a, 0x67, 0xcc, 0x4d, 0xea, 0x37, 0x45, 0xd5, 0xa6,
0x80, 0xe6, 0xba, 0xb3, 0x08, 0xd8, 0x30, 0x5b, 0x5f, 0xf2, 0x5a, 0xfb, 0x63, 0xb0, 0xa4, 0x41
};
void pgm_decrypt_kov()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040480) != 0x000080) x ^= 0x0001;
if ((i & 0x004008) == 0x004008) x ^= 0x0002;
if ((i & 0x000030) == 0x000010 && (i & 0x180000) != 0x080000) x ^= 0x0004;
if ((i & 0x000242) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x022004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x004820) == 0x004820) x ^= 0x0080;
x ^= kov_tab[i & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char kovsh_tab[256] = {
0xe7, 0x06, 0xa3, 0x70, 0xf2, 0x58, 0xe6, 0x59, 0xe4, 0xcf, 0xc2, 0x79, 0x1d, 0xe3, 0x71, 0x0e,
0xb6, 0x90, 0x9a, 0x2a, 0x8c, 0x41, 0xf7, 0x82, 0x9b, 0xef, 0x99, 0x0c, 0xfa, 0x2f, 0xf1, 0xfe,
0x8f, 0x70, 0xf4, 0xc1, 0xb5, 0x3d, 0x7c, 0x60, 0x4c, 0x09, 0xf4, 0x2e, 0x7c, 0x87, 0x63, 0x5f,
0xce, 0x99, 0x84, 0x95, 0x06, 0x9a, 0x20, 0x23, 0x5a, 0xb9, 0x52, 0x95, 0x48, 0x2c, 0x84, 0x60,
0x69, 0xe3, 0x93, 0x49, 0xb9, 0xd6, 0xbb, 0xd6, 0x9e, 0xdc, 0x96, 0x12, 0xfa, 0x60, 0xda, 0x5f,
0x55, 0x5d, 0x5b, 0x20, 0x07, 0x1e, 0x97, 0x42, 0x77, 0xea, 0x1d, 0xe0, 0x70, 0xfb, 0x6a, 0x00,
0x77, 0x9a, 0xef, 0x1b, 0xe0, 0xf9, 0x0d, 0xc1, 0x2e, 0x2f, 0xef, 0x25, 0x29, 0xe5, 0xd8, 0x2c,
0xaf, 0x01, 0xd9, 0x6c, 0x31, 0xce, 0x5c, 0xea, 0xab, 0x1c, 0x92, 0x16, 0x61, 0xbc, 0xe4, 0x7c,
0x5a, 0x76, 0xe9, 0x92, 0x39, 0x5b, 0x97, 0x60, 0xea, 0x57, 0x83, 0x9c, 0x92, 0x29, 0xa7, 0x12,
0xa9, 0x71, 0x7a, 0xf9, 0x07, 0x68, 0xa7, 0x45, 0x88, 0x10, 0x81, 0x12, 0x2c, 0x67, 0x4d, 0x55,
0x33, 0xf0, 0xfa, 0xd7, 0x1d, 0x4d, 0x0e, 0x63, 0x03, 0x34, 0x65, 0xe2, 0x76, 0x0f, 0x98, 0xa9,
0x5f, 0x9a, 0xd3, 0xca, 0xdd, 0xc1, 0x5b, 0x3d, 0x4d, 0xf8, 0x40, 0x08, 0xdc, 0x05, 0x38, 0x00,
0xcb, 0x24, 0x02, 0xff, 0x39, 0xe2, 0x9e, 0x04, 0x9a, 0x08, 0x63, 0xc8, 0x2b, 0x5a, 0x34, 0x06,
0x62, 0xc1, 0xbb, 0x8a, 0xd0, 0x54, 0x4c, 0x43, 0x21, 0x4e, 0x4c, 0x99, 0x80, 0xc2, 0x3d, 0xce,
0x2a, 0x7b, 0x09, 0x62, 0x1a, 0x91, 0x9b, 0xc3, 0x41, 0x24, 0xa0, 0xfd, 0xb5, 0x67, 0x93, 0x07,
0xa7, 0xb8, 0x85, 0x8a, 0xa1, 0x1e, 0x4f, 0xb6, 0x75, 0x38, 0x65, 0x8a, 0xf9, 0x7c, 0x00, 0xa0
};
void pgm_decrypt_kovsh()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040080) != 0x000080) x ^= 0x0001;
if ((i & 0x004008) == 0x004008 && (i & 0x180000) != 0x000000) x ^= 0x0002;
if ((i & 0x000030) == 0x000010) x ^= 0x0004;
if ((i & 0x000242) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x002004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= kovsh_tab[i & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char kovshp_tab[256] = { // IGS0009rd1040219
0x49, 0x47, 0x53, 0x30, 0x30, 0x30, 0x39, 0x72, 0x64, 0x31, 0x30, 0x34, 0x30, 0x32, 0x31, 0x39,
0xf9, 0x8c, 0xbd, 0x87, 0x16, 0x07, 0x39, 0xeb, 0x29, 0x9e, 0x17, 0xef, 0x4f, 0x64, 0x7c, 0xe0,
0x5f, 0x73, 0x5b, 0xa1, 0x5e, 0x95, 0x0d, 0xf1, 0x40, 0x36, 0x2f, 0x00, 0xe2, 0x8a, 0xbc, 0x32,
0x44, 0xfa, 0x6c, 0x33, 0x0b, 0xd5, 0x4c, 0x3b, 0x36, 0x34, 0x9e, 0xa3, 0x20, 0x2e, 0xf3, 0xa9,
0xb7, 0x3e, 0x87, 0x80, 0xfb, 0xf1, 0xdd, 0x9c, 0xba, 0xd3, 0x9b, 0x3b, 0x8a, 0x9c, 0xa8, 0x37,
0x07, 0x97, 0x84, 0x0c, 0x4e, 0x54, 0xe7, 0x25, 0xba, 0x8e, 0x9d, 0x6b, 0xde, 0x5f, 0xa1, 0x10,
0xc3, 0xa2, 0x79, 0x99, 0x63, 0xa9, 0xd1, 0x2a, 0x65, 0x20, 0x5b, 0x16, 0x1b, 0x41, 0xe6, 0xa7,
0xba, 0x3a, 0xbd, 0x2a, 0xd8, 0xdb, 0x43, 0x3f, 0x2b, 0x85, 0xcc, 0x5f, 0x80, 0x4f, 0xbe, 0xae,
0xfa, 0x79, 0xe8, 0x03, 0x8d, 0x16, 0x22, 0x35, 0xbb, 0xf6, 0x26, 0xa9, 0x8d, 0xd2, 0xaf, 0x19,
0xd4, 0xbb, 0xd0, 0xa6, 0xa1, 0xc4, 0x96, 0x21, 0x02, 0xef, 0xe1, 0x96, 0x00, 0x56, 0x80, 0x1b,
0xd6, 0x9a, 0x8c, 0xd7, 0x73, 0x91, 0x07, 0x55, 0x32, 0x2b, 0xb5, 0x0b, 0xd8, 0xa5, 0x39, 0x26,
0xce, 0xf2, 0x74, 0x98, 0xa1, 0x66, 0x1a, 0x64, 0xb8, 0xa5, 0x96, 0x29, 0x54, 0xcb, 0x21, 0xed,
0xcd, 0xdd, 0x1e, 0x2c, 0x0b, 0x70, 0xb8, 0x22, 0x43, 0x98, 0xbe, 0x54, 0xf3, 0x14, 0xbe, 0x65,
0x21, 0xb7, 0x61, 0x17, 0xcf, 0x19, 0x07, 0xa0, 0xc2, 0x7f, 0xa3, 0x30, 0x75, 0x08, 0xd8, 0xbf,
0x58, 0x1a, 0x55, 0x1b, 0x4e, 0x0d, 0x6d, 0x32, 0x65, 0x15, 0xfb, 0x9e, 0xd8, 0x75, 0x76, 0x6f,
0x42, 0xe2, 0x4f, 0x3c, 0x25, 0x35, 0x93, 0x6c, 0x9b, 0x56, 0xbe, 0xc1, 0x5b, 0x65, 0xde, 0x27
};
void pgm_decrypt_kovshp()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040080) != 0x000080) x ^= 0x0001;
if ((i & 0x004008) == 0x004008 && (i & 0x180000) != 0x000000) x ^= 0x0002;
if ((i & 0x000030) == 0x000010) x ^= 0x0004;
if ((i & 0x000042) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x022004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= kovshp_tab[i & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char photoy2k_tab[256] = {
0xd9, 0x92, 0xb2, 0xbc, 0xa5, 0x88, 0xe3, 0x48, 0x7d, 0xeb, 0xc5, 0x4d, 0x31, 0xe4, 0x82, 0xbc,
0x82, 0xcf, 0xe7, 0xf3, 0x15, 0xde, 0x8f, 0x91, 0xef, 0xc6, 0xb8, 0x81, 0x97, 0xe3, 0xdf, 0x4d,
0x88, 0xbf, 0xe4, 0x05, 0x25, 0x73, 0x1e, 0xd0, 0xcf, 0x1e, 0xeb, 0x4d, 0x18, 0x4e, 0x6f, 0x9f,
0x00, 0x72, 0xc3, 0x74, 0xbe, 0x02, 0x09, 0x0a, 0xb0, 0xb1, 0x8e, 0x9b, 0x08, 0xed, 0x68, 0x6d,
0x25, 0xe8, 0x28, 0x94, 0xa6, 0x44, 0xa6, 0xfa, 0x95, 0x69, 0x72, 0xd3, 0x6d, 0xb6, 0xff, 0xf3,
0x45, 0x4e, 0xa3, 0x60, 0xf2, 0x58, 0xe7, 0x59, 0xe4, 0x4f, 0x70, 0xd2, 0xdd, 0xc0, 0x6e, 0xf3,
0xd7, 0xb2, 0xdc, 0x1e, 0xa8, 0x41, 0x07, 0x5d, 0x60, 0x15, 0xea, 0xcf, 0xdb, 0xc1, 0x1d, 0x4d,
0xb7, 0x42, 0xec, 0xc4, 0xca, 0xa9, 0x40, 0x30, 0x0f, 0x3c, 0xe2, 0x81, 0xe0, 0x5c, 0x51, 0x07,
0xb0, 0x1e, 0x4a, 0xb3, 0x64, 0x3e, 0x1c, 0x62, 0x17, 0xcd, 0xf2, 0xe4, 0x14, 0x9d, 0xa6, 0xd4,
0x64, 0x36, 0xa5, 0xe8, 0x7e, 0x84, 0x0e, 0xb3, 0x5d, 0x79, 0x57, 0xea, 0xd7, 0xad, 0xbc, 0x9e,
0x2d, 0x90, 0x03, 0x9e, 0x0e, 0xc6, 0x98, 0xdb, 0xe3, 0xb6, 0x9f, 0x9b, 0xf6, 0x21, 0xe6, 0x98,
0x94, 0x77, 0xb7, 0x2b, 0xaa, 0xc9, 0xff, 0xef, 0x7a, 0xf2, 0x71, 0x4e, 0x52, 0x06, 0x85, 0x37,
0x81, 0x8e, 0x86, 0x64, 0x39, 0x92, 0x2a, 0xca, 0xf3, 0x3e, 0x87, 0xb5, 0x0c, 0x7b, 0x42, 0x5e,
0x04, 0xa7, 0xfb, 0xd7, 0x13, 0x7f, 0x83, 0x6a, 0x77, 0x0f, 0xa7, 0x34, 0x51, 0x88, 0x9c, 0xac,
0x23, 0x90, 0x4d, 0x4d, 0x72, 0x4e, 0xa3, 0x26, 0x1a, 0x45, 0x61, 0x0e, 0x10, 0x24, 0x8a, 0x27,
0x92, 0x14, 0x23, 0xae, 0x4b, 0x80, 0xae, 0x6a, 0x56, 0x01, 0xac, 0x55, 0xf7, 0x6d, 0x9b, 0x6d
};
void pgm_decrypt_photoy2k()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x40080) != 0x00080) x ^= 0x0001;
if ((i & 0x84008) == 0x84008) x ^= 0x0002;
if ((i & 0x00030) == 0x00010) x ^= 0x0004;
if ((i & 0x00242) != 0x00042) x ^= 0x0008;
if ((i & 0x48100) == 0x48000) x ^= 0x0010;
if ((i & 0x02004) != 0x00004) x ^= 0x0020;
if ((i & 0x01800) != 0x00000) x ^= 0x0040;
if ((i & 0x04820) == 0x04820) x ^= 0x0080;
x ^= photoy2k_tab[i & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char puzlstar_tab[256] = {
0x62, 0x59, 0x17, 0xe3, 0xe1, 0x11, 0x02, 0x97, 0x67, 0x4d, 0x4a, 0x1c, 0x1f, 0x76, 0x64, 0xc1,
0xfa, 0x04, 0xd2, 0x9f, 0x22, 0xf5, 0xfd, 0xfe, 0x89, 0xeb, 0xab, 0x41, 0xc0, 0xac, 0x2b, 0x64,
0xfe, 0x1e, 0x9b, 0x68, 0x07, 0xfd, 0x75, 0x25, 0x24, 0xa0, 0x41, 0x5d, 0x79, 0xb5, 0x67, 0x93,
0xe1, 0xa3, 0x3a, 0x24, 0xa0, 0xbf, 0x64, 0x62, 0x38, 0x65, 0x75, 0x78, 0x8a, 0xf9, 0x7c, 0x00,
0x71, 0x38, 0xc5, 0xe4, 0xdc, 0xf8, 0xc5, 0xc5, 0x8d, 0x1d, 0x6b, 0xb8, 0x84, 0x4e, 0x21, 0x6d,
0x55, 0x95, 0x31, 0x86, 0x11, 0xe6, 0xb1, 0x77, 0x77, 0x3b, 0x01, 0x82, 0xab, 0x88, 0xef, 0x77,
0x08, 0xd8, 0x80, 0xba, 0x41, 0xfb, 0xb3, 0x30, 0x5f, 0xf2, 0x5b, 0xe6, 0x5a, 0x63, 0xb0, 0xa4,
0x37, 0x37, 0x6d, 0x1f, 0x27, 0x0e, 0x80, 0x8e, 0x1a, 0x45, 0x97, 0xdb, 0x61, 0x10, 0x24, 0x8a,
0x62, 0x44, 0xf2, 0x91, 0x74, 0x25, 0x3e, 0xc5, 0xe6, 0x8e, 0x55, 0x44, 0x5a, 0x8a, 0x90, 0x25,
0xa1, 0x0d, 0x43, 0x35, 0x46, 0x80, 0xfe, 0xb3, 0x4e, 0x4c, 0x21, 0xcc, 0x99, 0xc2, 0x3d, 0xce,
0x19, 0xc5, 0x2c, 0xae, 0xe8, 0x94, 0xad, 0xed, 0x36, 0xb5, 0x8e, 0xf1, 0x81, 0xfe, 0x62, 0x3a,
0x8c, 0xe0, 0x90, 0x88, 0xf1, 0x31, 0xc5, 0xd9, 0x3c, 0xf4, 0x70, 0x7d, 0x7d, 0x1c, 0xca, 0xe2,
0x51, 0xce, 0xa0, 0x33, 0x42, 0x1e, 0xf7, 0xe4, 0x13, 0xcf, 0xa0, 0x95, 0x33, 0x59, 0x5b, 0xec,
0xf7, 0x6d, 0x56, 0xac, 0x6a, 0xae, 0x55, 0x9b, 0x92, 0x14, 0x6d, 0x01, 0x23, 0x4b, 0x80, 0xae,
0x65, 0x15, 0xc9, 0x84, 0x66, 0xd7, 0xbd, 0x16, 0xd2, 0xe7, 0x15, 0x95, 0x16, 0x9c, 0xd3, 0xd2,
0x62, 0x51, 0xf6, 0xe3, 0xa6, 0xea, 0x32, 0x86, 0x67, 0xcc, 0x4a, 0x46, 0x4d, 0x37, 0x45, 0xd5
};
void pgm_decrypt_puzlstar()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x40480) != 0x00080) x ^= 0x0001;
if ((i & 0x00030) == 0x00010) x ^= 0x0004;
if ((i & 0x00242) != 0x00042) x ^= 0x0008;
if ((i & 0x08100) == 0x08000) x ^= 0x0010;
if ((i & 0x22004) != 0x00004) x ^= 0x0020;
if ((i & 0x11800) != 0x10000) x ^= 0x0040;
if ((i & 0x04820) == 0x04820) x ^= 0x0080;
x ^= puzlstar_tab[i & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char puzzli2_tab[256] = {
0xb7, 0x66, 0xa3, 0xc0, 0x51, 0x55, 0x6d, 0x63, 0x86, 0x60, 0x64, 0x6c, 0x67, 0x18, 0x0b, 0x05,
0x62, 0xff, 0xe0, 0x1e, 0x30, 0x21, 0x2e, 0x40, 0x41, 0xb9, 0x60, 0x38, 0xd1, 0x24, 0x7e, 0x36,
0x7a, 0x0b, 0x1c, 0x69, 0x4f, 0x09, 0xe1, 0x9e, 0xcf, 0xcd, 0x7c, 0x00, 0x73, 0x08, 0x77, 0x37,
0x5f, 0x50, 0x32, 0x3e, 0xd3, 0x54, 0x77, 0x6b, 0x60, 0x60, 0x74, 0x7c, 0x55, 0x4f, 0x44, 0x5e,
0x66, 0x5c, 0x58, 0x26, 0x35, 0x29, 0x3f, 0x35, 0x3f, 0x1c, 0x0b, 0x0d, 0x08, 0x5b, 0x59, 0x5c,
0xa0, 0xa5, 0x87, 0x85, 0x24, 0x75, 0x5f, 0x42, 0x1b, 0xf3, 0x1a, 0x58, 0x17, 0x58, 0x71, 0x6b,
0x69, 0x89, 0x7d, 0x3a, 0xf3, 0xc4, 0x5d, 0xa0, 0x4f, 0x27, 0x58, 0xc4, 0xa8, 0xdd, 0xa8, 0xfb,
0xbe, 0xa4, 0xe2, 0xee, 0x07, 0x10, 0x90, 0x72, 0x99, 0x08, 0x68, 0x6d, 0x5c, 0x5c, 0x6d, 0x58,
0x2f, 0xdc, 0x15, 0xd5, 0xd6, 0xd6, 0x3b, 0x3b, 0xf9, 0x32, 0xcc, 0xdd, 0xd4, 0xf1, 0xea, 0xed,
0xe4, 0xf6, 0xf2, 0x91, 0xca, 0xc1, 0xed, 0xf2, 0xf6, 0xfb, 0xc0, 0xe8, 0xe3, 0xe7, 0xfa, 0xf1,
0xf5, 0x08, 0x26, 0x2b, 0x2f, 0x34, 0x39, 0x13, 0x28, 0x07, 0x88, 0x5b, 0x8f, 0x94, 0x9b, 0x2e,
0xf5, 0xab, 0x72, 0x76, 0x7a, 0x40, 0xb9, 0x09, 0xd8, 0x3b, 0xcd, 0x31, 0x3d, 0x42, 0xab, 0xb1,
0xb5, 0xb9, 0x3b, 0xe3, 0x0b, 0x65, 0x18, 0xfb, 0x1f, 0x12, 0xe4, 0xe8, 0xec, 0xf2, 0xf7, 0xfc,
0xc0, 0xe8, 0xe0, 0xe6, 0xfa, 0xf1, 0xf4, 0x0b, 0x26, 0x2b, 0x30, 0x35, 0x39, 0x13, 0x29, 0x21,
0x0c, 0x11, 0x16, 0x1b, 0x1f, 0x64, 0x0e, 0x60, 0x05, 0x79, 0x7c, 0x37, 0x00, 0x0f, 0x4f, 0x38,
0x1d, 0x18, 0xa2, 0xb6, 0xb2, 0xa9, 0xac, 0xab, 0xae, 0x91, 0x98, 0x8d, 0x91, 0xbb, 0xb1, 0xc0
};
void pgm_decrypt_puzzli2()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040080) != 0x000080) x ^= 0x0001;
if ((i & 0x004008) == 0x004008) x ^= 0x0002;
if ((i & 0x000030) == 0x000010) x ^= 0x0004;
if ((i & 0x000242) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x022004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x004820) == 0x004820) x ^= 0x0080;
x ^= puzzli2_tab[i & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char oldsplus_tab[256] = { // IGS0013RD1040727
0x49, 0x47, 0x53, 0x30, 0x30, 0x31, 0x33, 0x52, 0x44, 0x31, 0x30, 0x34, 0x30, 0x37, 0x32, 0x37,
0xf5, 0x79, 0x6d, 0xab, 0x04, 0x22, 0x51, 0x96, 0xf2, 0x72, 0xe8, 0x3a, 0x96, 0xd2, 0x9a, 0xcc,
0x3f, 0x47, 0x3c, 0x09, 0xf2, 0xd9, 0x72, 0x41, 0xe6, 0x44, 0x43, 0xa7, 0x3e, 0xe2, 0xfd, 0xd8,
0x06, 0xd8, 0x4c, 0xa9, 0x70, 0x80, 0x95, 0x35, 0x50, 0x17, 0x99, 0x27, 0xd5, 0xa8, 0x47, 0x45,
0x89, 0x38, 0xe1, 0x3d, 0x8c, 0x33, 0x53, 0xb4, 0x0d, 0x17, 0xd1, 0x8d, 0x09, 0x5f, 0xaf, 0x76,
0x48, 0xb2, 0x85, 0xb9, 0x95, 0x4c, 0x83, 0x42, 0x3d, 0xad, 0x11, 0xec, 0xca, 0x82, 0xac, 0x10,
0x01, 0xd0, 0xfd, 0x50, 0x19, 0x67, 0x3b, 0xa0, 0x3e, 0x86, 0xc2, 0x97, 0x46, 0xcb, 0xf4, 0xf5,
0xb3, 0x5f, 0x50, 0x74, 0xe9, 0x5f, 0xd2, 0xd4, 0xb0, 0x8d, 0x8a, 0x21, 0xed, 0x37, 0x80, 0x47,
0x9d, 0x68, 0xc7, 0xd9, 0x12, 0x4e, 0xdf, 0x1e, 0x72, 0xeb, 0x50, 0x5e, 0x6d, 0x00, 0x85, 0x6b,
0x3e, 0x37, 0xe6, 0x72, 0xe5, 0x8f, 0x3a, 0x03, 0xa3, 0x0d, 0x3b, 0x5f, 0xb6, 0xa1, 0x7b, 0x02,
0x56, 0x56, 0x77, 0x71, 0xef, 0xbe, 0xf9, 0x46, 0xa1, 0x9d, 0xb3, 0x79, 0xf6, 0xd5, 0x19, 0xf0,
0xe2, 0x91, 0x7e, 0x4a, 0x01, 0xb6, 0x73, 0xe8, 0x0c, 0x86, 0x5d, 0x3e, 0x9c, 0x97, 0x55, 0x58,
0x23, 0xf4, 0x45, 0xb0, 0x28, 0x91, 0x40, 0x2f, 0xc2, 0xf4, 0x21, 0x81, 0x58, 0x22, 0x68, 0x9d,
0x97, 0xc7, 0x51, 0x95, 0xb4, 0xaa, 0x36, 0x9b, 0xe4, 0x51, 0x27, 0x55, 0x18, 0xf0, 0xc7, 0x62,
0xfe, 0x98, 0x6a, 0x2d, 0x35, 0x9d, 0x6c, 0xf1, 0xcf, 0x48, 0xd4, 0x0d, 0x0c, 0xbe, 0x2a, 0x8a,
0x55, 0x31, 0x96, 0xea, 0x78, 0x45, 0x3a, 0x33, 0x23, 0xc5, 0xd1, 0x3c, 0xa3, 0x86, 0x88, 0x38
};
void pgm_decrypt_oldsplus()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040480) != 0x000080) x ^= 0x0001;
if ((i & 0x004008) == 0x004008) x ^= 0x0002;
if ((i & 0x000030) == 0x000010) x ^= 0x0004;
if ((i & 0x000242) != 0x000042) x ^= 0x0008;
if ((i & 0x048100) == 0x048000) x ^= 0x0010;
if ((i & 0x002004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= oldsplus_tab[i & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char py2k2_tab[256] = {
0x74, 0xe8, 0xa8, 0x64, 0x26, 0x44, 0xa6, 0x9a, 0xa5, 0x69, 0xa2, 0xd3, 0x6d, 0xba, 0xff, 0xf3,
0xeb, 0x6e, 0xe3, 0x70, 0x72, 0x58, 0x27, 0xd9, 0xe4, 0x9f, 0x50, 0xa2, 0xdd, 0xce, 0x6e, 0xf6,
0x44, 0x72, 0x0c, 0x7e, 0x4d, 0x41, 0x77, 0x2d, 0x00, 0xad, 0x1a, 0x5f, 0x6b, 0xc0, 0x1d, 0x4e,
0x4c, 0x72, 0x62, 0x3c, 0x32, 0x28, 0x43, 0xf8, 0x9d, 0x52, 0x05, 0x7e, 0xd1, 0xee, 0x82, 0x61,
0x3b, 0x3f, 0x77, 0xf3, 0x8f, 0x7e, 0x3f, 0xf1, 0xdf, 0x8f, 0x68, 0x43, 0xd7, 0x68, 0xdf, 0x19,
0x87, 0xff, 0x74, 0xe5, 0x3f, 0x43, 0x8e, 0x80, 0x0f, 0x7e, 0xdb, 0x32, 0xe8, 0xd1, 0x66, 0x8f,
0xbe, 0xe2, 0x33, 0x94, 0xc8, 0x32, 0x39, 0xfa, 0xf0, 0x43, 0xde, 0x84, 0x18, 0xd0, 0x6d, 0xd5,
0x74, 0x98, 0xf8, 0x64, 0xcf, 0x84, 0xc6, 0xea, 0x55, 0x32, 0xe2, 0x38, 0xdd, 0xea, 0xfd, 0x6c,
0xeb, 0x6e, 0xe3, 0x70, 0xae, 0x38, 0xc7, 0xd9, 0x54, 0x84, 0x10, 0xc1, 0xfd, 0x1e, 0x6e, 0x6d,
0x37, 0xe0, 0x03, 0x9e, 0x06, 0x36, 0x68, 0x5b, 0xe3, 0xf6, 0x7f, 0x0b, 0x56, 0x79, 0xe0, 0xa8,
0x98, 0x77, 0xc7, 0x2b, 0xa5, 0x79, 0xff, 0x2f, 0xca, 0x15, 0x71, 0x7e, 0x02, 0xbf, 0x87, 0xb7,
0x7a, 0x8e, 0xe6, 0x64, 0x32, 0x62, 0x2a, 0xca, 0x23, 0x72, 0x87, 0xb5, 0x0c, 0x02, 0x4b, 0xee,
0x44, 0x72, 0x9c, 0x7e, 0x5d, 0xc1, 0xa7, 0x1d, 0x30, 0x38, 0xda, 0xc9, 0x5b, 0xd0, 0x11, 0xf9,
0xb1, 0x72, 0x6c, 0x04, 0x31, 0xc9, 0x50, 0x60, 0x6f, 0xc1, 0xf2, 0xae, 0x00, 0xf4, 0x5d, 0x66,
0x43, 0x0e, 0x7a, 0xc3, 0x76, 0xae, 0x3c, 0xc2, 0xb7, 0xc9, 0x52, 0xf4, 0x74, 0x51, 0xaf, 0x12,
0x19, 0xc6, 0x75, 0xe8, 0x6c, 0x54, 0x7e, 0x63, 0xdd, 0xae, 0x07, 0x5a, 0xb7, 0x00, 0xb5, 0x5e
};
void pgm_decrypt_py2k2()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040480) != 0x000080) x ^= 0x0001;
if ((i & 0x084008) == 0x084008) x ^= 0x0002;
if ((i & 0x000030) == 0x000010 && (i & 0x180000) != 0x080000) x ^= 0x0004;
if ((i & 0x000042) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x022004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x004820) == 0x004820) x ^= 0x0080;
x ^= py2k2_tab[i & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char ketsui_tab[256] = { // IGS0004RD1021015
0x49, 0x47, 0x53, 0x30, 0x30, 0x30, 0x34, 0x52, 0x44, 0x31, 0x30, 0x32, 0x31, 0x30, 0x31, 0x35,
0x7c, 0x49, 0x27, 0xa5, 0xff, 0xf6, 0x98, 0x2d, 0x0f, 0x3d, 0x12, 0x23, 0xe2, 0x30, 0x50, 0xcf,
0xf1, 0x82, 0xf0, 0xce, 0x48, 0x44, 0x5b, 0xf3, 0x0d, 0xdf, 0xf8, 0x5d, 0x50, 0x53, 0x91, 0xd9,
0x12, 0xaf, 0x05, 0x7a, 0x98, 0xd0, 0x2f, 0x76, 0xf1, 0x5d, 0x17, 0x44, 0xc5, 0x03, 0x58, 0xf4,
0x61, 0xee, 0xd1, 0xce, 0x00, 0x88, 0x90, 0x2e, 0x5c, 0x76, 0xfb, 0x9f, 0x75, 0xcf, 0x40, 0x37,
0xa1, 0x9f, 0x00, 0x32, 0xd5, 0x9c, 0x37, 0xd2, 0x32, 0x27, 0x6f, 0x76, 0xd3, 0x86, 0x25, 0xf9,
0xd6, 0x60, 0x7b, 0x4e, 0xa9, 0x7a, 0x20, 0x59, 0x96, 0xb1, 0x7d, 0x10, 0x92, 0x37, 0x22, 0xd2,
0x42, 0x12, 0x6f, 0x07, 0x4f, 0xd2, 0x87, 0xfa, 0xeb, 0x92, 0x71, 0xf3, 0xa4, 0x31, 0x91, 0x98,
0x68, 0xd2, 0x47, 0x86, 0xda, 0x92, 0xe5, 0x2b, 0xd4, 0x89, 0xd7, 0xe7, 0x3d, 0x03, 0x0d, 0x63,
0x0c, 0x00, 0xac, 0x31, 0x9d, 0xe9, 0xf6, 0xa5, 0x34, 0x95, 0x77, 0xf2, 0xcf, 0x7c, 0x72, 0x89,
0x31, 0x3a, 0x8b, 0xae, 0x2b, 0x47, 0xb6, 0x5d, 0x2d, 0xf5, 0x5f, 0x5c, 0x0e, 0xab, 0xdb, 0xa1,
0x18, 0x60, 0x0e, 0xe6, 0x58, 0x5b, 0x5e, 0x8b, 0x24, 0x29, 0xd8, 0xac, 0xed, 0xdf, 0xa2, 0x83,
0x46, 0x91, 0xa1, 0xff, 0x35, 0x13, 0x6a, 0xa5, 0xba, 0xef, 0x6e, 0xa8, 0x9e, 0xa6, 0x62, 0x44,
0x7e, 0x2c, 0xed, 0x60, 0x17, 0x9e, 0x96, 0x64, 0xd3, 0x46, 0xec, 0x58, 0x95, 0xd1, 0xf7, 0x3e,
0xc2, 0xcf, 0xdf, 0xb0, 0x90, 0x6c, 0xdb, 0xbe, 0x93, 0x6d, 0x5d, 0x02, 0x85, 0x6e, 0x7c, 0x05,
0x55, 0x5a, 0xa1, 0xd7, 0x73, 0x2b, 0x76, 0xe9, 0x5b, 0xe4, 0x0c, 0x2e, 0x60, 0xcb, 0x4b, 0x72
};
void pgm_decrypt_ketsui()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040480) != 0x000080) x ^= 0x0001;
if ((i & 0x004008) == 0x004008) x ^= 0x0002;
if ((i & 0x080030) == 0x000010) x ^= 0x0004; // due to address starting at 0 and not 100000/2!
if ((i & 0x000042) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x002004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= ketsui_tab[i & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char espgal_tab[256] = { // IGS0007RD1030909
0x49, 0x47, 0x53, 0x30, 0x30, 0x30, 0x37, 0x52, 0x44, 0x31, 0x30, 0x33, 0x30, 0x39, 0x30, 0x39,
0xa7, 0xf1, 0x0a, 0xca, 0x69, 0xb2, 0xce, 0x86, 0xec, 0x3d, 0xa2, 0x5a, 0x03, 0xe9, 0xbf, 0xba,
0xf7, 0xd5, 0xec, 0x68, 0x03, 0x90, 0x15, 0xcc, 0x0d, 0x08, 0x2d, 0x76, 0xa5, 0xb5, 0x41, 0xf1,
0x43, 0x06, 0xdd, 0xcb, 0xbd, 0x0c, 0xa4, 0xe2, 0x08, 0x65, 0x2a, 0xf0, 0x30, 0x6b, 0x15, 0x59,
0x99, 0x9e, 0x75, 0x35, 0x77, 0x4f, 0x60, 0x99, 0x8c, 0x8f, 0xd2, 0x2b, 0x21, 0x57, 0xc3, 0xe5,
0x48, 0xf9, 0x8a, 0x29, 0x50, 0xc6, 0x71, 0x06, 0x89, 0x01, 0x9a, 0xc9, 0x39, 0x04, 0x12, 0xc8,
0xdf, 0xb1, 0x33, 0x6b, 0xa7, 0x1c, 0x3f, 0x7b, 0x2d, 0x76, 0x3a, 0xaf, 0x76, 0x3d, 0x08, 0x74,
0x2c, 0xa2, 0xc8, 0xfd, 0x1a, 0x3a, 0x6f, 0x8b, 0xe8, 0xe9, 0xa9, 0xfe, 0x17, 0x0c, 0xed, 0x9d,
0x40, 0xe6, 0xdf, 0x22, 0x89, 0x4d, 0xea, 0x09, 0x68, 0x96, 0x1e, 0x1a, 0x9c, 0xbd, 0x47, 0x35,
0x68, 0xd9, 0x4f, 0x5e, 0x12, 0xbf, 0xd6, 0x09, 0x9d, 0xf6, 0x0f, 0xa7, 0xc2, 0xdb, 0xde, 0x70,
0x35, 0x15, 0x2f, 0x73, 0x16, 0x3c, 0x9a, 0xdc, 0xb5, 0xc5, 0x35, 0x86, 0x8a, 0x31, 0xb8, 0xc1,
0x74, 0x76, 0xd7, 0x65, 0x32, 0xad, 0xdc, 0x17, 0x1f, 0xfe, 0x85, 0xda, 0x32, 0xc9, 0x1d, 0xda,
0x36, 0x16, 0xde, 0x76, 0x45, 0x3f, 0x85, 0x8c, 0x8b, 0xdc, 0x37, 0x08, 0x39, 0xef, 0x94, 0xaf,
0xc8, 0x51, 0x19, 0x29, 0x70, 0x5d, 0xbb, 0x4e, 0xe8, 0xdb, 0xc2, 0xb2, 0x5f, 0x2e, 0xe3, 0x73,
0xba, 0xc2, 0xa1, 0x42, 0x10, 0xb0, 0xe5, 0xb0, 0x64, 0xb4, 0xdc, 0xbb, 0xa1, 0x51, 0x12, 0x98,
0xdc, 0x43, 0xcc, 0xc3, 0xc5, 0x25, 0xab, 0x45, 0x6e, 0x63, 0x7e, 0x45, 0x40, 0x63, 0x67, 0xd2
};
void pgm_decrypt_espgaluda()
{
unsigned short *src = (unsigned short *)PGM68KROM;
for (int i = 0; i < nPGM68KROMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040480) != 0x000080) x ^= 0x0001;
if ((i & 0x084008) == 0x084008) x ^= 0x0002;
if ((i & 0x000030) == 0x000010) x ^= 0x0004;
if ((i & 0x000042) != 0x000042) x ^= 0x0008;
if ((i & 0x048100) == 0x048000) x ^= 0x0010;
if ((i & 0x022004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= espgal_tab[i & 0xff] << 8;
src[i] = swapWord(x);
}
}
void pgm_decrypt_svg()
{
unsigned short *src = (unsigned short *)PGMUSER0;
for (int i = 0; i < nPGMExternalARMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040080) != 0x000080) x ^= 0x0001;
if ((i & 0x004008) == 0x004008) x ^= 0x0002;
if ((i & 0x080030) == 0x080010) x ^= 0x0004;
if ((i & 0x000042) != 0x000042) x ^= 0x0008;
if ((i & 0x048100) == 0x048000) x ^= 0x0010;
if ((i & 0x002004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
src[i] = swapWord(x);
}
}
static unsigned char dfront_tab[256] = {
0x51, 0xc4, 0xe3, 0x10, 0x1c, 0xad, 0x8a, 0x39, 0x8c, 0xe0, 0xa5, 0x04, 0x0f, 0xe4, 0x35, 0xc3,
0x2d, 0x6b, 0x32, 0xe2, 0x60, 0x54, 0x63, 0x06, 0xa3, 0xf1, 0x0b, 0x5f, 0x6c, 0x5c, 0xb3, 0xec,
0x77, 0x61, 0x69, 0xe7, 0x3c, 0xb7, 0x42, 0x72, 0x1a, 0x70, 0xb0, 0x96, 0xa4, 0x28, 0xc0, 0xfb,
0x0a, 0x00, 0xcb, 0x15, 0x49, 0x48, 0xd3, 0x94, 0x58, 0xcf, 0x41, 0x86, 0x17, 0x71, 0xb1, 0xbd,
0x21, 0x01, 0x37, 0x1e, 0xba, 0xeb, 0xf3, 0x59, 0xf6, 0xa7, 0x29, 0x4f, 0xb5, 0xca, 0x4c, 0x34,
0x20, 0xa2, 0x62, 0x4b, 0x93, 0x9e, 0x47, 0x9f, 0x8d, 0x0e, 0x1b, 0xb6, 0x4d, 0x82, 0xd5, 0xf4,
0x85, 0x79, 0x53, 0x92, 0x9b, 0xf7, 0xea, 0x44, 0x76, 0x1f, 0x22, 0x45, 0xed, 0xbe, 0x11, 0x55,
0xaf, 0xf5, 0xf8, 0x50, 0x07, 0xe6, 0xc7, 0x5e, 0xd7, 0xde, 0xe5, 0x26, 0x2b, 0xf2, 0x6a, 0x8b,
0xb8, 0x98, 0x89, 0xdb, 0x14, 0x5b, 0xc5, 0x78, 0xdc, 0xd0, 0x87, 0x5d, 0xc1, 0x0d, 0x95, 0x97,
0x7e, 0xa8, 0x24, 0x3d, 0xe1, 0xd1, 0x19, 0xa6, 0x99, 0xd8, 0x83, 0x1d, 0xff, 0x30, 0x9d, 0x05,
0xd4, 0x02, 0x27, 0x7b, 0x13, 0xb2, 0x7f, 0x40, 0x12, 0xa0, 0x68, 0x67, 0x4e, 0x3a, 0x46, 0xb9,
0xee, 0xdf, 0x66, 0xd6, 0x8f, 0xa9, 0x0c, 0x91, 0x65, 0x18, 0x52, 0x56, 0xd9, 0x74, 0x09, 0x6e,
0xc6, 0x73, 0xc9, 0xfc, 0x03, 0x43, 0xef, 0xaa, 0x7c, 0xbb, 0x2c, 0x90, 0xcc, 0xce, 0xe8, 0xae,
0x2a, 0xf9, 0x57, 0x88, 0xc8, 0xe9, 0x5a, 0xdd, 0x2e, 0x7d, 0x64, 0xc2, 0x6d, 0x3e, 0xfa, 0x80,
0x16, 0xcd, 0x6f, 0x84, 0x8e, 0x9c, 0xf0, 0xac, 0xb4, 0x9a, 0x2f, 0xbc, 0x31, 0x23, 0xfe, 0x38,
0x08, 0x75, 0xa1, 0x33, 0xab, 0xd2, 0xda, 0x81, 0xbf, 0x7a, 0x3b, 0x3f, 0x4a, 0xfd, 0x25, 0x36
};
void pgm_decrypt_dfront()
{
unsigned short *src = (unsigned short *)PGMUSER0;
for (int i = 0; i < nPGMExternalARMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040080) != 0x000080) x ^= 0x0001;
if ((i & 0x104008) == 0x104008) x ^= 0x0002;
if ((i & 0x080030) == 0x080010) x ^= 0x0004;
if ((i & 0x000042) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x002004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x004820) == 0x004820) x ^= 0x0080;
x ^= dfront_tab[(i >> 1) & 0xff] << 8;
src[i] = swapWord(x);
}
}
static unsigned char ddp2_tab[256] = {
0x2a, 0x4a, 0x39, 0x98, 0xac, 0x39, 0xb2, 0x55, 0x72, 0xf3, 0x7b, 0x3c, 0xee, 0x94, 0x6e, 0xd5,
0xcd, 0xbc, 0x9a, 0xd0, 0x45, 0x7d, 0x49, 0x68, 0xb1, 0x61, 0x54, 0xef, 0xa2, 0x84, 0x29, 0x20,
0x32, 0x52, 0x82, 0x04, 0x38, 0x69, 0x9f, 0x24, 0x46, 0xf4, 0x3f, 0xc2, 0xf1, 0x25, 0xac, 0x2d,
0xdf, 0x2d, 0xb4, 0x51, 0xc7, 0xb5, 0xe5, 0x88, 0xbd, 0x3b, 0x5a, 0x25, 0x5b, 0xc7, 0xae, 0x5f,
0x43, 0xcf, 0x89, 0xd9, 0xe2, 0x63, 0xc6, 0x76, 0x21, 0x2b, 0x77, 0xc0, 0x27, 0x98, 0xfd, 0x09,
0xe1, 0x8c, 0x26, 0x2e, 0x92, 0x99, 0xbc, 0xbe, 0x0e, 0xba, 0xbf, 0x70, 0xe7, 0xb7, 0xe9, 0x37,
0x5c, 0xd1, 0x5e, 0xad, 0x22, 0x17, 0xc5, 0x67, 0x9d, 0xc6, 0xfb, 0x53, 0xc7, 0x4d, 0x32, 0xb4,
0xf2, 0x43, 0x53, 0x7c, 0x01, 0xfe, 0xd2, 0x91, 0x40, 0x85, 0xa3, 0xe8, 0xdf, 0xdb, 0xff, 0x6c,
0x64, 0x15, 0xcd, 0x8e, 0x07, 0x82, 0x78, 0x8d, 0x4e, 0x2d, 0x66, 0x8a, 0x62, 0x6f, 0xd3, 0x6a,
0xae, 0x16, 0x44, 0x1e, 0xed, 0xc4, 0x12, 0x7a, 0xbe, 0x05, 0x06, 0xce, 0x9b, 0x8a, 0xf7, 0xf8,
0x74, 0x23, 0x73, 0x74, 0xb8, 0x13, 0xc2, 0x42, 0xea, 0xf9, 0x7f, 0xa9, 0xaf, 0x56, 0xd6, 0xb3,
0xb7, 0xc4, 0x47, 0x31, 0x67, 0xaa, 0x58, 0x8b, 0x47, 0x1b, 0xf5, 0x75, 0x95, 0x8f, 0xf0, 0x3a,
0x85, 0x76, 0x59, 0x24, 0x0c, 0xd7, 0x00, 0xb3, 0xdc, 0xfc, 0x65, 0x34, 0xde, 0xfa, 0xd8, 0xc3,
0xc3, 0x5e, 0xe3, 0x9e, 0x02, 0x28, 0x50, 0x81, 0x95, 0x2f, 0xe4, 0xb5, 0xa0, 0x4d, 0xa1, 0x36,
0x9d, 0x18, 0x6d, 0x79, 0x19, 0x3b, 0x1d, 0xb8, 0xe1, 0xcc, 0x61, 0x1a, 0xe2, 0x31, 0x4c, 0x3f,
0xdc, 0xca, 0xd4, 0xda, 0xcd, 0xd2, 0x83, 0xca, 0xeb, 0x4f, 0xf2, 0x2f, 0x2d, 0x2a, 0xec, 0x1f
};
void pgm_decrypt_ddp2()
{
unsigned short *src = (unsigned short *)PGMUSER0;
for (int i = 0; i < nPGMExternalARMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x0480) != 0x0080) x ^= 0x0001;
if ((i & 0x0042) != 0x0042) x ^= 0x0008;
if ((i & 0x8100) == 0x8000) x ^= 0x0010;
if ((i & 0x2004) != 0x0004) x ^= 0x0020;
if ((i & 0x1800) != 0x0000) x ^= 0x0040;
if ((i & 0x0820) == 0x0820) x ^= 0x0080;
x ^= ddp2_tab[(i >> 1) & 0xff] << 8;
src[i] = swapWord(x);
}
}
static unsigned char mm_tab[256] = {
0xd0, 0x45, 0xbc, 0x84, 0x93, 0x60, 0x7d, 0x49, 0x68, 0xb1, 0x54, 0xa2, 0x05, 0x29, 0x41, 0x20,
0x04, 0x08, 0x52, 0x25, 0x89, 0xf4, 0x69, 0x9f, 0x24, 0x46, 0x3d, 0xf1, 0xf9, 0xab, 0xa6, 0x2d,
0x18, 0x19, 0x6d, 0x33, 0x79, 0x23, 0x3b, 0x1d, 0xe0, 0xb8, 0x61, 0x1a, 0xe1, 0x4c, 0x5d, 0x3f,
0x5e, 0x02, 0xe3, 0x4d, 0x9e, 0x80, 0x28, 0x50, 0xa0, 0x81, 0xe4, 0xa5, 0x97, 0xa1, 0x86, 0x36,
0x1e, 0xed, 0x16, 0x8a, 0x44, 0x06, 0x64, 0x12, 0x9a, 0x7e, 0xce, 0x9b, 0xef, 0xf7, 0x3e, 0xf8,
0x15, 0x07, 0xcb, 0x6f, 0x8e, 0x3c, 0x82, 0x70, 0x62, 0x8d, 0x66, 0x7a, 0x4e, 0xd3, 0xb6, 0x6a,
0x51, 0xa7, 0x2c, 0xc7, 0xa4, 0x0b, 0xb5, 0xe5, 0x88, 0xbd, 0x5a, 0x5b, 0x1b, 0xae, 0xe6, 0x5f,
0x2e, 0x92, 0x8c, 0xb7, 0x96, 0xba, 0x99, 0xbb, 0xbe, 0x0e, 0xbf, 0xe7, 0x2f, 0xe9, 0x30, 0x37,
0x98, 0xac, 0x4a, 0x94, 0x38, 0xf3, 0x39, 0xb2, 0x55, 0x72, 0x7b, 0xee, 0xdd, 0x6e, 0x11, 0xd5,
0x26, 0xa8, 0x71, 0xd6, 0x74, 0x7f, 0x13, 0xc2, 0x56, 0xea, 0xa9, 0xaf, 0xc3, 0x42, 0x03, 0xb3,
0xc4, 0x6b, 0x47, 0xf0, 0x31, 0xf5, 0xaa, 0x58, 0x8f, 0x48, 0x75, 0x95, 0x35, 0x8b, 0x57, 0x3a,
0x73, 0x0c, 0x59, 0xd8, 0x14, 0x65, 0xd7, 0x00, 0xfa, 0xdc, 0x34, 0xde, 0xc0, 0xb0, 0x87, 0xc1,
0xc8, 0xcd, 0xd4, 0x2a, 0xda, 0xe8, 0xd2, 0x83, 0x0d, 0xca, 0xf2, 0x0f, 0xeb, 0xec, 0x9c, 0x1f,
0xad, 0x22, 0xd1, 0x4b, 0x5c, 0xf6, 0x17, 0xc5, 0x67, 0x9d, 0xfb, 0xc9, 0xcc, 0x32, 0x1c, 0xb4,
0xd9, 0xe2, 0xcf, 0x90, 0xb9, 0x2b, 0x63, 0xc6, 0x76, 0x21, 0x77, 0x27, 0xfc, 0xfd, 0x0a, 0x09,
0x7c, 0x01, 0x43, 0xdb, 0x53, 0x85, 0xfe, 0x78, 0x91, 0x40, 0xa3, 0xdf, 0x4f, 0xff, 0x10, 0x6c
};
void pgm_decrypt_martmast()
{
unsigned short *src = (unsigned short *)PGMUSER0;
for (int i = 0; i < nPGMExternalARMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040480) != 0x000080) x ^= 0x0001;
if ((i & 0x004008) == 0x004008) x ^= 0x0002;
if ((i & 0x000030) == 0x000010) x ^= 0x0004;
if ((i & 0x000242) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x022004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= mm_tab[(i >> 1) & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char kov2_tab[256] = {
0x11, 0x4a, 0x38, 0x98, 0xac, 0x39, 0xb2, 0x55, 0x72, 0xf3, 0x7b, 0x3c, 0xee, 0x94, 0x6e, 0xd5,
0x41, 0xbc, 0x93, 0xd0, 0x45, 0x7d, 0x49, 0x68, 0xb1, 0x60, 0x54, 0xef, 0xa2, 0x84, 0x29, 0x20,
0xa6, 0x52, 0x89, 0x04, 0x08, 0x69, 0x9f, 0x24, 0x46, 0xf4, 0x3d, 0xc3, 0xf1, 0x25, 0xab, 0x2d,
0xe6, 0x2c, 0xa4, 0x51, 0xa7, 0xb5, 0xe5, 0x88, 0xbd, 0x0b, 0x5a, 0x35, 0x5b, 0xc7, 0xae, 0x5f,
0x0a, 0xcf, 0xb9, 0xd9, 0xe2, 0x63, 0xc6, 0x76, 0x21, 0x2b, 0x77, 0xc0, 0x27, 0x90, 0xfd, 0x09,
0x30, 0x8c, 0x96, 0x2e, 0x92, 0x99, 0xbb, 0xbe, 0x0e, 0xba, 0xbf, 0x80, 0xe7, 0xb7, 0xe9, 0x37,
0x1c, 0xd1, 0x5c, 0xad, 0x22, 0x17, 0xc5, 0x67, 0x9d, 0xf6, 0xfb, 0x23, 0xc9, 0x4b, 0x32, 0xb4,
0x10, 0x43, 0x53, 0x7c, 0x01, 0xfe, 0x78, 0x91, 0x40, 0x85, 0xa3, 0xe8, 0xdf, 0xdb, 0xff, 0x6c,
0xb6, 0x15, 0xcb, 0x8e, 0x07, 0x82, 0x70, 0x8d, 0x4e, 0xdd, 0x66, 0x7a, 0x62, 0x6f, 0xd3, 0x6a,
0x3e, 0x16, 0x44, 0x1e, 0xed, 0x64, 0x12, 0x9a, 0x7e, 0x05, 0x06, 0xce, 0x9b, 0x8a, 0xf7, 0xf8,
0x03, 0x26, 0x71, 0x74, 0xa8, 0x13, 0xc2, 0x42, 0xea, 0xf9, 0x7f, 0xa9, 0xaf, 0x56, 0xd6, 0xb3,
0x57, 0xc4, 0x47, 0x31, 0x6b, 0xaa, 0x58, 0x8b, 0x48, 0x1b, 0xf5, 0x75, 0x95, 0x8f, 0xf0, 0x3a,
0x87, 0x73, 0x59, 0x14, 0x0c, 0xd7, 0x00, 0xb0, 0xdc, 0xfc, 0x65, 0x34, 0xde, 0xfa, 0xd8, 0xc1,
0x86, 0x5e, 0xe3, 0x9e, 0x02, 0x28, 0x50, 0x81, 0x97, 0x2f, 0xe4, 0xa5, 0xa0, 0x4d, 0xa1, 0x36,
0x5d, 0x18, 0x6d, 0x79, 0x19, 0x3b, 0x1d, 0xb8, 0xe1, 0xcc, 0x61, 0x1a, 0xe0, 0x33, 0x4c, 0x3f,
0x9c, 0xc8, 0xd4, 0xda, 0xcd, 0xd2, 0x83, 0xca, 0xeb, 0x4f, 0xf2, 0x0f, 0x0d, 0x2a, 0xec, 0x1f
};
void pgm_decrypt_kov2()
{
unsigned short *src = (unsigned short *)PGMUSER0;
for (int i = 0; i < nPGMExternalARMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x40080) != 0x00080) x ^= 0x0001;
if ((i & 0x80030) == 0x80010) x ^= 0x0004;
if ((i & 0x00042) != 0x00042) x ^= 0x0008;
if ((i & 0x48100) == 0x48000) x ^= 0x0010;
if ((i & 0x22004) != 0x00004) x ^= 0x0020;
if ((i & 0x01800) != 0x00000) x ^= 0x0040;
if ((i & 0x00820) == 0x00820) x ^= 0x0080;
x ^= kov2_tab[(i >> 1) & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char kov2p_tab[256] = {
0x44, 0x47, 0xb8, 0x28, 0x03, 0xa2, 0x21, 0xbc, 0x17, 0x32, 0x4e, 0xe2, 0xdf, 0x69, 0x35, 0xc7,
0xa2, 0x06, 0xec, 0x36, 0xd2, 0x44, 0x12, 0x6a, 0x8d, 0x51, 0x6b, 0x20, 0x69, 0x01, 0xca, 0xf0,
0x71, 0xc4, 0x34, 0xdc, 0x6b, 0xd6, 0x42, 0x2a, 0x5d, 0xb5, 0xc7, 0x6f, 0x4f, 0xd8, 0xb3, 0xed,
0x51, 0x9e, 0x37, 0x1e, 0xc0, 0x85, 0x2a, 0x91, 0xc6, 0x9c, 0xac, 0xf5, 0x20, 0x3b, 0x09, 0x74,
0x24, 0xf1, 0xe0, 0x42, 0x02, 0xbe, 0x84, 0x75, 0x4a, 0x82, 0xa2, 0x17, 0xae, 0xb6, 0x24, 0x79,
0x0a, 0x5a, 0x56, 0xcb, 0xa1, 0x2e, 0x47, 0xea, 0xa9, 0x25, 0x73, 0x79, 0x0b, 0x17, 0x9e, 0x33,
0x64, 0xb6, 0x03, 0x7f, 0x4f, 0xc3, 0xae, 0x45, 0xe6, 0x82, 0x27, 0x01, 0x86, 0x6b, 0x50, 0x16,
0xd3, 0x22, 0x90, 0x64, 0xfc, 0xa9, 0x31, 0x1c, 0x41, 0xd5, 0x07, 0xd3, 0xb2, 0xfe, 0x53, 0xd6,
0x39, 0xfb, 0xe6, 0xbe, 0xda, 0x4d, 0x8a, 0x44, 0x3a, 0x9b, 0x9d, 0x56, 0x5e, 0x5f, 0xff, 0x6a,
0xb6, 0xde, 0x2f, 0x12, 0x5a, 0x5d, 0xb0, 0xd0, 0x93, 0x92, 0xb2, 0x2c, 0x9d, 0x59, 0xee, 0x05,
0xab, 0xa8, 0xd2, 0x25, 0x2c, 0xc5, 0xde, 0x18, 0x4d, 0xb6, 0x4e, 0x3d, 0xbf, 0xfa, 0xf9, 0x1d,
0xba, 0x76, 0x79, 0xfc, 0x42, 0xb2, 0x8c, 0xae, 0xa9, 0x45, 0xba, 0xac, 0x55, 0x8e, 0x38, 0x67,
0xc3, 0xa5, 0x0d, 0xdc, 0xcc, 0x91, 0x73, 0x69, 0x27, 0xbc, 0x80, 0xdf, 0x30, 0xa4, 0x05, 0xd8,
0xe7, 0xd2, 0xb7, 0x4b, 0x3c, 0x10, 0x8c, 0x5d, 0x8a, 0xd7, 0x68, 0x7a, 0x61, 0x07, 0xf9, 0xa5,
0x88, 0xda, 0xdf, 0x0c, 0x42, 0x1b, 0x11, 0xe0, 0xd1, 0x93, 0x7c, 0x63, 0x39, 0xc5, 0xed, 0x43,
0x46, 0xdb, 0x30, 0x26, 0xd0, 0xdf, 0x7a, 0x86, 0x3e, 0x2e, 0x04, 0xbf, 0x49, 0x2a, 0xf9, 0x66
};
void pgm_decrypt_kov2p()
{
unsigned short *src = (unsigned short*)PGMUSER0;
for (int i = 0; i < nPGMExternalARMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040080) != 0x000080) x ^= 0x0001;
if ((i & 0x004008) == 0x004008) x ^= 0x0002;
if ((i & 0x080030) == 0x080010) x ^= 0x0004;
if ((i & 0x000242) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x002004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= kov2p_tab[(i >> 1) & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char theglad_tab[256] = { // IGS0005RD1021203
0x49, 0x47, 0x53, 0x30, 0x30, 0x30, 0x35, 0x52, 0x44, 0x31, 0x30, 0x32, 0x31, 0x32, 0x30, 0x33,
0xc4, 0xa3, 0x46, 0x78, 0x30, 0xb3, 0x8b, 0xd5, 0x2f, 0xc4, 0x44, 0xbf, 0xdb, 0x76, 0xdb, 0xea,
0xb4, 0xeb, 0x95, 0x4d, 0x15, 0x21, 0x99, 0xa1, 0xd7, 0x8c, 0x40, 0x1d, 0x43, 0xf3, 0x9f, 0x71,
0x3d, 0x8c, 0x52, 0x01, 0xaf, 0x5b, 0x8b, 0x63, 0x34, 0xc8, 0x5c, 0x1b, 0x06, 0x7f, 0x41, 0x96,
0x2a, 0x8d, 0xf1, 0x64, 0xda, 0xb8, 0x67, 0xba, 0x33, 0x1f, 0x2b, 0x28, 0x20, 0x13, 0xe6, 0x96,
0x86, 0x34, 0x25, 0x85, 0xb0, 0xd0, 0x6d, 0x85, 0xfe, 0x78, 0x81, 0xf1, 0xca, 0xe4, 0xef, 0xf2,
0x9b, 0x09, 0xe1, 0xb4, 0x8d, 0x79, 0x22, 0xe2, 0x00, 0xfb, 0x6f, 0x68, 0x80, 0x6a, 0x00, 0x69,
0xf5, 0xd3, 0x57, 0x7e, 0x0c, 0xca, 0x48, 0x31, 0xe5, 0x0d, 0x4a, 0xb9, 0xfd, 0x5c, 0xfd, 0xf8,
0x5f, 0x98, 0xfb, 0xb3, 0x07, 0x1a, 0xe3, 0x10, 0x96, 0x56, 0xa3, 0x56, 0x3d, 0xb1, 0x07, 0xe0,
0xe3, 0x9f, 0x7f, 0x62, 0x99, 0x01, 0x35, 0x60, 0x40, 0xbe, 0x4f, 0xeb, 0x79, 0xa0, 0x82, 0x9f,
0xcd, 0x71, 0xd8, 0xda, 0x1e, 0x56, 0xc2, 0x3e, 0x4e, 0x6b, 0x60, 0x69, 0x2d, 0x9f, 0x10, 0xf4,
0xa9, 0xd3, 0x36, 0xaa, 0x31, 0x2e, 0x4c, 0x0a, 0x69, 0xc3, 0x2a, 0xff, 0x15, 0x67, 0x96, 0xde,
0x3f, 0xcc, 0x0f, 0xa1, 0xac, 0xe2, 0xd6, 0x62, 0x7e, 0x6f, 0x3e, 0x1b, 0x2a, 0xed, 0x36, 0x9c,
0x9d, 0xa4, 0x14, 0xcd, 0xaa, 0x08, 0xa4, 0x26, 0xb7, 0x55, 0x70, 0x6c, 0xa9, 0x69, 0x52, 0xae,
0x0c, 0xe1, 0x38, 0x7f, 0x87, 0x78, 0x38, 0x75, 0x80, 0x9c, 0xd4, 0xe2, 0x0b, 0x52, 0x8f, 0xd2,
0x19, 0x4c, 0xb0, 0x45, 0xde, 0x48, 0x55, 0xae, 0x82, 0xab, 0xbc, 0xab, 0x0c, 0x5e, 0xce, 0x07
};
void pgm_decrypt_theglad()
{
unsigned short *src = (unsigned short*)PGMUSER0;
for (int i = 0; i < nPGMExternalARMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040080) != 0x000080) x ^= 0x0001;
if ((i & 0x104008) == 0x104008) x ^= 0x0002;
if ((i & 0x080030) == 0x080010) x ^= 0x0004;
if ((i & 0x000042) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x022004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= theglad_tab[(i >> 1) & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char killbldp_tab[] = { // IGS0024RD1050908
0x49, 0x47, 0x53, 0x30, 0x30, 0x32, 0x34, 0x52, 0x44, 0x31, 0x30, 0x35, 0x30, 0x39, 0x30, 0x38,
0x12, 0xa0, 0xd1, 0x9e, 0xb1, 0x8a, 0xfb, 0x1f, 0x50, 0x51, 0x4b, 0x81, 0x28, 0xda, 0x5f, 0x41,
0x78, 0x6c, 0x7a, 0xf0, 0xcd, 0x6b, 0x69, 0x14, 0x94, 0x55, 0xb6, 0x42, 0xdf, 0xfe, 0x10, 0x79,
0x74, 0x08, 0xfa, 0xc0, 0x1c, 0xa5, 0xb4, 0x03, 0x2a, 0x91, 0x67, 0x2b, 0x49, 0x4a, 0x94, 0x7d,
0x8b, 0x92, 0xbe, 0x35, 0xaf, 0x28, 0x56, 0x63, 0xb3, 0xc2, 0xe8, 0x06, 0x9b, 0x4e, 0x85, 0x66,
0x7f, 0x6b, 0x70, 0xb7, 0xdb, 0x22, 0x0c, 0xeb, 0x13, 0xe9, 0x06, 0xd7, 0x45, 0xda, 0xbe, 0x8b,
0x54, 0x30, 0xfc, 0xeb, 0x32, 0x02, 0xd0, 0x92, 0x6d, 0x44, 0xca, 0xe8, 0xfd, 0xfb, 0x5b, 0x81,
0x4c, 0xc0, 0x8b, 0xb9, 0x87, 0x78, 0xdd, 0x8e, 0x24, 0x52, 0x80, 0xbe, 0xb4, 0x01, 0xb7, 0x21,
0xeb, 0x3c, 0x8a, 0x49, 0xed, 0x73, 0xae, 0x58, 0xdb, 0xd2, 0xb2, 0x21, 0x9e, 0x7c, 0x6c, 0x82,
0xf3, 0x01, 0xa3, 0x00, 0xb7, 0x21, 0xfe, 0xa5, 0x75, 0xc4, 0x2d, 0x17, 0x2d, 0x39, 0x56, 0xf9,
0x67, 0xae, 0xc2, 0x87, 0x79, 0xf1, 0xc8, 0x6d, 0x15, 0x66, 0xfa, 0xe8, 0x16, 0x48, 0x8f, 0x1f,
0x8b, 0x24, 0x10, 0xc4, 0x04, 0x93, 0x47, 0xe6, 0x1d, 0x37, 0x65, 0x1a, 0x49, 0xf8, 0x72, 0xcb,
0xe1, 0x80, 0xfa, 0xdd, 0x6d, 0xf5, 0xf6, 0x89, 0x32, 0xf6, 0xf8, 0x75, 0xfc, 0xd8, 0x9b, 0x12,
0x2d, 0x22, 0x2a, 0x3b, 0x06, 0x46, 0x90, 0x0c, 0x35, 0xa2, 0x80, 0xff, 0xa0, 0xb7, 0xe5, 0x4d,
0x71, 0xa9, 0x8c, 0x84, 0x62, 0xf7, 0x10, 0x65, 0x4a, 0x7b, 0x06, 0x00, 0xe8, 0xa4, 0x6a, 0x13,
0xf0, 0xf3, 0x4a, 0x9f, 0x54, 0xb4, 0xb1, 0xcc, 0xd4, 0xff, 0xd6, 0xff, 0xc9, 0xee, 0x86, 0x39
};
void pgm_decrypt_killbldp()
{
unsigned short *src = (unsigned short*)PGMUSER0;
for (int i = 0; i< nPGMExternalARMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040480) != 0x000080) x ^= 0x0001;
if ((i & 0x104008) == 0x104008) x ^= 0x0002;
if ((i & 0x080030) == 0x080010) x ^= 0x0004;
if ((i & 0x000242) != 0x000042) x ^= 0x0008;
if ((i & 0x008100) == 0x008000) x ^= 0x0010;
if ((i & 0x002004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= killbldp_tab[(i >> 1) & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char happy6in1_tab[256] = { // IGS0008RD1031215
0x49, 0x47, 0x53, 0x30, 0x30, 0x30, 0x38, 0x52, 0x44, 0x31, 0x30, 0x33, 0x31, 0x32, 0x31, 0x35,
0x14, 0xd6, 0x37, 0x5c, 0x5e, 0xc3, 0xd3, 0x62, 0x96, 0x3d, 0xfb, 0x47, 0xf0, 0xcb, 0xbf, 0xb0,
0x60, 0xa1, 0xc2, 0x3d, 0x90, 0xd0, 0x58, 0x56, 0x22, 0xac, 0xdd, 0x39, 0x27, 0x7e, 0x58, 0x44,
0xe0, 0x6b, 0x51, 0x80, 0xb4, 0xa4, 0xf0, 0x6f, 0x71, 0xd0, 0x57, 0x18, 0xc7, 0xb6, 0x41, 0x50,
0x02, 0x2f, 0xdb, 0x4a, 0x08, 0x4b, 0xe3, 0x62, 0x92, 0xc3, 0xff, 0x26, 0xaf, 0x9f, 0x60, 0xa5,
0x76, 0x28, 0x97, 0xfd, 0x0b, 0x10, 0xb7, 0x1f, 0xd5, 0xe0, 0xac, 0xe6, 0xfd, 0xa3, 0xdb, 0x58,
0x2a, 0xd1, 0xfc, 0x3b, 0x7c, 0x7e, 0x34, 0xdc, 0xc7, 0xc4, 0x76, 0x1b, 0x11, 0x6d, 0x1b, 0xbb,
0x4e, 0xe5, 0xc0, 0xe8, 0x5a, 0x60, 0x60, 0x0a, 0x38, 0x47, 0xb3, 0xc9, 0x89, 0xe9, 0xc6, 0x61,
0x50, 0x5f, 0xdb, 0x28, 0xe5, 0xc0, 0x83, 0x5c, 0x37, 0x86, 0xfa, 0x32, 0x46, 0x40, 0xc3, 0x1d,
0xdf, 0x7a, 0x85, 0x5c, 0x9a, 0xea, 0x24, 0xc7, 0x12, 0xdc, 0x23, 0xda, 0x65, 0xdf, 0x39, 0x02,
0xeb, 0xb1, 0x32, 0x28, 0x3a, 0x69, 0x09, 0x7c, 0x5a, 0xe3, 0x44, 0x83, 0x45, 0x71, 0x8f, 0x64,
0xa3, 0xbf, 0x9c, 0x6f, 0xc4, 0x07, 0x3a, 0xee, 0xdd, 0x77, 0xb4, 0x31, 0x87, 0xdf, 0x6d, 0xd4,
0x75, 0x9f, 0xb9, 0x53, 0x75, 0xd0, 0xfe, 0xd1, 0xaa, 0xb2, 0x0b, 0x25, 0x08, 0x56, 0xb8, 0x27,
0x10, 0x8c, 0xbf, 0x39, 0xce, 0x0f, 0xdb, 0x18, 0x10, 0xf0, 0x1f, 0xe5, 0xe8, 0x40, 0x98, 0x6f,
0x64, 0x02, 0x27, 0xc3, 0x8c, 0x4f, 0x98, 0xf6, 0x9d, 0xcb, 0x07, 0x31, 0x85, 0x48, 0x75, 0xff,
0x9f, 0xba, 0xa6, 0xd3, 0xb0, 0x5b, 0x3d, 0xdd, 0x22, 0x1f, 0x1b, 0x0e, 0x7f, 0x5a, 0xf4, 0x6a
};
void pgm_decrypt_happy6in1()
{
unsigned short *src = (unsigned short*)PGMUSER0;
for (int i = 0; i < nPGMExternalARMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x040480) != 0x000080) x ^= 0x0001;
if ((i & 0x104008) == 0x104008) x ^= 0x0002;
if ((i & 0x080030) == 0x080010) x ^= 0x0004;
if ((i & 0x000242) != 0x000042) x ^= 0x0008;
if ((i & 0x048100) == 0x048000) x ^= 0x0010;
if ((i & 0x002004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= happy6in1_tab[(i >> 1) & 0xff] << 8;
src[i] = swapWord(x);
}
}
static const unsigned char dw2001_tab[256] = {
0xd0, 0x45, 0xbc, 0x84, 0x93, 0x60, 0x7d, 0x49, 0x68, 0xb1, 0x54, 0xa2, 0x05, 0x29, 0x41, 0x20,
0x04, 0x08, 0x52, 0x25, 0x89, 0xf4, 0x69, 0x9f, 0x24, 0x46, 0x3d, 0xf1, 0xf9, 0xab, 0xa6, 0x2d,
0x18, 0x19, 0x6d, 0x33, 0x79, 0x23, 0x3b, 0x1d, 0xe0, 0xb8, 0x61, 0x1a, 0xe1, 0x4c, 0x5d, 0x3f,
0x5e, 0x02, 0xe3, 0x4d, 0x9e, 0x80, 0x28, 0x50, 0xa0, 0x81, 0xe4, 0xa5, 0x97, 0xa1, 0x86, 0x36,
0x1e, 0xed, 0x16, 0x8a, 0x44, 0x06, 0x64, 0x12, 0x9a, 0x7e, 0xce, 0x9b, 0xef, 0xf7, 0x3e, 0xf8,
0x15, 0x07, 0xcb, 0x6f, 0x8e, 0x3c, 0x82, 0x70, 0x62, 0x8d, 0x66, 0x7a, 0x4e, 0xd3, 0xb6, 0x6a,
0x51, 0xa7, 0x2c, 0xc7, 0xa4, 0x0b, 0xb5, 0xe5, 0x88, 0xbd, 0x5a, 0x5b, 0x1b, 0xae, 0xe6, 0x5f,
0x2e, 0x92, 0x8c, 0xb7, 0x96, 0xba, 0x99, 0xbb, 0xbe, 0x0e, 0xbf, 0xe7, 0x2f, 0xe9, 0x30, 0x37,
0x98, 0xac, 0x4a, 0x94, 0x38, 0xf3, 0x39 ,0xb2, 0x55, 0x72, 0x7b, 0xee, 0xdd, 0x6e, 0x11, 0xd5,
0x26, 0xa8, 0x71, 0xd6, 0x74, 0x7f, 0x13, 0xc2, 0x56, 0xea, 0xa9, 0xaf, 0xc3, 0x42, 0x03, 0xb3,
0xc4, 0x6b, 0x47, 0xf0, 0x31, 0xf5, 0xaa, 0x58, 0x8f, 0x48, 0x75, 0x95, 0x35, 0x8b, 0x57, 0x3a,
0x73, 0x0c, 0x59, 0xd8, 0x14, 0x65, 0xd7, 0x00, 0xfa, 0xdc, 0x34, 0xde, 0xc0, 0xb0, 0x87, 0xc1,
0xc8, 0xcd, 0xd4, 0x2a, 0xda, 0xe8, 0xd2, 0x83, 0x0d, 0xca, 0xf2, 0x0f, 0xeb, 0xec, 0x9c, 0x1f,
0xad, 0x22, 0xd1, 0x4b, 0x5c, 0xf6, 0x17, 0xc5, 0x67, 0x9d, 0xfb, 0xc9, 0xcc, 0x32, 0x1c, 0xb4,
0xd9, 0xe2, 0xcf, 0x90, 0xb9, 0x2b, 0x61, 0xc6, 0x76, 0x21, 0x77, 0x27, 0xfc, 0xfd, 0x0a, 0x09,
0x7c, 0x01, 0x43, 0xdb, 0x53, 0x87, 0xfe, 0x78, 0x91, 0x40, 0xa3, 0xdf, 0x4f, 0xff, 0x10, 0x6c
};
void pgm_decrypt_dw2001()
{
unsigned short *src = (unsigned short*)PGMUSER0;
for (int i = 0; i < nPGMExternalARMLen/2; i++) {
unsigned short x = swapWord(src[i]);
if ((i & 0x000480) != 0x000080) x ^= 0x0001;
if ((i & 0x004008) == 0x004008) x ^= 0x0002;
if ((i & 0x000030) == 0x000010) x ^= 0x0004;
if ((i & 0x000242) != 0x000042) x ^= 0x0008;
if ((i & 0x002004) != 0x000004) x ^= 0x0020;
if ((i & 0x011800) != 0x010000) x ^= 0x0040;
if ((i & 0x000820) == 0x000820) x ^= 0x0080;
x ^= dw2001_tab[(i >> 1) & 0xff] << 8;
src[i] = swapWord(x);
}
}
// ------------------------------------------------------------------------------------------------------------
// Bootleg decryption routines
void pgm_decode_kovqhsgs_gfx_block(unsigned char *src)
{
int i, j;
unsigned char *dec = (unsigned char*)malloc(0x800000);
for (i = 0; i < 0x800000; i++)
{
j = BITSWAP24(i, 23, 10, 9, 22, 19, 18, 20, 21, 17, 16, 15, 14, 13, 12, 11, 8, 7, 6, 5, 4, 3, 2, 1, 0);
dec[j] = src[i];
}
memcpy (src, dec, 0x800000);
free (dec);
}
void pgm_decode_kovqhsgs_tile_data(unsigned char *source)
{
int i, j;
unsigned short *src = (unsigned short*)source;
unsigned short *dst = (unsigned short*)malloc(0x800000);
for (i = 0; i < 0x800000 / 2; i++)
{
j = BITSWAP24(i, 23, 22, 9, 8, 21, 18, 0, 1, 2, 3, 16, 15, 14, 13, 12, 11, 10, 19, 20, 17, 7, 6, 5, 4);
dst[j] = BITSWAP16(swapWord(src[i]), 1, 14, 8, 7, 0, 15, 6, 9, 13, 2, 5, 10, 12, 3, 4, 11);
}
memcpy (src, dst, 0x800000);
free (dst);
}
static void pgm_decode_kovqhsgs_samples()
{
int i;
for (i = 0; i < 0x400000; i+=2) {
ICSSNDROM[i + 0x400001] = ICSSNDROM[i + 0xc00001];
}
}
static void pgm_decode_kovqhsgs_program()
{
int i, j;
unsigned short *src = (unsigned short*)PGM68KROM;
unsigned short *dst = (unsigned short*)malloc(0x400000);
for (i = 0; i < 0x400000 / 2; i++)
{
j = BITSWAP24(i, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 6, 7, 5, 4, 3, 2, 1, 0);
dst[j] = BITSWAP16(swapWord(src[i]), 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 4, 5, 3, 2, 1, 0);
}
memcpy (src, dst, 0x400000);
free (dst);
}
void pgm_decrypt_kovqhsgs()
{
pgm_decode_kovqhsgs_program();
pgm_decode_kovqhsgs_gfx_block(PGMSPRMaskROM + 0x000000);
pgm_decode_kovqhsgs_gfx_block(PGMSPRMaskROM + 0x800000);
// sprite colors are decoded in pgm_run
pgm_decode_kovqhsgs_samples();
}
static void pgm_decode_kovlsqh2_program()
{
int i, j;
unsigned short *src = (unsigned short*)PGM68KROM;
unsigned short *dst = (unsigned short*)malloc(0x400000);
for (i = 0; i < 0x400000 / 2; i++)
{
j = BITSWAP24(i, 23, 22, 21, 20, 19, 16, 15, 14, 13, 12, 11, 10, 9, 8, 0, 1, 2, 3, 4, 5, 6, 18, 17, 7);
dst[j] = src[i];
}
memcpy (src, dst, 0x400000);
free (dst);
}
void pgm_decrypt_kovlsqh2()
{
pgm_decode_kovlsqh2_program();
pgm_decode_kovqhsgs_gfx_block(PGMSPRMaskROM + 0x000000);
pgm_decode_kovqhsgs_gfx_block(PGMSPRMaskROM + 0x800000);
// sprite colors are decoded in pgm_run.cpp
pgm_decode_kovqhsgs_samples();
}
static void pgm_decode_kovassg_program()
{
int i, j;
unsigned short *rom = (unsigned short *)PGM68KROM;
unsigned short *tmp = (unsigned short *)malloc(0x400000);
for (i = 0; i < 0x400000/2; i++)
{
j = (i & ~0xffff) | (BITSWAP16(i, 15, 14, 13, 12, 11, 10, 7, 3, 1, 9, 4, 8, 6, 0, 2, 5) ^ 0x019c);
tmp[i] = BITSWAP16(swapWord(rom[j]), 13, 9, 10, 11, 2, 0, 12 ,5, 4, 1, 14, 8, 15, 6, 3, 7) ^ 0x9d05;
}
memcpy (rom, tmp, 0x400000);
free (tmp);
}
void pgm_decrypt_kovassg()
{
pgm_decode_kovassg_program();
pgm_decode_kovqhsgs_gfx_block(PGMSPRMaskROM + 0x000000);
pgm_decode_kovqhsgs_gfx_block(PGMSPRMaskROM + 0x800000);
// sprite colors are decoded in pgm_run.cpp
pgm_decode_kovqhsgs_samples();
}
| [
"[email protected]"
]
| [
[
[
1,
984
]
]
]
|
3d4ab4cd9bccdfb2ba2077fc401339f029408eda | ef23e388061a637f82b815d32f7af8cb60c5bb1f | /src/mame/includes/wwfsstar.h | 64acbdf10c61bab7c0e32e28c126ae98b31050c4 | []
| no_license | marcellodash/psmame | 76fd877a210d50d34f23e50d338e65a17deff066 | 09f52313bd3b06311b910ed67a0e7c70c2dd2535 | refs/heads/master | 2021-05-29T23:57:23.333706 | 2011-06-23T20:11:22 | 2011-06-23T20:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 575 | h | class wwfsstar_state : public driver_device
{
public:
wwfsstar_state(running_machine &machine, const driver_device_config_base &config)
: driver_device(machine, config) { }
int m_vblank;
int m_scrollx;
int m_scrolly;
UINT16 *m_spriteram;
UINT16 *m_fg0_videoram;
UINT16 *m_bg0_videoram;
tilemap_t *m_fg0_tilemap;
tilemap_t *m_bg0_tilemap;
};
/*----------- defined in video/wwfsstar.c -----------*/
VIDEO_START( wwfsstar );
SCREEN_UPDATE( wwfsstar );
WRITE16_HANDLER( wwfsstar_fg0_videoram_w );
WRITE16_HANDLER( wwfsstar_bg0_videoram_w );
| [
"Mike@localhost"
]
| [
[
[
1,
23
]
]
]
|
e98690f8aff1eefb9490627ef7dc4f6f3dd22135 | d64ed1f7018aac768ddbd04c5b465c860a6e75fa | /drawing_element/dle_x.cpp | 96a4303930a63241f44e3b01d83f656c5d8cddbb | []
| no_license | roc2/archive-freepcb-codeproject | 68aac46d19ac27f9b726ea7246cfc3a4190a0136 | cbd96cd2dc81a86e1df57b86ce540cf7c120c282 | refs/heads/master | 2020-03-25T00:04:22.712387 | 2009-06-13T04:36:32 | 2009-06-13T04:36:32 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 465 | cpp | #include "stdafx.h"
#include "dle_x.h"
// X
void CDLE_X::_Draw(CDrawInfo const &di) const
{
int w2 = w/2;
int _xi = i.x - w2;
int _xf = i.x + w2;
int _yi = i.y - w2;
int _yf = i.y + w2;
if( _xi < dlist->m_max_x && _xf > dlist->m_org_x
&& _yi < dlist->m_max_y && _yf > dlist->m_org_y )
{
di.DC->MoveTo( _xi, _yi );
di.DC->LineTo( _xf, _yf );
di.DC->MoveTo( _xf, _yi );
di.DC->LineTo( _xi, _yf );
di.nlines += 2;
}
}
| [
"jamesdily@9bfb2a70-7351-0410-8a08-c5b0c01ed314"
]
| [
[
[
1,
23
]
]
]
|
5e0ae1e8a4c3e5113a6aae2b4bf5f6e7e6c24175 | 1741474383f0b3bc3518d7935a904f7903f40506 | /A6/Program.h | 41ced3dc74f307fe6ee6ca0abf9e8d42597b2dec | []
| no_license | osecki/drexelgroupwork | 739df86f361e00528a6b03032985288d64b464aa | 7c3bde253a50cab42c22d286c80cad72348b4fcf | refs/heads/master | 2020-05-31T02:25:57.734312 | 2009-06-03T18:34:59 | 2009-06-03T18:34:59 | 32,121,248 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 644 | h | #ifndef PROGRAM_H
#define PROGRAM_H
#include <map>
#include <string>
#include <vector>
#include "StmtList.h"
using namespace std;
class Program
{
public:
Program(StmtList *SL);
Program(){};
//~Program() {delete SL_; };
void dump();
//void eval();
void translate();
void optimize();
void fixLabels();
void link();
void compile();
static int constantCounter;
static int temporaryVarCounter;
static int labelCounter;
private:
StmtList *SL_;
map<int, string> constantValues;
map<string, SymbolDetails> symbolTable;
vector<string> ralProgram;
};
#endif
| [
"jordan.osecki@c6e0ff0a-2120-11de-a108-cd2f117ce590"
]
| [
[
[
1,
34
]
]
]
|
b972c002c6c6dde3b1bbbf6e042d6a35eeb1b19b | ff48db9b3e5d09ceaa36fc2924529167f455ed9b | /GalMaker/GalMaker/SurfaceClass.cpp | 239bc5457e3db0e80d8be8af1c86ae8111901081 | []
| no_license | kidfruit/galmaker | 3fb8860eba7b5d0b07f1bd54ed899717e0fb0974 | a8d825719857f4ce32f5365d16c4eda26a96d4bd | refs/heads/master | 2021-01-21T05:01:01.641932 | 2009-01-04T12:33:06 | 2009-01-04T12:33:06 | 32,144,889 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 11,375 | cpp | #include "SurfaceClass.h"
//*****************************************
//class ScreenSurface
int ScreenSurface::screenNum = 0;
ScreenSurface::ScreenSurface():
width(800), height(600), bpp(32), flags(0), windowName("NULL")
{
if ( screenNum > 0 )
throw ErrorInfo("DONOT create more than ONE screen!");
if ( SDL_Init(SDL_INIT_VIDEO) < 0 )
throw ErrorInfo(SDL_GetError());
pScreen = SDL_SetVideoMode(width, height, bpp, flags);
screenNum++;
}
ScreenSurface::ScreenSurface(int w, int h, const std::string& window_name, int b, Uint32 f):
width(w), height(h), bpp(b), flags(f)
{
if ( screenNum > 0 )
throw ErrorInfo("DONOT create more than ONE screen!");
if ( SDL_Init(SDL_INIT_VIDEO) < 0 )
throw ErrorInfo(SDL_GetError());
pScreen = SDL_SetVideoMode(width, height, bpp, flags);
screenNum++;
if ( window_name != "NULL" ) {
windowName = window_name;
SDL_WM_SetCaption(windowName.c_str(), 0);
}
else
windowName = "NULL";
}
ScreenSurface::~ScreenSurface()
{
SDL_Quit();
}
//***
SDL_Surface* ScreenSurface::point() const
{
return pScreen;
}
void ScreenSurface::flip() const
{
if ( SDL_Flip(pScreen) < 0 )
throw ErrorInfo(SDL_GetError());
}
void ScreenSurface::fillColor(Uint8 r, Uint8 g, Uint8 b) const
{
if ( SDL_FillRect(pScreen, 0, SDL_MapRGB(pScreen->format, r, g, b)) < 0 )
throw ErrorInfo(SDL_GetError());
}
void ScreenSurface::UpdateRect( const SDL_Rect Rect )
{
SDL_UpdateRect( pScreen,Rect.x,Rect.y,Rect.w,Rect.h );
}
void ScreenSurface::UpdateRect( Sint32 x, Sint32 y, Uint32 w, Uint32 h )
{
SDL_UpdateRect( pScreen,x,y,w,h);
}
//************************************
//************************************
//class BaseSurface
//protected
BaseSurface::BaseSurface():
pScreen(0), pSurface(0)
{}
//public
BaseSurface::BaseSurface(const BaseSurface& copy):
pScreen(copy.pScreen)
{
pSurface = SDL_ConvertSurface(copy.pSurface, copy.pSurface->format, SDL_SWSURFACE);
}
BaseSurface::~BaseSurface()
{
SDL_FreeSurface(pSurface);
}
BaseSurface& BaseSurface::operator=(const BaseSurface& copy)
{
SDL_FreeSurface(pSurface);
pSurface = SDL_ConvertSurface(copy.pSurface, copy.pSurface->format, SDL_SWSURFACE);
return *this;
}
//***
SDL_Surface* BaseSurface::point() const
{
return pSurface;
}
//***
void BaseSurface::blit() const
{
const int SRC_W = pSurface->w;
const int SRC_H = pSurface->h;
const int DST_W = pScreen->w;
const int DST_H = pScreen->h;
SDL_Rect offset;
offset.x = ( DST_W - SRC_W ) / 2;
offset.y = ( DST_H - SRC_H ) / 2;
if ( SDL_BlitSurface(pSurface, 0, pScreen, &offset) < 0 )
throw ErrorInfo(SDL_GetError());
}
void BaseSurface::blit(int any_num) const
{
if ( SDL_BlitSurface(pSurface, 0, pScreen, 0) < 0 )
throw ErrorInfo(SDL_GetError());
}
void BaseSurface::blit(int at_x, int at_y) const
{
SDL_Rect offset;
offset.x = at_x;
offset.y = at_y;
if ( SDL_BlitSurface(pSurface, 0, pScreen, &offset) < 0 )
throw ErrorInfo(SDL_GetError());
}
void BaseSurface::blit(int at_x, int at_y,
int from_x, int from_y, int w, int h,
int delta_x, int delta_y) const
{
SDL_Rect offset;
offset.x = at_x - delta_x;
offset.y = at_y - delta_y;
SDL_Rect dest;
dest.x = from_x - delta_x;
dest.y = from_y - delta_y;
dest.w = w + delta_x*2;
dest.h = h + delta_y*2;
if ( SDL_BlitSurface(pSurface, &dest, pScreen, &offset) < 0 )
throw ErrorInfo(SDL_GetError());
}
//***
void BaseSurface::blit(const BaseSurface& dst_surface) const
{
const int SRC_W = pSurface->w;
const int SRC_H = pSurface->h;
const int DST_W = dst_surface.point()->w;
const int DST_H = dst_surface.point()->h;
SDL_Rect offset;
offset.x = ( DST_W - SRC_W ) / 2;
offset.y = ( DST_H - SRC_H ) / 2;
if ( &dst_surface == this )
throw ErrorInfo("Cannot blit surface to itself!");
if ( SDL_BlitSurface(pSurface, 0, dst_surface.point(), &offset) < 0 )
throw ErrorInfo(SDL_GetError());
}
void BaseSurface::blit(const BaseSurface& dst_surface, int any_num) const
{
if ( &dst_surface == this )
throw ErrorInfo("Cannot blit surface to itself!");
if ( SDL_BlitSurface(pSurface, 0, dst_surface.point(), 0) < 0 )
throw ErrorInfo(SDL_GetError());
}
void BaseSurface::blit(const BaseSurface& dst_surface, int at_x, int at_y) const
{
SDL_Rect offset;
offset.x = at_x;
offset.y = at_y;
if ( &dst_surface == this )
throw ErrorInfo("Cannot blit surface to itself!");
if ( SDL_BlitSurface(pSurface, 0, dst_surface.point(), &offset) < 0 )
throw ErrorInfo(SDL_GetError());
}
void BaseSurface::blit(const BaseSurface& dst_surface,
int at_x, int at_y,
int from_x, int from_y, int w, int h,
int delta_x, int delta_y) const
{
SDL_Rect offset;
offset.x = at_x - delta_x;
offset.y = at_y - delta_y;
SDL_Rect dest;
dest.x = from_x - delta_x;
dest.y = from_y - delta_y;
dest.w = w + delta_x*2;
dest.h = h + delta_y*2;
if ( &dst_surface == this )
throw ErrorInfo("Cannot blit surface to itself!");
if ( SDL_BlitSurface(pSurface, &dest, dst_surface.point(), &offset) < 0 )
throw ErrorInfo(SDL_GetError());
}
//***
void BaseSurface::colorKey(Uint8 r, Uint8 g, Uint8 b, Uint32 flag)
{
Uint32 colorkey = SDL_MapRGB(pSurface->format, r, g, b);
if ( SDL_SetColorKey(pSurface, flag, colorkey ) < 0 )
throw ErrorInfo(SDL_GetError());
}
SDL_RWops* BaseSurface::GetFileFromPack(const std::string &fileInPack, const std::string &packName)
{
unzFile zip;
unz_file_info info;
Uint8 *buffer;
zip = unzOpen( packName.c_str() );
unzLocateFile( zip, fileInPack.c_str(), 0 );
unzGetCurrentFileInfo( zip, &info, NULL, 0, NULL, 0, NULL, 0 );
unzOpenCurrentFile( zip );
buffer = (Uint8*)malloc(info.uncompressed_size);
unzReadCurrentFile( zip, buffer, info.uncompressed_size );
return SDL_RWFromMem(buffer, info.uncompressed_size);
}
void BaseSurface::SetAlpha( const Uint8 alpha, const Uint32 flag )
{
SDL_SetAlpha( pSurface, flag, alpha );
}
void BaseSurface::clickBlit( SDL_Event& game_Event )
{
SDL_Rect offset;
if ( game_Event.type==SDL_MOUSEBUTTONDOWN && game_Event.button.button==SDL_BUTTON_LEFT )
{
offset.x=game_Event.button.x;
offset.y=game_Event.button.y;
SDL_BlitSurface( pSurface,NULL,pScreen,&offset );
}
}
//************************************
//************************************
//class PictureSurface
PictureSurface::PictureSurface(const std::string& file_name, const ScreenSurface& screen, const std::string& pack_Name):
BaseSurface(),
fileName(file_name),packName(pack_Name)
{
SDL_Surface* pSurfaceTemp;
if(unzOpen( packName.c_str() )!=NULL)
{
SDL_RWops* rw=GetFileFromPack(fileName, packName);
pSurfaceTemp = IMG_Load_RW(rw,0);
}
else
{
std::string dir="./image/";
fileName=dir+fileName;
pSurfaceTemp = IMG_Load(fileName.c_str());
}
if ( pSurfaceTemp == 0 )
throw ErrorInfo(SDL_GetError());
pSurface = SDL_DisplayFormat(pSurfaceTemp);
if ( pSurface == 0 )
throw ErrorInfo(SDL_GetError());
SDL_FreeSurface(pSurfaceTemp);
pScreen = screen.point();
}
//************************************
//************************************
//class TextSurface
int TextSurface::textNum = 0;
TextSurface::TextSurface(const std::string& _message, const ScreenSurface& screen,
Uint8 _r, Uint8 _g, Uint8 _b,
int ttf_size, const std::string& ttf_fileName):
BaseSurface(),
message(_message), TTF_fileName(ttf_fileName), TTF_size(ttf_size),
r(_r), g(_g), b(_b)
{
if ( textNum == 0 ){
if ( TTF_Init() < 0 ){
throw ErrorInfo(TTF_GetError());
}
}
SDL_Color textColor;
textColor.r = r;
textColor.g = g;
textColor.b = b;
TTF_Font* pFont = TTF_OpenFont(TTF_fileName.c_str(), TTF_size);
if ( pFont == 0 )
throw ErrorInfo(TTF_GetError());
pSurface = myTTF_RenderString_Blended(pFont, message.c_str(), textColor);
if ( pSurface == 0 )
throw ErrorInfo(TTF_GetError());
TTF_CloseFont(pFont);
pScreen = screen.point();
textNum++;
}
TextSurface::TextSurface(const TextSurface& copy):
BaseSurface(copy),
message(copy.message), TTF_fileName(copy.TTF_fileName), TTF_size(copy.TTF_size),
r(copy.r), g(copy.g), b(copy.b)
{
textNum++;
}
TextSurface::~TextSurface()
{
textNum--;
if ( textNum == 0 ){
TTF_Quit();
}
}
//***
void TextSurface::toBlended()
{
SDL_FreeSurface(pSurface);
SDL_Color textColor;
textColor.r = r;
textColor.g = g;
textColor.b = b;
TTF_Font* pFont = TTF_OpenFont(TTF_fileName.c_str(), TTF_size);
if ( pFont == 0 )
throw ErrorInfo(TTF_GetError());
pSurface = myTTF_RenderString_Blended(pFont, message.c_str(), textColor);
if ( pSurface == 0 )
throw ErrorInfo(TTF_GetError());
TTF_CloseFont(pFont);
}
void TextSurface::toSolid()
{
SDL_FreeSurface(pSurface);
SDL_Color textColor;
textColor.r = r;
textColor.g = g;
textColor.b = b;
TTF_Font* pFont = TTF_OpenFont(TTF_fileName.c_str(), TTF_size);
if ( pFont == 0 )
throw ErrorInfo(TTF_GetError());
pSurface = myTTF_RenderString_Solid(pFont, message.c_str(), textColor);
if ( pSurface == 0 )
throw ErrorInfo(TTF_GetError());
TTF_CloseFont(pFont);
}
void TextSurface::toShaded(Uint8 _r, Uint8 _g, Uint8 _b)
{
SDL_Color textColor;
textColor.r = r;
textColor.g = g;
textColor.b = b;
SDL_Color bgColor;
bgColor.r = _r;
bgColor.g = _g;
bgColor.b = _b;
SDL_FreeSurface(pSurface);
TTF_Font* pFont = TTF_OpenFont(TTF_fileName.c_str(), TTF_size);
if ( pFont == 0 )
throw ErrorInfo(TTF_GetError());
pSurface = myTTF_RenderString_Shaded(pFont, message.c_str(), textColor, bgColor);
if ( pSurface == 0 )
throw ErrorInfo(TTF_GetError());
TTF_CloseFont(pFont);
}
void TextSurface::setColor(Uint8 _r, Uint8 _g, Uint8 _b)
{
SDL_FreeSurface(pSurface);
SDL_Color textColor;
textColor.r = r = _r;
textColor.g = g = _g;
textColor.b = b = _b;
TTF_Font* pFont = TTF_OpenFont(TTF_fileName.c_str(), TTF_size);
if ( pFont == 0 )
throw ErrorInfo(TTF_GetError());
pSurface = myTTF_RenderString_Blended(pFont, message.c_str(), textColor);
if ( pSurface == 0 )
throw ErrorInfo(TTF_GetError());
TTF_CloseFont(pFont);
}
void TextSurface::setSize(int ttf_size)
{
SDL_FreeSurface(pSurface);
SDL_Color textColor;
textColor.r = r;
textColor.g = g;
textColor.b = b;
TTF_size = ttf_size;
TTF_Font* pFont = TTF_OpenFont(TTF_fileName.c_str(), TTF_size);
if ( pFont == 0 )
throw ErrorInfo(TTF_GetError());
pSurface = myTTF_RenderString_Blended(pFont, message.c_str(), textColor);
if ( pSurface == 0 )
throw ErrorInfo(TTF_GetError());
TTF_CloseFont(pFont);
}
void TextSurface::setFont(const std::string& ttf_fileName)
{
SDL_FreeSurface(pSurface);
SDL_Color textColor;
textColor.r = r;
textColor.g = g;
textColor.b = b;
TTF_fileName = ttf_fileName;
TTF_Font* pFont = TTF_OpenFont(TTF_fileName.c_str(), TTF_size);
if ( pFont == 0 )
throw ErrorInfo(TTF_GetError());
pSurface = myTTF_RenderString_Blended(pFont, message.c_str(), textColor);
if ( pSurface == 0 )
throw ErrorInfo(TTF_GetError());
TTF_CloseFont(pFont);
}
//*************************************
| [
"[email protected]@c611df1e-b216-11dd-8f72-659bbef264a5"
]
| [
[
[
1,
479
]
]
]
|
9b0a09850d267055cd9322a9d05c9592cd7d868e | 3c2dc480d637cc856a1be74be1bbc197a0b24bd2 | /s34Curve.cpp | 1446f25a02312b9159187fe5233937b6b2650049 | []
| no_license | cjus/s34mme | d49ff5ede63fbae83fa0694eeea66b0024a4b72b | 77d372c9f55d2053c11e41bdfd9d2f074329e451 | refs/heads/master | 2020-04-14T19:30:39.690545 | 2010-09-05T18:23:37 | 2010-09-05T18:23:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,478 | cpp | // Curve.cpp: implementation of the CS34Curve class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "s34Curve.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CS34Curve::CS34Curve()
{
m_pPoints = NULL;
m_iTotalSegments = 0;
}
CS34Curve::~CS34Curve()
{
Reset();
}
void CS34Curve::Reset()
{
if (m_pPoints)
{
delete []m_pPoints;
m_pPoints = NULL;
}
m_iTotalSegments = 0;
}
void CS34Curve::SetTotalSegments(int iTotalSegments)
{
if (iTotalSegments != m_iTotalSegments)
{
if (m_pPoints)
{
delete []m_pPoints;
m_pPoints = NULL;
}
m_pPoints = new CURVEPOINT[iTotalSegments];
m_iTotalSegments = iTotalSegments;
}
}
void CS34Curve::GeneratePoints(POINT ptStartPoint, POINT ptEndPoint, POINT ptControlPoint)
{
CURVEPOINT p1, p2, p3;
p1.x = (float)ptStartPoint.x;
p1.y = (float)ptStartPoint.y;
p2.x = (float)ptEndPoint.x;
p2.y = (float)ptEndPoint.y;
p3.x = (float)ptControlPoint.x;
p3.y = (float)ptControlPoint.y;
CalculatePoints(p1, p2, p3, m_iTotalSegments, m_pPoints);
}
int CS34Curve::GetPoints(POINT *p, int iTotalPoints)
{
if (iTotalPoints > m_iTotalSegments)
iTotalPoints = m_iTotalSegments;
for (int i = 0; i < iTotalPoints; i++)
{
p[i].x = (long) m_pPoints[i].x;
p[i].y = (long) m_pPoints[i].y;
}
return iTotalPoints;
}
CURVEPOINT CS34Curve::Intersect(LINE l1, LINE l2)
{
float m1;
float b1;
float m2;
float b2;
CURVEPOINT p;
if (Dx(l1) == 0)
{
p.x = l1.p1.x;
m1 = (l2.p1.y - l2.p2.y) / (l2.p1.x - l2.p2.x);
b1 = l2.p1.y - m1*l2.p1.x;
}
else if (Dx(l2) == 0)
{
p.x = l2.p1.x;
m1 = (l1.p1.y - l1.p2.y) / (l1.p1.x - l1.p2.x);
b1 = l1.p1.y - m1*l1.p1.x;
}
else
{
m1 = (l1.p1.y - l1.p2.y) / (l1.p1.x - l1.p2.x);
b1 = l1.p1.y - m1*l1.p1.x;
m2 = (l2.p1.y - l2.p2.y) / (l2.p1.x - l2.p2.x);
b2 = l2.p1.y - m2*l2.p1.x;
p.x = (b1 - b2) / (m2 - m1);
}
p.y = m1 * p.x + b1;
return p;
}
BOOL CS34Curve::CalculatePoints(CURVEPOINT p1, CURVEPOINT p2, CURVEPOINT p3, int n, CURVEPOINT *p)
{
LINE l1;
l1.p1 = p1;
l1.p2 = p3;
LINE l2;
l2.p1 = p3;
l2.p2 = p2;
float dx1 = Dx(l1) / (n + 1);
float dx2 = Dx(l2) / (n + 1);
float m1;
float m2;
float dy1;
float dy2;
float b1;
float b2;
if (dx1 != 0)
{
m1 = (l1.p1.y - l1.p2.y) / (l1.p1.x - l1.p2.x);
b1 = l1.p1.y - m1*l1.p1.x;
}
else
{
dy1 = Dy(l1) / (n + 1);
}
if (dx2 != 0)
{
m2 = (l2.p1.y - l2.p2.y) / (l2.p1.x - l2.p2.x);
b2 = l2.p1.y - m2*l2.p1.x;
}
else
{
dy2 = Dy(l2) / (n + 1);
}
LINE ls1;
LINE ls2;
for (int i = 0; i < n; i++)
{
ls1.p1.x = l1.p1.x + (dx1 * i);
ls1.p2.x = l2.p1.x + (dx2 * (i + 1));
ls2.p1.x = l1.p1.x + (dx1 * (i + 1));
ls2.p2.x = l2.p1.x + (dx2 * (i + 2));
if (dx1 != 0)
{
ls1.p1.y = m1*ls1.p1.x + b1;
ls2.p1.y = m1*ls2.p1.x + b1;
}
else
{
ls1.p1.y = l1.p1.y + (dy1 * i);
ls2.p1.y = l1.p1.y + (dy1 * (i + 1));
}
if (dx2 != 0)
{
ls1.p2.y = m2*ls1.p2.x + b2;
ls2.p2.y = m2*ls2.p2.x + b2;
}
else
{
ls1.p2.y = l2.p1.y + (dy2 * (i + 1));
ls2.p2.y = l2.p1.y + (dy2 * (i + 2));
}
p[i] = Intersect(ls1, ls2);
}
return TRUE;
}
| [
"[email protected]"
]
| [
[
[
1,
183
]
]
]
|
ada322f6e6241e95eabf7e44c47330737b2404c4 | b2d46af9c6152323ce240374afc998c1574db71f | /cursovideojuegos/theflostiproject/3rdParty/boost/libs/multi_index/test/test_conv_iterators.cpp | cb97012d7512fb4a4fb74e580e6eab02479ff8bc | [
"BSL-1.0"
]
| permissive | bugbit/cipsaoscar | 601b4da0f0a647e71717ed35ee5c2f2d63c8a0f4 | 52aa8b4b67d48f59e46cb43527480f8b3552e96d | refs/heads/master | 2021-01-10T21:31:18.653163 | 2011-09-28T16:39:12 | 2011-09-28T16:39:12 | 33,032,640 | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 1,887 | cpp | /* Boost.MultiIndex test for interconvertibilty between const and
* non-const iterators.
*
* Copyright 2003-2004 Joaquín M López Muñoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* See http://www.boost.org/libs/multi_index for library home page.
*/
#include "test_conv_iterators.hpp"
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
#include "pre_multi_index.hpp"
#include "employee.hpp"
#include <boost/test/test_tools.hpp>
using namespace boost::multi_index;
void test_conv_iterators()
{
employee_set es;
es.insert(employee(2,"John",40));
{
const employee_set& ces=es;
employee_set::iterator it=es.find(employee(2,"John",40));
employee_set::const_iterator it1=es.find(employee(2,"John",40));
employee_set::const_iterator it2=ces.find(employee(2,"John",40));
BOOST_CHECK(it==it1&&it1==it2&&it2==it);
BOOST_CHECK(*it==*it1&&*it1==*it2&&*it2==*it);
}
{
employee_set_by_name& i1=get<1>(es);
const employee_set_by_name& ci1=get<1>(es);
employee_set_by_name::iterator it=i1.find("John");
employee_set_by_name::const_iterator it1=i1.find("John");
employee_set_by_name::const_iterator it2=ci1.find("John");
BOOST_CHECK(it==it1&&it1==it2&&it2==it);
BOOST_CHECK(*it==*it1&&*it1==*it2&&*it2==*it);
}
{
employee_set_as_inserted& i3=get<3>(es);
const employee_set_as_inserted& ci3=get<3>(es);
employee_set_as_inserted::iterator it=i3.begin();
employee_set_as_inserted::const_iterator it1=i3.begin();
employee_set_as_inserted::const_iterator it2=ci3.begin();
BOOST_CHECK(it==it1&&it1==it2&&it2==it);
BOOST_CHECK(*it==*it1&&*it1==*it2&&*it2==*it);
}
}
| [
"ohernandezba@71d53fa2-cca5-e1f2-4b5e-677cbd06613a"
]
| [
[
[
1,
55
]
]
]
|
275749944cf7f71347a5726313d6cb6481ea696e | b6d87736b619bd299d337637900c6025fe056a84 | /src/UnitsManager.cpp | 98343ab72b14bbc0a633a35ce0e66b908c02883b | []
| no_license | rogergranada/pipe-flow-simulator | 00d6ef7ab7d22a0c6e8512399e26b940a11bcbcf | 8b81b1ca6152aa8ac96a3a728896675e8aaea7de | refs/heads/master | 2021-01-17T12:10:39.727622 | 2011-04-11T16:19:30 | 2011-04-11T16:19:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 313 | cpp | #include "UnitsManager.h"
double UnitsManager::atmToPa(double x){
// 1 atm = 101 325 pascals
return x * 101325;
}
double UnitsManager::cPToPas(double x){
// 1 cP = 0.001 Pa
return x * 1e-3;
}
double UnitsManager::m3DayToM3Seconds(double x){
// 1 day = 86400 seconds
return x / 86400.0;
} | [
"[email protected]"
]
| [
[
[
1,
17
]
]
]
|
46714e5fc8a7a5c402708b56af7ae7b1f4ee046c | 96e96a73920734376fd5c90eb8979509a2da25c0 | /C3DE/Font.h | 939166b98896cfa133c51b6ce06815effa5decf2 | []
| no_license | lianlab/c3de | 9be416cfbf44f106e2393f60a32c1bcd22aa852d | a2a6625549552806562901a9fdc083c2cacc19de | refs/heads/master | 2020-04-29T18:07:16.973449 | 2009-11-15T10:49:36 | 2009-11-15T10:49:36 | 32,124,547 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,034 | h | #ifndef FONT_H
#define FONT_H
#include "D3DSprite.h"
#include <vector>
using namespace std;
struct FontRect
{
FontRect(int x, int y, int w, int h)
{
m_x = x;
m_y = y;
m_w = w;
m_h = h;
}
int m_x;
int m_y;
int m_w;
int m_h;
};
class Font//: public D3DSprite
{
public:
//Font(D3DImage *a_image, vector<int> *a_chars, vector<FontRect> *a_rects, vector<D3DXVECTOR2> *a_offsets);
Font(D3DImage *a_image, int *descriptor);
//Font(D3DImage *a_image, vector<int> *tt);
virtual ~Font();
vector<int> * GetCharsIndices();
vector<int> * GetWidths();
vector<FontRect> * GetRects();
vector<D3DXVECTOR2> * GetOffsets();
D3DImage * GetImage();
int * GetDescriptor();
int GetSpacing();
int GetLineSpacing();
int GetHeight();
private:
vector<int> *m_chars;
vector<int> *m_widths;
vector<FontRect> *m_rects;
vector<D3DXVECTOR2> *m_offsets;
D3DImage *m_image;
int * m_descriptor;
int m_spacing;
int m_lineSpacing;
int m_height;
};
#endif
| [
"caiocsabino@7e2be596-0d54-0410-9f9d-cf4183935158"
]
| [
[
[
1,
62
]
]
]
|
e40e7dc03f6524f678b0e1d7509229372d64fb9c | fad6f9883d4ad2686c196dc532a9ecb9199500ee | /NXP-LPC/CommTest/CommTest/PacketDecodeFrm.h | 3056f06cf2ed61c10f9067a2ad653f77c5ed5993 | []
| no_license | aquarius20th/nxp-lpc | fe83d6a140d361a1737d950ff728c6ea9a16a1dd | 4abfb804daf0ac9c59bd90d879256e7a3c1b2f30 | refs/heads/master | 2021-01-10T13:54:40.237682 | 2009-12-22T14:54:59 | 2009-12-22T14:54:59 | 48,420,260 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 585 | h | #pragma once
// CPacketDecodeFrm 框架
class CPacketDecodeFrm : public CBCGPMDIChildWnd
{
DECLARE_DYNCREATE(CPacketDecodeFrm)
protected:
CPacketDecodeFrm(); // 动态创建所使用的受保护的构造函数
virtual ~CPacketDecodeFrm();
CBCGPSplitterWnd m_wndSplitter;
protected:
DECLARE_MESSAGE_MAP()
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
public:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
protected:
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
public:
afx_msg void OnClose();
};
| [
"lijin.unix@13de9a6c-71d3-11de-b374-81e7cb8b6ca2"
]
| [
[
[
1,
25
]
]
]
|
9e122bd2188b44179967dc9be0e413a9fc1c649a | 444a151706abb7bbc8abeb1f2194a768ed03f171 | /trunk/ENIGMAsystem/SHELL/Universal_System/depth_draw.cpp | 9d8c30d04231fb30b5f49432aa3a044d244b779e | []
| no_license | amorri40/Enigma-Game-Maker | 9d01f70ab8de42f7c80af9a0f8c7a66e412d19d6 | c6b701201b6037f2eb57c6938c184a5d4ba917cf | refs/heads/master | 2021-01-15T11:48:39.834788 | 2011-11-22T04:09:28 | 2011-11-22T04:09:28 | 1,855,342 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,142 | cpp | /** Copyright (C) 2011 Josh Ventura
***
*** This file is a part of the ENIGMA Development Environment.
***
*** ENIGMA is free software: you can redistribute it and/or modify it under the
*** terms of the GNU General Public License as published by the Free Software
*** Foundation, version 3 of the license or any later version.
***
*** This application and its source code is distributed AS-IS, WITHOUT ANY
*** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
*** FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
*** details.
***
*** You should have received a copy of the GNU General Public License along
*** with this code. If not, see <http://www.gnu.org/licenses/>
**/
/// While the code that manages tiles and drawing is to be declared and managed
/// by the files under Graphics_Systems, this file exists to provide a way to
/// structure layers of depth, for both tiles and instances.
#include <math.h>
#include "depth_draw.h"
namespace enigma {
depth_layer::depth_layer(): draw_events(new event_iter("Draw")) {}
map<double,depth_layer> drawing_depths;
}
| [
"[email protected]"
]
| [
[
[
1,
28
]
]
]
|
7b48a9b4d4551de3198e2c8edb8627d37b211214 | d9a78f212155bb978f5ac27d30eb0489bca87c3f | /PB/src/PbLib/GeneratedFiles/Release/moc_pbtables.cpp | 61b9e034a8520623c53bf0d12c94650fcfaea09d | []
| no_license | marchon/pokerbridge | 1ed4a6a521f8644dcd0b6ec66a1ac46879b8473c | 97d42ef318bf08f3bc0c0cb1d95bd31eb2a3a8a9 | refs/heads/master | 2021-01-10T07:15:26.496252 | 2010-05-17T20:01:29 | 2010-05-17T20:01:29 | 36,398,892 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,400 | cpp | /****************************************************************************
** Meta object code from reading C++ file 'pbtables.h'
**
** Created: Fri 2. Apr 21:30:24 2010
** by: The Qt Meta Object Compiler version 61 (Qt 4.5.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "stdafx.h"
#include "..\..\pbtables.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'pbtables.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 61
#error "This file was generated using the moc from 4.5.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_PBTables[] = {
// content:
2, // revision
0, // classname
0, 0, // classinfo
1, 12, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
// signals: signature, parameters, type, tag, flags
14, 10, 9, 9, 0x05,
0 // eod
};
static const char qt_meta_stringdata_PBTables[] = {
"PBTables\0\0tbl\0newTableEvent(PBTable*)\0"
};
const QMetaObject PBTables::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_PBTables,
qt_meta_data_PBTables, 0 }
};
const QMetaObject *PBTables::metaObject() const
{
return &staticMetaObject;
}
void *PBTables::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_PBTables))
return static_cast<void*>(const_cast< PBTables*>(this));
return QObject::qt_metacast(_clname);
}
int PBTables::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: newTableEvent((*reinterpret_cast< PBTable*(*)>(_a[1]))); break;
default: ;
}
_id -= 1;
}
return _id;
}
// SIGNAL 0
void PBTables::newTableEvent(PBTable * _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
QT_END_MOC_NAMESPACE
| [
"[email protected]",
"mikhail.mitkevich@a5377438-2eb2-11df-b28a-19025b8c0740"
]
| [
[
[
1,
3
],
[
5,
26
],
[
28,
31
],
[
35,
38
],
[
40,
64
],
[
72,
73
],
[
81,
81
]
],
[
[
4,
4
],
[
27,
27
],
[
32,
34
],
[
39,
39
],
[
65,
71
],
[
74,
80
]
]
]
|
a00d9cc0d4b5fc9714c66d4a95f46134e2ff5b84 | e31046aee3ad2d4600c7f35aaeeba76ee2b99039 | /trunk/header/base/Actor.h | 6a6e5ad414cbaa062b85909f56e9333f56daacf5 | []
| no_license | BackupTheBerlios/trinitas-svn | ddea265cf47aff3e8853bf6d46861e0ed3031ea1 | 7d3ff64a7d0e5ba37febda38e6ce0b2d0a4b6cca | refs/heads/master | 2021-01-23T08:14:44.215249 | 2009-02-18T19:37:51 | 2009-02-18T19:37:51 | 40,749,519 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 188 | h | /*
* Copyright 2008 by Trinitas. All rights reserved.
* Distributed under the terms of the BSD License.
*
*/
#ifndef ACTOR_H
#define ACTOR_H
class Actor {
public:
}
#endif
| [
"paradoxon@ab3bda7c-5b37-0410-9911-e7f4556ba333",
"ichthys1@ab3bda7c-5b37-0410-9911-e7f4556ba333"
]
| [
[
[
1,
1
],
[
3,
7
],
[
10,
10
]
],
[
[
2,
2
],
[
8,
9
],
[
11,
12
]
]
]
|
4480fd468c2d7c6374cab9600ee4735ec904497e | 44890f9b95a8c77492bf38514d26c0da51d2fae5 | /Gif/Gif/GifFrame.cpp | 3cd8f24930bd8694c519be14420ac963e0adfb96 | []
| no_license | winnison/huang-cpp | fd9cd57bd0b97870ae1ca6427d2fc8191cf58a77 | 989fe1d3fdc1c9eae33e0f11fcd6d790e866e4c5 | refs/heads/master | 2021-01-19T18:07:38.882211 | 2008-04-14T16:42:48 | 2008-04-14T16:42:48 | 34,250,385 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,168 | cpp | #include "GifFrame.h"
HBITMAP _CreateDIB(HDC hdc,int cx,int cy, LPBYTE &lpData)
{
BITMAPINFO bmpInfo = {
sizeof(bmpInfo.bmiHeader), //biSize
cx, //biWidth
cy, //biHeight
1, //biPlanes
4*8 //biBitCount
};
return CreateDIBSection(hdc,&bmpInfo,DIB_RGB_COLORS,(void**)&lpData,NULL,0);
}
CGifFrame::CGifFrame(int width, int height, CDCHandle& dcScreen)
:delay(-1),transparent(EMPTYCOLOR),w(width),h(height)
{
hBmp = _CreateDIB(dcScreen, width, height, lpData);
}
CGifFrame::~CGifFrame()
{
DeleteObject(hBmp);
}
HBITMAP CGifFrame::GetBitmap()
{
return hBmp;
}
CSize CGifFrame::GetSize()
{
return CSize(w,h);
}
int CGifFrame::GetDelay()
{
return delay;
}
COLORREF CGifFrame::GetTransparent()
{
return transparent;
}
LPBYTE CGifFrame::GetData()
{
return lpData;
}
int CGifFrame::ReplaceTransparent(COLORREF clr)
{
byte* pb = (byte*)&clr;
byte b = pb[0];
pb[0] = pb[2];
pb[2] = b;
int count = 0;
for (int i=w*h-1; i>=0; i--)
{
if(((COLORREF*)lpData)[i] == transparent)
{
count++;
((COLORREF*)lpData)[i] = clr;
}
}
return count;
}
| [
"mr.huanghuan@48bf5850-ed27-0410-9317-b938f814dc16"
]
| [
[
[
1,
69
]
]
]
|
eab39f3878a71aaf3b7847900943448a57068626 | 77aa13a51685597585abf89b5ad30f9ef4011bde | /dep/src/boost/boost/config/stdlib/dinkumware.hpp | fb6e101827c8abdd0ca43b64f9a9c6e33ea24886 | []
| no_license | Zic/Xeon-MMORPG-Emulator | 2f195d04bfd0988a9165a52b7a3756c04b3f146c | 4473a22e6dd4ec3c9b867d60915841731869a050 | refs/heads/master | 2021-01-01T16:19:35.213330 | 2009-05-13T18:12:36 | 2009-05-14T03:10:17 | 200,849 | 8 | 10 | null | null | null | null | UTF-8 | C++ | false | false | 3,719 | hpp | // (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Jens Maurer 2001.
// (C) Copyright Peter Dimov 2001.
// (C) Copyright David Abrahams 2002.
// (C) Copyright Guillaume Melquiond 2003.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most recent version.
// Dinkumware standard library config:
#if !defined(_YVALS) && !defined(_CPPLIB_VER)
#include <boost/config/no_tr1/utility.hpp>
#if !defined(_YVALS) && !defined(_CPPLIB_VER)
#error This is not the Dinkumware lib!
#endif
#endif
#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306)
// full dinkumware 3.06 and above
// fully conforming provided the compiler supports it:
# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h
# define BOOST_NO_STDC_NAMESPACE
# endif
# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC)
# define BOOST_NO_STD_ALLOCATOR
# endif
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
// if this lib version is set up for vc6 then there is no std::use_facet:
# define BOOST_NO_STD_USE_FACET
# define BOOST_HAS_TWO_ARG_USE_FACET
// C lib functions aren't in namespace std either:
# define BOOST_NO_STDC_NAMESPACE
// and nor is <exception>
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
# endif
// There's no numeric_limits<long long> support unless _LONGLONG is defined:
# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310)
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
# endif
// 3.06 appears to have (non-sgi versions of) <hash_set> & <hash_map>,
// and no <slist> at all
#else
# define BOOST_MSVC_STD_ITERATOR 1
# define BOOST_NO_STD_ITERATOR
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
# define BOOST_NO_STD_ALLOCATOR
# define BOOST_NO_STDC_NAMESPACE
# define BOOST_NO_STD_USE_FACET
# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
# define BOOST_HAS_MACRO_USE_FACET
# ifndef _CPPLIB_VER
// Updated Dinkum library defines this, and provides
// its own min and max definitions.
# define BOOST_NO_STD_MIN_MAX
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
# endif
#endif
//
// std extension namespace is stdext for vc7.1 and later,
// the same applies to other compilers that sit on top
// of vc7.1 (Intel and Comeau):
//
#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__)
# define BOOST_STD_EXTENSION_NAMESPACE stdext
#endif
#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306)
// if we're using a dinkum lib that's
// been configured for VC6/7 then there is
// no iterator traits (true even for icl)
# define BOOST_NO_STD_ITERATOR_TRAITS
#endif
#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310)
// Intel C++ chokes over any non-trivial use of <locale>
// this may be an overly restrictive define, but regex fails without it:
# define BOOST_NO_STD_LOCALE
#endif
#ifdef _CPPLIB_VER
# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER
#else
# define BOOST_DINKUMWARE_STDLIB 1
#endif
#ifdef _CPPLIB_VER
# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER)
#else
# define BOOST_STDLIB "Dinkumware standard library version 1.x"
#endif
| [
"pepsi1x1@a6a5f009-272a-4b40-a74d-5f9816a51f88"
]
| [
[
[
1,
106
]
]
]
|
f5972dcd8ad74147ec6aadeeb00608b0d66b2630 | 841e58a0ee1393ddd5053245793319c0069655ef | /Karma/Source/GuiHandler.cpp | 40292dfa8e0a2dceb592f8cfb6c5da1a647b62b7 | []
| no_license | dremerbuik/projectkarma | 425169d06dc00f867187839618c2d45865da8aaa | faf42e22b855fc76ed15347501dd817c57ec3630 | refs/heads/master | 2016-08-11T10:02:06.537467 | 2010-06-09T07:06:59 | 2010-06-09T07:06:59 | 35,989,873 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 24,992 | cpp | /*---------------------------------------------------------------------------------*/
/* File: GuiHandler.cpp */
/* Author: Per Karlsson, [email protected] */
/* */
/* Description: GuiHandler is a class takes care of all the in-game GUI */
/* (and the cursor). */
/*---------------------------------------------------------------------------------*/
#include <GuiHandler.h>
/*---------------------------------------------------------------------------------*/
/* PUBLIC */
/*---------------------------------------------------------------------------------*/
GuiHandler::GuiHandler(Ogre::RenderWindow* renderWnd) :mvpRenderWnd(renderWnd), mvFirstPerson(false),mvCastBar(false)
{
//Initiate all the different cursors.
//Textures and overlay files are located in a Resource Group called Cursor.
mvpCursorLayer = Ogre::OverlayManager::getSingleton().getByName("CursorMain");
mvpCursorNormal = Ogre::OverlayManager::getSingleton().getOverlayElement("CursorNormal");
mvpCursorMoveBox = Ogre::OverlayManager::getSingleton().getOverlayElement("CursorMoveBox");
mvpCursorMoveBox->hide();
mvpCursorMoveBoxGrab = Ogre::OverlayManager::getSingleton().getOverlayElement("CursorMoveBoxGrab");
mvpCursorMoveBoxGrab->hide();
mvpCursorAim = Ogre::OverlayManager::getSingleton().getOverlayElement("CursorAim");
mvpCursorAim->hide();
//Start with the normal cursor
mvpCurCursor = mvpCursorNormal;
showCursor();
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::changeCursor(int cursor)
{
//Hide the current Cursor.
mvpCurCursor->hide();
//Set the new cursor.
switch (cursor)
{
case Game::Cursor_Normal:
mvpCurCursor = mvpCursorNormal;
break;
case Game::Cursor_MoveBox:
mvpCurCursor = mvpCursorMoveBox;
break;
case Game::Cursor_MoveBoxGrab:
mvpCurCursor = mvpCursorMoveBoxGrab;
break;
case Game::Cursor_Aim:
mvpCurCursor = mvpCursorAim;
}
//Show the new cursor and update its position.
mvpCurCursor->show();
mvpCurCursor->setPosition(mvMouseX,mvMouseY);
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::firstPerson(bool state)
{
//Either shows or hides the First Person Gun GUI.
mvFirstPerson = state;
if (mvFirstPerson)
{
mvpFirstPersonLayer->show();
updateCursorPos(mvpRenderWnd->getWidth()/2,mvpRenderWnd->getHeight()/2);
}
else
mvpFirstPersonLayer->hide();
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::hideCastingBar()
{
//If the current casting bar has an icon, hide it.
if (mvpCurrCastingBarIcon)
{
mvpCurrCastingBarIcon->hide();
mvpCurrCastingBarIcon = 0;
}
//Hide and disable the casting bar.
mvCastBar = false;
mvpCastingBarLayer->hide();
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::hideCursor()
{
//Hide the Cursor overlay.
mvpCursorLayer->hide();
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::initGui()
{
//Initiate all the In-Game GUI components.
initActionBar();
initCastingBar();
initMiniMap();
initFirstPersonShooter();
initHP();
}
/*---------------------------------------------------------------------------------*/
bool GuiHandler::isLoaded(int powerUp)
{
//If a PowerUp is loaded, the regular ".PowerUp" in the ActionBarElement struct is visible.
switch (powerUp)
{
case Game::PowerUp_SuperJump:
return mvpActionBarSuperJump.PowerUp->isVisible();
break;
case Game::PowerUp_SuperSpeed:
return mvpActionBarSuperSpeed.PowerUp->isVisible();
break;
case Game::PowerUp_MoveBoxMode:
return mvpActionBarMoveBox.PowerUp->isVisible();
break;
case Game::PowerUp_GunModePistol:
return mvpActionBarPistol.PowerUp->isVisible();
break;
case Game::PowerUp_GunModeMachineGun:
return mvpActionBarMachineGun.PowerUp->isVisible();
break;
case Game::PowerUp_RocketBootsMode:
return mvpActionBarRocketBoots.PowerUp->isVisible();
};
return false;
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::loadCastingBar(int powerUp , float totalTime)
{
//Depending on PowerUp, the casting bar has different text strings and icons.
Ogre::String name;
switch(powerUp)
{
case Game::PowerUp_SuperSpeed:
mvpCurrCastingBarIcon = mvpCastingBarSuperSpeed;
name = "Super Speed";
break;
case Game::PowerUp_MoveBox:
mvpCurrCastingBarIcon = mvpCastingBarMoveBox;
name = "Move Box";
break;
case Game::PowerUp_RocketBootsMode:
mvpCurrCastingBarIcon = mvpCastingBarRocketBoots;
name = "Rocket Boots";
}
//Enables casting bar.
mvCastBar = true;
mvpCastingBarLayer->show();
mvpCurrCastingBarIcon->show();
//mvpCastingBarCur is a small "bar" that shows current position on the casting bar.
//This resets it to start at the same position as the casting bars right edge.
//243 = width of casting bar
//24 = left offset of casting bar. (the icon is 24 in width)
mvpCastingBarCur->setLeft(24+243);
//Updates the total time and the name of the PowerUp on the casting bar.
mvCastingBarTotalTime = totalTime;
mvpCastingBarText->setCaption(name);
//For example "SuperSpeed x / 3.0"
//SuperSpeed = mvpCastingBarText
//3.0 = mvCastingBarTotalTime
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::showCursor()
{
//Show the cursor overlay
mvpCursorLayer->show();
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::showMuzzleFire(bool state)
{
//Either shows or hides the First Person muzzle fire.
if (state)
mvpMuzzleFireFirstPerson->show();
else
mvpMuzzleFireFirstPerson->hide();
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::toggleGameGUI(bool state)
{
//Either shows or hides the In-Game GUI
if (state)
{
mvpMiniMapLayer->show();
//If the casting bar was enabled before, show it.
if (mvCastBar)
mvpCastingBarLayer->show();
mvpActionBar->show();
mvpHPLayer->show();
if (mvFirstPerson)
firstPerson(mvFirstPerson);
}
else
{
mvpMiniMapLayer->hide();
mvpCastingBarLayer->hide();
mvpActionBar->hide();
mvpHPLayer->hide();
if (mvFirstPerson)
mvpFirstPersonLayer->hide();
}
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::updateActionBarElement(int powerUp,int ActionBarMode)
{
//In the future: Make this more general maybe.
//Changes an action bar slot. Some PowerUps are supposed to cancel others.
switch (powerUp)
{
case Game::PowerUp_SuperJump:
changeActionBarElement(mvpActionBarSuperJump,ActionBarMode);
//If SuperJump is set to active and RocketBoots is loaded, set Rocket Boots icon to normal (and not activ)
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_RocketBootsMode))
changeActionBarElement(mvpActionBarRocketBoots,Game::ActionBar_Normal);
break;
case Game::PowerUp_SuperSpeed:
changeActionBarElement(mvpActionBarSuperSpeed,ActionBarMode);
//Same as SuperJump (line 213). SuperSpeed cancels RocketBoots and MoveBox.
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_RocketBootsMode))
changeActionBarElement(mvpActionBarRocketBoots,Game::ActionBar_Normal);
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_MoveBoxMode))
changeActionBarElement(mvpActionBarMoveBox,Game::ActionBar_Normal);
break;
case Game::PowerUp_MoveBoxMode:
changeActionBarElement(mvpActionBarMoveBox,ActionBarMode);
//Same as SuperJump (line 213). MoveBox cancels GunMode Pistol, GunMode MachineGun, SuperSpeed and RocketBoots.
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_GunModePistol))
changeActionBarElement(mvpActionBarPistol,Game::ActionBar_Normal);
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_GunModeMachineGun))
changeActionBarElement(mvpActionBarMachineGun,Game::ActionBar_Normal);
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_SuperSpeed))
changeActionBarElement(mvpActionBarSuperSpeed,Game::ActionBar_Normal);
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_RocketBootsMode))
changeActionBarElement(mvpActionBarRocketBoots,Game::ActionBar_Normal);
break;
case Game::PowerUp_GunModePistol:
changeActionBarElement(mvpActionBarPistol,ActionBarMode);
//Same as SuperJump (line 213). GunMode Pistol cancels GunMode MachineGun and MoveBox.
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_MoveBoxMode))
changeActionBarElement(mvpActionBarMoveBox,Game::ActionBar_Normal);
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_GunModeMachineGun))
changeActionBarElement(mvpActionBarMachineGun,Game::ActionBar_Normal);
break;
case Game::PowerUp_GunModeMachineGun:
changeActionBarElement(mvpActionBarMachineGun,ActionBarMode);
//Same as SuperJump (line 213). GunMode Machine cancels GunMode Pistol and MoveBox.
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_MoveBoxMode))
changeActionBarElement(mvpActionBarMoveBox,Game::ActionBar_Normal);
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_GunModePistol))
changeActionBarElement(mvpActionBarPistol,Game::ActionBar_Normal);
break;
case Game::PowerUp_RocketBootsMode:
changeActionBarElement(mvpActionBarRocketBoots,ActionBarMode);
//Same as SuperJump (line 213). Rocket Boots cancels SuperSpeed,SuperJump and MoveBox.
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_SuperJump))
changeActionBarElement(mvpActionBarSuperJump,Game::ActionBar_Normal);
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_SuperSpeed))
changeActionBarElement(mvpActionBarSuperSpeed,Game::ActionBar_Normal);
if (ActionBarMode==Game::ActionBar_Active && isLoaded(Game::PowerUp_MoveBoxMode))
changeActionBarElement(mvpActionBarMoveBox,Game::ActionBar_Normal);
break;
};
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::updateCastingBar(float curTime)
{
//Get the width in percents. relWidth is in the range 0 <= relWidth <= 1
float relWidth = curTime/mvCastingBarTotalTime;
//Depending on the curTime, we need to set differnet precisions to avoid 0.000001 etc
int precision1 = 2;
//Prolbems once curTime = 0.xx
if (curTime<1)
precision1 = 1;
//Once the casting bar is below 0.1 seconds, the casting bar is reseted.
//No differnece between 0.1 and 0.0, no one can notice any difference.
if (curTime < 0.1)
{
curTime = 0;
mvCastBar = false;
}
static Ogre::String text("/");
if (relWidth <= 1)
{
//Updates the current casting bar text. " 2.3 / 3" for example.
mvpCastingBarTextTime->setCaption(Ogre::StringConverter::toString(curTime,precision1)+text+Ogre::StringConverter::toString(mvCastingBarTotalTime,3));
//243 = castingbar width
//relWidth is in the range 0 <= relWidth <= 1
mvpCastingBar->setWidth(243 * relWidth);
//See ::loadCastingBar for more information about mvpCastingBarCur
mvpCastingBarCur->setLeft(24 + 243 * relWidth);
}
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::updateCursorPos(const int x,const int y)
{
/* The (0,0) position of a cursor is the top left corner. Every cursor has the size of
32 x 32 pixels. If 16 is subtracted from each cursor position, the cursors center will be where the
OIS cursor is.*/
mvMouseX = x-16;
mvMouseY = y-16;
mvpCurCursor->setPosition(mvMouseX,mvMouseY);
#ifdef DEBUG
//updateDebugCursorPos(x,y);
#endif
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::updateHP(float hp)
{
//Updates the HP-meter
mvpHPText->setCaption(Ogre::StringConverter::toString(hp));
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::updateMiniMap(double globalX, double globalZ)
{
//In the future: Read World Size from the Settings class.
#define WORLDSIZE 600
//New coordinate system where x and z can have values between (-1) and (1).
double x = (globalX) / (WORLDSIZE / 2);
double z = (globalZ) / (WORLDSIZE / 2);
#define MINIMAPWIDTH 0.24
/* On each side of the minimap there is 12% of the picture.
________________________
12% | _________________ |
| |XXXXXXXXXXXXXXX| |
76% | |XXXXXXXXXXXXXXX| |
| |XXXXXXXXXXXXXXX| |
| |XXXXXXXXXXXXXXX| |
12% |_______________________|
12% 76% 12%
XXX = minimap
the white space = black empty space on the minimap
Scales the coordinate system so x and z can have values from (0) to (1-MINIMAPWIDTH=0.76) */
x = (x + 1) / (2/(1-MINIMAPWIDTH));
z = (z + 1) / (2/(1-MINIMAPWIDTH));
//Set new UV coordinates on the minimap texture
Ogre::Real uvXstart = 0.76 - z;
Ogre::Real uvXend = uvXstart + 0.24;
Ogre::Real uvYstart = x;
Ogre::Real uvYend = uvYstart + 0.24;
//Changes the UV coordinates of the MiniMap layer.
Ogre::String value = Ogre::StringConverter::toString(uvXstart);
value += " ";
value += Ogre::StringConverter::toString(uvYstart);
value += " ";
value += Ogre::StringConverter::toString(uvXend);
value += " ";
value += Ogre::StringConverter::toString(uvYend);
mvpMiniMap->setParameter("uv_coords" ,value );
}
/*---------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------*/
/* PRIVATE */
/*---------------------------------------------------------------------------------*/
void GuiHandler::initActionBar()
{
//Load Action Bar border.
mvpActionBar = Ogre::OverlayManager::getSingletonPtr()->getByName("ActionBarOverlay");
mvpActionBar->show();
//Load all elements and only show the locked ones (initial state)
mvpActionBarSuperJump.PowerUp = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupSuperJump");
mvpActionBarSuperJump.PowerUpLocked = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupSuperJumpLocked");
mvpActionBarSuperJump.Active = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupSuperJumpActive");
changeActionBarElement(mvpActionBarSuperJump,Game::ActionBar_Locked);
mvpActionBarSuperSpeed.PowerUp = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupSuperSpeed");
mvpActionBarSuperSpeed.PowerUpLocked = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupSuperSpeedLocked");
mvpActionBarSuperSpeed.Active = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupSuperSpeedActive");
changeActionBarElement(mvpActionBarSuperSpeed,Game::ActionBar_Locked);
mvpActionBarMoveBox.PowerUp = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupMoveBox");
mvpActionBarMoveBox.PowerUpLocked = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupMoveBoxLocked");
mvpActionBarMoveBox.Active = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupMoveBoxActive");
changeActionBarElement(mvpActionBarMoveBox,Game::ActionBar_Locked);
mvpActionBarPistol.PowerUp = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupPistol");
mvpActionBarPistol.PowerUpLocked = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupPistolLocked");
mvpActionBarPistol.Active = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupPistolActive");
changeActionBarElement(mvpActionBarPistol,Game::ActionBar_Locked);
mvpActionBarMachineGun.PowerUp = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupMachineGun");
mvpActionBarMachineGun.PowerUpLocked = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupMachineGunLocked");
mvpActionBarMachineGun.Active = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupMachineGunActive");
changeActionBarElement(mvpActionBarMachineGun,Game::ActionBar_Locked);
mvpActionBarRocketBoots.PowerUp = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupRocketBoots");
mvpActionBarRocketBoots.PowerUpLocked = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupRocketBootsLocked");
mvpActionBarRocketBoots.Active = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("ActionBarOverlay/pwrupRocketBootsActive");
changeActionBarElement(mvpActionBarRocketBoots,Game::ActionBar_Locked);
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::changeActionBarElement(ActionBarElements& ae, int ActionBarMode)
{
/*Changes a slot in the Action Bar.
Action Bar Mode == Game::ActionBar_Normal
Show normal layer, hide locked and active.
Action Bar Mode == Game::ActionBar_Active
Show active layer and normal layer, hide locked.
Action Bar Mode == Game::ActionBar_Locked
Show locked layer, hide locked and normal.
*/
if (ActionBarMode == Game::ActionBar_Normal)
{
ae.Active->hide();
ae.PowerUpLocked->hide();
ae.PowerUp->show();
}
else if (ActionBarMode == Game::ActionBar_Active)
{
ae.Active->show();
ae.PowerUpLocked->hide();
ae.PowerUp->show();
}
else
{
ae.Active->hide();
ae.PowerUpLocked->show();
ae.PowerUp->hide();
}
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::initCastingBar()
{
//Initiate the casting bar overlays.
mvpCastingBarLayer = Ogre::OverlayManager::getSingleton().getByName("GuiKarma/CastingBar");
mvpCastingBar = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/CastingbarPanel/Texture");
mvpCastingBarCur =Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/CastingBarPanel/TextureCurrent");
mvpCastingBarText = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/CastingbarPanel/Text");
mvpCastingBarTextTime = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/CastingbarPanel/TextTime");
//Initiate the casting bar icons. Default hidden.
mvpCastingBarSuperSpeed = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/CastingbarPanel/SuperSpeed");
mvpCastingBarSuperSpeed->hide();
mvpCastingBarMoveBox = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/CastingbarPanel/MoveBox");
mvpCastingBarMoveBox->hide();
mvpCastingBarRocketBoots = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/CastingbarPanel/RocketBoots");
mvpCastingBarRocketBoots->hide();
//At first, no icon is active.
mvpCurrCastingBarIcon = 0;
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::initMiniMap()
{
//Initiate the MiniMap
mvpMiniMapLayer = Ogre::OverlayManager::getSingleton().getByName("GuiKarma/MiniMap");
mvpMiniMapLayer->show();
mvpMiniMap = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/MiniMapImage");
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::initFirstPersonShooter()
{
//Initiate the First Person GUI (Muzzle Fire and Gun). Starts hidden
mvpMuzzleFireFirstPerson = Ogre::OverlayManager::getSingleton().getByName("GuiKarma/FirstPersonMuzzle");
mvpMuzzleFireFirstPerson->hide();
mvpFirstPersonLayer = Ogre::OverlayManager::getSingleton().getByName("GuiKarma/FirstPerson");
mvpFirstPersonLayer->hide();
mvpMiniMapLayer->setZOrder(1);
}
/*---------------------------------------------------------------------------------*/
void GuiHandler::initHP()
{
//Initiate the HP-meter.
mvpHPLayer = Ogre::OverlayManager::getSingleton().getByName("GuiKarma/HP");
mvpHPLayer->show();
mvpHPText = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement("GuiKarma/HPText");
}
/*---------------------------------------------------------------------------------*/
#ifdef DEBUG
void GuiHandler::initDebugGui()
{
mtpDebugLayer = Ogre::OverlayManager::getSingleton().getByName("GuiKarma/DebugOverlay");
mtpDebugLayer->show();
debugFPS = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextFPS");
debugCharX = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextCharX");
debugCharY = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextCharY");
debugCharZ = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextCharZ");
debugCamX = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextCamX");
debugCamY = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextCamY");
debugCamZ = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextCamZ");
debugDirX = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextDirX");
debugDirY = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextDirY");
debugDirZ = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextDirZ");
debugMouseX = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextMousePosX");
debugMouseY = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextMousePosY");
debugTriangles= Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextTriangles");
debugChunkX = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextPlaceholder1");
debugChunkY = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextPlaceholder2");
debugHP = Ogre::OverlayManager::getSingleton().getOverlayElement("GuiKarma/DebugOverlay/TextPlaceholder3");
}
void GuiHandler::updateDebugFPS(Ogre::String& s)
{
static Ogre::String currFps = "Current FPS: ";
debugFPS->setCaption(currFps + s);
}
void GuiHandler::updateDebugCharXYZ(Ogre::Vector3& p)
{
static Ogre::String CharX = "Char X: ";
debugCharX->setCaption(CharX + Ogre::StringConverter::toString(p.x));
static Ogre::String CharY = "Char Y: ";
debugCharY->setCaption(CharY + Ogre::StringConverter::toString(p.y));
static Ogre::String CharZ = "Char Z: ";
debugCharZ->setCaption(CharZ + Ogre::StringConverter::toString(p.z));
}
void GuiHandler::updateDebugCamXYZ(Ogre::Vector3& p)
{
static Ogre::String CamX = "Cam X: ";
debugCamX->setCaption(CamX + Ogre::StringConverter::toString(p.x));
static Ogre::String CamY = "Cam Y: ";
debugCamY->setCaption(CamY + Ogre::StringConverter::toString(p.y));
static Ogre::String CamZ = "Cam Z: ";
debugCamZ->setCaption(CamZ + Ogre::StringConverter::toString(p.z));
}
void GuiHandler::updateDebugDirXYZ(Ogre::Vector3& p)
{
static Ogre::String DirX = "Dir X: ";
debugDirX->setCaption(DirX + Ogre::StringConverter::toString(p.x));
static Ogre::String DirY = "Dir Y: ";
debugDirY->setCaption(DirY + Ogre::StringConverter::toString(p.y));
static Ogre::String DirZ = "Dir Z: ";
debugDirZ->setCaption(DirZ + Ogre::StringConverter::toString(p.z));
}
void GuiHandler::updateDebugTriangles(Ogre::String& s)
{
static Ogre::String currFps = "Triangle count: ";
debugTriangles->setCaption(currFps + s);
}
void GuiHandler::updateDebugCursorPos(const int x,const int y)
{
static Ogre::String mousePosX = "Mouse X: ";
debugMouseX->setCaption(mousePosX + Ogre::StringConverter::toString(x));
static Ogre::String mousePosY = "Mouse Y: ";
debugMouseY->setCaption(mousePosY + Ogre::StringConverter::toString(y));
}
void GuiHandler::updateCurChunk(const int x, const int y)
{
static Ogre::String ChunkPosX = "Chunk X: ";
debugChunkX->setCaption(ChunkPosX + Ogre::StringConverter::toString(x));
static Ogre::String ChunkPosY = "Chunk Y: ";
debugChunkY->setCaption(ChunkPosY + Ogre::StringConverter::toString(y));
}
void GuiHandler::updateDebugHP(float x)
{
static Ogre::String hp = "HP: ";
debugHP->setCaption(hp + Ogre::StringConverter::toString(x));
}
#endif | [
"perkarlsson89@0a7da93c-2c89-6d21-fed9-0a9a637d9411"
]
| [
[
[
1,
591
]
]
]
|
701982967c8c34571b610184288f8ccc48de55b6 | 6581dacb25182f7f5d7afb39975dc622914defc7 | /WinsockLab/Sio_rcvall/parser.cpp | 4aa34a3c4dc054769ac452657a5ee1da45cb05ed | []
| no_license | dice2019/alexlabonline | caeccad28bf803afb9f30b9e3cc663bb2909cc4f | 4c433839965ed0cff99dad82f0ba1757366be671 | refs/heads/master | 2021-01-16T19:37:24.002905 | 2011-09-21T15:20:16 | 2011-09-21T15:20:16 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,923 | cpp | // Description:
// This file is the companion to rcvall.c and contains
// the parser routines for printing out IP, UDP, TCP,
// ICMP, and IGMP packets.
//
#include <stdio.h>
#include "parser.h"
extern BOOL bFilter;
//
// A list of protocol types in the IP protocol header
//
char *szProto[] = {"Reserved", // 0
"ICMP", // 1
"IGMP", // 2
"GGP", // 3
"IP", // 4
"ST", // 5
"TCP", // 6
"UCL", // 7
"EGP", // 8
"IGP", // 9
"BBN-RCC-MON", // 10
"NVP-II", // 11
"PUP", // 12
"ARGUS", // 13
"EMCON", // 14
"XNET", // 15
"CHAOS", // 16
"UDP", // 17
"MUX", // 18
"DCN-MEAS", // 19
"HMP", // 20
"PRM", // 21
"XNS-IDP", // 22
"TRUNK-1", // 23
"TRUNK-2", // 24
"LEAF-1", // 25
"LEAF-2", // 26
"RDP", // 27
"IRTP", // 28
"ISO-TP4", // 29
"NETBLT", // 30
"MFE-NSP", // 31
"MERIT-INP", // 32
"SEP", // 33
"3PC", // 34
"IDPR", // 35
"XTP", // 36
"DDP", // 37
"IDPR-CMTP", // 38
"TP++", // 39
"IL", // 40
"SIP", // 41
"SDRP", // 42
"SIP-SR", // 43
"SIP-FRAG", // 44
"IDRP", // 45
"RSVP", // 46
"GRE", // 47
"MHRP", // 48
"BNA", // 49
"SIPP-ESP", // 50
"SIPP-AH", // 51
"I-NLSP", // 52
"SWIPE", // 53
"NHRP", // 54
"unassigned", // 55
"unassigned", // 56
"unassigned", // 57
"unassigned", // 58
"unassigned", // 59
"unassigned", // 60
"any host internal protocol", // 61
"CFTP", // 62
"any local network", // 63
"SAT-EXPAK", // 64
"KRYPTOLAN", // 65
"RVD", // 66
"IPPC", // 67
"any distributed file system", // 68
"SAT-MON", // 69
"VISA", // 70
"IPCV", // 71
"CPNX", // 72
"CPHB", // 73
"WSN", // 74
"PVP", // 75
"BR-SAT-MON", // 76
"SUN-ND", // 77
"WB-MON", // 78
"WB-EXPAK", // 79
"ISO-IP", // 80
"VMTP", // 81
"SECURE-VMTP",// 82
"VINES", // 83
"TTP", // 84
"NSFNET-IGP", // 85
"DGP", // 86
"TCF", // 87
"IGRP", // 88
"OSPFIGP", // 89
"Sprite-RPC", // 90
"LARP", // 91
"MTP", // 92
"AX.25", // 93
"IPIP", // 94
"MICP", // 95
"SCC-SP", // 96
"ETHERIP", // 97
"ENCAP", // 98
"any private encryption scheme", // 98
"GMTP" // 99
};
// The types of IGMP messages
char *szIgmpType[] = {"",
"Host Membership Query",
"HOst Membership Report",
"",
"",
"",
"Version 2 Membership Report",
"Leave Group"
};
// Function: PrintRawBytes
// Description:
// This function simply prints out a series of bytes
// as hexadecimal digits.
void PrintRawBytes(BYTE *ptr, DWORD len)
{
int i;
while (len > 0)
{
for(i=0; i < 20 ;i++)
{
printf("%x%x ", HI_WORD(*ptr), LO_WORD(*ptr));
len--;
ptr++;
if (len == 0)
break;
}
printf("\n");
}
}
// Function: DecodeIGMPHeader
// Description:
// This function takes a pointer to a buffer containing
// an IGMP packet and prints it out in a readable form.
int DecodeIGMPHeader(WSABUF *wsabuf, DWORD iphdrlen)
{
BYTE *hdr = (BYTE *)(wsabuf->buf + iphdrlen);
unsigned short chksum, version, type, maxresptime;
SOCKADDR_IN addr;
version = HI_WORD(*hdr);
type = LO_WORD(*hdr);
hdr++;
maxresptime = *hdr;
hdr++;
memcpy(&chksum, hdr, 2);
chksum = ntohs(chksum);
hdr += 2;
memcpy(&(addr.sin_addr.s_addr), hdr, 4);
printf(" IGMP HEADER:\n");
if ((type == 1) || (type == 2))
version = 1;
else
version = 2;
printf(" IGMP Version = %d\n", version);
printf(" IGMP Type = %s\n", szIgmpType[type]);
if (version == 2)
printf(" Max Resp Time = %d\n", maxresptime);
printf(" IGMP Grp Addr = %s\n", inet_ntoa(addr.sin_addr));
//ExitProcess(0);
return 0;
}
// Function: DecodeUDPHeader
// Description:
// This function takes a buffer which points to a UDP
// header and prints it out in a readable form.
int DecodeUDPHeader(WSABUF *wsabuf, DWORD iphdrlen)
{
BYTE *hdr = (BYTE *)(wsabuf->buf + iphdrlen);
unsigned short shortval,
udp_src_port,
udp_dest_port,
udp_len,
udp_chksum;
memcpy(&shortval, hdr, 2);
udp_src_port = ntohs(shortval);
hdr += 2;
memcpy(&shortval, hdr, 2);
udp_dest_port = ntohs(shortval);
hdr += 2;
memcpy(&shortval, hdr, 2);
udp_len = ntohs(shortval);
hdr += 2;
memcpy(&shortval, hdr, 2);
udp_chksum = ntohs(shortval);
printf(" UDP HEADER\n");
printf(" Source Port: %-05d | Dest Port: %-05d\n",
udp_src_port, udp_dest_port);
printf(" UDP Len: %-05d | ChkSum: 0x%08x\n",
udp_len, udp_chksum);
return 0;
}
// Function: DecodeTCPHeader
// Description:
// This function takes a buffer pointing to a TCP header
// and prints it out in a readable form.
int DecodeTCPHeader(WSABUF *wsabuf, DWORD iphdrlen)
{
BYTE *hdr = (BYTE *)(wsabuf->buf + iphdrlen);
unsigned short shortval;
unsigned int longval;
printf(" TCP HEADER\n");
memcpy(&shortval, hdr, 2);
shortval = ntohs(shortval);
printf(" Src Port : %d\n", shortval);
hdr += 2;
memcpy(&shortval, hdr, 2);
shortval = ntohs(shortval);
printf(" Dest Port : %d\n", shortval);
hdr += 2;
memcpy(&longval, hdr, 4);
longval = ntohl(longval);
printf(" Seq Num : %ul\n", longval);
hdr += 4;
memcpy(&longval, hdr, 4);
longval = ntohl(longval);
printf(" ACK Num : %ul\n", longval);
hdr += 4;
printf(" Header Len : %d (bytes %d)\n", HI_WORD(*hdr),
(HI_WORD(*hdr) * 4));
memcpy(&shortval, hdr, 2);
shortval = ntohs(shortval) & 0x3F;
printf(" Flags : ");
if (shortval & 0x20)
printf("URG ");
if (shortval & 0x10)
printf("ACK ");
if (shortval & 0x08)
printf("PSH ");
if (shortval & 0x04)
printf("RST ");
if (shortval & 0x02)
printf("SYN ");
if (shortval & 0x01)
printf("FIN ");
printf("\n");
hdr += 2;
memcpy(&shortval, hdr, 2);
shortval = ntohs(shortval);
printf(" Window size: %d\n", shortval);
hdr += 2;
memcpy(&shortval, hdr, 2);
shortval = ntohs(shortval);
printf(" TCP Chksum : %d\n", shortval);
hdr += 2;
memcpy(&shortval, hdr, 2);
shortval = ntohs(shortval);
printf(" Urgent ptr : %d\n", shortval);
return 0;
}
// Function: DecodeIPHeader
// Description:
// This function takes a pointer to an IP header and prints it out in a readable form.
int DecodeIPHeader(WSABUF *wsabuf, unsigned int srcip, unsigned short srcport,
unsigned int destip, unsigned short destport)
{
BYTE *hdr = (BYTE *)wsabuf->buf, *nexthdr = NULL;
unsigned short shortval;
SOCKADDR_IN srcaddr, destaddr;
unsigned short ip_version,
ip_hdr_len,
ip_tos,
ip_total_len,
ip_id,
ip_flags,
ip_ttl,
ip_frag_offset,
ip_proto,
ip_hdr_chksum,
ip_src_port,
ip_dest_port;
unsigned int ip_src, ip_dest;
BOOL bPrint = TRUE;
ip_version = HI_WORD(*hdr);
ip_hdr_len = LO_WORD(*hdr) * 4;
nexthdr = (BYTE *)(wsabuf->buf + ip_hdr_len);
hdr++;
ip_tos = *hdr;
hdr++;
memcpy(&shortval, hdr, 2);
ip_total_len = ntohs(shortval);
hdr += 2;
memcpy(&shortval, hdr, 2);
ip_id = ntohs(shortval);
hdr += 2;
ip_flags = ((*hdr) >> 5);
memcpy(&shortval, hdr, 2);
ip_frag_offset = ((ntohs(shortval)) & 0x1FFF);
hdr+=2;
ip_ttl = *hdr;
hdr++;
ip_proto = *hdr;
hdr++;
memcpy(&shortval, hdr, 2);
ip_hdr_chksum = ntohs(shortval);
hdr += 2;
memcpy(&srcaddr.sin_addr.s_addr, hdr, 4);
ip_src = ntohl(srcaddr.sin_addr.s_addr);
hdr += 4;
memcpy(&destaddr.sin_addr.s_addr, hdr, 4);
ip_dest = ntohl(destaddr.sin_addr.s_addr);
hdr += 4;
// If packet is UDP, TCP, or IGMP read ahead and
// get the port values.
if (((ip_proto == 2) ||
(ip_proto == 6) ||
(ip_proto == 17)) &&
bFilter)
{
memcpy(&ip_src_port, nexthdr, 2);
ip_src_port = ntohs(ip_src_port);
memcpy(&ip_dest_port, nexthdr+2, 2);
ip_dest_port = ntohs(ip_dest_port);
if ((srcip == ip_src) ||
(srcport == ip_src_port) ||
(destip == ip_dest) ||
(destport == ip_dest_port))
{
bPrint = TRUE;
}
else
{
bPrint = FALSE;
}
}
else if (bFilter)
bPrint = FALSE;
// Print IP Hdr
if (bPrint)
{
printf("IP HEADER\n");
printf(" IP Version: %-10d | IP Header Len: %2d bytes | IP TOS: %X%X (hex)\n",
ip_version, ip_hdr_len, HI_WORD(ip_tos), LO_WORD(ip_tos));
printf(" IP Total Len: %-05d bytes | Identification: 0x%08X | IP Flags: %X (hex)\n",
ip_total_len, ip_id, ip_flags);
printf(" Frag Offset: 0x%08X | TTL: %-10d | Protocol: %-10s \n",
ip_frag_offset, ip_ttl, szProto[ip_proto]);
printf(" Hdr Checksum: 0x%08X\n", ip_hdr_chksum);
printf(" Src Addr: %-15s\n", inet_ntoa(srcaddr.sin_addr));
printf(" Dest Addr: %-15s\n", inet_ntoa(destaddr.sin_addr));
}
else
return ip_hdr_len;
switch (ip_proto)
{
case 2: // IGMP
DecodeIGMPHeader(wsabuf, ip_hdr_len);
break;
case 6: // TCP
DecodeTCPHeader(wsabuf, ip_hdr_len);
break;
case 17: // UDP
DecodeUDPHeader(wsabuf, ip_hdr_len);
break;
default:
printf(" No decoder installed for protocol\n");
break;
}
printf("\n");
return ip_hdr_len;
}
| [
"damoguyan8844@3a4e9f68-f5c2-36dc-e45a-441593085838"
]
| [
[
[
1,
420
]
]
]
|
6dbeda1d8f51225443e797882e4b7488e4559764 | 29c00095e9aa05f7100561e490c65f71150fa93b | /langs/cpp.cpp | fdbc698308f5cc3fd5b921f26b15570566cde448 | [
"Apache-2.0"
]
| permissive | krfkeith/toupl | 1c78fe90a6516946a7f504d6c77ec746807e7ec8 | c80b5206750dc2de222e79c860cb229fb150a1fb | refs/heads/master | 2020-12-24T17:36:26.259097 | 2009-06-13T14:53:44 | 2009-06-13T14:53:44 | 37,639,837 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,846 | cpp | /*
This file is part of Toupl.
http://code.google.com/p/toupl/
Autor: Bga
Email: [email protected]
X.509 & GnuPG Email certifaces here: http://code.google.com/p/jbasis/downloads/list
Copyright 2009 Bga <[email protected]>
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
#include "cpp.hpp"
Lang cppLang=
{
&(::_createLangClass<TouplParser::Cpp>),
"c++",
{".cpp",".hpp",".h",null}
};
namespace TouplParser
{
String Cpp::__addText(Const String& text)
{
return String("fpText+=\"") & _quote(text) & "\";\n";
}
String Cpp::__addValue(Const String& value)
{
return String("fpText+=") & value & ";\n";
}
String Cpp::__declareVar(Const String& varName,Const String& varType)
{
String type;
if(varType=="String")
type=stringClassName;
else if(varType=="Bool")
type="bool";
return String("") & type & " " & varName & ";\n";
}
String Cpp::__condBegin(Const String& varName)
{
return String("if(") & varName & ")\n{\n";
}
String Cpp::__condEnd(Const String& varName)
{
return String("}\n");
}
// simple. only AND operations
String Cpp::__condComp(Const Vector<ParseRes_*>& prs)
{
if(prs.size()==0)
return null;
String ret="";
Vector<ParseRes_*>::size_type i;
for(i=0;i<prs.size()-1;++i)
{
ret & "(" & prs[i]->varName_ & "=" & prs[i]->value_ & "," & prs[i]->testCode_ & ") && ";
}
ret & "(" & prs[i]->varName_ & "=" & prs[i]->value_ & "," & prs[i]->testCode_ & ")";
return ret;
}
String Cpp::__condCompFinal(ParseRes_* pr)
{
if(!_t(pr))
return null;
return String ("") & pr->varName_ & "=" & pr->value_ & ";\n";
}
String Cpp::__createVar(Int pos)
{
return String("fpVar") & pos;
}
String Cpp::__boolVarTestCode(Const String& varName)
{
return varName;
}
String Cpp::__varTestCode(Const String& varName)
{
return String("_fpT(") & varName & ")";
}
Void Cpp::_setup(ArgParser * argp)
{
if(!argp->_get("-stringclassname",stringClassName))
stringClassName="std::string";
Base::_setup(argp);
}
} // namespace TouplParser
| [
"bga.email@31f10f56-5826-11de-b31f-81d54249e7d9"
]
| [
[
[
1,
116
]
]
]
|
110f783b0d827ae75ac40f18aeb19f3683b2826e | e7c45d18fa1e4285e5227e5984e07c47f8867d1d | /SMDK/Examples/DemoSpUsr/DemoSpUsr.cpp | b9c60b886c1b2827daccdb23ba0143f2928156f8 | []
| no_license | abcweizhuo/Test3 | 0f3379e528a543c0d43aad09489b2444a2e0f86d | 128a4edcf9a93d36a45e5585b70dee75e4502db4 | refs/heads/master | 2021-01-17T01:59:39.357645 | 2008-08-20T00:00:29 | 2008-08-20T00:00:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,306 | cpp | //================== SysCAD - Copyright Kenwalt (Pty) Ltd ===================
// $Nokeywords: $
//===========================================================================
#include "stdafx.h"
#define __DEMOSPUSR_CPP
#include "DemoSpUsr.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
#include "scdmacros.h"
#include "md_headers.h"
#pragma LIBCOMMENT("..\\..\\Bin\\", "\\DevLib" )
#pragma LIBCOMMENT("..\\..\\Bin\\", "\\scdlib" )
//===========================================================================
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
/*if (!MakeVersionOK("DemoSpUsr.DLL", _MAKENAME, SCD_VERINFO_V0, SCD_VERINFO_V1, SCD_VERINFO_V2, SCD_VERINFO_V3))
return FALSE;*/
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
//===========================================================================
extern "C" __declspec(dllexport) BOOL IsSMDKLibDLL()
{
return TRUE;
}
//===========================================================================
| [
"[email protected]",
"[email protected]",
"[email protected]"
]
| [
[
[
1,
15
],
[
17,
30
],
[
33,
50
]
],
[
[
16,
16
]
],
[
[
31,
32
]
]
]
|
07c007cd9560293dd00274592eac8173a5cf998e | 78fb44a7f01825c19d61e9eaaa3e558ce80dcdf5 | /guceCORE/include/CIOAccessArchiveFactory.h | 640f91667fb5fd9e284021627edaafcf9378f75a | []
| no_license | LiberatorUSA/GUCE | a2d193e78d91657ccc4eab50fab06de31bc38021 | a4d6aa5421f8799cedc7c9f7dc496df4327ac37f | refs/heads/master | 2021-01-02T08:14:08.541536 | 2011-09-08T03:00:46 | 2011-09-08T03:00:46 | 41,840,441 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,706 | h | /*
* guceCORE: GUCE module providing tie-in functionality between systems
* Copyright (C) 2002 - 2008. Dinand Vanvelzen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef GUCE_CORE_CIOACCESSARCHIVEFACTORY_H
#define GUCE_CORE_CIOACCESSARCHIVEFACTORY_H
/*-------------------------------------------------------------------------//
// //
// INCLUDES //
// //
//-------------------------------------------------------------------------*/
#ifndef _ArchiveFactory_H__
#include "OgreArchiveFactory.h" /* Ogre base class for archive factories */
#define _ArchiveFactory_H__
#endif /* _ArchiveFactory_H__ ? */
#ifndef GUCE_CORE_CIOACCESSARCHIVE_H
#include "CIOAccessArchive.h" /* Ogre archive to CIOAccess adapter */
#define GUCE_CORE_CIOACCESSARCHIVE_H
#endif /* GUCE_CORE_CIOACCESSARCHIVE_H ? */
/*-------------------------------------------------------------------------//
// //
// NAMESPACE //
// //
//-------------------------------------------------------------------------*/
namespace GUCE {
namespace CORE {
/*-------------------------------------------------------------------------//
// //
// CLASSES //
// //
//-------------------------------------------------------------------------*/
class GUCE_CORE_EXPORT_CPP CIOAccessArchiveFactory : public Ogre::ArchiveFactory
{
public:
typedef std::map< CString, CIOAccessArchive* > TArchiveMap;
virtual const Ogre::String& getType( void ) const;
virtual Ogre::Archive* createInstance( const Ogre::String& name );
virtual void destroyInstance( Ogre::Archive* archive );
TArchiveMap& GetArchiveMap( void );
static CIOAccessArchiveFactory* Instance( void );
private:
friend class CGUCEApplication;
static void Deinstance( void );
private:
CIOAccessArchiveFactory( void );
virtual ~CIOAccessArchiveFactory();
CIOAccessArchiveFactory( const CIOAccessArchiveFactory& src );
CIOAccessArchiveFactory& operator=( const CIOAccessArchiveFactory& src );
private:
TArchiveMap m_archiveMap;
static CIOAccessArchiveFactory* g_instance;
};
/*-------------------------------------------------------------------------//
// //
// NAMESPACE //
// //
//-------------------------------------------------------------------------*/
}; /* namespace CORE */
}; /* namespace GUCE */
/*-------------------------------------------------------------------------*/
#endif /* GUCE_CORE_CIOACCESSARCHIVEFACTORY_H ? */
/*-------------------------------------------------------------------------//
// //
// Info & Changes //
// //
//-------------------------------------------------------------------------//
- 02-04-2005 :
- Initial version of this file.
-----------------------------------------------------------------------------*/
| [
"[email protected]"
]
| [
[
[
1,
111
]
]
]
|
aa9b78f7d8e3c65ddd431af453e083c2940f95fd | b73f27ba54ad98fa4314a79f2afbaee638cf13f0 | /projects/MainUI/GuiLib1.5/GuiNormalButton.h | 9a21cc05ecc0e2e1d2a48af525a5474014498ddc | []
| no_license | weimingtom/httpcontentparser | 4d5ed678f2b38812e05328b01bc6b0c161690991 | 54554f163b16a7c56e8350a148b1bd29461300a0 | refs/heads/master | 2021-01-09T21:58:30.326476 | 2009-09-23T08:05:31 | 2009-09-23T08:05:31 | 48,733,304 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,474 | h | /****************************************************************************
* *
* GuiToolKit *
* (MFC extension) *
* Created by Francisco Campos G. www.beyondata.com [email protected] *
*--------------------------------------------------------------------------*
* *
* This program is free software;so you are free to use it any of your *
* applications (Freeware, Shareware, Commercial),but leave this header *
* intact. *
* *
* These files are provided "as is" without warranty of any kind. *
* *
* GuiToolKit is forever FREE CODE !!!!! *
* *
*--------------------------------------------------------------------------*
* Created by: Francisco Campos G. *
* Bug Fixes and improvements : (Add your name) *
* -Francisco Campos *
* *
****************************************************************************/
#pragma once
#include "guitoolbutton.h"
class CGuiNormalButton :public CGuiToolButton
{
public:
enum StyleBtn{STL_NORMAL=0,STL_FLAT=1,STL_SEMIFLAT=2,STL_XP=3};
public:
CGuiNormalButton(void);
virtual ~CGuiNormalButton(void);
void SetStyleButton(StyleBtn StlButton);
private:
StyleBtn m_stlbtn;
protected:
virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
};
| [
"[email protected]"
]
| [
[
[
1,
39
]
]
]
|
961baa5cd63383edac7f3b38bdd525c167ba1d4b | 061348a6be0e0e602d4a5b3e0af28e9eee2d257f | /Source/Contrib/Sound/src/FMod/OSGFModSoundManager.h | 005b4953e9f932439fac0abfc4c5c26746c04fb4 | []
| no_license | passthefist/OpenSGToolbox | 4a76b8e6b87245685619bdc3a0fa737e61a57291 | d836853d6e0647628a7dd7bb7a729726750c6d28 | refs/heads/master | 2023-06-09T22:44:20.711657 | 2010-07-26T00:43:13 | 2010-07-26T00:43:13 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,681 | h | /*---------------------------------------------------------------------------*\
* OpenSG *
* *
* *
* Copyright (C) 2000-2002 by the OpenSG Forum *
* *
* www.opensg.org *
* *
* contact: [email protected], [email protected], [email protected] *
* *
\*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*\
* License *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Library General Public License as published *
* by the Free Software Foundation, version 2. *
* *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
\*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*\
* Changes *
* This class is a wrapper for FMOD::EventSystem class, it provides basic *
* Operation such as loading an an FMod event data base, and loading evnets*
* in the database provided. *
* *
* *
* *
\*---------------------------------------------------------------------------*/
#ifndef _OSGFMODSOUNDMANAGER_H_
#define _OSGFMODSOUNDMANAGER_H_
#ifdef __sgi
#pragma once
#endif
#include "OSGConfig.h"
#include "OSGContribSoundDef.h"
#ifdef OSG_WITH_FMOD
#include "OSGSoundManager.h"
#include "fmod.hpp"
OSG_BEGIN_NAMESPACE
/*! \brief FModSoundManager class. See \ref
PageSoundFModSoundManager for a description.
*/
void OSG_CONTRIBSOUND_DLLMAPPING FMOD_ERRCHECK(FMOD_RESULT result, std::string Location = std::string(""));
class OSG_CONTRIBSOUND_DLLMAPPING FModSoundManager : public SoundManager
{
private:
typedef SoundManager Inherited;
/*========================== PUBLIC =================================*/
public:
static FModSoundManager* the(void);
static bool init(void);
static bool uninit(void);
/**
* update the sound system with current elapsed time
*/
virtual void update(const UpdateEventUnrecPtr e);
//create a new sound object by its integer id
virtual SoundUnrecPtr createSound(void) const;
virtual void setCamera(CameraUnrecPtr TheCamera);
/*! \} */
/*========================= PROTECTED ===============================*/
protected:
static FModSoundManager* _the;
// Variables should all be in StubSoundManagerBase.
/*---------------------------------------------------------------------*/
/*! \name Constructors */
/*! \{ */
FModSoundManager(void);
FModSoundManager(const FModSoundManager &source);
/*! \} */
/*---------------------------------------------------------------------*/
/*! \name Destructors */
/*! \{ */
virtual ~FModSoundManager(void);
/*! \} */
FMOD::System* getSystem(void) const;
Pnt3f _PreviousLisenerPosition;
/*========================== PRIVATE ================================*/
private:
friend class SoundManager;
friend class FModSound;
// prohibit default functions (move to 'public' if you need one)
void operator =(const FModSoundManager &source);
FMOD::System *_FModSystem;
};
typedef FModSoundManager *FModSoundManagerP;
OSG_END_NAMESPACE
#include "OSGFModSoundManager.inl"
#endif /* OSG_WITH_FMOD */
#endif /* _OSGFMODSOUNDMANAGER_H_ */
| [
"[email protected]",
"[email protected]",
"[email protected]"
]
| [
[
[
1,
44
],
[
47,
47
],
[
51,
59
],
[
63,
65
],
[
67,
69
],
[
72,
72
],
[
75,
76
],
[
78,
78
],
[
80,
80
],
[
84,
86
],
[
88,
88
],
[
90,
107
],
[
110,
110
],
[
115,
118
],
[
121,
128
],
[
131,
132
]
],
[
[
45,
46
],
[
50,
50
],
[
60,
60
],
[
62,
62
],
[
79,
79
],
[
82,
83
]
],
[
[
48,
49
],
[
61,
61
],
[
66,
66
],
[
70,
71
],
[
73,
74
],
[
77,
77
],
[
81,
81
],
[
87,
87
],
[
89,
89
],
[
108,
109
],
[
111,
114
],
[
119,
120
],
[
129,
130
]
]
]
|
9837d835ad7972042dea563cbf4fcb4d4ca6359a | c5534a6df16a89e0ae8f53bcd49a6417e8d44409 | /trunk/Dependencies/Xerces/include/xercesc/dom/deprecated/AttrMapImpl.hpp | fde8ef3715328a00d66e4651ea69870e43c0592b | []
| no_license | svn2github/ngene | b2cddacf7ec035aa681d5b8989feab3383dac012 | 61850134a354816161859fe86c2907c8e73dc113 | refs/heads/master | 2023-09-03T12:34:18.944872 | 2011-07-27T19:26:04 | 2011-07-27T19:26:04 | 78,163,390 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,260 | hpp | #ifndef AttrMapImpl_HEADER_GUARD_
#define AttrMapImpl_HEADER_GUARD_
/*
* Copyright 1999-2002,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//
// This file is part of the internal implementation of the C++ XML DOM.
// It should NOT be included or used directly by application programs.
//
// Applications should include the file <xercesc/dom/deprecated/DOM.hpp> for the entire
// DOM API, or DOM_*.hpp for individual DOM classes, where the class
// name is substituded for the *.
//
/*
* $Id: AttrMapImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $
*/
#include <xercesc/util/XercesDefs.hpp>
#include "AttrImpl.hpp"
#include "NodeImpl.hpp"
#include "NamedNodeMapImpl.hpp"
XERCES_CPP_NAMESPACE_BEGIN
class NamedNodeMapImpl;
class DEPRECATED_DOM_EXPORT AttrMapImpl : public NamedNodeMapImpl
{
private:
bool attrDefaults;
public:
AttrMapImpl(NodeImpl *ownerNod);
AttrMapImpl(NodeImpl *ownerNod, NamedNodeMapImpl *defaults);
virtual ~AttrMapImpl();
virtual AttrMapImpl *cloneAttrMap(NodeImpl *ownerNode);
virtual bool hasDefaults();
virtual void hasDefaults(bool value);
virtual NodeImpl *removeNamedItem(const DOMString &name);
virtual NodeImpl *removeNamedItemNS(const DOMString &namespaceURI, const DOMString &localName);
};
// ---------------------------------------------------------------------------
// AttrMapImpl: Getters & Setters
// ---------------------------------------------------------------------------
inline bool AttrMapImpl::hasDefaults()
{
return attrDefaults;
}
inline void AttrMapImpl::hasDefaults(bool value)
{
attrDefaults = value;
}
XERCES_CPP_NAMESPACE_END
#endif
| [
"Riddlemaster@fdc6060e-f348-4335-9a41-9933a8eecd57"
]
| [
[
[
1,
77
]
]
]
|
eb396c1a754a3f4d4baa4748fee033a69cac0938 | 2112057af069a78e75adfd244a3f5b224fbab321 | /branches/ref1/src-root/include/ireon_rs/net/rscc/rscc_main_state.h | 5a647bf82c16a5c9d8e52ebbab9b0f73c67fd3e9 | []
| no_license | blockspacer/ireon | 120bde79e39fb107c961697985a1fe4cb309bd81 | a89fa30b369a0b21661c992da2c4ec1087aac312 | refs/heads/master | 2023-04-15T00:22:02.905112 | 2010-01-07T20:31:07 | 2010-01-07T20:31:07 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,311 | h | /**
* @file ireon_rs/net/rscc/rscc_main_state.h
* root server cluster context main state
*/
/* Copyright (C) 2005-2006 ireon.org developers council
* $Id$
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#ifndef _RSCC_MAIN_STATE_H_
#define _RSCC_MAIN_STATE_H_
#include "common/net/generic_state.h"
#include "ireon_rs/net/rs_cm_connection.h"
class CRSCCMainState : public CGenericState
{
public:
CRSCCMainState(CRSCMConnection *ownerConnection);
private:
CRSCMConnection *m_ownerConnection;
void onCheckRemoveCharRequest(CData& data);
void onRemoveCharAck(CData& data);
};
#endif
| [
"[email protected]"
]
| [
[
[
1,
43
]
]
]
|
65977d93d8b98896eaadf6a3b7c5f1ea7c52c6fb | 9152cb31fbe4e82c22092bb3071b2ec8c6ae86ab | /face/msnface/DemoDlgB.cpp | 822afa9dedb36602f484266ffaf6817c9eceaff6 | []
| no_license | zzjs2001702/sfsipua-svn | ca3051b53549066494f6264e8f3bf300b8090d17 | e8768338340254aa287bf37cf620e2c68e4ff844 | refs/heads/master | 2022-01-09T20:02:20.777586 | 2006-03-29T13:24:02 | 2006-03-29T13:24:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,012 | cpp | // DemoDlgB.cpp : implementation file
//
#include "stdafx.h"
#include "Messenger.h"
#include "DemoDlgB.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDemoDlgB dialog
CDemoDlgB::CDemoDlgB(CWnd* pParent /*=NULL*/)
: CDialog(CDemoDlgB::IDD, pParent)
{
//{{AFX_DATA_INIT(CDemoDlgB)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDemoDlgB::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDemoDlgB)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDemoDlgB, CDialog)
//{{AFX_MSG_MAP(CDemoDlgB)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDemoDlgB message handlers
| [
"yippeesoft@5dda88da-d10c-0410-ac74-cc18da35fedd"
]
| [
[
[
1,
43
]
]
]
|
f1a3ba765fdae8a97ca5e7f716f31eaf87c9179e | ea6b169a24f3584978f159ec7f44184f9e84ead8 | /source/reflect/execute/Application.cc | 606a33dc1bd727755c8b41e7d2603ee67267f835 | []
| no_license | sparecycles/reflect | e2051e5f91a7d72375dd7bfa2635cf1d285d8ef7 | bec1b6e6521080ad4d932ee940073d054c8bf57f | refs/heads/master | 2020-06-05T08:34:52.453196 | 2011-08-18T16:33:47 | 2011-08-18T16:33:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 284 | cc | #include <reflect/execute/Application.h>
#include <reflect/execute/ApplicationClass.hpp>
DEFINE_REFLECTION(reflect::execute::Application, "reflect::execute::Application")
{
}
int reflect::execute::Application::Execute(int argc, char *argv[])
{
return Run(argc, argv);
}
| [
"[email protected]"
]
| [
[
[
1,
11
]
]
]
|
ce8db3b40e7da27afeb36daa809c01bbca1474e0 | e7c45d18fa1e4285e5227e5984e07c47f8867d1d | /Common/Models/CONTROL1/NoiseCon.cpp | 10c3a0e779cc59fa750b745a11862b7303605868 | []
| no_license | abcweizhuo/Test3 | 0f3379e528a543c0d43aad09489b2444a2e0f86d | 128a4edcf9a93d36a45e5585b70dee75e4502db4 | refs/heads/master | 2021-01-17T01:59:39.357645 | 2008-08-20T00:00:29 | 2008-08-20T00:00:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,309 | cpp | //================== SysCAD - Copyright Kenwalt (Pty) Ltd ===================
// $Nokeywords: $
//===========================================================================
#include "stdafx.h"
#include "sc_defs.h"
//#include "pgm_e.h"
#include "noisecon.h"
#if !SKIPIT
//==========================================================================
const byte NT_Gaus1 = NS_Gaus1;
const byte NT_Flat1 = NS_Flat1;
const byte NT_Pois1 = NS_Pois1;
const byte NT_Gamma1 = NS_Gamma1;
const byte NT_Weibull1 = NS_Weibull1;
const long FunctSubsStartIndex = 500;
//==========================================================================
NoiseConInfo::NoiseConInfo():
m_OutputVar(BXO_Blank)
{
//m_OutputVar.Init(FALSE, TRUE);
bOn = 1;
bValid = 0;
iPriority = 0;
iExecCnt = 1;
ResetStats();
}
//--------------------------------------------------------------------------
NoiseConInfo::~NoiseConInfo()
{
}
//--------------------------------------------------------------------------
void NoiseConInfo::Init(int iNo)
{
sTagSuffix.Set("NC_%d", iNo);
iPriority = iNo;
//pXRM = ERH;
}
//--------------------------------------------------------------------------
void NoiseConInfo::ResetStats()
{
iIterCnt = 0;
}
//--------------------------------------------------------------------------
double NoiseConInfo::ExecIns()
{
iExecCnt = max(iExecCnt, 1L);
if (iExecCnt==1)
Noise.GetVal();
else
{
ldiv_t div_result;
div_result = ldiv(iIterCnt, iExecCnt);
if (div_result.rem==0)
Noise.GetVal();
}
iIterCnt++;
return Noise.m_dOutput;
}
//==========================================================================
//
//
//
//==========================================================================
static double Drw_NoiseCon[] =
{
DD_Poly, -3.2,-3.2, -3.2,3.2, 3.2,3.2, 3.2,-3.2, -3.2,-3.2,
DD_Poly, -3.2,0.0, -2.4,1.6, -1.6,-0.8, -0.8,0.8, 0.0,-1.6, 0.8,1.6, 1.6,-2.4, 2.4,0.0, 3.2,0.0,
DD_TagPos, 0, -6.7,
DD_End
};
IMPLEMENT_MODELUNIT(CNoiseCon, "NoiseCon", "", Drw_NoiseCon, "Control", "NC", TOC_ALL|TOC_DYNAMICFLOW|TOC_GRP_GENERAL|TOC_STD_KENWALT,
"Control:Noise",
"Noise and Random number Control model.")
flag CNoiseCon::bWithCnvComment = true;
//--------------------------------------------------------------------------
CNoiseCon::CNoiseCon(pTagObjClass pClass_, pchar TagIn, pTaggedObject pAttach, TagObjAttachment eAttach) :
FlwNode(pClass_, TagIn, pAttach, eAttach)
//, m_MXRH(this)
{
AttachClassInfo(nc_Control, NULL, &NullFlwGroup);
SetActiveOptions(true, true);
bOn = 1;
//bDoneXRefs = 0;
bAboutToStart = 0;
iCount = 0;
DataBlk = NULL;
for (int i=0; i<3; i++)
m_StateLine[i] = "";
m_StateLine[0] = "OK";
SetCount(1);
}
//--------------------------------------------------------------------------
CNoiseCon::~CNoiseCon()
{
SetCount(0);
}
//--------------------------------------------------------------------------
void CNoiseCon::SetCount(long NewSize)
{
NewSize = max(NewSize, 0L);
if (NewSize!=iCount)
{
NoiseConInfo** NewDataBlk = NULL;
if (NewSize<iCount)
{
for (int i=NewSize; i<iCount; i++)
delete DataBlk[i];
}
if (NewSize>0)
{
NewDataBlk = new pNoiseConInfo[NewSize];
for (int i=0; (i<NewSize && i<iCount); i++)
NewDataBlk[i] = DataBlk[i];
for (i=iCount; i<NewSize; i++)
{
NewDataBlk[i] = new NoiseConInfo;
NewDataBlk[i]->Init(i);
}
}
if (DataBlk)
delete []DataBlk;
DataBlk = NewDataBlk;
iCount = NewSize;
if (SortRqd())
Sort();
StructureChanged(this);
}
}
//--------------------------------------------------------------------------
flag CNoiseCon::SortRqd()
{
for (int i=1; i<iCount; i++)
{
if (DataBlk[i-1]->iPriority>DataBlk[i]->iPriority)
return true;
}
return false;
}
//--------------------------------------------------------------------------
void CNoiseCon::Sort()
{
for (int i=0; i<iCount; i++)
{
int MinPos = -1;
long MinVal = DataBlk[i]->iPriority;
for (int j=i+1; j<iCount; j++)
{
if (DataBlk[j]->iPriority<MinVal)
{
MinPos = j;
MinVal = DataBlk[j]->iPriority;
}
}
if (MinPos>=0)
{
NoiseConInfo* p = DataBlk[i];
DataBlk[i] = DataBlk[MinPos];
DataBlk[MinPos] = p;
}
}
StructureChanged(this);
}
//--------------------------------------------------------------------------
void CNoiseCon::ResetData(flag Complete)
{
}
//--------------------------------------------------------------------------
const word idmCount = 1000;
const word idmCheckBtn = 1001;
const word idmCfgTags = 1100;
const word NoOfCfgTags = 8;
//--------------------------------------------------------------------------
void CNoiseCon::BuildDataDefn(DataDefnBlk & DDB)
{
DDB.BeginStruct(this, "CNoiseCon", NULL, DDB_NoPage);
DDB.Text("");
DDB.CheckBoxBtn("On", "", DC_, "", &bOn, this, isParmStopped, DDBYesNo);
DDB.CheckBoxBtn("ShowCnv", "", DC_, "", &bWithCnvComment, this, isParmStopped, DDBYesNo);
DDB.Long("Number_of_Blocks", "No_of_Blks", DC_, "", idmCount, this, isParmStopped/*|AffectsStruct*/);
DDB.Text("");
if (iCount>0)
{
DDB.Button("Check_tags"/* and functions"*/, "", DC_, "", idmCheckBtn, this, isParmStopped);
DDB.Text("");
DDB.String("State", "", DC_, "", &m_StateLine[0], this, noSnap|noFile);
DDB.Text("Error:");
DDB.String("Msg_1", "", DC_, "", &m_StateLine[1], this, noSnap|noFile);
DDB.String("Msg_2", "", DC_, "", &m_StateLine[2], this, noSnap|noFile);
DDB.Text("");
}
DDB.Text("----------------------------------------");
static DDBValueLst DDBNoiseType[]={
{NT_Gaus1, "Gaussian" },
{NT_Flat1, "Flat" },
{NT_Pois1, "Poisson" },
{NT_Gamma1, "Gamma" },
{NT_Weibull1, "Weibull" },
{0}};
char Buff[128];
Strng Tag;
if (DDB.BeginArray(this, "Cfg", "Nois_Cfg", iCount))
{
for (int i=0; i<iCount; i++)
{
if (i>0 && (i % 4)==2)
{
sprintf(Buff, "Cfg_%d", i);
DDB.Page(Buff, DDB_RqdPage);
}
DDB.BeginElement(this, i);
NoiseConInfo* p = DataBlk[i];
const NoiseTypes NT = p->Noise.NoiseType();
Strng CnvTxt;
if (bWithCnvComment && XRefsValid() && p->bValid)
GetValidCnvTxt(p->m_OutputVar, CnvTxt);
DDB.Byte ("Type", "", DC_, "", idmCfgTags+(i*NoOfCfgTags)+1, this, isParm, DDBNoiseType);
//DDB.String("Name", "", DC_, "", idmCfgTags+(i*NoOfCfgTags)+0, this, isParmStopped); not needed?
DDB.String("Output_Tag", "", DC_, "", idmCfgTags+(i*NoOfCfgTags)+2, this, isParmStopped|isTag);
DDB.Double("Output_Value", "Output", DC_, "", &(p->Noise.m_dOutput), this, isResult);
if (NT==NT_Gaus1 || NT==NT_Flat1)
DDB.Range(p->Noise.m_dMean-(2.0*p->Noise.m_dStdDev), p->Noise.m_dMean+(2.0*p->Noise.m_dStdDev));
if (CnvTxt.Len())
DDB.TagComment(CnvTxt());
DDB.CheckBoxBtn("On", "", DC_, "", idmCfgTags+(i*NoOfCfgTags)+5, this, isParm, DDBYesNo);
if (NT==NT_Weibull1)
DDB.Double("a", "", DC_, "", &(p->Noise.m_dMean), this, isParm);
else
{
DDB.Double("Mean", "", DC_, "", &(p->Noise.m_dMean), this, isParm);
if (CnvTxt.Len())
DDB.TagComment(CnvTxt());
}
DDB.Visibility(NSHM_All, NT==NT_Gaus1 || NT==NT_Flat1 || NT==NT_Weibull1);
if (NT==NT_Weibull1)
DDB.Double("b", "", DC_, "", &(p->Noise.m_dStdDev), this, isParm);
else
{
DDB.Double("StdDev", "", DC_, "", &(p->Noise.m_dStdDev), this, isParm);
if (CnvTxt.Len())
DDB.TagComment(CnvTxt());
}
DDB.Visibility();
DDB.Long ("ExecCnt", "", DC_, "", &(p->iExecCnt), this, isParm);
DDB.Long ("IterCnt", "", DC_, "", &(p->iIterCnt), this, isParm);
DDB.Text("");
DDB.Long ("Priority", "", DC_, "", idmCfgTags+(i*NoOfCfgTags)+4, this, isParmStopped);
DDB.Text("----------------------------------------");
}
}
DDB.EndArray();
DDB.EndStruct();
}
//--------------------------------------------------------------------------
flag CNoiseCon::DataXchg(DataChangeBlk & DCB)
{
if (FlwNode::DataXchg(DCB))
return 1;
switch (DCB.lHandle)
{
case idmCount:
if (DCB.rL)
{
if (*DCB.rL!=iCount)
StructureChanged(this);
SetCount(Range(0L, *DCB.rL, 50L));
}
DCB.L = iCount;
return True;
case idmCheckBtn:
if (DCB.rB && (*DCB.rB!=0))
{
//AccNodeWnd::RefreshData(TRUE); ???
//TODO: need to accept current data before processing button push!
if (PreStartCheck())
LogNote(Tag(), 0, "No bad external tag references or function errors");
bAboutToStart = 0;
}
DCB.B=0;
return True;
default:
if (DCB.lHandle>=idmCfgTags)
{
int Index = (DCB.lHandle - idmCfgTags) / NoOfCfgTags;
if (Index<iCount)
{
NoiseConInfo* p = DataBlk[Index];
switch ((DCB.lHandle - idmCfgTags) - (Index * NoOfCfgTags))
{
case 0:
if (DCB.rpC)
{
if (p->sTagSuffix.IsEmpty() || p->sTagSuffix.XStrICmp(DCB.rpC)!=0)
{
StructureChanged(this);
//bDoneXRefs = 0;
}
if (strlen(DCB.rpC)) p->sTagSuffix = DCB.rpC;
}
DCB.pC = p->sTagSuffix();
break;
case 1:
if (DCB.rB)
p->Noise.SetType((NoiseTypes)(*DCB.rB));
DCB.B=(byte)p->Noise.NoiseType();
break;
case 2:
{
flag Chg = (p->m_OutputVar.DoDataXchg(DCB)==1);
if (Chg)
{
MyTagsHaveChanged();
}
DCB.pC = p->m_OutputVar.sVar();
break;
}
case 4:
if (DCB.rL)
{
p->iPriority = *DCB.rL;
if (SortRqd())
{
Sort();
}
}
DCB.L = p->iPriority;
break;
case 5:
if (DCB.rB)
p->bOn = (*DCB.rB);
DCB.B = p->bOn;
break;
}
}
return True;
}
}
return False;
}
//--------------------------------------------------------------------------
flag CNoiseCon::ValidateData(ValidateDataBlk & VDB)
{
for (int i=0; i<iCount; i++)
{
TaggedObject::ValidateTag(DataBlk[i]->sTagSuffix);
}
Sort();
return FlwNode::ValidateData(VDB);
}
//--------------------------------------------------------------------------
flag CNoiseCon::PreStartCheck()
{
for (int i=0; i<3; i++)
m_StateLine[i] = "";
m_StateLine[0] = "OK";
if (bOn)
{
bAboutToStart = 1;
}
return FlwNode::PreStartCheck();
}
//--------------------------------------------------------------------------
bool CNoiseCon::TestXRefListActive() { return SetXRefListActive(!GetActiveHold() && bOn!=0); }
//---------------------------------------------------------------------------
int CNoiseCon::UpdateXRefLists(CXRefBuildResults & Results)
{
if (1)//bOn)
{
FnMngrClear();
int FunctNo = 0;
for (int i=0; i<iCount; i++)
{
NoiseConInfo* p = DataBlk[i];
if (p->bOn)
{
Strng S;
S.Set("%s.Cfg.[%i].Out", Tag(), i);
BXReturn RetCode = p->m_OutputVar.UpdateXRef(p, 1, 0, FunctNo, this, -1, S(), S(), "NoiseCon:Output", Results);
p->bValid = (RetCode==BXR_OK);
}
}
FnMngrTryUpdateXRefLists(Results);
}
return Results.m_nMissing;
}
//--------------------------------------------------------------------------
void CNoiseCon::UnlinkAllXRefs()
{
FnMngrClear();
FnMngrTryUnlinkAllXRefs();
for (int i=0; i<iCount; i++)
{
NoiseConInfo* p = DataBlk[i];
p->m_OutputVar.UnlinkXRefs();
}
CNodeXRefMngr::UnlinkAllXRefs();
};
//--------------------------------------------------------------------------
void CNoiseCon::ResetAllStats()
{
for (int i=0; i<iCount; i++)
DataBlk[i]->ResetStats();
}
//--------------------------------------------------------------------------
void CNoiseCon::EvalCtrlStrategy(eScdCtrlTasks Tasks)
{
if (XRefListActive() && ICGetTimeInc() > 0.0)
{
GetNearXRefValues();
//for (int i=0; i<m_NearXRefs.GetSize(); i++)
// if (m_NearXRefs[i]->bMustGet)
// m_NearXRefs[i]->GetNearXRefValue();
//if (bAboutToStart && bResetOnStart)
// ResetAllStats();
if (FnMngrPresent())
{
//solve pgm functions...
CGExecContext ECtx(this);
ECtx.dIC_Time = ICGetTime();
ECtx.dIC_dTime = ICGetTimeInc();
ECtx.OnStart = bAboutToStart;
ECtx.m_HoldNearXRefGet=true;
ECtx.m_HoldNearXRefSet=true;
FnMngr().Execute(ECtx);
bAboutToStart = 0;
if (ECtx.DoXStop)
{
LogError(Tag(), 0, "SysCAD stopped by function");
ExecObj()->XStop();
}
if (ECtx.DoXIdle)
{
LogError(Tag(), 0, "SysCAD paused by function");
ExecObj()->XIdle();
}
}
//solve DataBlks...
for (int i=0; i<iCount; i++)
{
NoiseConInfo* p = DataBlk[i];
if (p->bValid)
{
double NewVal = p->ExecIns();
p->m_OutputVar.PutValue(NewVal);
}
}
SetNearXRefValues();
//for (i=0; i<m_NearXRefs.GetSize(); i++)
// m_NearXRefs[i]->SetNearXRefValue();
}
}
//--------------------------------------------------------------------------
void CNoiseCon::SetState(eScdMdlStateActs RqdState)
{
FlwNode::SetState(RqdState);
/*flag DoReset = false;
switch (RqdState)
{
case MSA_PBInit : if (bResetOnInit) DoReset = true; break;
case MSA_ZeroFlows: break;
case MSA_Empty : if (bResetOnEmpty) DoReset = true; break;
case MSA_PreSet : if (bResetOnPreSet) DoReset = true; break;
default: break;
}
if (DoReset)
ResetAllStats();*/
}
//--------------------------------------------------------------------------
void CNoiseCon::EvalProducts(CNodeEvalIndex & NEI)
{
}
//--------------------------------------------------------------------------
int CNoiseCon::ChangeTag(pchar pOldTag, pchar pNewTag)
{
BOOL DidChange = FALSE;
for (int i=0; i<iCount; i++)
{
if (DataBlk[i]->m_OutputVar.DoChangeTag(pOldTag, pNewTag))
DidChange = TRUE;
}
if (DidChange)
{
UnlinkAllXRefs(); //PreStartCheck();
bAboutToStart = 0;
}
return FlwNode::ChangeTag(pOldTag, pNewTag);
}
//--------------------------------------------------------------------------
int CNoiseCon::DeleteTag(pchar pDelTag)
{
BOOL FoundOne = FALSE;
for (int i=0; i<iCount; i++)
{
if (DataBlk[i]->m_OutputVar.ContainsTag(pDelTag))
FoundOne = TRUE;
}
if (FoundOne)
{
LogNote(Tag(), 0, "Delete tag '%s' affects Noise Controller model '%s'.", pDelTag, Tag());
UnlinkAllXRefs(); //PreStartCheck();
bAboutToStart = 0;
}
return FlwNode::DeleteTag(pDelTag);
}
//--------------------------------------------------------------------------
dword CNoiseCon::ModelStatus()
{
dword Status=FlwNode::ModelStatus();
Status|=bOn ? FNS_On : FNS_Off;
return Status;
}
//--------------------------------------------------------------------------
flag CNoiseCon::CIStrng(int No, pchar & pS)
{
// NB check CBCount is large enough.
switch (No-CBContext())
{
case 1: pS="E\t?????????"; return 1;
default:
return FlwNode::CIStrng(No, pS);
}
}
//==========================================================================
#endif | [
"[email protected]",
"[email protected]",
"[email protected]"
]
| [
[
[
1,
65
],
[
68,
82
],
[
86,
101
],
[
103,
269
],
[
271,
408
],
[
410,
459
],
[
461,
461
],
[
463,
479
],
[
482,
530
],
[
532,
549
],
[
551,
568
],
[
570,
596
]
],
[
[
66,
67
],
[
102,
102
],
[
270,
270
],
[
409,
409
],
[
460,
460
],
[
462,
462
],
[
480,
481
],
[
531,
531
],
[
550,
550
],
[
569,
569
]
],
[
[
83,
85
]
]
]
|
50a8b393f7c431c159d5aaeef00407ac457ee067 | 9eaa698f624abd80019ac7e3c53304950daa66ba | /ui/maindialog.h | 993b57a6d8552297cddf16d6d21552ecd2b93e7e | []
| no_license | gan7488/happ-talk-jchat | 8f2e3f1437a683ec16d3bc4d0d36e409df088a94 | 182cec6e496401b4ea8f108fb711b05a775232b4 | refs/heads/master | 2021-01-10T11:14:23.607688 | 2011-05-17T17:30:57 | 2011-05-17T17:30:57 | 52,271,940 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,867 | h | /******************************************************************************
** Author: Svirskiy Sergey Nickname: Happ
******************************************************************************/
#ifndef MAINDIALOG_H
#define MAINDIALOG_H
#include <QDialog>
#include <QList>
#include <QSystemTrayIcon>
#include "xmpp/xmppclient.h"
#include "xmpp/xmppmessaging.h"
#include "xmpp/xmpproster.h"
class QMenu;
class QTreeWidget;
class QListWidget;
class QPushButton;
class QListWidgetItem;
class LoginDialog;
class AboutDialog;
class ConfigDialog;
class TalksDialog;
/**
* @brief Main dialog.
*/
class MainDialog : public QDialog
{
Q_OBJECT
public:
explicit MainDialog(QWidget *parent = 0);
~MainDialog();
public slots:
/**
* @brief Show or hide dialog.
*/
void showhide();
protected:
/**
* @brief Occurs when the dialog is shown.
* @param e Event arguments.
*/
void showEvent(QShowEvent *e);
/**
* @brief Occurs when the dialog is closed.
* @param e Event arguments.
*/
void closeEvent(QCloseEvent *e);
private:
/*
No Comments
*/
void createActions();
void createButtons();
void createTrayIcon();
void createUserList();
void createMenus();
void createWindows();
void layoutElements();
/*
Elements
*/
AboutDialog *about;
ConfigDialog *config;
LoginDialog *login;
TalksDialog *talks;
QTreeWidget *buddies;
QListWidget *userList;
QPushButton *top;
QPushButton *right;
QPushButton *bottom;
QPushButton *left;
QMenu *menu;
QMenu *statusMenu;
QAction *beginTalkAction;
QAction *subscribeAction;
QAction *unsubscribeAction;
QAction *configAction;
QAction *aboutAction;
QAction *aboutQtAction;
QAction *showhideAction;
QAction *quitAction;
QAction *addItemAction;
QAction *removeItemAction;
QList<QAction *> statusActions;
QSystemTrayIcon *trayIcon;
XMPPClient *m_client;
XMPPMessaging *m_messaging;
XMPPRoster *m_roster;
private slots:
/*
All handlers (Slots) goes here
*/
/**
* @brief addItem action triggered.
*/
void addItemTriggered();
/**
* @brief removeItem action triggered.
*/
void removeItemTriggered();
/**
* @brief subscribe action triggered.
*/
void subscribeActionTriggered();
/**
* @brief unsubscribe action triggered.
*/
void unsubscribeActionTriggered();
/**
* @brief Update user list.
* @param roster Elements to be added to user list.
*/
void updateUserList(const Roster &roster);
/**
* @brief The connection was aborted.
* @param e The reason for the disconnection.
*/
void disconnected(ConnectionError e);
/**
* @brief Occurs when an item has been added to roster.
* @param jid JID of the added item.
*/
void itemAdded (const JID &jid);
/**
* @brief Occurs when an item has been removed from roster.
* @param jid JID of the removed item.
*/
void itemRemoved (const JID &jid);
/**
* @brief Occurs when an item has been updated in roster.
* @param jid JID of the updated item.
*/
void itemUpdated (const JID &jid);
/**
* @brief Occurs when item was subscribed
* @param jid JID of the subscribed item.
*/
void itemSubscribed (const JID &jid);
/**
* @brief Occurs when item was unsubscribed.
* @param jid JID of the unsubscribed item.
*/
void itemUnsubscribed (const JID &jid);
/*
Presence
*/
void selfPresence (const RosterItem &item, const QString& resource, Presence::PresenceType presence, const QString& msg);
void rosterPresence (const RosterItem &item, const QString& resource, Presence::PresenceType presence, const QString& msg);
/*
Subscription requests
*/
void subscriptionRequest (const JID &jid, const QString& msg);
void unsubscriptionRequest (const JID &jid, const QString& msg);
void rosterRecieved (const Roster &roster);
void loginAccepted();
void iconActivated(QSystemTrayIcon::ActivationReason reason);
void topClicked();
void bottomClicked();
void beginTalk();
void configActionTriggered();
void aboutActionTriggered();
void aboutQtActionTriggered();
void quitActionTriggered();
void setAvailableStatus();
void setAwayStatus();
void setDNDStatus();
void setInvisibleStatus();
void setOfflineStatus();
void userListClicked(QListWidgetItem * item);
};
#endif // MAINDIALOG_H
| [
"[email protected]"
]
| [
[
[
1,
203
]
]
]
|
698bbce810e685f3a8d17694b3ef10d5ab2fd801 | 4b0f51aeecddecf3f57a29ffa7a184ae48f1dc61 | /CleanProject/MyGUI/include/MyGUI_ControllerFadeAlpha.h | 0d3c83a8c20e34a6e339d5870567f5516fc027fc | []
| no_license | bahao247/apeengine2 | 56560dbf6d262364fbc0f9f96ba4231e5e4ed301 | f2617b2a42bdf2907c6d56e334c0d027fb62062d | refs/heads/master | 2021-01-10T14:04:02.319337 | 2009-08-26T08:23:33 | 2009-08-26T08:23:33 | 45,979,392 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,828 | h | /*!
@file
@author Albert Semenov
@date 01/2008
@module
*//*
This file is part of MyGUI.
MyGUI is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MyGUI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __MYGUI_CONTROLLER_FADE_ALPHA_H__
#define __MYGUI_CONTROLLER_FADE_ALPHA_H__
#include "MyGUI_Prerequest.h"
#include "MyGUI_WidgetDefines.h"
#include "MyGUI_ControllerItem.h"
namespace MyGUI
{
/** This controller used for smooth changing alpha of widget in time */
class MYGUI_EXPORT ControllerFadeAlpha : public ControllerItem
{
public:
/**
@param _alpha that will be as result of changing
@param _coef of alpha changing speed (1. mean that alpha will change from 0 to 1 at 1 second)
@param _enabled if true then widget will be inactive after start of alpha changing
*/
ControllerFadeAlpha(float _alpha, float _coef, bool _enabled);
private:
ControllerFadeAlpha();
const std::string & getType();
bool addTime(WidgetPtr _widget, float _time);
void prepareItem(WidgetPtr _widget);
bool getEnabled() {return mEnabled;}
float getAlpha() {return mAlpha;}
float getCoef() {return mCoef;}
private:
float mAlpha;
float mCoef;
bool mEnabled;
};
}
#endif // __MYGUI_CONTROLLER_FADE_ALPHA_H__
| [
"pablosn@06488772-1f9a-11de-8b5c-13accb87f508"
]
| [
[
[
1,
63
]
]
]
|
7499186ad7a2f127577008bfb0610c60d13113d4 | c5ecda551cefa7aaa54b787850b55a2d8fd12387 | /src/WorkLayer/FtpClient.h | abb15869cf6590a9831b4021abf35ca23b8e2191 | []
| no_license | firespeed79/easymule | b2520bfc44977c4e0643064bbc7211c0ce30cf66 | 3f890fa7ed2526c782cfcfabb5aac08c1e70e033 | refs/heads/master | 2021-05-28T20:52:15.983758 | 2007-12-05T09:41:56 | 2007-12-05T09:41:56 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 2,653 | h | // ***************************************************************
// FtpClient version: 1.0 · date: 08/09/2007
// -------------------------------------------------------------
//
// -------------------------------------------------------------
// Copyright (C) 2007 - All Rights Reserved
// ***************************************************************
// Ftp Peer 定义,从ParFile获取下载数据任务,并把下载后的数据交给PartFile
// Ftp Peer 需要管理两个Socket通道( 命令Socket和数据Socket)
// vc-huby
// ***************************************************************
#pragma once
#include "updownclient.h"
#include "SourceURL.h"
#include "FTPClientReqSocket.h"
class CFtpClient : public CUpDownClient
{
DECLARE_DYNAMIC(CFtpClient)
public:
CFtpClient(void);
virtual ~CFtpClient(void);
bool SetUrl(LPCTSTR pszUrl, uint32 nIP = 0);
virtual void SetRequestFile(CPartFile* pReqFile);
virtual bool IsEd2kClient() const
{
return false;
}
virtual bool TryToConnect(bool bIgnoreMaxCon = false, CRuntimeClass* pClassSocket = NULL);
virtual bool Connect();
virtual void OnSocketConnected(int nErrorCode);
virtual void ConnectionEstablished();
virtual bool Disconnected(LPCTSTR pszReason, bool bFromSocket = false,CClientReqSocket* pSocket=NULL);
virtual void Pause( );
virtual uint32 GetTimeUntilReask() const; ///< http/ftp Peer如果没在下载,可以10s后再询问一次.
bool OnFileSizeKnown( uint64 uiFileSize );
void OnCmdSocketErr(CStringA strError);
virtual void ProcessRawData(const BYTE * pucData, UINT uSize);
virtual bool SendHelloPacket();
virtual bool SendFtpBlockRequests();
virtual void SendCancelTransfer(Packet* packet);
virtual void CheckDownloadTimeout();
CFtpClientDataSocket* GetClientDataSocket( bool bCreateIfNull=true );
CFtpClientReqSocket* GetClientReqSocket( );
virtual void CreateBlockRequests(int iMaxBlocks);
bool GetUrlStartPosForReq( uint64& uiUrlStartPos ); //< 计算此ftp peer应该从数据的哪个位置开始发请求
CSourceURL m_SourceURL;
uint64 m_uiFileSize; //< 此INet peer的远程文件大小,和PartFileSize大小不一致的时候不参与下载
void CloseDataSocket();
int PendingBlockReqCount(){ return m_PendingBlocks_list.GetCount();}
private:
CFtpClientDataSocket * m_pFtpDataSocket; //< 发PASV命令成功后才会创建数据通道传文件数据
public:
CStringA lastError;
int m_ErrorCount;
CString m_strUrl;
uint32 m_nIP ;
bool bAddOtherSources;
};
| [
"LanceFong@4a627187-453b-0410-a94d-992500ef832d"
]
| [
[
[
1,
74
]
]
]
|
d2fe4aabc720168ff4135133148aaa0446c8a968 | b14d5833a79518a40d302e5eb40ed5da193cf1b2 | /cpp/extern/xercesc++/2.6.0/src/xercesc/util/regx/BlockRangeFactory.hpp | dabe9f21723f32e907e01d1760ce021512615c66 | [
"Apache-2.0"
]
| permissive | andyburke/bitflood | dcb3fb62dad7fa5e20cf9f1d58aaa94be30e82bf | fca6c0b635d07da4e6c7fbfa032921c827a981d6 | refs/heads/master | 2016-09-10T02:14:35.564530 | 2011-11-17T09:51:49 | 2011-11-17T09:51:49 | 2,794,411 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,309 | hpp | /*
* Copyright 2001-2002,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: BlockRangeFactory.hpp,v 1.5 2004/09/08 13:56:47 peiyongz Exp $
*/
#if !defined(BLOCKRANGEFACTORY_HPP)
#define BLOCKRANGEFACTORY_HPP
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/util/regx/RangeFactory.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLUTIL_EXPORT BlockRangeFactory: public RangeFactory {
public:
// -----------------------------------------------------------------------
// Constructors and operators
// -----------------------------------------------------------------------
BlockRangeFactory();
~BlockRangeFactory();
// -----------------------------------------------------------------------
// Initialization methods
// -----------------------------------------------------------------------
void initializeKeywordMap();
protected:
// -----------------------------------------------------------------------
// Private Helper methods
// -----------------------------------------------------------------------
void buildRanges();
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
BlockRangeFactory(const BlockRangeFactory&);
BlockRangeFactory& operator=(const BlockRangeFactory&);
bool fRangesCreated;
bool fKeywordsInitialized;
};
XERCES_CPP_NAMESPACE_END
#endif
/**
* End file BlockRangeFactory.hpp
*/
| [
"[email protected]"
]
| [
[
[
1,
68
]
]
]
|
3877af91747d403c9ba62c6f53d512d47e5c644b | 5ac13fa1746046451f1989b5b8734f40d6445322 | /minimangalore/Nebula2/code/contrib/tutorials/src/signals_tutorial/signals01.cc | 5f473baed9ee0d6253ad7db3519efc40541102d2 | []
| no_license | moltenguy1/minimangalore | 9f2edf7901e7392490cc22486a7cf13c1790008d | 4d849672a6f25d8e441245d374b6bde4b59cbd48 | refs/heads/master | 2020-04-23T08:57:16.492734 | 2009-08-01T09:13:33 | 2009-08-01T09:13:33 | 35,933,330 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,671 | cc | //------------------------------------------------------------------------------
/**
@file signals01.cc
@ingroup Nebula2TutorialsSignals
@brief Signal Example 01 - Defining, Binding, Emitting and Posting signals.
A simple example of signals, both synchronous and asynchronous.
*/
#include "kernel/nkernelserver.h"
#include "signals/nsignal.h"
#include "signals/nsignalbinding.h"
#include "signals/nsignalserver.h"
#include "signals/nsignalnative.h"
#include "signals/nsignalbindingnative.h"
#include "signals_tutorial/nsignaltestemitter.h"
#include "signals_tutorial/nsignaltestreceiver.h"
// Need this to get our test classes to work.
nNebulaUsePackage(nkernel);
nNebulaUsePackage(signals01);
int
main(int argc, const char** argv)
{
nKernelServer* kernelServer = new nKernelServer();
kernelServer->AddPackage(nkernel);
kernelServer->AddPackage(signals01);
// initialize signal server
nSignalServer * ss = static_cast<nSignalServer *>( kernelServer->New( "nsignalserver", "/sys/servers/signals" ) );
nSignalTestEmitter * emitter = static_cast<nSignalTestEmitter *>
(nKernelServer::Instance()->New("nsignaltestemitter", "/signals/emitter"));
nSignalTestReceiver * receiver = static_cast<nSignalTestReceiver *>
(nKernelServer::Instance()->New("nsignaltestreceiver", "/signals/receiver1"));
nSignalTestReceiver * receiver2 = static_cast<nSignalTestReceiver *>
(nKernelServer::Instance()->New("nsignaltestreceiver", "/signals/receiver2"));
emitter->BindSignal(nSignalTestEmitter::SignalTestbii,
receiver, &nSignalTestReceiver::Signaledbi, 0);
emitter->BindSignal(nSignalTestEmitter::SignalTestbii,
receiver2, &nSignalTestReceiver::Signaledbi, 2);
emitter->BindSignal(nSignalTestEmitter::SignalTestbii,
receiver, &nSignalTestReceiver::Signaledbi, 1);
emitter->BindSignal(nSignalTestEmitter::SignalTestffff,
receiver2, &nSignalTestReceiver::Signaledffff, 2);
emitter->BindSignal(nSignalTestEmitter::SignalTestffff,
receiver2, &nSignalTestReceiver::Signaledffff, 2);
emitter->BindSignal(nSignalTestEmitter::SignalTestffff,
receiver2, &nSignalTestReceiver::Signaledffff, 0);
emitter->SignalTestbii(emitter, 1);
emitter->SignalTestbii(emitter, 2);
emitter->SignalTestbii(emitter, 3);
emitter->SignalTestbi2(emitter, 4);
emitter->SignalTestffff(emitter, 1.0f, 2.0f, 3.0f);
// The following should fail to compile (type safety rocks!)
//emitter->SignalTestbii(emitter, 1.0f);
//emitter->SignalTestbii(emitter, 1.0f, 2.0f);
//emitter->SignalTestbii(emitter, "hello");
//emitter->SignalTestbii(emitter, emitter);
//emitter->SignalTestbii(emitter, receiver);
// Another way for signal emission (not possible to check params)
emitter->EmitSignal("testbii", 1);
emitter->EmitSignal("testbii", 2);
emitter->EmitSignal("testbii", 3);
emitter->EmitSignal("testffff", 1.0f, 2.0f, 3.0f);
emitter->EmitSignal("testffff", 5.0f, 6.0f, 7.0f);
// Post some signals to execute in the future.
emitter->PostSignal(5.f, "testbii", 1);
emitter->PostSignal(6.f, "testbii", 2);
emitter->PostSignal(4.f, "testbii", 3);
emitter->PostSignal(4.f, "testffff", 10.0f, 20.0f, 30.0f);
// Manually trigger the signal server to make it think sufficient
// time has elapsed to execute the posted signals
ss->Trigger( 10.0f );
delete kernelServer;
return 0;
}
| [
"BawooiT@d1c0eb94-fc07-11dd-a7be-4b3ef3b0700c"
]
| [
[
[
1,
90
]
]
]
|
3d4864d674400470d52026d7bf98a4e1a0170f9b | 36135d8069401456e92aea4515a9504b6afdc8f4 | /seeautz/source/glutFramework/glutFramework/oglSpriteFont.cpp | b6fd61c2849857d286768478d4c0db20f3f15981 | []
| no_license | CorwinJV/seeautz-projekt1 | 82d03b19d474de61ef58dea475ac4afee11570a5 | bbfb4ce0d341dfba9f4d076eced229bee5c9301c | refs/heads/master | 2020-03-30T23:06:45.280743 | 2009-05-31T23:09:15 | 2009-05-31T23:09:15 | 32,131,398 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,659 | cpp | //=========================
#include "oglSpriteFont.h"
oglSpriteFont::oglSpriteFont() : fontImage(NULL), charWidth(0),
charHeight(0), charSize(0), numColumns(0), maxAsciiCount(127),
fontLineSpacing(30)
{
init();
init();
}
oglSpriteFont::~oglSpriteFont()
{
if(fontImage != NULL)
{
delete fontImage;
}
}
oglSpriteFont::oglSpriteFont(const std::string &filename, unsigned int size)
{
init();
oglSpriteFont::open(filename, size);
}
void oglSpriteFont::open(const std::string &filename, unsigned int size)
{
charSize = size * 1.5;
if(fontImage != NULL)
{
delete fontImage;
}
fontImage = new oglTexture2D;
fontImage->loadImage(filename, 1024, 512);
fontImage->dX = 1024;
fontImage->dY = 512;
kernAmount = 35.37 + (64-charSize)*0.4;
//kernAmount = charSize/64 - 1;
}
int oglSpriteFont::drawText(float x, float y, const std::string &str, int numColumns)
{
// temp here, this is for figuring this shit out...
//kernAmount = kernTweakb + (64-charSize)*kernTweak;
// strip the string into chars
//parseText(str);
//int offsetX = x;
//int offsetY = y;
// returnNumRows is a return value that specifies the number of
// rows that were created when drawing text with a column spec.
int returnNumRows = 0;
if(fontImage != NULL)
{
// If numColumns was specified, then we're going to parse the string into
// rows, then draw those rows of strings with an offset for each row.
if(numColumns != 0)
{
std::vector<std::string*> outStrs;
this->parseMeIntoRows(&outStrs, str, numColumns, true);
// Now that the string has been parsed into a vector of subStrs
// we can draw the parsed text for each element in the vector
// (with an offset for new lines)
std::vector<std::string*>::iterator itr = outStrs.begin();
for(; itr < outStrs.end(); itr++)
{
int offsetAmt = std::distance(outStrs.begin(), itr);
parseText((*(*itr)));
// dividing by 1.5 because charSize has a modifier
// due to pixels-to-points conversion
drawParsedText(x, y + (offsetAmt * (charSize / 1.5)));
}
returnNumRows = outStrs.size();
}
else
{
parseText(str);
drawParsedText(x, y);
returnNumRows = 1;
}
}
return returnNumRows;
}
void oglSpriteFont::drawParsedText(float x, float y)
{
int offsetX = x;
int offsetY = y;
for(int i = 0; i < (int)drawMe.size(); i++)
{
// Check the current character (drawMe[i]) to see what
// image segment we need to draw in fontImage
int currentCharacter = drawMe[i];
// Draw the image segment
fontImage->mX = offsetX + (i * charWidth) - (i*kernAmount);
fontImage->mY = offsetY;
int currentRow = currentCharacter / (numColumns);
int currentColumn = currentCharacter % (numColumns);
double bW = (double)fontImage->dX;
double bY = (double)fontImage->dY;
fontImage->drawImageSegment((currentColumn * charWidth)/bW, (currentRow * charHeight)/bY, ((currentColumn * charWidth) + charWidth)/bW, (currentRow * charHeight)/bY,
(currentColumn * charWidth)/bW, ((currentRow * charHeight) + charHeight)/bY, ((currentColumn * charWidth) + charWidth)/bW, ((currentRow * charHeight) + charHeight)/bY,
1.0, charSize, charSize);
}
}
void oglSpriteFont::parseMeIntoRows(std::vector<std::string*> *storageContainer, std::string stringToParse, int numCharsPerRow, bool autoFeed)
{
storageContainer->clear();
std::string* tempString = new std::string;
//*tempString = stringToParse;
int row = 0;
if(!autoFeed)
{
for(int x = 0; x < (int)(stringToParse.length() / numCharsPerRow); x++)
{
*tempString = stringToParse.substr(numCharsPerRow*row, numCharsPerRow);
storageContainer->push_back(tempString);
tempString = new std::string;
row++;
}
*tempString = stringToParse.substr(numCharsPerRow*row, stringToParse.length()%numCharsPerRow);
storageContainer->push_back(tempString);
}
else
{
// auto separation
int curStart = 0;
int curEnd = numCharsPerRow-1;
bool done = false;
while(!done)
{
// if we're not on row zero, check the first character of the line
// if its a space, increment until its not a space
if(curStart >= numCharsPerRow)
{
while(stringToParse.substr(curStart, 1) == " ")
{
curStart++;
}
}
curEnd = curStart + numCharsPerRow-1;
if(curEnd > (int)stringToParse.length())
{
curEnd = stringToParse.length();
}
// check the last character of the line
// if its a space, leave it alone
if(stringToParse.substr(curEnd, 1) == " ")
{
// leave curEnd alone
}
else
{
// if its a character, we have three possibilities
// #1 it is a character with a space after it in which we're ok to cut and move on
// #2 its a character with another character after it, in which case we have to go backward
// and figure out where the cut spot is
// #3 its a word that's so long it goes on for multiple lines in which case we have to backtrack and just cut anyways
// #1
if(curEnd < (int)stringToParse.length())
{
if(stringToParse.substr(curEnd+1, 1) == " ")
{
// do nothing
}
else
{
// find a new ending
while((stringToParse.substr(curEnd, 1) != " ") && (curEnd < (int)stringToParse.length()))
{
curEnd++;
}
// #2
if((curEnd - curStart) < numCharsPerRow*2)
{
curEnd = curStart + numCharsPerRow;
// backtrack until we find a space
while(stringToParse.substr(curEnd,1) != " ")
{
curEnd--;
}
}
// #3
else
{
// reset it and just cut
curEnd = curStart + numCharsPerRow;
}
}
}
}
// with the newly calculated curEnd lets chop it and move on
if(curEnd > (int)stringToParse.length())
{
curEnd = stringToParse.length();
}
*tempString = stringToParse.substr(curStart, curEnd-curStart+1);
storageContainer->push_back(tempString);
tempString = new std::string;
curStart = curEnd + 1;
if(curStart > (int)stringToParse.length())
{
done = true;
}
}
}
}
void oglSpriteFont::init()
{
charWidth = 64;
charHeight = 64;
numColumns = 16;
charSize = 64;
fontImage = NULL;
kernAmount = 15;
kernTweak = 0.1;
kernTweakb = 0.1;
}
void oglSpriteFont::parseText(const std::string& parseMe)
{
drawMe.clear();
for(int x = 0; x < (int)parseMe.length(); x++)
{
drawMe.push_back(*(parseMe.substr(x, 1).c_str()));
}
} | [
"corwin.j@6d558e22-e0db-11dd-bce9-bf72c0239d3a",
"[email protected]@6d558e22-e0db-11dd-bce9-bf72c0239d3a"
]
| [
[
[
1,
1
],
[
4,
6
],
[
8,
8
],
[
43,
43
],
[
49,
55
],
[
57,
64
],
[
66,
225
]
],
[
[
2,
3
],
[
7,
7
],
[
9,
42
],
[
44,
48
],
[
56,
56
],
[
65,
65
],
[
226,
247
]
]
]
|
bb40853b5f0214c069fe6974e595a3040aade90c | f28c7b0e16b07c8b6d7a9ee407682b3230ab1dfa | /precompiler/file_operations.h | d89dbb94df57646cac1fbe83931556d617df44dc | []
| no_license | netoff/fenix | 402c0c6ffd639fa3412270658cd49fe961553997 | 7c5b8f3ea20833f5d1ce0da909cb43e824f2cfdc | refs/heads/master | 2021-01-01T03:46:00.022414 | 2010-06-28T01:19:57 | 2010-06-28T01:19:57 | 58,566,699 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 569 | h | #pragma once
#include "common.h"
using namespace std;
using namespace boost::filesystem;
const std::string supported_view_files[] = {".html", ".htm", ".xml", ".svg"};
#define CURRENT_PATH path(".")
bool contains_dir(const std::string& dir, const path& root_path = CURRENT_PATH);
bool contains_file(const std::string& file, const path& root_path = CURRENT_PATH);
void get_files(const path& p, std::vector<path>& files);
bool is_html(const path& p);
bool is_layout(const path& p);
//void save_string_to_file(string output, string filename, string ); | [
"[email protected]"
]
| [
[
[
1,
17
]
]
]
|
b0c7692f628591e19a0ae2560cfc1891fdf206bc | 11af1673bab82ca2329ef8b596d1f3d2f8b82481 | /source/cgame/cg_weapons.cpp | a7d6a2322b0d6d3d83e686ca04622f944d8a48f9 | []
| no_license | legacyrp/legacyojp | 8b33ecf24fd973bee5e7adbd369748cfdd891202 | d918151e917ea06e8698f423bbe2cf6ab9d7f180 | refs/heads/master | 2021-01-10T20:09:55.748893 | 2011-04-18T21:07:13 | 2011-04-18T21:07:13 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 69,840 | cpp | // Copyright (C) 1999-2000 Id Software, Inc.
//
// cg_weapons.c -- events and effects dealing with weapons
#include "cg_local.h"
#include "fx_local.h"
extern vec4_t bluehudtint;
extern vec4_t redhudtint;
extern float *hudTintColor;
/*
Ghoul2 Insert Start
*/
// set up the appropriate ghoul2 info to a refent
void CG_SetGhoul2InfoRef( refEntity_t *ent, refEntity_t *s1)
{
ent->ghoul2 = s1->ghoul2;
VectorCopy( s1->modelScale, ent->modelScale);
ent->radius = s1->radius;
VectorCopy( s1->angles, ent->angles);
}
/*
Ghoul2 Insert End
*/
/*
=================
CG_RegisterItemVisuals
The server says this item is used on this level
=================
*/
void CG_RegisterItemVisuals( int itemNum ) {
itemInfo_t *itemInfo;
gitem_t *item;
int handle;
if ( itemNum < 0 || itemNum >= bg_numItems ) {
CG_Error( "CG_RegisterItemVisuals: itemNum %d out of range [0-%d]", itemNum, bg_numItems-1 );
}
itemInfo = &cg_items[ itemNum ];
if ( itemInfo->registered ) {
return;
}
item = &bg_itemlist[ itemNum ];
memset( itemInfo, 0, sizeof( &itemInfo ) );
itemInfo->registered = qtrue;
if (item->giType == IT_TEAM &&
(item->giTag == PW_REDFLAG || item->giTag == PW_BLUEFLAG) &&
cgs.gametype == GT_CTY)
{ //in CTY the flag model is different
itemInfo->models[0] = trap_R_RegisterModel( item->world_model[1] );
}
else if (item->giType == IT_WEAPON &&
(item->giTag == WP_THERMAL || item->giTag == WP_GRENADE || item->giTag == WP_DET_PACK))
{
itemInfo->models[0] = trap_R_RegisterModel( item->world_model[1] );
}
else
{
itemInfo->models[0] = trap_R_RegisterModel( item->world_model[0] );
}
/*
Ghoul2 Insert Start
*/
if (!Q_stricmp(&item->world_model[0][strlen(item->world_model[0]) - 4], ".glm"))
{
handle = trap_G2API_InitGhoul2Model(&itemInfo->g2Models[0], item->world_model[0], 0 , 0, 0, 0, 0);
if (handle<0)
{
itemInfo->g2Models[0] = NULL;
}
else
{
itemInfo->radius[0] = 60;
}
}
/*
Ghoul2 Insert End
*/
if (item->icon)
{
if (item->giType == IT_HEALTH)
{ //medpack gets nomip'd by the ui or something I guess.
itemInfo->icon = trap_R_RegisterShaderNoMip( item->icon );
}
else
{
itemInfo->icon = trap_R_RegisterShader( item->icon );
}
}
else
{
itemInfo->icon = 0;
}
if ( item->giType == IT_WEAPON ) {
CG_RegisterWeapon( item->giTag );
}
//
// powerups have an accompanying ring or sphere
//
if ( item->giType == IT_POWERUP || item->giType == IT_HEALTH ||
item->giType == IT_ARMOR || item->giType == IT_HOLDABLE ) {
if ( item->world_model[1] ) {
itemInfo->models[1] = trap_R_RegisterModel( item->world_model[1] );
}
}
}
/*
========================================================================================
VIEW WEAPON
========================================================================================
*/
#define WEAPON_FORCE_BUSY_HOLSTER
#ifdef WEAPON_FORCE_BUSY_HOLSTER
//rww - this was done as a last resort. Forgive me.
static int cgWeapFrame = 0;
static int cgWeapFrameTime = 0;
#endif
/*
=================
CG_MapTorsoToWeaponFrame
=================
*/
static int CG_MapTorsoToWeaponFrame( clientInfo_t *ci, int frame, int animNum ) {
animation_t *animations = bgHumanoidAnimations;
#ifdef WEAPON_FORCE_BUSY_HOLSTER
if (cg.snap->ps.forceHandExtend != HANDEXTEND_NONE || cgWeapFrameTime > cg.time)
{ //the reason for the after delay is so that it doesn't snap the weapon frame to the "idle" (0) frame
//for a very quick moment
if (cgWeapFrame < 6)
{
cgWeapFrame = 6;
cgWeapFrameTime = cg.time + 10;
}
if (cgWeapFrameTime < cg.time && cgWeapFrame < 10)
{
cgWeapFrame++;
cgWeapFrameTime = cg.time + 10;
}
if (cg.snap->ps.forceHandExtend != HANDEXTEND_NONE &&
cgWeapFrame == 10)
{
cgWeapFrameTime = cg.time + 100;
}
return cgWeapFrame;
}
else
{
cgWeapFrame = 0;
cgWeapFrameTime = 0;
}
#endif
switch( animNum )
{
case TORSO_DROPWEAP1:
if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 5 )
{
return frame - animations[animNum].firstFrame + 6;
}
break;
case TORSO_RAISEWEAP1:
if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 4 )
{
return frame - animations[animNum].firstFrame + 6 + 4;
}
break;
case BOTH_ATTACK1:
case BOTH_ATTACK2:
case BOTH_ATTACK3:
case BOTH_ATTACK4:
case BOTH_ATTACK10:
case BOTH_THERMAL_THROW:
if ( frame >= animations[animNum].firstFrame && frame < animations[animNum].firstFrame + 6 )
{
return 1 + ( frame - animations[animNum].firstFrame );
}
break;
}
return -1;
}
/*
==============
CG_CalculateWeaponPosition
==============
*/
static void CG_CalculateWeaponPosition( vec3_t origin, vec3_t angles ) {
float scale;
int delta;
float fracsin;
VectorCopy( cg.refdef.vieworg, origin );
VectorCopy( cg.refdef.viewangles, angles );
// on odd legs, invert some angles
if ( cg.bobcycle & 1 ) {
scale = -cg.xyspeed;
} else {
scale = cg.xyspeed;
}
// gun angles from bobbing
angles[ROLL] += scale * cg.bobfracsin * 0.005;
angles[YAW] += scale * cg.bobfracsin * 0.01;
angles[PITCH] += cg.xyspeed * cg.bobfracsin * 0.005;
// drop the weapon when landing
delta = cg.time - cg.landTime;
if ( delta < LAND_DEFLECT_TIME ) {
origin[2] += cg.landChange*0.25 * delta / LAND_DEFLECT_TIME;
} else if ( delta < LAND_DEFLECT_TIME + LAND_RETURN_TIME ) {
origin[2] += cg.landChange*0.25 *
(LAND_DEFLECT_TIME + LAND_RETURN_TIME - delta) / LAND_RETURN_TIME;
}
// idle drift
scale = cg.xyspeed + 40;
fracsin = sin( cg.time * 0.001 );
angles[ROLL] += scale * fracsin * 0.01;
angles[YAW] += scale * fracsin * 0.01;
angles[PITCH] += scale * fracsin * 0.01;
}
/*
===============
CG_LightningBolt
Origin will be the exact tag point, which is slightly
different than the muzzle point used for determining hits.
The cent should be the non-predicted cent if it is from the player,
so the endpoint will reflect the simulated strike (lagging the predicted
angle)
===============
*/
static void CG_LightningBolt( centity_t *cent, vec3_t origin ) {
// trace_t trace;
refEntity_t beam;
// vec3_t forward;
// vec3_t muzzlePoint, endPoint;
//Must be a durational weapon that continuously generates an effect.
if ( cent->currentState.weapon == WP_DEMP2 && cent->currentState.eFlags & EF_ALT_FIRING )
{ /*nothing*/ }
else
{
return;
}
memset( &beam, 0, sizeof( beam ) );
// NOTENOTE No lightning gun-ish stuff yet.
/*
// CPMA "true" lightning
if ((cent->currentState.number == cg.predictedPlayerState.clientNum) && (cg_trueLightning.value != 0)) {
vec3_t angle;
int i;
for (i = 0; i < 3; i++) {
float a = cent->lerpAngles[i] - cg.refdef.viewangles[i];
if (a > 180) {
a -= 360;
}
if (a < -180) {
a += 360;
}
angle[i] = cg.refdef.viewangles[i] + a * (1.0 - cg_trueLightning.value);
if (angle[i] < 0) {
angle[i] += 360;
}
if (angle[i] > 360) {
angle[i] -= 360;
}
}
AngleVectors(angle, forward, NULL, NULL );
VectorCopy(cent->lerpOrigin, muzzlePoint );
// VectorCopy(cg.refdef.vieworg, muzzlePoint );
} else {
// !CPMA
AngleVectors( cent->lerpAngles, forward, NULL, NULL );
VectorCopy(cent->lerpOrigin, muzzlePoint );
}
// FIXME: crouch
muzzlePoint[2] += DEFAULT_VIEWHEIGHT;
VectorMA( muzzlePoint, 14, forward, muzzlePoint );
// project forward by the lightning range
VectorMA( muzzlePoint, LIGHTNING_RANGE, forward, endPoint );
// see if it hit a wall
CG_Trace( &trace, muzzlePoint, vec3_origin, vec3_origin, endPoint,
cent->currentState.number, MASK_SHOT );
// this is the endpoint
VectorCopy( trace.endpos, beam.oldorigin );
// use the provided origin, even though it may be slightly
// different than the muzzle origin
VectorCopy( origin, beam.origin );
beam.reType = RT_LIGHTNING;
beam.customShader = cgs.media.lightningShader;
trap_R_AddRefEntityToScene( &beam );
*/
// NOTENOTE No lightning gun-ish stuff yet.
/*
// add the impact flare if it hit something
if ( trace.fraction < 1.0 ) {
vec3_t angles;
vec3_t dir;
VectorSubtract( beam.oldorigin, beam.origin, dir );
VectorNormalize( dir );
memset( &beam, 0, sizeof( beam ) );
beam.hModel = cgs.media.lightningExplosionModel;
VectorMA( trace.endpos, -16, dir, beam.origin );
// make a random orientation
angles[0] = rand() % 360;
angles[1] = rand() % 360;
angles[2] = rand() % 360;
AnglesToAxis( angles, beam.axis );
trap_R_AddRefEntityToScene( &beam );
}
*/
}
/*
========================
CG_AddWeaponWithPowerups
========================
*/
static void CG_AddWeaponWithPowerups( refEntity_t *gun, int powerups ) {
// add powerup effects
trap_R_AddRefEntityToScene( gun );
if (cg.predictedPlayerState.electrifyTime > cg.time)
{ //add electrocution shell
int preShader = gun->customShader;
if ( rand() & 1 )
{
gun->customShader = cgs.media.electricBodyShader;
}
else
{
gun->customShader = cgs.media.electricBody2Shader;
}
trap_R_AddRefEntityToScene( gun );
gun->customShader = preShader; //set back just to be safe
}
}
/*
=============
CG_AddPlayerWeapon
Used for both the view weapon (ps is valid) and the world modelother character models (ps is NULL)
The main player will have this called for BOTH cases, so effects like light and
sound should only be done on the world model case.
=============
*/
void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent, int team, vec3_t newAngles, qboolean thirdPerson,qboolean leftweap ) {
refEntity_t gun;
refEntity_t barrel;
vec3_t angles;
weapon_t weaponNum;
weaponInfo_t *weapon;
centity_t *nonPredictedCent;
refEntity_t flash;
weaponNum = cent->currentState.weapon;
if (cent->currentState.weapon == WP_EMPLACED_GUN)
{
return;
}
if (cg.predictedPlayerState.pm_type == PM_SPECTATOR &&
cent->currentState.number == cg.predictedPlayerState.clientNum)
{ //spectator mode, don't draw it...
return;
}
CG_RegisterWeapon( weaponNum );
weapon = &cg_weapons[weaponNum];
/*
Ghoul2 Insert Start
*/
memset( &gun, 0, sizeof( gun ) );
// only do this if we are in first person, since world weapons are now handled on the server by Ghoul2
if (!thirdPerson)
{
// add the weapon
VectorCopy( parent->lightingOrigin, gun.lightingOrigin );
gun.shadowPlane = parent->shadowPlane;
gun.renderfx = parent->renderfx;
if (ps)
{ // this player, in first person view
gun.hModel = weapon->viewModel;
}
else
{
gun.hModel = weapon->weaponModel;
}
if (!gun.hModel) {
return;
}
if ( !ps ) {
// add weapon ready sound
cent->pe.lightningFiring = qfalse;
if ( ( cent->currentState.eFlags & EF_FIRING ) && weapon->firingSound ) {
// lightning gun and guantlet make a different sound when fire is held down
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, weapon->firingSound );
cent->pe.lightningFiring = qtrue;
} else if ( weapon->readySound ) {
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, weapon->readySound );
}
}
//gun.angles[1]=20;
//gun.origin[1]=20;
//gun.axis[1][1]=20;
//gun.axis[0][1]=20;
//gun.axis[2][1]=20;
CG_PositionEntityOnTag( &gun, parent, parent->hModel, "tag_weapon");
if (!CG_IsMindTricked(cent->currentState.trickedentindex,
cent->currentState.trickedentindex2,
cent->currentState.trickedentindex3,
cent->currentState.trickedentindex4,
cg.snap->ps.clientNum))
{
CG_AddWeaponWithPowerups( &gun, cent->currentState.powerups ); //don't draw the weapon if the player is invisible
/*
if ( weaponNum == WP_STUN_BATON )
{
gun.shaderRGBA[0] = gun.shaderRGBA[1] = gun.shaderRGBA[2] = 25;
gun.customShader = trap_R_RegisterShader( "gfx/effects/stunPass" );
gun.renderfx = RF_RGB_TINT | RF_FIRST_PERSON | RF_DEPTHHACK;
trap_R_AddRefEntityToScene( &gun );
}
*/
}
// add the spinning barrel
if ( weapon->barrelModel ) {
memset( &barrel, 0, sizeof( barrel ) );
VectorCopy( parent->lightingOrigin, barrel.lightingOrigin );
barrel.shadowPlane = parent->shadowPlane;
barrel.renderfx = parent->renderfx;
barrel.hModel = weapon->barrelModel;
angles[YAW] = 0;
angles[PITCH] = 0;
angles[ROLL] = 0;
AnglesToAxis( angles, barrel.axis );
CG_PositionRotatedEntityOnTag( &barrel, parent/*&gun*/, /*weapon->weaponModel*/weapon->handsModel, "tag_barrel" );
CG_AddWeaponWithPowerups( &barrel, cent->currentState.powerups );
}
}
/*
Ghoul2 Insert End
*/
memset (&flash, 0, sizeof(flash));
CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash");
VectorCopy(flash.origin, cg.lastFPFlashPoint);
// Do special charge bits
//-----------------------
//[TrueView]
//Make the guns do their charging visual in True View.
if ( (ps || cg.renderingThirdPerson || cg.predictedPlayerState.clientNum != cent->currentState.number || cg_trueguns.integer) &&
//if ( (ps || cg.renderingThirdPerson || cg.predictedPlayerState.clientNum != cent->currentState.number) &&
//[/TrueView]
( ( cent->currentState.modelindex2 == WEAPON_CHARGING_ALT && cent->currentState.weapon == WP_BRYAR_PISTOL ) ||
( cent->currentState.modelindex2 == WEAPON_CHARGING_ALT && cent->currentState.weapon == WP_BRYAR_OLD ) ||
// ( cent->currentState.weapon == WP_BOWCASTER && cent->currentState.modelindex2 == WEAPON_CHARGING ) ||
( cent->currentState.weapon == WP_DEMP2 && cent->currentState.modelindex2 == WEAPON_CHARGING_ALT) ) )
{
int shader = 0;
float val = 0.0f;
float scale = 1.0f;
addspriteArgStruct_t fxSArgs;
vec3_t flashorigin, flashdir;
//[DualPistols]
int wpmdlidx = 2;
if (leftweap == qfalse)
wpmdlidx = 1;
//[/DualPistols]
if (!thirdPerson)
{
VectorCopy(flash.origin, flashorigin);
VectorCopy(flash.axis[0], flashdir);
}
else
{
mdxaBone_t boltMatrix;
if (!trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), wpmdlidx))
{ //it's quite possible that we may have have no weapon model and be in a valid state, so return here if this is the case
return;
}
// go away and get me the bolt position for this frame please
if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, wpmdlidx, 0, &boltMatrix, newAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale)))
{ // Couldn't find bolt point.
return;
}
BG_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin);
BG_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir);
}
if ( cent->currentState.weapon == WP_BRYAR_PISTOL ||
cent->currentState.weapon == WP_BRYAR_OLD)
{
// Hardcoded max charge time of 1 second
val = ( cg.time - cent->currentState.constantLight ) * 0.001f;
shader = cgs.media.bryarFrontFlash;
}
else if ( cent->currentState.weapon == WP_BOWCASTER )
{
// Hardcoded max charge time of 1 second
val = ( cg.time - cent->currentState.constantLight ) * 0.001f;
shader = cgs.media.greenFrontFlash;
}
else if ( cent->currentState.weapon == WP_DEMP2 )
{
val = ( cg.time - cent->currentState.constantLight ) * 0.001f;
shader = cgs.media.lightningFlash;
scale = 1.75f;
}
if ( val < 0.0f )
{
val = 0.0f;
}
else if ( val > 1.0f )
{
val = 1.0f;
if (ps && cent->currentState.number == ps->clientNum)
{
CGCam_Shake( /*0.1f*/0.2f, 100 );
}
}
else
{
if (ps && cent->currentState.number == ps->clientNum)
{
CGCam_Shake( val * val * /*0.3f*/0.6f, 100 );
}
}
val += random() * 0.5f;
VectorCopy(flashorigin, fxSArgs.origin);
VectorClear(fxSArgs.vel);
VectorClear(fxSArgs.accel);
fxSArgs.scale = 3.0f*val*scale;
fxSArgs.dscale = 0.0f;
fxSArgs.sAlpha = 0.7f;
fxSArgs.eAlpha = 0.7f;
fxSArgs.rotation = random()*360;
fxSArgs.bounce = 0.0f;
fxSArgs.life = 1.0f;
fxSArgs.shader = shader;
fxSArgs.flags = 0x08000000;
//FX_AddSprite( flash.origin, NULL, NULL, 3.0f * val, 0.0f, 0.7f, 0.7f, WHITE, WHITE, random() * 360, 0.0f, 1.0f, shader, FX_USE_ALPHA );
trap_FX_AddSprite(&fxSArgs);
}
// make sure we aren't looking at cg.predictedPlayerEntity for LG
nonPredictedCent = &cg_entities[cent->currentState.clientNum];
// if the index of the nonPredictedCent is not the same as the clientNum
// then this is a fake player (like on teh single player podiums), so
// go ahead and use the cent
if( ( nonPredictedCent - cg_entities ) != cent->currentState.clientNum ) {
nonPredictedCent = cent;
}
// add the flash
if ( ( weaponNum == WP_DEMP2)
&& ( nonPredictedCent->currentState.eFlags & EF_FIRING ) )
{
// continuous flash
} else {
// impulse flash
if ( cg.time - cent->muzzleFlashTime > MUZZLE_FLASH_TIME) {
return;
}
}
//[TrueView]
if ( ps || cg.renderingThirdPerson || cg_trueguns.integer
|| cent->currentState.number != cg.predictedPlayerState.clientNum )
//if ( ps || cg.renderingThirdPerson ||
// cent->currentState.number != cg.predictedPlayerState.clientNum )
//[/TrueView]
{ // Make sure we don't do the thirdperson model effects for the local player if we're in first person
vec3_t flashorigin, flashdir;
refEntity_t flash;
//[DualPistols]
int wpmdlidx = 2;
if (leftweap == qfalse)
wpmdlidx = 1;
//[/DualPistols]
memset (&flash, 0, sizeof(flash));
if (!thirdPerson)
{
CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash");
VectorCopy(flash.origin, flashorigin);
VectorCopy(flash.axis[0], flashdir);
}
else
{
mdxaBone_t boltMatrix;
if (!trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), wpmdlidx))
{ //it's quite possible that we may have have no weapon model and be in a valid state, so return here if this is the case
return;
}
// go away and get me the bolt position for this frame please
if (!(trap_G2API_GetBoltMatrix(cent->ghoul2, wpmdlidx, 0, &boltMatrix, newAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale)))
{ // Couldn't find bolt point.
return;
}
BG_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, flashorigin);
BG_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, flashdir);
}
if(cg.predictedPlayerState.weapon == WP_BOWCASTER && (cent->currentState.eFlags & EF_ALT_FIRING)) return;
if (cg.time - cent->muzzleFlashTime <= MUZZLE_FLASH_TIME + 10 )
{ // Handle muzzle flashes
if ( cent->currentState.eFlags & EF_ALT_FIRING )
{ // Check the alt firing first.
if (weapon->altMuzzleEffect)
{
if (!thirdPerson)
{
trap_FX_PlayEntityEffectID(weapon->altMuzzleEffect, flashorigin, flash.axis, -1, -1, -1, -1 );
}
else
{
trap_FX_PlayEffectID(weapon->altMuzzleEffect, flashorigin, flashdir, -1, -1);
}
}
}
else
{ // Regular firing
if (weapon->muzzleEffect && (cg.predictedPlayerState.weapon != WP_REPEATER || cg.predictedPlayerState.weapon == WP_REPEATER && cg.predictedPlayerState.weaponTime == 100000))
{
if (!thirdPerson)
{
trap_FX_PlayEntityEffectID(weapon->muzzleEffect, flashorigin, flash.axis, -1, -1, -1, -1 );
}
else
{
trap_FX_PlayEffectID(weapon->muzzleEffect, flashorigin, flashdir, -1, -1);
}
}
}
}
// add lightning bolt
CG_LightningBolt( nonPredictedCent, flashorigin );
if ( weapon->flashDlightColor[0] || weapon->flashDlightColor[1] || weapon->flashDlightColor[2] ) {
trap_R_AddLightToScene( flashorigin, 300 + (rand()&31), weapon->flashDlightColor[0],
weapon->flashDlightColor[1], weapon->flashDlightColor[2] );
}
}
}
/*
==============
CG_AddViewWeapon
Add the weapon, and flash for the player's view
==============
*/
void CG_AddViewWeapon( playerState_t *ps ) {
refEntity_t hand;
centity_t *cent;
clientInfo_t *ci;
float fovOffset;
vec3_t angles;
weaponInfo_t *weapon;
//[TrueView]
float cgFov;
if(!cg.renderingThirdPerson && (cg_trueguns.integer || cg.predictedPlayerState.weapon == WP_SABER
|| cg.predictedPlayerState.weapon == WP_MELEE
|| cg.predictedPlayerState.weapon == WP_TUSKEN_RIFLE) && cg_truefov.value
&& (cg.predictedPlayerState.pm_type != PM_SPECTATOR)
&& (cg.predictedPlayerState.pm_type != PM_INTERMISSION))
{
cgFov = cg_truefov.value;
}
else
{
cgFov = cg_fov.value;
}
//float cgFov = cg_fov.value;
//[TrueView]
if (cgFov < 1)
{
cgFov = 1;
}
//[TrueView]
//Allow larger Fields of View
if (cgFov > 180)
{
cgFov = 180;
}
/*
if (cgFov > 97)
{
cgFov = 97;
}
*/
//[TrueView]
if ( ps->persistant[PERS_TEAM] == TEAM_SPECTATOR ) {
return;
}
if ( ps->pm_type == PM_INTERMISSION ) {
return;
}
// no gun if in third person view or a camera is active
//if ( cg.renderingThirdPerson || cg.cameraMode) {
if ( cg.renderingThirdPerson ) {
return;
}
// allow the gun to be completely removed
//[TrueView]
if ( !cg_drawGun.integer || cg.predictedPlayerState.zoomMode || cg_trueguns.integer
|| cg.predictedPlayerState.weapon == WP_SABER || cg.predictedPlayerState.weapon == WP_MELEE
|| cg.predictedPlayerState.weapon == WP_TUSKEN_RIFLE) {
//if ( !cg_drawGun.integer || cg.predictedPlayerState.zoomMode) {
//[TrueView]
vec3_t origin;
if ( cg.predictedPlayerState.eFlags & EF_FIRING ) {
// special hack for lightning gun...
VectorCopy( cg.refdef.vieworg, origin );
VectorMA( origin, -8, cg.refdef.viewaxis[2], origin );
CG_LightningBolt( &cg_entities[ps->clientNum], origin );
}
return;
}
// don't draw if testing a gun model
if ( cg.testGun ) {
return;
}
// drop gun lower at higher fov
if ( cgFov > 90 ) {
fovOffset = -0.2 * ( cgFov - 90 );
} else {
fovOffset = 0;
}
cent = &cg_entities[cg.predictedPlayerState.clientNum];
CG_RegisterWeapon( ps->weapon );
weapon = &cg_weapons[ ps->weapon ];
memset (&hand, 0, sizeof(hand));
// set up gun position
CG_CalculateWeaponPosition( hand.origin, angles );
VectorMA( hand.origin, cg_gun_x.value, cg.refdef.viewaxis[0], hand.origin );
VectorMA( hand.origin, cg_gun_y.value, cg.refdef.viewaxis[1], hand.origin );
VectorMA( hand.origin, (cg_gun_z.value+fovOffset), cg.refdef.viewaxis[2], hand.origin );
AnglesToAxis( angles, hand.axis );
// map torso animations to weapon animations
if ( cg_gun_frame.integer ) {
// development tool
hand.frame = hand.oldframe = cg_gun_frame.integer;
hand.backlerp = 0;
} else {
// get clientinfo for animation map
if (cent->currentState.eType == ET_NPC)
{
if (!cent->npcClient)
{
return;
}
ci = cent->npcClient;
}
else
{
ci = &cgs.clientinfo[ cent->currentState.clientNum ];
}
hand.frame = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.frame, cent->currentState.torsoAnim );
hand.oldframe = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.oldFrame, cent->currentState.torsoAnim );
hand.backlerp = cent->pe.torso.backlerp;
// Handle the fringe situation where oldframe is invalid
if ( hand.frame == -1 )
{
hand.frame = 0;
hand.oldframe = 0;
hand.backlerp = 0;
}
else if ( hand.oldframe == -1 )
{
hand.oldframe = hand.frame;
hand.backlerp = 0;
}
}
hand.hModel = weapon->handsModel;
hand.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON;// | RF_MINLIGHT;
// add everything onto the hand
//[DualPistols]
//CG_AddPlayerWeapon( &hand, ps, &cg_entities[cg.predictedPlayerState.clientNum], ps->persistant[PERS_TEAM], angles, qfalse );
CG_AddPlayerWeapon( &hand, ps, &cg_entities[cg.predictedPlayerState.clientNum], ps->persistant[PERS_TEAM], angles, qfalse,qfalse );
if((ps->eFlags & EF_DUAL_WEAPONS) && ps->weapon == WP_BRYAR_PISTOL)
{
memset (&hand, 0, sizeof(hand));
// set up gun position
CG_CalculateWeaponPosition( hand.origin, angles );
VectorMA( hand.origin, cg_gun_x.value, cg.refdef.viewaxis[0], hand.origin );
VectorMA( hand.origin, cg_gun_y.value + 10, cg.refdef.viewaxis[1], hand.origin );
VectorMA( hand.origin, (cg_gun_z.value+fovOffset), cg.refdef.viewaxis[2], hand.origin );
angles[1]=20;
AnglesToAxis( angles, hand.axis );
// map torso animations to weapon animations
if ( cg_gun_frame.integer ) {
// development tool
hand.frame = hand.oldframe = cg_gun_frame.integer;
hand.backlerp = 0;
} else {
// get clientinfo for animation map
if (cent->currentState.eType == ET_NPC)
{
if (!cent->npcClient)
{
return;
}
ci = cent->npcClient;
}
else
{
ci = &cgs.clientinfo[ cent->currentState.clientNum ];
}
hand.frame = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.frame, cent->currentState.torsoAnim );
hand.oldframe = CG_MapTorsoToWeaponFrame( ci, cent->pe.torso.oldFrame, cent->currentState.torsoAnim );
hand.backlerp = cent->pe.torso.backlerp;
// Handle the fringe situation where oldframe is invalid
if ( hand.frame == -1 )
{
hand.frame = 0;
hand.oldframe = 0;
hand.backlerp = 0;
}
else if ( hand.oldframe == -1 )
{
hand.oldframe = hand.frame;
hand.backlerp = 0;
}
}
////adasadas
hand.hModel = weapon->handsModel;
hand.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON;// | RF_MINLIGHT;
angles[2]+=20;
// add everything onto the hand
CG_AddPlayerWeapon( &hand, ps, &cg_entities[cg.predictedPlayerState.clientNum], ps->persistant[PERS_TEAM], angles, qfalse, qtrue );
}
//[/DualPistols]
}
/*
==============================================================================
WEAPON SELECTION
==============================================================================
*/
#define ICON_WEAPONS 0
#define ICON_FORCE 1
#define ICON_INVENTORY 2
void CG_DrawIconBackground(void)
{
int height,xAdd,x2,y2,t;
// int prongLeftX,prongRightX;
float inTime = cg.invenSelectTime+WEAPON_SELECT_TIME;
float wpTime = cg.weaponSelectTime+WEAPON_SELECT_TIME;
float fpTime = cg.forceSelectTime+WEAPON_SELECT_TIME;
// int drawType = cgs.media.weaponIconBackground;
// int yOffset = 0;
// don't display if dead
if ( cg.snap->ps.stats[STAT_HEALTH] <= 0 )
{
return;
}
if (cg_hudFiles.integer)
{ //simple hud
return;
}
x2 = 30;
y2 = SCREEN_HEIGHT-70;
//prongLeftX =x2+37;
//prongRightX =x2+544;
if (inTime > wpTime)
{
// drawType = cgs.media.inventoryIconBackground;
cg.iconSelectTime = cg.invenSelectTime;
}
else
{
// drawType = cgs.media.weaponIconBackground;
cg.iconSelectTime = cg.weaponSelectTime;
}
if (fpTime > inTime && fpTime > wpTime)
{
// drawType = cgs.media.forceIconBackground;
cg.iconSelectTime = cg.forceSelectTime;
}
if ((cg.iconSelectTime+WEAPON_SELECT_TIME)<cg.time) // Time is up for the HUD to display
{
if (cg.iconHUDActive) // The time is up, but we still need to move the prongs back to their original position
{
t = cg.time - (cg.iconSelectTime+WEAPON_SELECT_TIME);
cg.iconHUDPercent = t/ 130.0f;
cg.iconHUDPercent = 1 - cg.iconHUDPercent;
if (cg.iconHUDPercent<0)
{
cg.iconHUDActive = qfalse;
cg.iconHUDPercent=0;
}
xAdd = (int) 8*cg.iconHUDPercent;
height = (int) (60.0f*cg.iconHUDPercent);
//CG_DrawPic( x2+60, y2+30+yOffset, 460, -height, drawType); // Top half
//CG_DrawPic( x2+60, y2+30-2+yOffset, 460, height, drawType); // Bottom half
}
else
{
xAdd = 0;
}
return;
}
//prongLeftX =x2+37;
//prongRightX =x2+544;
if (!cg.iconHUDActive)
{
t = cg.time - cg.iconSelectTime;
cg.iconHUDPercent = t/ 130.0f;
// Calc how far into opening sequence we are
if (cg.iconHUDPercent>1)
{
cg.iconHUDActive = qtrue;
cg.iconHUDPercent=1;
}
else if (cg.iconHUDPercent<0)
{
cg.iconHUDPercent=0;
}
}
else
{
cg.iconHUDPercent=1;
}
//trap_R_SetColor( colorTable[CT_WHITE] );
//height = (int) (60.0f*cg.iconHUDPercent);
//CG_DrawPic( x2+60, y2+30+yOffset, 460, -height, drawType); // Top half
//CG_DrawPic( x2+60, y2+30-2+yOffset, 460, height, drawType); // Bottom half
// And now for the prongs
/* if ((cg.inventorySelectTime+WEAPON_SELECT_TIME)>cg.time)
{
cgs.media.currentBackground = ICON_INVENTORY;
background = &cgs.media.inventoryProngsOn;
}
else if ((cg.weaponSelectTime+WEAPON_SELECT_TIME)>cg.time)
{
cgs.media.currentBackground = ICON_WEAPONS;
}
else
{
cgs.media.currentBackground = ICON_FORCE;
background = &cgs.media.forceProngsOn;
}
*/
// Side Prongs
// trap_R_SetColor( colorTable[CT_WHITE]);
// xAdd = (int) 8*cg.iconHUDPercent;
// CG_DrawPic( prongLeftX+xAdd, y2-10, 40, 80, background);
// CG_DrawPic( prongRightX-xAdd, y2-10, -40, 80, background);
}
qboolean CG_WeaponCheck(int weap)
{
//[Reload]
/*
if (cg.snap->ps.ammo[weaponData[weap].ammoIndex] < weaponData[weap].energyPerShot &&
cg.snap->ps.ammo[weaponData[weap].ammoIndex] < weaponData[weap].altEnergyPerShot)
{
return qfalse;
}
*/
if(cg.snap->ps.ammo[weaponData[weap].ammoIndex] == -10)
return qfalse;
if (weap == WP_DET_PACK && cg.predictedPlayerState.ammo[weaponData[weap].ammoIndex] < 1 &&
!cg.predictedPlayerState.hasDetPackPlanted)
{
return qfalse;
}
if(weap == WP_GRENADE && cg.predictedPlayerState.ammo[weaponData[weap].ammoIndex] < 1)
return qfalse;
if(weap == WP_THERMAL && cg.predictedPlayerState.ammo[weaponData[weap].ammoIndex] < 1)
return qfalse;
//[/Reload]
return qtrue;
}
/*
===============
CG_WeaponSelectable
===============
*/
static qboolean CG_WeaponSelectable( int i ) {
/*if ( !cg.snap->ps.ammo[weaponData[i].ammoIndex] ) {
return qfalse;
}*/
if (!i)
{
return qfalse;
}
//[Reload]
if (cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] == -10)
{
return qfalse;
}
//[/Reload]
if (i == WP_DET_PACK && cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < 1 &&
!cg.predictedPlayerState.hasDetPackPlanted)
{
return qfalse;
}
//[Reload]
if(i == WP_GRENADE && cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < 1)
return qfalse;
if(i == WP_THERMAL && cg.predictedPlayerState.ammo[weaponData[i].ammoIndex] < 1)
return qfalse;
//[/Reload]
if ( ! (cg.predictedPlayerState.stats[ STAT_WEAPONS ] & ( 1 << i ) ) ) {
return qfalse;
}
return qtrue;
}
/*
===================
CG_DrawWeaponSelect
===================
*/
void CG_DrawWeaponSelect( void ) {
int i;
int bits;
int count;
int smallIconSize,bigIconSize;
int holdX,x,y,pad;
int sideLeftIconCnt,sideRightIconCnt;
int sideMax,holdCount,iconCnt;
int height;
int yOffset = 0;
qboolean drewConc = qfalse;
if (cg.predictedPlayerState.emplacedIndex)
{ //can't cycle when on a weapon
cg.weaponSelectTime = 0;
}
if ((cg.weaponSelectTime+WEAPON_SELECT_TIME)<cg.time) // Time is up for the HUD to display
{
return;
}
// don't display if dead
if ( cg.predictedPlayerState.stats[STAT_HEALTH] <= 0 )
{
return;
}
// showing weapon select clears pickup item display, but not the blend blob
cg.itemPickupTime = 0;
bits = cg.predictedPlayerState.stats[ STAT_WEAPONS ];
// count the number of weapons owned
count = 0;
if ( !CG_WeaponSelectable(cg.weaponSelect) &&
(cg.weaponSelect == WP_THERMAL || cg.weaponSelect == WP_GRENADE) )
{ //display this weapon that we don't actually "have" as unhighlighted until it's deselected
//since it's selected we must increase the count to display the proper number of valid selectable weapons
count++;
}
for ( i = 1 ; i < WP_NUM_WEAPONS ; i++ )
{
if ( bits & ( 1 << i ) )
{
if ( CG_WeaponSelectable(i) ||
(i != WP_THERMAL && i != WP_GRENADE) )
{
count++;
}
}
}
if (count == 0) // If no weapons, don't display
{
return;
}
sideMax = 3; // Max number of icons on the side
// Calculate how many icons will appear to either side of the center one
holdCount = count - 1; // -1 for the center icon
if (holdCount == 0) // No icons to either side
{
sideLeftIconCnt = 0;
sideRightIconCnt = 0;
}
else if (count > (2*sideMax)) // Go to the max on each side
{
sideLeftIconCnt = sideMax;
sideRightIconCnt = sideMax;
}
else // Less than max, so do the calc
{
sideLeftIconCnt = holdCount/2;
sideRightIconCnt = holdCount - sideLeftIconCnt;
}
if ( cg.weaponSelect == WP_CONCUSSION )
{
i = WP_FLECHETTE;
}
else
{
i = cg.weaponSelect - 1;
}
if (i<1)
{
i = LAST_USEABLE_WEAPON;
}
smallIconSize = 40;
bigIconSize = 80;
pad = 12;
x = 320;
y = 410;
// Background
// memcpy(calcColor, colorTable[CT_WHITE], sizeof(vec4_t));
// calcColor[3] = .35f;
// trap_R_SetColor( calcColor);
// Left side ICONS
trap_R_SetColor(colorTable[CT_WHITE]);
// Work backwards from current icon
holdX = x - ((bigIconSize/2) + pad + smallIconSize);
height = smallIconSize * 1;//cg.iconHUDPercent;
drewConc = qfalse;
for (iconCnt=1;iconCnt<(sideLeftIconCnt+1);i--)
{
if ( i == WP_CONCUSSION )
{
i--;
}
else if ( i == WP_FLECHETTE && !drewConc && cg.weaponSelect != WP_CONCUSSION )
{
i = WP_CONCUSSION;
}
if (i<1)
{
//i = 13;
//...don't ever do this.
i = LAST_USEABLE_WEAPON;
}
if ( !(bits & ( 1 << i ))) // Does he have this weapon?
{
if ( i == WP_CONCUSSION )
{
drewConc = qtrue;
i = WP_ROCKET_LAUNCHER;
}
continue;
}
if ( !CG_WeaponSelectable(i) &&
(i == WP_THERMAL || i == WP_GRENADE) )
{ //Don't show thermal and tripmine when out of them
continue;
}
++iconCnt; // Good icon
if (cgs.media.weaponIcons[i])
{
weaponInfo_t *weaponInfo;
CG_RegisterWeapon( i );
weaponInfo = &cg_weapons[i];
trap_R_SetColor(colorTable[CT_WHITE]);
if (!CG_WeaponCheck(i))
{
CG_DrawPic( holdX, y+10+yOffset, smallIconSize, smallIconSize, /*weaponInfo->weaponIconNoAmmo*/cgs.media.weaponIcons_NA[i] );
}
else
{
CG_DrawPic( holdX, y+10+yOffset, smallIconSize, smallIconSize, /*weaponInfo->weaponIcon*/cgs.media.weaponIcons[i] );
}
holdX -= (smallIconSize+pad);
}
if ( i == WP_CONCUSSION )
{
drewConc = qtrue;
i = WP_ROCKET_LAUNCHER;
}
}
// Current Center Icon
height = bigIconSize * cg.iconHUDPercent;
if (cgs.media.weaponIcons[cg.weaponSelect])
{
weaponInfo_t *weaponInfo;
CG_RegisterWeapon( cg.weaponSelect );
weaponInfo = &cg_weapons[cg.weaponSelect];
trap_R_SetColor( colorTable[CT_WHITE]);
if (!CG_WeaponCheck(cg.weaponSelect))
{
CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10+yOffset, bigIconSize, bigIconSize, cgs.media.weaponIcons_NA[cg.weaponSelect] );
}
else
{
CG_DrawPic( x-(bigIconSize/2), (y-((bigIconSize-smallIconSize)/2))+10+yOffset, bigIconSize, bigIconSize, cgs.media.weaponIcons[cg.weaponSelect] );
}
}
if ( cg.weaponSelect == WP_CONCUSSION )
{
i = WP_ROCKET_LAUNCHER;
}
else
{
i = cg.weaponSelect + 1;
}
if (i> LAST_USEABLE_WEAPON)
{
i = 1;
}
// Right side ICONS
// Work forwards from current icon
holdX = x + (bigIconSize/2) + pad;
height = smallIconSize * cg.iconHUDPercent;
for (iconCnt=1;iconCnt<(sideRightIconCnt+1);i++)
{
if ( i == WP_CONCUSSION )
{
i++;
}
else if ( i == WP_ROCKET_LAUNCHER && !drewConc && cg.weaponSelect != WP_CONCUSSION )
{
i = WP_CONCUSSION;
}
if (i>LAST_USEABLE_WEAPON)
{
i = 1;
}
if ( !(bits & ( 1 << i ))) // Does he have this weapon?
{
if ( i == WP_CONCUSSION )
{
drewConc = qtrue;
i = WP_FLECHETTE;
}
continue;
}
if ( !CG_WeaponSelectable(i) &&
(i == WP_THERMAL || i == WP_GRENADE) )
{ //Don't show thermal and tripmine when out of them
continue;
}
++iconCnt; // Good icon
if (/*weaponData[i].weaponIcon[0]*/cgs.media.weaponIcons[i])
{
weaponInfo_t *weaponInfo;
CG_RegisterWeapon( i );
weaponInfo = &cg_weapons[i];
// No ammo for this weapon?
trap_R_SetColor( colorTable[CT_WHITE]);
if (!CG_WeaponCheck(i))
{
CG_DrawPic( holdX, y+10+yOffset, smallIconSize, smallIconSize, cgs.media.weaponIcons_NA[i] );
}
else
{
CG_DrawPic( holdX, y+10+yOffset, smallIconSize, smallIconSize, cgs.media.weaponIcons[i] );
}
holdX += (smallIconSize+pad);
}
if ( i == WP_CONCUSSION )
{
drewConc = qtrue;
i = WP_FLECHETTE;
}
}
// draw the selected name
if ( cg_weapons[ cg.weaponSelect ].item )
{
vec4_t textColor = { .875f, .718f, .121f, 1.0f };
char text[1024];
char upperKey[1024];
strcpy(upperKey, cg_weapons[ cg.weaponSelect ].item->classname);
if ( trap_SP_GetStringTextString( va("SP_INGAME_%s",Q_strupr(upperKey)), text, sizeof( text )))
{
UI_DrawProportionalString(320, y+45+yOffset, text, UI_CENTER|UI_SMALLFONT, textColor);
}
else
{
UI_DrawProportionalString(320, y+45+yOffset, cg_weapons[ cg.weaponSelect ].item->classname, UI_CENTER|UI_SMALLFONT, textColor);
}
}
trap_R_SetColor( NULL );
}
/*
===============
CG_NextWeapon_f
===============
*/
void CG_NextWeapon_f( void ) {
int i;
int original;
if ( !cg.snap ) {
return;
}
if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) {
return;
}
if (cg.predictedPlayerState.pm_type == PM_SPECTATOR)
{
return;
}
if (cg.snap->ps.emplacedIndex)
{
return;
}
cg.weaponSelectTime = cg.time;
original = cg.weaponSelect;
for ( i = 0 ; i < WP_NUM_WEAPONS ; i++ ) {
//*SIGH*... Hack to put concussion rifle before rocketlauncher
if ( cg.weaponSelect == WP_FLECHETTE )
{
cg.weaponSelect = WP_CONCUSSION;
}
else if ( cg.weaponSelect == WP_CONCUSSION )
{
cg.weaponSelect = WP_ROCKET_LAUNCHER;
}
else if ( cg.weaponSelect == WP_DET_PACK )
{
cg.weaponSelect = WP_BRYAR_OLD;
}
else
{
cg.weaponSelect++;
}
if ( cg.weaponSelect == WP_NUM_WEAPONS ) {
cg.weaponSelect = 0;
}
// if ( cg.weaponSelect == WP_STUN_BATON ) {
// continue; // never cycle to gauntlet
// }
if ( CG_WeaponSelectable( cg.weaponSelect ) ) {
break;
}
}
if ( i == WP_NUM_WEAPONS ) {
cg.weaponSelect = original;
}
else
{
trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON);
}
}
/*
===============
CG_PrevWeapon_f
===============
*/
void CG_PrevWeapon_f( void ) {
int i;
int original;
if ( !cg.snap ) {
return;
}
if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) {
return;
}
if (cg.predictedPlayerState.pm_type == PM_SPECTATOR)
{
return;
}
if (cg.snap->ps.emplacedIndex)
{
return;
}
cg.weaponSelectTime = cg.time;
original = cg.weaponSelect;
for ( i = 0 ; i < WP_NUM_WEAPONS ; i++ ) {
//*SIGH*... Hack to put concussion rifle before rocketlauncher
if ( cg.weaponSelect == WP_ROCKET_LAUNCHER )
{
cg.weaponSelect = WP_CONCUSSION;
}
else if ( cg.weaponSelect == WP_CONCUSSION )
{
cg.weaponSelect = WP_FLECHETTE;
}
else if ( cg.weaponSelect == WP_BRYAR_OLD )
{
cg.weaponSelect = WP_DET_PACK;
}
else
{
cg.weaponSelect--;
}
if ( cg.weaponSelect == -1 ) {
cg.weaponSelect = WP_NUM_WEAPONS-1;
}
// if ( cg.weaponSelect == WP_STUN_BATON ) {
// continue; // never cycle to gauntlet
// }
if ( CG_WeaponSelectable( cg.weaponSelect ) ) {
break;
}
}
if ( i == WP_NUM_WEAPONS ) {
cg.weaponSelect = original;
}
else
{
trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON);
}
}
/*
===============
CG_Weapon_f
===============
*/
void CG_Weapon_f( void ) {
int num;
if ( !cg.snap ) {
return;
}
if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) {
return;
}
if (cg.snap->ps.emplacedIndex)
{
return;
}
num = atoi( CG_Argv( 1 ) );
if ( num < 1 || num > LAST_USEABLE_WEAPON ) {
return;
}
if (num == 1 && cg.snap->ps.weapon == WP_SABER)
{
//[MELEE]
//Switch to melee when blade is toggled if ojp_sabermelee is on
if (cg.snap->ps.weaponTime < 1)
{
if(ojp_sabermelee.integer && !cg.snap->ps.saberHolstered && CG_WeaponSelectable(WP_MELEE))
{
num = WP_MELEE;
cg.weaponSelectTime = cg.time;
if (cg.weaponSelect != num)
{
trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON);
}
cg.weaponSelect = num;
}
else
{
trap_SendConsoleCommand("sv_saberswitch\n");
}
}
/*
if (cg.snap->ps.weaponTime < 1)
{
trap_SendConsoleCommand("sv_saberswitch\n");
}
*/
//[/MELEE]
return;
}
//rww - hack to make weapon numbers same as single player
if (num > WP_TUSKEN_RIFLE)
{
//num++;
num += 2; //I suppose this is getting kind of crazy, what with the wp_melee in there too now.
}
else
{
if (cg.snap->ps.stats[STAT_WEAPONS] & (1 << WP_SABER))
{
num = WP_SABER;
}
else
{
num = WP_MELEE;
}
}
if (num > LAST_USEABLE_WEAPON+1)
{ //other weapons are off limits due to not actually being weapon weapons
return;
}
if (num >= WP_THERMAL && num <= WP_DET_PACK)
{
int weap, i = 0;
if (cg.snap->ps.weapon >= WP_THERMAL &&
cg.snap->ps.weapon <= WP_DET_PACK)
{
// already in cycle range so start with next cycle item
weap = cg.snap->ps.weapon + 1;
}
else
{
// not in cycle range, so start with thermal detonator
weap = WP_THERMAL;
}
// prevent an endless loop
while ( i <= 4 )
{
if (weap > WP_DET_PACK)
{
weap = WP_THERMAL;
}
if (CG_WeaponSelectable(weap))
{
num = weap;
break;
}
weap++;
i++;
}
}
if (!CG_WeaponSelectable(num))
{
return;
}
cg.weaponSelectTime = cg.time;
if ( ! ( cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << num ) ) )
{
if (num == WP_SABER)
{ //don't have saber, try melee on the same slot
num = WP_MELEE;
if ( ! ( cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << num ) ) )
{
return;
}
}
else
{
return; // don't have the weapon
}
}
if (cg.weaponSelect != num)
{
trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON);
}
cg.weaponSelect = num;
}
//Version of the above which doesn't add +2 to a weapon. The above can't
//triger WP_MELEE or WP_STUN_BATON. Derogatory comments go here.
void CG_WeaponClean_f( void ) {
int num;
if ( !cg.snap ) {
return;
}
if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) {
return;
}
if (cg.snap->ps.emplacedIndex)
{
return;
}
num = atoi( CG_Argv( 1 ) );
if ( num < 1 || num > LAST_USEABLE_WEAPON ) {
return;
}
if (num == 1 && cg.snap->ps.weapon == WP_SABER)
{
if (cg.snap->ps.weaponTime < 1)
{
trap_SendConsoleCommand("sv_saberswitch\n");
}
return;
}
if (num > LAST_USEABLE_WEAPON+1)
{ //other weapons are off limits due to not actually being weapon weapons
return;
}
if (num >= WP_THERMAL && num <= WP_DET_PACK)
{
int weap, i = 0;
if (cg.snap->ps.weapon >= WP_THERMAL &&
cg.snap->ps.weapon <= WP_DET_PACK)
{
// already in cycle range so start with next cycle item
weap = cg.snap->ps.weapon + 1;
}
else
{
// not in cycle range, so start with thermal detonator
weap = WP_THERMAL;
}
// prevent an endless loop
while ( i <= 4 )
{
if (weap > WP_DET_PACK)
{
weap = WP_THERMAL;
}
if (CG_WeaponSelectable(weap))
{
num = weap;
break;
}
weap++;
i++;
}
}
if (!CG_WeaponSelectable(num))
{
return;
}
cg.weaponSelectTime = cg.time;
if ( ! ( cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << num ) ) )
{
if (num == WP_SABER)
{ //don't have saber, try melee on the same slot
num = WP_MELEE;
if ( ! ( cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << num ) ) )
{
return;
}
}
else
{
return; // don't have the weapon
}
}
if (cg.weaponSelect != num)
{
trap_S_MuteSound(cg.snap->ps.clientNum, CHAN_WEAPON);
}
cg.weaponSelect = num;
}
/*
===================================================================================================
WEAPON EVENTS
===================================================================================================
*/
void CG_GetClientWeaponMuzzleBoltPoint(int clIndex, vec3_t to, qboolean leftweap)//[DualPistols]
//void CG_GetClientWeaponMuzzleBoltPoint(int clIndex, vec3_t to)
{
centity_t *cent;
mdxaBone_t boltMatrix;
//[DualPistols]
int midx = (leftweap ? 2 : 1);
if (clIndex < 0 || clIndex >= MAX_CLIENTS)
{
return;
}
cent = &cg_entities[clIndex];
if (!cent || !cent->ghoul2 || !trap_G2_HaveWeGhoul2Models(cent->ghoul2) ||
!trap_G2API_HasGhoul2ModelOnIndex(&(cent->ghoul2), midx))
{
return;
}
trap_G2API_GetBoltMatrix(cent->ghoul2, midx, 0, &boltMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale);
BG_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, to);
}
/*
================
CG_FireWeapon
Caused by an EV_FIRE_WEAPON event
================
*/
void CG_FireWeapon( centity_t *cent, qboolean altFire ) {
entityState_t *ent;
int c;
weaponInfo_t *weap;
int mishap = cg.predictedPlayerState.saberAttackChainCount;
ent = ¢->currentState;
if ( ent->weapon == WP_NONE ) {
return;
}
if(!altFire && ent->weapon == WP_REPEATER && cg.predictedPlayerState.weaponTime != 100000)
return;
if ( ent->weapon >= WP_NUM_WEAPONS ) {
CG_Error( "CG_FireWeapon: ent->weapon >= WP_NUM_WEAPONS" );
return;
}
weap = &cg_weapons[ ent->weapon ];
// mark the entity as muzzle flashing, so when it is added it will
// append the flash to the weapon model
cent->muzzleFlashTime = cg.time;
if (cg.predictedPlayerState.clientNum == cent->currentState.number)
{
if ((ent->weapon == WP_BRYAR_PISTOL && altFire) ||
(ent->weapon == WP_BRYAR_OLD && altFire) ||
(ent->weapon == WP_DEMP2 && altFire)
|| (mishap >= 5 && ent->weapon != WP_BOWCASTER && ent->weapon != WP_BLASTER
&& ent->weapon != WP_REPEATER && ent->weapon != WP_FLECHETTE && ent->weapon != WP_DET_PACK && ent->weapon != WP_THERMAL
&& ent->weapon != WP_GRENADE && (ent->weapon != WP_BRYAR_PISTOL
|| ent->weapon == WP_BRYAR_PISTOL && altFire)))
{
float val = ( cg.time - cent->currentState.constantLight ) * 0.001f;
if (val > 3)
{
val = 3;
}
if (val < 0.2)
{
val = 0.2;
}
val *= 2;
if(mishap >= 5 && mishap <= 8)
val = 2;
else if(mishap > 8 && mishap <= 14)
val = 4;
else if(mishap > 14)
val = 6;
CGCam_Shake( val, 250 );
}
else if (ent->weapon == WP_ROCKET_LAUNCHER ||
(ent->weapon == WP_REPEATER && altFire) ||
ent->weapon == WP_FLECHETTE ||
(ent->weapon == WP_CONCUSSION && !altFire))
{
if (ent->weapon == WP_CONCUSSION)
{
if (!cg.renderingThirdPerson )//gives an advantage to being in 3rd person, but would look silly otherwise
{//kick the view back
cg.kick_angles[PITCH] = flrand( -10, -15 );
cg.kick_time = cg.time;
}
}
else if (ent->weapon == WP_ROCKET_LAUNCHER)
{
CGCam_Shake(flrand(2, 3), 350);
}
else if (ent->weapon == WP_REPEATER)
{
CGCam_Shake(flrand(2, 3), 350);
}
}
}
// lightning gun only does this this on initial press
if ( ent->weapon == WP_DEMP2 ) {
if ( cent->pe.lightningFiring ) {
return;
}
}
if(altFire && ent->weapon == WP_BOWCASTER)
return;
// play a sound
if (altFire)
{
// play a sound
for ( c = 0 ; c < 4 ; c++ ) {
if ( !weap->altFlashSound[c] ) {
break;
}
}
if ( c > 0 ) {
c = rand() % c;
if ( weap->altFlashSound[c] )
{
trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->altFlashSound[c] );
}
}
}
else
{
// play a sound
for ( c = 0 ; c < 4 ; c++ ) {
if ( !weap->flashSound[c] ) {
break;
}
}
if ( c > 0 ) {
c = rand() % c;
if ( weap->flashSound[c] )
{
trap_S_StartSound( NULL, ent->number, CHAN_WEAPON, weap->flashSound[c] );
}
}
}
}
qboolean CG_VehicleWeaponImpact( centity_t *cent )
{//see if this is a missile entity that's owned by a vehicle and should do a special, overridden impact effect
if ((cent->currentState.eFlags&EF_JETPACK_ACTIVE)//hack so we know we're a vehicle Weapon shot
&& cent->currentState.otherEntityNum2
&& g_vehWeaponInfo[cent->currentState.otherEntityNum2].iImpactFX)
{//missile is from a special vehWeapon
vec3_t normal;
ByteToDir( cent->currentState.eventParm, normal );
trap_FX_PlayEffectID( g_vehWeaponInfo[cent->currentState.otherEntityNum2].iImpactFX, cent->lerpOrigin, normal, -1, -1 );
return qtrue;
}
return qfalse;
}
/*
=================
CG_MissileHitWall
Caused by an EV_MISSILE_MISS event, or directly by local bullet tracing
=================
*/
extern void FX_TuskenHitWall(vec3_t origin, vec3_t normal);
extern void FX_TuskenWeaponHitPlayer( vec3_t origin, vec3_t normal);
void CG_MissileHitWall(int weapon, int clientNum, vec3_t origin, vec3_t dir, impactSound_t soundType, qboolean altFire, int charge)
{
int parm;
vec3_t up={0,0,1};
switch( weapon )
{
case WP_BRYAR_PISTOL:
if ( altFire )
{
parm = charge;
FX_BryarAltHitWall( origin, dir, parm );
}
else
{
FX_BryarHitWall( origin, dir );
}
break;
case WP_CONCUSSION:
FX_ConcussionHitWall( origin, dir );
break;
case WP_BRYAR_OLD:
if ( altFire )
{
parm = charge;
FX_BryarAltHitWall( origin, dir, parm );
}
else
{
FX_BryarHitWall( origin, dir );
}
break;
case WP_TURRET:
FX_TurretHitWall( origin, dir );
break;
case WP_BLASTER:
FX_BlasterWeaponHitWall( origin, dir );
break;
case WP_TUSKEN_RIFLE:
FX_TuskenHitWall(origin,dir);
break;
case WP_DISRUPTOR:
FX_DisruptorAltMiss( origin, dir );
break;
case WP_BOWCASTER:
FX_BowcasterHitWall( origin, dir );
break;
case WP_REPEATER:
if ( altFire )
{
FX_RepeaterAltHitWall( origin, dir );
}
else
{
FX_RepeaterHitWall( origin, dir );
}
break;
case WP_DEMP2:
if (altFire)
{
trap_FX_PlayEffectID(cgs.effects.mAltDetonate, origin, dir, -1, -1);
}
else
{
FX_DEMP2_HitWall( origin, dir );
}
break;
case WP_FLECHETTE:
/*if (altFire)
{
CG_SurfaceExplosion(origin, dir, 20.0f, 12.0f, qtrue);
}
else
*/
if (!altFire)
{
FX_FlechetteWeaponHitWall( origin, dir );
}
else
{
FX_FlechetteWeaponHitWallAlt(origin, dir);
}
break;
case WP_ROCKET_LAUNCHER:
FX_RocketHitWall( origin, dir );
break;
case WP_GRENADE:
trap_FX_PlayEffectID( cgs.effects.thermalShockwaveEffect, origin, up, -1, -1 );
break;
case WP_THERMAL:
trap_FX_PlayEffectID( cgs.effects.thermalExplosionEffect, origin, dir, -1, -1 );
trap_FX_PlayEffectID( cgs.effects.thermalShockwaveEffect, origin, up, -1, -1 );
break;
case WP_EMPLACED_GUN:
FX_BlasterWeaponHitWall( origin, dir );
//FIXME: Give it its own hit wall effect
break;
}
}
/*
=================
CG_MissileHitPlayer
=================
*/
void CG_MissileHitPlayer(int weapon, vec3_t origin, vec3_t dir, int entityNum, qboolean altFire)
{
qboolean humanoid = qtrue;
vec3_t up={0,0,1};
/*
// NOTENOTE Non-portable code from single player
if ( cent->gent )
{
other = &g_entities[cent->gent->s.otherEntityNum];
if ( other->client && other->client->playerTeam == TEAM_BOTS )
{
humanoid = qfalse;
}
}
*/
// NOTENOTE No bleeding in this game
// CG_Bleed( origin, entityNum );
// some weapons will make an explosion with the blood, while
// others will just make the blood
switch ( weapon ) {
case WP_BRYAR_PISTOL:
if ( altFire )
{
FX_BryarAltHitPlayer( origin, dir, humanoid );
}
else
{
FX_BryarHitPlayer( origin, dir, humanoid );
}
break;
case WP_CONCUSSION:
FX_ConcussionHitPlayer( origin, dir, humanoid );
break;
case WP_BRYAR_OLD:
if ( altFire )
{
FX_BryarAltHitPlayer( origin, dir, humanoid );
}
else
{
FX_BryarHitPlayer( origin, dir, humanoid );
}
break;
case WP_TURRET:
FX_TurretHitPlayer( origin, dir, humanoid );
break;
case WP_TUSKEN_RIFLE:
FX_TuskenWeaponHitPlayer(origin,dir);
break;
case WP_BLASTER:
FX_BlasterWeaponHitPlayer( origin, dir, humanoid );
break;
case WP_DISRUPTOR:
FX_DisruptorAltHit( origin, dir);
break;
case WP_BOWCASTER:
FX_BowcasterHitPlayer( origin, dir, humanoid );
break;
case WP_REPEATER:
if ( altFire )
{
FX_RepeaterAltHitPlayer( origin, dir, humanoid );
}
else
{
FX_RepeaterHitPlayer( origin, dir, humanoid );
}
break;
case WP_DEMP2:
// Do a full body effect here for some more feedback
// NOTENOTE The chaining of the demp2 is not yet implemented.
/*
if ( other )
{
other->s.powerups |= ( 1 << PW_DISINT_1 );
other->client->ps.powerups[PW_DISINT_1] = cg.time + 650;
}
*/
if (altFire)
{
trap_FX_PlayEffectID(cgs.effects.mAltDetonate, origin, dir, -1, -1);
}
else
{
FX_DEMP2_HitPlayer( origin, dir, humanoid );
}
break;
case WP_FLECHETTE:
FX_FlechetteWeaponHitPlayer( origin, dir, humanoid );
break;
case WP_ROCKET_LAUNCHER:
FX_RocketHitPlayer( origin, dir, humanoid );
break;
case WP_THERMAL:
trap_FX_PlayEffectID( cgs.effects.thermalExplosionEffect, origin, dir, -1, -1 );
trap_FX_PlayEffectID( cgs.effects.thermalShockwaveEffect, origin, up, -1, -1 );
break;
case WP_EMPLACED_GUN:
//FIXME: Its own effect?
FX_BlasterWeaponHitPlayer( origin, dir, humanoid );
break;
default:
break;
}
}
/*
============================================================================
BULLETS
============================================================================
*/
/*
======================
CG_CalcMuzzlePoint
======================
*/
qboolean CG_CalcMuzzlePoint( int entityNum, vec3_t muzzle ) {
vec3_t forward, right;
vec3_t gunpoint;
centity_t *cent;
int anim;
if ( entityNum == cg.snap->ps.clientNum )
{ //I'm not exactly sure why we'd be rendering someone else's crosshair, but hey.
int weapontype = cg.snap->ps.weapon;
vec3_t weaponMuzzle;
centity_t *pEnt = &cg_entities[cg.predictedPlayerState.clientNum];
VectorCopy(WP_MuzzlePoint[weapontype], weaponMuzzle);
if (weapontype == WP_DISRUPTOR || weapontype == WP_MELEE || weapontype == WP_SABER)
{
VectorClear(weaponMuzzle);
}
if (cg.renderingThirdPerson)
{
VectorCopy( pEnt->lerpOrigin, gunpoint );
AngleVectors( pEnt->lerpAngles, forward, right, NULL );
}
else
{
VectorCopy( cg.refdef.vieworg, gunpoint );
AngleVectors( cg.refdef.viewangles, forward, right, NULL );
}
if (weapontype == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex)
{
centity_t *gunEnt = &cg_entities[cg.snap->ps.emplacedIndex];
if (gunEnt)
{
vec3_t pitchConstraint;
VectorCopy(gunEnt->lerpOrigin, gunpoint);
gunpoint[2] += 46;
if (cg.renderingThirdPerson)
{
VectorCopy(pEnt->lerpAngles, pitchConstraint);
}
else
{
VectorCopy(cg.refdef.viewangles, pitchConstraint);
}
if (pitchConstraint[PITCH] > 40)
{
pitchConstraint[PITCH] = 40;
}
AngleVectors( pitchConstraint, forward, right, NULL );
}
}
VectorCopy(gunpoint, muzzle);
VectorMA(muzzle, weaponMuzzle[0], forward, muzzle);
VectorMA(muzzle, weaponMuzzle[1], right, muzzle);
if (weapontype == WP_EMPLACED_GUN && cg.snap->ps.emplacedIndex)
{
//Do nothing
}
else if (cg.renderingThirdPerson)
{
muzzle[2] += cg.snap->ps.viewheight + weaponMuzzle[2];
}
else
{
muzzle[2] += weaponMuzzle[2];
}
return qtrue;
}
cent = &cg_entities[entityNum];
if ( !cent->currentValid ) {
return qfalse;
}
VectorCopy( cent->currentState.pos.trBase, muzzle );
AngleVectors( cent->currentState.apos.trBase, forward, NULL, NULL );
anim = cent->currentState.legsAnim;
if ( anim == BOTH_CROUCH1WALK || anim == BOTH_CROUCH1IDLE ) {
muzzle[2] += CROUCH_VIEWHEIGHT;
} else {
muzzle[2] += DEFAULT_VIEWHEIGHT;
}
VectorMA( muzzle, 14, forward, muzzle );
return qtrue;
}
/*
Ghoul2 Insert Start
*/
// create one instance of all the weapons we are going to use so we can just copy this info into each clients gun ghoul2 object in fast way
static void *g2WeaponInstances[MAX_WEAPONS];
static void *g2WeaponInstances2[MAX_WEAPONS];//[DualPistols]
//[VisualWeapons]
void *g2HolsterWeaponInstances[MAX_WEAPONS];
//[/VisualWeapons]
void CG_InitG2Weapons(void)
{
int i = 0;
gitem_t *item;
memset(g2WeaponInstances, 0, sizeof(g2WeaponInstances));
memset(g2WeaponInstances2, 0, sizeof(g2WeaponInstances2));//[DualPistols]
for ( item = bg_itemlist + 1 ; item->classname ; item++ )
{
if ( item->giType == IT_WEAPON )
{
assert(item->giTag < MAX_WEAPONS);
// initialise model
trap_G2API_InitGhoul2Model(&g2WeaponInstances[/*i*/item->giTag], item->world_model[0], 0, 0, 0, 0, 0);
//[VisualWeapons]
//init holster models at the same time.
trap_G2API_InitGhoul2Model(&g2HolsterWeaponInstances[item->giTag], item->world_model[0], 0, 0, 0, 0, 0);
//[/VisualWeapons]
// trap_G2API_InitGhoul2Model(&g2WeaponInstances[i], item->world_model[0],G_ModelIndex( item->world_model[0] ) , 0, 0, 0, 0);
if (g2WeaponInstances[/*i*/item->giTag])
{
// indicate we will be bolted to model 0 (ie the player) on bolt 0 (always the right hand) when we get copied
trap_G2API_SetBoltInfo(g2WeaponInstances[/*i*/item->giTag], 0, 0);
// now set up the gun bolt on it
if (item->giTag == WP_SABER)
{
trap_G2API_AddBolt(g2WeaponInstances[/*i*/item->giTag], 0, "*blade1");
}
else
{
trap_G2API_AddBolt(g2WeaponInstances[/*i*/item->giTag], 0, "*flash");
}
i++;
}
//[DualPistols]
trap_G2API_InitGhoul2Model(&g2WeaponInstances2[/*i*/item->giTag], item->world_model[0], 0, 0, 0, 0, 0);
// trap_G2API_InitGhoul2Model(&g2WeaponInstances2[i], item->world_model[0],G_ModelIndex( item->world_model[0] ) , 0, 0, 0, 0);
if (g2WeaponInstances2[/*i*/item->giTag])
{
// indicate we will be bolted to model 0 (ie the player) on bolt 0 (always the right hand) when we get copied
//WeaponMod FIXME ? : c bien 1?
trap_G2API_SetBoltInfo(g2WeaponInstances2[/*i*/item->giTag], 0, 1);
// now set up the gun bolt on it
if (item->giTag == WP_SABER)
{
trap_G2API_AddBolt(g2WeaponInstances2[/*i*/item->giTag], 0, "*blade1");
}
else
{
trap_G2API_AddBolt(g2WeaponInstances2[/*i*/item->giTag], 0, "*flash");
}
}
//[/DualPistols]
i++;
if (i == MAX_WEAPONS)
{
assert(0);
break;
}
}
}
}
// clean out any g2 models we instanciated for copying purposes
void CG_ShutDownG2Weapons(void)
{
int i;
for (i=0; i<MAX_WEAPONS; i++)
{
trap_G2API_CleanGhoul2Models(&g2WeaponInstances[i]);
//[VisualWeapons]
trap_G2API_CleanGhoul2Models(&g2HolsterWeaponInstances[i]);
//[/VisualWeapons]
trap_G2API_CleanGhoul2Models(&g2WeaponInstances2[i]);//[DualPistols]
}
}
void *CG_G2WeaponInstance(centity_t *cent, int weapon)
{
clientInfo_t *ci = NULL;
if (weapon != WP_SABER)
{
return g2WeaponInstances[weapon];
}
if (cent->currentState.eType != ET_PLAYER &&
cent->currentState.eType != ET_NPC)
{
return g2WeaponInstances[weapon];
}
if (cent->currentState.eType == ET_NPC)
{
ci = cent->npcClient;
}
else
{
ci = &cgs.clientinfo[cent->currentState.number];
}
if (!ci)
{
return g2WeaponInstances[weapon];
}
//Try to return the custom saber instance if we can.
if (ci->saber[0].model && ci->saber[0].model[0] && ci->ghoul2Weapons &&
ci->ghoul2Weapons[0])
{
return ci->ghoul2Weapons[0];
}
//If no custom then just use the default.
return g2WeaponInstances[weapon];
}
//[DualPistols]
void *CG_G2WeaponInstance2(centity_t *cent, int weapon)
{
clientInfo_t *ci = NULL;
if (weapon != WP_SABER)
{
return g2WeaponInstances2[weapon];
}
if (cent->currentState.eType != ET_PLAYER &&
cent->currentState.eType != ET_NPC)
{
return g2WeaponInstances2[weapon];
}
if (cent->currentState.eType == ET_NPC)
{
ci = cent->npcClient;
}
else
{
ci = &cgs.clientinfo[cent->currentState.number];
}
if (!ci)
{
return g2WeaponInstances2[weapon];
}
//Try to return the custom saber instance if we can.
if (ci->saber[0].model[0] &&
ci->ghoul2Weapons[0])
{
return ci->ghoul2Weapons[0];
}
//If no custom then just use the default.
return g2WeaponInstances2[weapon];
}
//[/DualPistols]
//[VisualWeapons]
void *CG_G2HolsterWeaponInstance(centity_t *cent, int weapon, qboolean secondSaber)
{
clientInfo_t *ci = NULL;
if (weapon != WP_SABER)
{
return g2HolsterWeaponInstances[weapon];
}
if (cent->currentState.eType != ET_PLAYER &&
cent->currentState.eType != ET_NPC)
{
return g2HolsterWeaponInstances[weapon];
}
if (cent->currentState.eType == ET_NPC)
{
ci = cent->npcClient;
}
else
{
ci = &cgs.clientinfo[cent->currentState.number];
}
if (!ci)
{
return g2HolsterWeaponInstances[weapon];
}
//Try to return the custom saber instance if we can.
if(secondSaber)
{//return secondSaber instance
if (ci->saber[1].model[0] &&
ci->ghoul2HolsterWeapons[1])
{
return ci->ghoul2HolsterWeapons[1];
}
}
else
{//return first saber instance
if (ci->saber[0].model[0] &&
ci->ghoul2HolsterWeapons[0])
{
return ci->ghoul2HolsterWeapons[0];
}
}
//If no custom then just use the default.
return g2HolsterWeaponInstances[weapon];
}
//[/VisualWeapons]
// what ghoul2 model do we want to copy ?
void CG_CopyG2WeaponInstance(centity_t *cent, int weaponNum, void *toGhoul2)
{
//rww - the -1 is because there is no "weapon" for WP_NONE
assert(weaponNum < MAX_WEAPONS);
if (CG_G2WeaponInstance(cent, weaponNum/*-1*/))
{
if (weaponNum == WP_SABER)
{
clientInfo_t *ci = NULL;
if (cent->currentState.eType == ET_NPC)
{
ci = cent->npcClient;
}
else
{
ci = &cgs.clientinfo[cent->currentState.number];
}
if (!ci)
{
trap_G2API_CopySpecificGhoul2Model(CG_G2WeaponInstance(cent, weaponNum/*-1*/), 0, toGhoul2, 1);
}
else
{ //Try both the left hand saber and the right hand saber
int i = 0;
while (i < MAX_SABERS)
{
if (ci->saber[i].model[0] &&
ci->ghoul2Weapons[i])
{
trap_G2API_CopySpecificGhoul2Model(ci->ghoul2Weapons[i], 0, toGhoul2, i+1);
}
else if (ci->ghoul2Weapons[i])
{ //if the second saber has been removed, then be sure to remove it and free the instance.
qboolean g2HasSecondSaber = trap_G2API_HasGhoul2ModelOnIndex(&(toGhoul2), 2);
if (g2HasSecondSaber)
{ //remove it now since we're switching away from sabers
trap_G2API_RemoveGhoul2Model(&(toGhoul2), 2);
}
trap_G2API_CleanGhoul2Models(&ci->ghoul2Weapons[i]);
}
i++;
}
}
}
else
{
qboolean g2HasSecondSaber = trap_G2API_HasGhoul2ModelOnIndex(&(toGhoul2), 2);
if (g2HasSecondSaber)
{ //remove it now since we're switching away from sabers
trap_G2API_RemoveGhoul2Model(&(toGhoul2), 2);
}
if (weaponNum == WP_EMPLACED_GUN)
{ //a bit of a hack to remove gun model when using an emplaced weap
if (trap_G2API_HasGhoul2ModelOnIndex(&(toGhoul2), 1))
{
trap_G2API_RemoveGhoul2Model(&(toGhoul2), 1);
}
}
else if (weaponNum == WP_MELEE)
{ //don't want a weapon on the model for this one
if (trap_G2API_HasGhoul2ModelOnIndex(&(toGhoul2), 1))
{
trap_G2API_RemoveGhoul2Model(&(toGhoul2), 1);
}
}
else
{
trap_G2API_CopySpecificGhoul2Model(CG_G2WeaponInstance(cent, weaponNum/*-1*/), 0, toGhoul2, 1);
//[DualPistols]
if ( (cent->currentState.eFlags & EF_DUAL_WEAPONS) &&
(cent->currentState.weapon == WP_BRYAR_PISTOL) )
{
trap_G2API_CopySpecificGhoul2Model(CG_G2WeaponInstance2(cent, weaponNum/*-1*/), 0, toGhoul2, 2);
}
//[/DualPistols]
}
}
}
//[CoOp]
//only WP_NONE doesn't have a CG_G2WeaponInstance, in this case, jsut remove the weapon model then
else
{
if (trap_G2API_HasGhoul2ModelOnIndex(&(toGhoul2), 1))
{
trap_G2API_RemoveGhoul2Model(&(toGhoul2), 1);
}
}
//[/CoOp]
}
void CG_CheckPlayerG2Weapons(playerState_t *ps, centity_t *cent)
{
if (!ps)
{
assert(0);
return;
}
if (ps->pm_flags & PMF_FOLLOW)
{
return;
}
if (cent->currentState.eType == ET_NPC)
{
assert(0);
return;
}
//[SaberLockSys]
//racc - this was preventing a non-saber weapon from rendering when the player's saber is dropped.
/* basejka code
// should we change the gun model on this player?
if (cent->currentState.saberInFlight)
{
cent->ghoul2weapon = CG_G2WeaponInstance(cent, WP_SABER);
}
*/
//[/SaberLockSys]
if (cent->currentState.eFlags & EF_DEAD)
{ //no updating weapons when dead
cent->ghoul2weapon = NULL;
return;
}
if (cent->torsoBolt)
{ //got our limb cut off, no updating weapons until it's restored
cent->ghoul2weapon = NULL;
return;
}
if (cgs.clientinfo[ps->clientNum].team == TEAM_SPECTATOR ||
ps->persistant[PERS_TEAM] == TEAM_SPECTATOR)
{
cent->ghoul2weapon = cg_entities[ps->clientNum].ghoul2weapon = NULL;
cent->weapon = cg_entities[ps->clientNum].weapon = 0;
return;
}
//[DualPistols]
if (cent->ghoul2 && (cent->ghoul2weapon != CG_G2WeaponInstance(cent, ps->weapon) ||
((cent->ghoul2weapon2 != CG_G2WeaponInstance2(cent, cent->currentState.weapon) &&
//WeaponMod FIXME?
(cent->currentState.eFlags & EF_DUAL_WEAPONS) && (cent->currentState.weapon != WP_SABER))) ||
(cent->ghoul2weapon2 != NULL && ((!(cent->currentState.eFlags & EF_DUAL_WEAPONS)) || (cent->currentState.weapon == WP_SABER)))) &&
ps->clientNum == cent->currentState.number) //don't want spectator mode forcing one client's weapon instance over another's
//[/DualPistols]
{
CG_CopyG2WeaponInstance(cent, ps->weapon, cent->ghoul2);
cent->ghoul2weapon = CG_G2WeaponInstance(cent, ps->weapon);
if ((cent->currentState.eFlags & EF_DUAL_WEAPONS) &&
(ps->weapon == WP_BRYAR_PISTOL))
{
cent->ghoul2weapon2 = CG_G2WeaponInstance2(cent, ps->weapon);
}
else
{
cent->ghoul2weapon2 = NULL;
}
if (cent->weapon == WP_SABER && cent->weapon != ps->weapon && !ps->saberHolstered)
{ //switching away from the saber
//trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberoffquick.wav" ));
if (cgs.clientinfo[ps->clientNum].saber[0].soundOff && !ps->saberHolstered)
{
trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, cgs.clientinfo[ps->clientNum].saber[0].soundOff);
}
if (cgs.clientinfo[ps->clientNum].saber[1].soundOff &&
cgs.clientinfo[ps->clientNum].saber[1].model[0] &&
!ps->saberHolstered)
{
trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, cgs.clientinfo[ps->clientNum].saber[1].soundOff);
}
}
else if (ps->weapon == WP_SABER && cent->weapon != ps->weapon && !cent->saberWasInFlight)
{ //switching to the saber
//trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ));
if (cgs.clientinfo[ps->clientNum].saber[0].soundOn)
{
trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, cgs.clientinfo[ps->clientNum].saber[0].soundOn);
}
if (cgs.clientinfo[ps->clientNum].saber[1].soundOn)
{
trap_S_StartSound(cent->lerpOrigin, cent->currentState.number, CHAN_AUTO, cgs.clientinfo[ps->clientNum].saber[1].soundOn);
}
BG_SI_SetDesiredLength(&cgs.clientinfo[ps->clientNum].saber[0], 0, -1);
BG_SI_SetDesiredLength(&cgs.clientinfo[ps->clientNum].saber[1], 0, -1);
}
cent->weapon = ps->weapon;
}
}
/*
Ghoul2 Insert End
*/
| [
"[email protected]@5776d9f2-9662-11de-ad41-3fcdc5e0e42d"
]
| [
[
[
1,
2817
]
]
]
|
c328195120d222e099c60b8004b69b4d225b7794 | 91b964984762870246a2a71cb32187eb9e85d74e | /SRC/OFFI SRC!/boost_1_34_1/boost_1_34_1/libs/test/example/cla/custom_parameter.cpp | e8aeadbdbb46059b943b789adf058ac6ed2fc8b5 | [
"BSL-1.0",
"LicenseRef-scancode-unknown-license-reference"
]
| permissive | willrebuild/flyffsf | e5911fb412221e00a20a6867fd00c55afca593c7 | d38cc11790480d617b38bb5fc50729d676aef80d | refs/heads/master | 2021-01-19T20:27:35.200154 | 2011-02-10T12:34:43 | 2011-02-10T12:34:43 | 32,710,780 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,020 | cpp | // (C) Copyright Gennadiy Rozental 2001-2006.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
// Boost.Runtime.Param
#include <boost/test/utils/runtime/cla/named_parameter.hpp>
#include <boost/test/utils/runtime/cla/parser.hpp>
namespace rt = boost::runtime;
namespace cla = boost::runtime::cla;
// STL
#include <iostream>
#include <iterator>
//_____________________________________________________________________//
struct Point : std::pair<int,int> {
bool parse( rt::cstring& in ) {
in.trim_left();
if( first_char( in ) != '(' )
return false;
in.trim_left( 1 );
rt::cstring::size_type pos = in.find( ")" );
if( pos == rt::cstring::npos )
return false;
rt::cstring ss( in.begin(), pos );
pos = ss.find( "," );
if( pos == rt::cstring::npos )
return false;
rt::cstring f( ss.begin(), pos );
rt::cstring s( ss.begin()+pos+1, ss.end() );
f.trim();
s.trim();
try {
first = boost::lexical_cast<int>( f );
second = boost::lexical_cast<int>( s );
}
catch( boost::bad_lexical_cast const& ) {
return false;
}
in.trim_left( ss.end()+1 );
return true;
}
};
std::ostream& operator<<( std::ostream& ostr, Point const& p )
{
ostr << '(' << p.first << ',' << p.second << ')';
return ostr;
}
struct Segment : std::pair<Point,Point> {
bool parse( rt::cstring& in ) {
in.trim_left();
if( first_char( in ) != '[' )
return false;
in.trim_left( 1 );
if( !first.parse( in ) )
return false;
in.trim_left();
if( first_char( in ) != ',' )
return false;
in.trim_left( 1 );
if( !second.parse( in ) )
return false;
in.trim_left();
if( first_char( in ) != ']' )
return false;
in.trim_left( 1 );
return true;
}
};
std::ostream& operator<<( std::ostream& ostr, Segment const& p )
{
ostr << '[' << p.first << ',' << p.second << ']';
return ostr;
}
struct Circle : std::pair<Point,int> {
bool parse( rt::cstring& in ) {
in.trim_left();
if( first_char( in ) != '[' )
return false;
in.trim_left( 1 );
if( !first.parse( in ) )
return false;
in.trim_left();
if( first_char( in ) != ',' )
return false;
in.trim_left( 1 );
rt::cstring::size_type pos = in.find( "]" );
if( pos == rt::cstring::npos )
return false;
rt::cstring ss( in.begin(), pos );
ss.trim();
try {
second = boost::lexical_cast<int>( ss );
}
catch( boost::bad_lexical_cast const& ) {
return false;
}
in.trim_left( pos+1 );
return true;
}
};
std::ostream& operator<<( std::ostream& ostr, Circle const& p )
{
ostr << '[' << p.first << ',' << p.second << ']';
return ostr;
}
//_____________________________________________________________________//
template<typename T>
class ShapeIdPolicy : public cla::identification_policy {
rt::cstring m_name;
rt::cstring m_usage_str;
public:
explicit ShapeIdPolicy( rt::cstring name )
: cla::identification_policy( boost::rtti::type_id<ShapeIdPolicy<T> >() )
, m_name( name ) {}
virtual bool responds_to( rt::cstring name ) const { return m_name == name; }
virtual bool conflict_with( cla::identification_policy const& ) const { return false; }
virtual rt::cstring id_2_report() const { return m_name; }
virtual void usage_info( rt::format_stream& fs ) const { fs << m_name; }
virtual bool matching( cla::parameter const& p, cla::argv_traverser& tr, bool primary ) const
{
T s;
rt::cstring in = tr.input();
return s.parse( in );
}
};
//_____________________________________________________________________//
template<typename T>
class ShapeArgumentFactory : public cla::argument_factory {
rt::cstring m_usage_str;
public:
explicit ShapeArgumentFactory( rt::cstring usage ) : m_usage_str( usage ) {}
// Argument factory interface
virtual rt::argument_ptr produce_using( cla::parameter& p, cla::argv_traverser& tr )
{
T s;
rt::cstring in = tr.input();
s.parse( in );
tr.trim( in.begin() - tr.input().begin() );
if( !p.actual_argument() ) {
rt::argument_ptr res;
rt::typed_argument<std::list<T> >* new_arg = new rt::typed_argument<std::list<T> >( p );
new_arg->p_value.value.push_back( s );
res.reset( new_arg );
return res;
}
else {
std::list<T>& arg_values = rt::arg_value<std::list<T> >( *p.actual_argument() );
arg_values.push_back( s );
return p.actual_argument();
}
}
virtual rt::argument_ptr produce_using( cla::parameter& p, cla::parser const& ) { return rt::argument_ptr(); }
virtual void argument_usage_info( rt::format_stream& fs ) { fs << m_usage_str; }
};
//_____________________________________________________________________//
struct SegmentParam : cla::parameter {
SegmentParam()
: cla::parameter( m_id_policy, m_arg_factory )
, m_id_policy( "segment" )
, m_arg_factory( ":((P1x,P1y), (P2x,P2y)) ... ((P1x,P1y), (P2x,P2y))" )
{}
ShapeIdPolicy<Segment> m_id_policy;
ShapeArgumentFactory<Segment> m_arg_factory;
};
inline boost::shared_ptr<SegmentParam>
segment_param() { return boost::shared_ptr<SegmentParam>( new SegmentParam ); }
//_____________________________________________________________________//
struct CircleParam : cla::parameter {
CircleParam()
: cla::parameter( m_id_policy, m_arg_factory )
, m_id_policy( "circle" )
, m_arg_factory( ":((P1x,P1y), R) ... ((P1x,P1y), R)" )
{}
ShapeIdPolicy<Circle> m_id_policy;
ShapeArgumentFactory<Circle> m_arg_factory;
};
inline boost::shared_ptr<CircleParam>
circle_param() { return boost::shared_ptr<CircleParam>( new CircleParam ); }
//_____________________________________________________________________//
int main() {
char* argv[] = { "basic", "[(1,", "1)", ",", "(7,", "-1", ")]", "[(", "1,1)", ",7", "]", "[(3,", "1", ")", ",", "2]",
"[", "(2,7", "),", "(5", ",1", ")]" };
int argc = sizeof(argv)/sizeof(char*);
try {
cla::parser P;
P << circle_param() - cla::optional
<< segment_param() - cla::optional;
P.parse( argc, argv );
boost::optional<std::list<Segment> > segments;
boost::optional<std::list<Circle> > circles;
P.get( "segment", segments );
if( segments ) {
std::cout << "segments : ";
std::copy( segments->begin(), segments->end(), std::ostream_iterator<Segment>( std::cout, "; " ) );
std::cout << std::endl;
}
P.get( "circle", circles );
if( circles ) {
std::cout << "circles : ";
std::copy( circles->begin(), circles->end(), std::ostream_iterator<Circle>( std::cout, "; " ) );
std::cout << std::endl;
}
}
catch( rt::logic_error const& ex ) {
std::cout << "Logic error: " << ex.msg() << std::endl;
return -1;
}
return 0;
}
// EOF
| [
"[email protected]@e2c90bd7-ee55-cca0-76d2-bbf4e3699278"
]
| [
[
[
1,
290
]
]
]
|
ac06a859a401ab293e538a6aedbaf24f44fdc486 | e53e3f6fac0340ae0435c8e60d15d763704ef7ec | /WDL/sha.cpp | fed9951d945ab50b019020abc516325fd21f7894 | []
| no_license | b-vesco/vfx-wdl | 906a69f647938b60387d8966f232a03ce5b87e5f | ee644f752e2174be2fefe43275aec2979f0baaec | refs/heads/master | 2020-05-30T21:37:06.356326 | 2011-01-04T08:54:45 | 2011-01-04T08:54:45 | 848,136 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,641 | cpp | /*
WDL - sha.cpp
Copyright (C) 2005 and later, Cockos Incorporated
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/*
This file provides the implementation to the WDL_SHA1 object, which performs SHA-1 hashes
on data.
*/
#include "sha.h"
/// sha
WDL_SHA1::WDL_SHA1()
{
reset();
}
void WDL_SHA1::reset()
{
lenW = 0;
size[0] = size[1] = 0;
H[0] = 0x67452301;
H[1] = 0xefcdab89;
H[2] = 0x98badcfe;
H[3] = 0x10325476;
H[4] = 0xc3d2e1f0;
int x;
for (x = 0; x < sizeof(W)/sizeof(W[0]); x ++) W[x]=0;
}
#define SHA_ROTL(X,n) ((((X)&0xffffffff) << (n)) | (((X)&0xffffffff) >> (32-(n))))
#define SHUFFLE() E = D; D = C; C = SHA_ROTL(B, 30); B = A; A = TEMP
void WDL_SHA1::add(const void *data, int datalen)
{
int i;
for (i = 0; i < datalen; i++)
{
W[lenW / 4] <<= 8;
W[lenW / 4] |= (unsigned int)((const unsigned char *)data)[i];
if (!(++lenW & 63))
{
int t;
unsigned int A = H[0];
unsigned int B = H[1];
unsigned int C = H[2];
unsigned int D = H[3];
unsigned int E = H[4];
for (t = 16; t < 80; t++) W[t] = SHA_ROTL(W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16], 1);
for (t = 0; t < 20; t++)
{
unsigned int TEMP = SHA_ROTL(A,5) + E + W[t] + 0x5a827999 + (((C^D)&B)^D);
SHUFFLE();
}
for (; t < 40; t++)
{
unsigned int TEMP = SHA_ROTL(A,5) + E + W[t] + 0x6ed9eba1 + (B^C^D);
SHUFFLE();
}
for (; t < 60; t++)
{
unsigned int TEMP = SHA_ROTL(A,5) + E + W[t] + 0x8f1bbcdc + ((B&C)|(D&(B|C)));
SHUFFLE();
}
for (; t < 80; t++)
{
unsigned int TEMP = SHA_ROTL(A,5) + E + W[t] + 0xca62c1d6 + (B^C^D);
SHUFFLE();
}
H[0] += A;
H[1] += B;
H[2] += C;
H[3] += D;
H[4] += E;
lenW = 0;
}
size[0] += 8;
if (size[0] < 8) size[1]++;
}
}
void WDL_SHA1::result(void *out)
{
unsigned char pad0x80 = 0x80;
unsigned char pad0x00 = 0x00;
unsigned char padlen[8];
int i;
padlen[0] = (unsigned char)((size[1] >> 24) & 0xff);
padlen[1] = (unsigned char)((size[1] >> 16) & 0xff);
padlen[2] = (unsigned char)((size[1] >> 8) & 0xff);
padlen[3] = (unsigned char)((size[1]) & 0xff);
padlen[4] = (unsigned char)((size[0] >> 24) & 0xff);
padlen[5] = (unsigned char)((size[0] >> 16) & 0xff);
padlen[6] = (unsigned char)((size[0] >> 8) & 0xff);
padlen[7] = (unsigned char)((size[0]) & 0xff);
add(&pad0x80, 1);
while (lenW != 56) add(&pad0x00, 1);
add(padlen, 8);
for (i = 0; i < 20; i++)
{
((unsigned char *)out)[i] = (unsigned char)(H[i / 4] >> 24);
H[i / 4] <<= 8;
}
reset();
}
| [
"[email protected]"
]
| [
[
[
1,
133
]
]
]
|
9b733313a08b91b2959c278a0aec3757de3f7a4d | 842997c28ef03f8deb3422d0bb123c707732a252 | /src/moaicore/MOAITouchSensor.cpp | d01537c3c7b4f558d6e5dd0eb6cbfee9ba6a2b32 | []
| no_license | bjorn/moai-beta | e31f600a3456c20fba683b8e39b11804ac88d202 | 2f06a454d4d94939dc3937367208222735dd164f | refs/heads/master | 2021-01-17T11:46:46.018377 | 2011-06-10T07:33:55 | 2011-06-10T07:33:55 | 1,837,561 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 9,788 | cpp | // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved.
// http://getmoai.com
#include "pch.h"
#include <moaicore/MOAILogMessages.h>
#include <moaicore/MOAITouchSensor.h>
//================================================================//
// lua
//================================================================//
//----------------------------------------------------------------//
/** @name down
@text Checks to see if the screen was touched during the last iteration.
@in MOAITouchSensor self
@out boolean wasPressed
*/
int MOAITouchSensor::_down ( lua_State* L ) {
MOAI_LUA_SETUP ( MOAITouchSensor, "U" )
u32 idx = state.GetValue < u32 >( 2, 0 );
if ( idx < MAX_TOUCHES ) {
lua_pushboolean ( state, ( self->mTouches [ idx ].mState & DOWN ) == DOWN );
return 1;
}
return 0;
}
//----------------------------------------------------------------//
/** @name getActiveTouches
@text Returns the IDs of all of the touches currently occurring (for use with getTouch).
@in MOAITouchSensor self
@out number id1
@out ...
@out number idn
*/
int MOAITouchSensor::_getActiveTouches ( lua_State* L ) {
MOAI_LUA_SETUP ( MOAITouchSensor, "U" )
for ( u32 i = 0; i < self->mTop; ++i ) {
lua_pushnumber ( state, self->mActiveStack [ i ]);
}
return self->mTop;
}
//----------------------------------------------------------------//
/** @name getTouch
@text Checks to see if there are currently touches being made on the screen.
@in MOAITouchSensor self
@in number id The ID of the touch.
@out number x
@out number y
@out number tapCount
*/
int MOAITouchSensor::_getTouch ( lua_State* L ) {
MOAI_LUA_SETUP ( MOAITouchSensor, "U" )
u32 idx = state.GetValue < u32 >( 2, 0 );
if ( idx < MAX_TOUCHES ) {
MOAITouch& touch = self->mTouches [ idx ];
lua_pushnumber ( state, touch.mX );
lua_pushnumber ( state, touch.mY );
lua_pushnumber ( state, touch.mTapCount );
return 3;
}
return 0;
}
//----------------------------------------------------------------//
/** @name hasTouches
@text Checks to see if there are currently touches being made on the screen.
@in MOAITouchSensor self
@out boolean hasTouches
*/
int MOAITouchSensor::_hasTouches ( lua_State* L ) {
MOAI_LUA_SETUP ( MOAITouchSensor, "U" )
lua_pushboolean ( state, ( self->mTop > 0 ));
return 1;
}
//----------------------------------------------------------------//
/** @name isDown
@text Checks to see if the touch status is currently down.
@in MOAITouchSensor self
@out boolean isDown
*/
int MOAITouchSensor::_isDown ( lua_State* L ) {
MOAI_LUA_SETUP ( MOAITouchSensor, "U" )
u32 idx = state.GetValue < u32 >( 2, 0 );
if ( idx < MAX_TOUCHES ) {
lua_pushboolean ( state, ( self->mTouches [ idx ].mState & IS_DOWN ) == IS_DOWN );
return 1;
}
return 0;
}
//----------------------------------------------------------------//
/** @name setCallback
@text Sets the callback to be issued when the pointer location changes.
@in MOAITouchSensor self
@in function callback
@out nil
*/
int MOAITouchSensor::_setCallback ( lua_State* L ) {
MOAI_LUA_SETUP ( MOAITouchSensor, "UF" )
self->mCallback.SetRef ( state, 2, false );
return 0;
}
//----------------------------------------------------------------//
/** @name up
@text Checks to see if the screen was untouched (is no longer being touched) during the last iteration.
@in MOAITouchSensor self
@out boolean wasPressed
*/
int MOAITouchSensor::_up ( lua_State* L ) {
MOAI_LUA_SETUP ( MOAITouchSensor, "U" )
u32 idx = state.GetValue < u32 >( 2, 0 );
if ( idx < MAX_TOUCHES ) {
lua_pushboolean ( state, ( self->mTouches [ idx ].mState & UP ) == UP );
return 1;
}
return 0;
}
//================================================================//
// MOAITouchSensor
//================================================================//
//----------------------------------------------------------------//
u32 MOAITouchSensor::AddTouch () {
u32 idx = UNKNOWN_TOUCH;
if ( this->mTop < MAX_TOUCHES ) {
idx = this->mAllocStack [ this->mTop ];
this->mActiveStack [ this->mTop ] = idx;
this->mTop++;
//this->PrintStacks ();
}
return idx;
}
//----------------------------------------------------------------//
void MOAITouchSensor::Clear () {
this->mTop = 0;
for ( u32 i = 0; i < MAX_TOUCHES; ++i ) {
this->mTouches [ i ].mState = 0;
this->mAllocStack [ i ] = i;
this->mActiveStack [ i ] = MAX_TOUCHES;
}
}
//----------------------------------------------------------------//
u32 MOAITouchSensor::FindTouch ( u32 touchID ) {
for ( u32 i = 0; i < this->mTop; ++i ) {
u32 idx = this->mActiveStack [ i ];
if ( this->mTouches [ idx ].mTouchID == touchID ) {
return idx;
}
}
return UNKNOWN_TOUCH;
}
//----------------------------------------------------------------//
void MOAITouchSensor::HandleEvent ( USStream& eventStream ) {
u32 eventType = eventStream.Read < u32 >();
if ( eventType == TOUCH_CANCEL ) {
this->Clear ();
if ( this->mCallback ) {
USLuaStateHandle state = this->mCallback.GetSelf ();
lua_pushnumber ( state, eventType );
state.DebugCall ( 1, 0 );
}
}
else {
MOAITouch touch;
touch.mState = 0;
touch.mTouchID = eventStream.Read < u32 >();
touch.mX = eventStream.Read < float >();
touch.mY = eventStream.Read < float >();
touch.mTapCount = eventStream.Read < u32 >();
u32 idx = this->FindTouch ( touch.mTouchID );
if ( eventType == TOUCH_DOWN ) {
if ( idx == UNKNOWN_TOUCH ) {
idx = this->AddTouch ();
if ( idx == UNKNOWN_TOUCH ) return;
touch.mState = IS_DOWN | DOWN;
}
else {
if ( idx == UNKNOWN_TOUCH ) return;
touch.mState = this->mTouches [ idx ].mState | IS_DOWN;
eventType = TOUCH_MOVE;
}
}
else {
touch.mState &= ~IS_DOWN;
touch.mState |= UP;
touch.mTouchID = 0;
}
if ( idx != UNKNOWN_TOUCH ) {
this->mTouches [ idx ] = touch;
if (( idx != UNKNOWN_TOUCH ) && ( this->mCallback )) {
USLuaStateHandle state = this->mCallback.GetSelf ();
lua_pushnumber ( state, eventType );
lua_pushnumber ( state, idx );
lua_pushnumber ( state, touch.mX );
lua_pushnumber ( state, touch.mY );
lua_pushnumber ( state, touch.mTapCount );
state.DebugCall ( 5, 0 );
}
}
}
}
//----------------------------------------------------------------//
MOAITouchSensor::MOAITouchSensor () {
RTTI_SINGLE ( MOAISensor )
this->Clear ();
}
//----------------------------------------------------------------//
MOAITouchSensor::~MOAITouchSensor () {
}
//----------------------------------------------------------------//
void MOAITouchSensor::PrintStacks () {
printf ( "[" );
for ( u32 i = 0; i < MAX_TOUCHES; ++i ) {
if ( i == this->mTop ) {
printf ( "|" );
}
else {
printf ( " " );
}
printf ( "%d", ( int )this->mAllocStack [ i ]);
}
printf ( " ] [" );
for ( u32 i = 0; i < MAX_TOUCHES; ++i ) {
if ( i == this->mTop ) {
printf ( "|" );
}
else {
printf ( " " );
}
if ( this->mActiveStack [ i ] < MAX_TOUCHES ) {
printf ( "%d", ( int )this->mActiveStack [ i ]);
}
else {
printf ( "-" );
}
}
printf ( " ]\n" );
}
//----------------------------------------------------------------//
void MOAITouchSensor::RegisterLuaClass ( USLuaState& state ) {
state.SetField ( -1, "TOUCH_DOWN", ( u32 )TOUCH_DOWN );
state.SetField ( -1, "TOUCH_MOVE", ( u32 )TOUCH_MOVE );
state.SetField ( -1, "TOUCH_UP", ( u32 )TOUCH_UP );
state.SetField ( -1, "TOUCH_CANCEL", ( u32 )TOUCH_CANCEL );
}
//----------------------------------------------------------------//
void MOAITouchSensor::RegisterLuaFuncs ( USLuaState& state ) {
luaL_Reg regTable [] = {
{ "down", _down },
{ "getActiveTouches", _getActiveTouches },
{ "getTouch", _getTouch },
{ "hasTouches", _hasTouches },
{ "isDown", _isDown },
{ "setCallback", _setCallback },
{ "up", _up },
{ NULL, NULL }
};
luaL_register ( state, 0, regTable );
}
//----------------------------------------------------------------//
void MOAITouchSensor::Reset () {
u32 top = this->mTop;
u32 j = 0;
for ( u32 i = 0; i < top; ++i ) {
u32 idx = this->mActiveStack [ i ];
MOAITouch& touch = this->mTouches [ idx ];
if (( touch.mState & IS_DOWN ) == 0 ) {
touch.mState = 0;
--this->mTop;
this->mAllocStack [ this->mTop ] = idx;
}
else {
touch.mState &= ~( DOWN | UP );
this->mActiveStack [ j++ ] = this->mActiveStack [ i ];
}
}
if ( this->mTop == 0 ) {
this->Clear ();
}
}
//----------------------------------------------------------------//
STLString MOAITouchSensor::ToString () {
STLString repr;
//PRETTY_PRINT ( repr, mX )
//PRETTY_PRINT ( repr, mY )
return repr;
}
//----------------------------------------------------------------//
void MOAITouchSensor::WriteEvent ( USStream& eventStream, u32 touchID, bool down, float x, float y, u32 tapCount ) {
u32 eventType = down ? TOUCH_DOWN : TOUCH_UP;
eventStream.Write < u32 >( eventType );
eventStream.Write < u32 >( touchID );
eventStream.Write < float >( x );
eventStream.Write < float >( y );
eventStream.Write < u32 >( tapCount );
}
//----------------------------------------------------------------//
void MOAITouchSensor::WriteEventCancel ( USStream& eventStream ) {
eventStream.Write < u32 >( TOUCH_CANCEL );
}
| [
"[email protected]"
]
| [
[
[
1,
385
]
]
]
|
db9ec50d07156b3085b3c043939f4fbc5dc1f7da | c5534a6df16a89e0ae8f53bcd49a6417e8d44409 | /trunk/Dependencies/Xerces/include/xercesc/util/XMLDeleterFor.hpp | 3b13de2c304af12406775bc74a9403623d2fe7c1 | []
| no_license | svn2github/ngene | b2cddacf7ec035aa681d5b8989feab3383dac012 | 61850134a354816161859fe86c2907c8e73dc113 | refs/heads/master | 2023-09-03T12:34:18.944872 | 2011-07-27T19:26:04 | 2011-07-27T19:26:04 | 78,163,390 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,477 | hpp | /*
* Copyright 1999-2000,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XMLDeleterFor.hpp 191054 2005-06-17 02:56:35Z jberry $
*/
#if !defined(XMLDELETERFOR_HPP)
#define XMLDELETERFOR_HPP
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/util/PlatformUtils.hpp>
XERCES_CPP_NAMESPACE_BEGIN
//
// For internal use only.
//
// This class is used by the platform utilities class to support cleanup
// of global/static data which is lazily created. Since that data is
// widely spread out, and in higher level DLLs, the platform utilities
// class cannot know about them directly. So, the code that creates such
// objects creates an registers a deleter for the object. The platform
// termination call will iterate the list and delete the objects.
//
template <class T> class XMLDeleterFor : public XMLDeleter
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
XMLDeleterFor(T* const toDelete);
~XMLDeleterFor();
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XMLDeleterFor();
XMLDeleterFor(const XMLDeleterFor<T>&);
XMLDeleterFor<T>& operator=(const XMLDeleterFor<T>&);
// -----------------------------------------------------------------------
// Private data members
//
// fToDelete
// This is a pointer to the data to destroy
// -----------------------------------------------------------------------
T* fToDelete;
};
XERCES_CPP_NAMESPACE_END
#if !defined(XERCES_TMPLSINC)
#include <xercesc/util/XMLDeleterFor.c>
#endif
#endif
| [
"Riddlemaster@fdc6060e-f348-4335-9a41-9933a8eecd57"
]
| [
[
[
1,
74
]
]
]
|
4753bcf3db02856d51ce2672127ebd70d37e19cf | 6613641e04e8ca78862938d6d5ce2b6ec93ee161 | / qlink-up --username [email protected]/LineCounter/debug/qrc_res.cpp | af4169bad60ebdee88c2f16d6bf6f7d3e488e861 | []
| no_license | reyoung/qlink-up | 46a117e91b1097de9ed763aaf48c473532278fb9 | 21df00e453db552378166181f520fe0d6ae24bbc | refs/heads/master | 2021-01-23T03:08:03.232791 | 2010-03-12T01:05:46 | 2010-03-12T01:05:46 | 33,867,970 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 21,955 | cpp | /****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation ([email protected])
**
** This file is part of the tools applications of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at [email protected].
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
/****************************************************************************
** Resource object code
**
** Created: Sun Jan 24 23:34:23 2010
** by: The Resource Compiler for Qt version 4.6.0
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <QtCore/qglobal.h>
static const unsigned char qt_resource_data[] = {
// F:/NotePad0/assistant/assistant/Image/next.png
0x0,0x0,0x5,0x1f,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x6,0x0,0x0,0x0,0xc4,0xb4,0x6c,0x3b,
0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,
0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0xd,0x0,0x0,
0xb,0xd,0x1,0xed,0x7,0xc0,0x2c,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,
0xd3,0x9,0x9,0x14,0x27,0x14,0xf3,0x56,0x84,0x6e,0x0,0x0,0x4,0xac,0x49,0x44,
0x41,0x54,0x78,0xda,0x8d,0x95,0xdf,0x6b,0x5c,0x45,0x14,0xc7,0x3f,0xf3,0xe3,0xde,
0xfd,0xbd,0xd9,0x34,0x49,0xdb,0x68,0xbb,0x4d,0x15,0xa9,0x5a,0x5b,0xc3,0x46,0x85,
0x52,0x50,0x51,0x8b,0xa4,0x55,0x41,0xb,0x22,0x2a,0xbe,0x55,0xec,0x9b,0x8,0x22,
0xbe,0xb,0xfd,0xb,0xb4,0xf,0x57,0x5,0x9f,0x4,0xad,0xa0,0x88,0xb4,0x10,0x7f,
0x20,0xb5,0xd6,0x62,0xba,0x35,0xd6,0x58,0x8d,0x98,0x34,0x6d,0x69,0x93,0xcd,0xcf,
0xdd,0xcd,0x66,0xef,0xdd,0x7b,0xef,0x8c,0xf,0x9b,0xf4,0x87,0xb6,0xb6,0x7,0xbe,
0x2f,0x33,0x67,0x3e,0x73,0xe6,0xcc,0x39,0x33,0x82,0xff,0xb1,0xd2,0xfe,0x11,0x7,
0x6c,0xf,0x98,0x5e,0xac,0x4d,0x83,0x5,0x6c,0x13,0x6b,0xa6,0x1c,0x53,0xab,0x9c,
0xf0,0x76,0xb5,0x6e,0xb4,0x56,0xfc,0xf,0x74,0x7,0xf0,0x3c,0xd8,0x7e,0x4,0x45,
0x84,0x93,0x1,0xc0,0x4,0xcb,0xd8,0xf8,0x3c,0x30,0x22,0x4c,0x74,0xa8,0x64,0x3f,
0x3c,0xe6,0x79,0x5e,0x7c,0x53,0x70,0x69,0xff,0xc8,0x9d,0x20,0x5e,0x47,0x39,0x2f,
0x66,0x33,0xe9,0xc2,0xfa,0xee,0xbc,0x5c,0xd7,0x95,0x64,0x4b,0x77,0x9d,0x94,0x13,
0xf3,0xf7,0x7c,0x96,0xb3,0x15,0xc3,0xec,0xcc,0x8c,0x99,0xaf,0x36,0x9b,0x26,0x6a,
0x1e,0x73,0xec,0xd2,0x3b,0xdb,0xed,0xc7,0xc7,0x3d,0xcf,0x8b,0xae,0xb,0x2e,0xed,
0x1f,0xd9,0x4,0xe2,0x20,0x6e,0x7e,0xb0,0xff,0x8e,0x14,0xbb,0x1f,0xcc,0xb1,0x6d,
0xa3,0x65,0x6d,0xc1,0x41,0xc9,0xb6,0xab,0x5,0x16,0xea,0x11,0xe3,0x53,0x21,0x87,
0xcb,0x3e,0x47,0x4f,0x2f,0xd0,0x6a,0xd6,0xce,0x24,0xcc,0xfc,0x5b,0xf7,0xd9,0x43,
0x87,0x57,0xe1,0xea,0x5f,0x91,0xbe,0x9b,0xcd,0xe7,0x9f,0x7c,0x66,0x47,0x87,0x78,
0xe5,0xd1,0x14,0x77,0xf5,0x2a,0x12,0x8e,0x22,0x8c,0x41,0x2b,0x41,0x26,0xa9,0xf8,
0xe4,0xe8,0x2,0x77,0xdd,0x9e,0xa4,0x3b,0xaf,0xd9,0xb6,0xc9,0x61,0x5d,0xa7,0xc3,
0x44,0xc5,0x76,0xd7,0x7c,0xf1,0xc0,0x9c,0xdd,0x5c,0x1e,0x1c,0x48,0x5d,0x28,0x97,
0xcb,0xf6,0x32,0xb8,0xf7,0xc1,0xd7,0xe,0xe0,0xe6,0x5e,0xd8,0xf3,0x50,0x41,0x3c,
0x3d,0xe0,0xe0,0x3a,0x92,0x56,0x64,0x9,0xc2,0xb6,0x36,0xf4,0x24,0x90,0x52,0x70,
0x6f,0x31,0xc9,0x17,0x3f,0x2d,0xd2,0xd3,0xa1,0xb1,0xd6,0x72,0xdb,0x1a,0x87,0x5c,
0xda,0x11,0xbf,0x5f,0x88,0xbb,0xfc,0x96,0x75,0x6e,0xe3,0xd4,0xd0,0xc0,0xc0,0x40,
0xa8,0xda,0xd1,0x9e,0xdc,0x21,0x54,0xe2,0xc0,0xfd,0x77,0xe6,0x93,0x83,0x25,0x7,
0x29,0xa1,0x15,0x1a,0xfc,0xd0,0x10,0xac,0x68,0xdd,0x4a,0x3a,0x94,0x14,0xdc,0xbb,
0x31,0xc9,0x91,0x93,0x35,0x72,0xa9,0xf6,0xe6,0x6b,0xb2,0x92,0x46,0x4b,0x73,0x6e,
0x26,0xec,0x9b,0x89,0x37,0x8e,0xac,0xe3,0xcc,0x84,0x2a,0xbd,0x36,0xec,0x0,0xaf,
0xe7,0x72,0xb9,0x87,0x1f,0xef,0xcf,0x88,0xce,0x2c,0x4,0xa1,0xc5,0xf,0xaf,0x44,
0x1b,0x84,0x96,0xd9,0x5a,0x48,0x67,0x56,0xe3,0x3a,0x12,0xa5,0x4,0x77,0x6f,0x48,
0xf2,0xfd,0xe9,0x25,0x1c,0x25,0xf0,0x43,0x83,0xab,0x5a,0x8c,0x4f,0x1b,0xb7,0xe1,
0x47,0xa1,0x8a,0xaa,0x47,0x35,0xd0,0x3,0xf4,0xe7,0xf3,0x1d,0xb2,0x90,0x8c,0xa8,
0x35,0x24,0x5a,0x89,0xff,0x94,0xcb,0xb2,0x1f,0x73,0x22,0xa8,0xf3,0xc8,0xf6,0xe,
0xb4,0x12,0x24,0x5d,0xc9,0xde,0x9d,0x9d,0x7c,0x76,0x6c,0x81,0x6f,0xff,0xcc,0x52,
0x6b,0xa6,0xa9,0x93,0x95,0x86,0xc5,0xad,0x35,0x51,0x2c,0x6a,0xa0,0x17,0x21,0x8b,
0xdd,0x39,0x41,0xb3,0x65,0x48,0x27,0x24,0xbb,0x4a,0x5,0xb2,0x29,0xc5,0xcd,0x2c,
0x9b,0x52,0x3c,0xbb,0x73,0xd,0x3f,0x4c,0x48,0x66,0x66,0x1,0xad,0x41,0xa8,0x5e,
0x94,0x5b,0x94,0x40,0x1a,0x99,0xc8,0xa4,0x9d,0x90,0xc5,0x86,0x61,0x7d,0x57,0xe2,
0x96,0xa0,0xab,0x96,0x4f,0x49,0x9e,0xd8,0xb6,0x52,0xbb,0x42,0x80,0x4c,0xa4,0x4,
0xe4,0xe4,0xaa,0x43,0xcd,0x77,0x98,0xae,0x4a,0xce,0x4e,0xc7,0xf8,0x2d,0x73,0xcb,
0x60,0x3f,0x84,0x89,0xa,0x8,0x71,0xa5,0x29,0x4,0x46,0x6a,0xb0,0x4d,0x4c,0xb0,
0x3c,0xdd,0x48,0xd1,0x88,0x93,0x4c,0x9c,0x84,0xc9,0xc5,0x90,0x6c,0x52,0xe0,0x47,
0x1a,0xb,0x18,0x2b,0x30,0xb6,0xbd,0xec,0x8d,0xdd,0x90,0x74,0xae,0x80,0xdf,0xff,
0xe,0xbe,0xfa,0xa5,0xd,0x6,0xb,0xb1,0xef,0xb,0x1b,0x5,0x1a,0x6b,0xa6,0x80,
0xf3,0xd5,0x65,0xb3,0x39,0x16,0x29,0x0,0xbe,0x39,0xc3,0x4a,0x97,0xb5,0xf,0x64,
0xc,0x64,0x12,0xf0,0xe6,0x53,0x90,0xd0,0x2b,0x97,0xd9,0x82,0xf7,0x86,0xe0,0xcb,
0x32,0x68,0x5,0x12,0x58,0x6a,0x6,0x60,0xe3,0x8a,0x34,0x8d,0x29,0xe9,0x98,0x5a,
0x5,0x18,0x21,0x98,0x37,0x8e,0xb2,0xb8,0x57,0x29,0xa1,0x62,0xb0,0x16,0x63,0xe1,
0xed,0x67,0xe0,0x91,0x7b,0x56,0x23,0x83,0xf,0xbe,0x33,0xc,0xfd,0x1a,0x93,0xd4,
0x6d,0xb9,0x3a,0x46,0xb4,0xe6,0x8c,0xc6,0x1f,0x2b,0xd8,0xc9,0x4b,0xfa,0x84,0xb7,
0xab,0x35,0xf0,0xea,0xf1,0x43,0x71,0x50,0x7d,0xd9,0x89,0x53,0x9d,0x9d,0x39,0xf7,
0x9a,0x52,0x33,0xb6,0x9d,0xb5,0x9d,0x5b,0x72,0xed,0x9c,0xb6,0x2c,0x9f,0x1e,0xf,
0x28,0xff,0xd5,0xa2,0x37,0xcb,0x55,0xef,0x47,0xb,0xe3,0x2f,0x34,0x52,0xf1,0xf4,
0x50,0x87,0x9a,0x9d,0x57,0x0,0x4f,0x95,0xe4,0x85,0x8b,0x6c,0xdf,0x2c,0x6c,0x34,
0x50,0xec,0xd1,0xe4,0x13,0x11,0x19,0x37,0x22,0xe3,0x44,0x64,0xdd,0x88,0x6c,0x22,
0x64,0x6d,0x87,0x66,0x7d,0xa7,0xe6,0x8b,0x9f,0xea,0xc,0x8f,0x2d,0xb5,0xe7,0x57,
0x7c,0xb4,0x8,0x39,0x7f,0x69,0x8e,0xa0,0xb1,0x70,0x64,0x9b,0xf8,0xfc,0x23,0xa0,
0xa2,0x0,0xca,0xe5,0xb2,0xdd,0x50,0x7a,0x69,0x3c,0x8,0xb9,0xc7,0x98,0x78,0xd3,
0xed,0x5d,0x4a,0xa4,0x13,0x82,0x84,0x63,0xdb,0xd2,0x96,0xc9,0x4a,0xc0,0xe8,0xd9,
0x26,0x93,0x95,0xe0,0x9a,0x71,0x41,0xc8,0xd8,0xb9,0x9a,0x99,0x9b,0xaf,0xe,0x77,
0xc5,0xa3,0x7,0xb,0xe2,0xe2,0x28,0x50,0xbf,0x5c,0xb0,0x7b,0x4a,0xce,0xdc,0x9c,
0x2d,0xe,0x57,0x9b,0x7a,0x6b,0x6d,0x39,0xea,0xcb,0xa5,0x1d,0xd6,0xe4,0xda,0x2d,
0xec,0x6a,0x81,0x14,0x82,0x56,0x64,0x71,0xb4,0xc0,0xd5,0x2,0x47,0xc1,0x6c,0x35,
0xe4,0xf4,0x78,0x95,0xa9,0x99,0xda,0x70,0x4f,0x74,0xea,0x40,0x51,0x96,0x7f,0x6,
0x66,0x3d,0xcf,0x8b,0x2f,0x83,0xcb,0xe5,0xb2,0x1d,0x1c,0x48,0xcf,0xcf,0xd9,0xbe,
0x53,0xd5,0xa6,0x4a,0xcf,0x54,0xc3,0xbe,0xfa,0x72,0xe4,0x26,0x75,0x24,0x32,0x29,
0x8d,0x96,0x12,0x29,0xc0,0xda,0x98,0xb9,0x85,0x6,0xbf,0x9d,0x5d,0x36,0x7f,0x9c,
0xab,0x2f,0x2d,0x2e,0xd6,0x8e,0x74,0xc5,0xa3,0x7,0x57,0xa0,0x15,0xcf,0xf3,0xc2,
0xeb,0xfe,0x20,0xfb,0xf6,0xed,0x93,0x40,0xe6,0x34,0x7b,0x1f,0x8b,0x64,0xf6,0x39,
0x83,0xb3,0x55,0x4a,0xd1,0x9b,0x4b,0xa9,0x14,0x40,0xbd,0x19,0xfb,0x26,0x36,0x15,
0x8d,0x3f,0x96,0x8c,0xa7,0x87,0xb6,0xc8,0xaf,0x7f,0x4,0xa6,0x81,0xc5,0x1b,0xfe,
0x20,0x57,0xc1,0x5,0xe0,0x56,0xe2,0xbe,0x42,0x4d,0x14,0x8b,0x28,0xb7,0x28,0x20,
0x27,0x30,0x52,0xd8,0x28,0x90,0xa6,0x31,0x55,0xb0,0x93,0x97,0x3a,0xd4,0xec,0x3c,
0x50,0x7,0x9a,0x9e,0xe7,0x5d,0xd3,0xae,0xff,0x0,0xdc,0x34,0x32,0x12,0x78,0xdd,
0xc8,0x6b,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// F:/NotePad0/assistant/assistant/Image/ajouter.png
0x0,0x0,0x1,0xf6,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,
0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,
0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x4,0x67,0x41,0x4d,0x41,0x0,0x0,0xb1,
0x8e,0x7c,0xfb,0x51,0x93,0x0,0x0,0x0,0x20,0x63,0x48,0x52,0x4d,0x0,0x0,0x7a,
0x25,0x0,0x0,0x80,0x83,0x0,0x0,0xf9,0xff,0x0,0x0,0x80,0xe9,0x0,0x0,0x75,
0x30,0x0,0x0,0xea,0x60,0x0,0x0,0x3a,0x98,0x0,0x0,0x17,0x6f,0x92,0x5f,0xc5,
0x46,0x0,0x0,0x1,0x6c,0x49,0x44,0x41,0x54,0x78,0xda,0xa4,0x93,0xbb,0x6a,0x5b,
0x41,0x10,0x86,0xbf,0xd9,0x3d,0x7b,0xb0,0x8c,0x2c,0xd9,0x32,0x18,0xfb,0xd,0xdc,
0x8,0x12,0x92,0x32,0xa5,0xc1,0x60,0x88,0x9b,0x54,0xee,0xf3,0x4,0x69,0xe2,0xc2,
0xa0,0xa4,0x4a,0x97,0x47,0x48,0x9b,0x36,0x90,0x26,0x26,0x17,0x52,0xc6,0x95,0x2a,
0x1b,0xc,0x36,0x88,0x34,0x6a,0x8c,0x63,0x5,0x74,0x39,0xe7,0xec,0xee,0xb8,0x50,
0x20,0x44,0xd2,0x51,0x7c,0xf9,0xbb,0x81,0x7f,0x3f,0x66,0xfe,0xd9,0x11,0x55,0x45,
0x44,0x98,0x54,0xe5,0x85,0x3b,0xac,0xd5,0xab,0x1b,0x0,0xbf,0x7b,0xfd,0xee,0xf0,
0x6d,0xbe,0x3d,0xe9,0x51,0x55,0x12,0x4a,0xf4,0x68,0xf9,0xc1,0xea,0xce,0xd6,0xd3,
0x66,0x94,0xc8,0x97,0xcf,0x9f,0x46,0xdf,0xf9,0x31,0xd3,0x57,0xa,0x70,0xcb,0x95,
0xa5,0xd5,0xb5,0x75,0xbc,0x6,0x5c,0x7d,0x71,0xa9,0xcc,0x57,0xa,0x28,0x74,0xa8,
0x57,0xa3,0xb,0x82,0x7a,0x32,0x1d,0x70,0x6b,0x80,0x4a,0x1e,0x73,0x7a,0x4,0x3c,
0x4a,0x1e,0xe7,0x2,0xdc,0x81,0xf9,0x90,0x38,0xe7,0xd0,0xa8,0xc6,0x42,0xe8,0x43,
0x7d,0x25,0x6d,0xe4,0xda,0x23,0xaa,0xa7,0xd6,0x48,0x1b,0xb,0x2f,0xdd,0x47,0xa9,
0x22,0x28,0x20,0x88,0xf,0x21,0x0,0xbb,0xa2,0xaa,0x34,0xdf,0x6d,0xea,0xb3,0xc7,
0x3b,0x44,0x32,0x8c,0x44,0x6c,0x1a,0xc9,0x8a,0x1,0x45,0x18,0x11,0x34,0x60,0x4d,
0x82,0x24,0x9,0xd9,0x28,0x90,0xf9,0x48,0x11,0xe0,0xdb,0xf1,0x11,0xe7,0xcf,0x7f,
0xca,0xb8,0x3,0x3,0xd6,0xf4,0xb1,0x52,0x60,0x6c,0xc4,0xe0,0x19,0xc8,0x15,0x6a,
0x3d,0xaa,0x1e,0x6b,0x2a,0xa4,0xa4,0x88,0xb,0x88,0x44,0xac,0x80,0x35,0xe1,0xef,
0x8,0xed,0xce,0x29,0xed,0xce,0xe9,0xd4,0x7c,0xfb,0x7b,0x4f,0x10,0x2,0x6f,0xde,
0x7f,0xfd,0x4f,0x88,0xaf,0x99,0xfe,0x49,0x2d,0xd4,0x56,0x2e,0x31,0xfc,0xc9,0x6f,
0x96,0xe7,0xd5,0x9c,0x2d,0x0,0x48,0xed,0x64,0xc6,0xab,0x1b,0xae,0x11,0xe0,0x61,
0x75,0x9b,0x31,0xe1,0xf0,0x6e,0x80,0xb3,0xee,0x2f,0x8c,0x99,0xdf,0x81,0x94,0x1d,
0x13,0x2d,0xf4,0x9f,0x7a,0x46,0x6,0xaa,0x3a,0x6,0xdc,0x47,0x86,0x7b,0xea,0x7a,
0x0,0xf4,0xda,0x8e,0x5f,0x96,0xf5,0x89,0x1d,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,
0x44,0xae,0x42,0x60,0x82,
// F:/NotePad0/assistant/assistant/Image/supprimer.png
0x0,0x0,0x0,0xed,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,
0x0,0x0,0x0,0x4,0x67,0x41,0x4d,0x41,0x0,0x0,0xd9,0x4,0xdc,0xb2,0xda,0x2,
0x0,0x0,0x0,0xa4,0x49,0x44,0x41,0x54,0x78,0x9c,0xed,0x90,0x2b,0x16,0xc2,0x40,
0xc,0x0,0x67,0xb3,0xbb,0x15,0x3c,0x1c,0x57,0xc0,0xe2,0x38,0x43,0x6f,0x80,0xef,
0xd1,0xf0,0x1c,0xa1,0x1e,0x83,0x1,0x74,0x8f,0x1,0x82,0xee,0x36,0x41,0xf4,0x67,
0x70,0x15,0x98,0x8e,0xcd,0xcb,0x64,0x5e,0x60,0x65,0x31,0xe,0xe0,0xb2,0xc5,0xe,
0xc7,0xfd,0xd9,0x17,0x46,0x2c,0xc0,0x47,0x88,0xa1,0x9f,0x8a,0x0,0xa,0xd9,0xc0,
0x32,0xa4,0x16,0x52,0x72,0xdc,0xaf,0x4d,0x75,0x7a,0xe1,0xc2,0x68,0xda,0x95,0x65,
0x25,0x96,0x11,0xf,0xe2,0xc1,0xb9,0xf9,0x8a,0x29,0x44,0x5,0x55,0x88,0x19,0xd4,
0x2,0x5c,0x1b,0x0,0x26,0x1,0xcf,0x1a,0x17,0x8d,0x10,0xc0,0x7,0x70,0x32,0x48,
0xac,0x5f,0xec,0x3a,0xc8,0x19,0xb4,0x5,0x4d,0xb3,0x7d,0x12,0xbc,0x3f,0x1b,0x24,
0x69,0x5f,0x20,0x43,0xfa,0x58,0x30,0x54,0xa8,0x82,0x66,0xe8,0xf4,0x87,0xe0,0x56,
0x3f,0x96,0x7f,0x74,0xe5,0x4f,0x7c,0x1,0x86,0x31,0x3a,0x84,0x42,0x2f,0x72,0xc5,
0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// F:/NotePad0/assistant/assistant/Image/previous.png
0x0,0x0,0x5,0x44,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x6,0x0,0x0,0x0,0xc4,0xb4,0x6c,0x3b,
0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,
0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0xd,0x0,0x0,
0xb,0xd,0x1,0xed,0x7,0xc0,0x2c,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,
0xd3,0x9,0x9,0x13,0x13,0x1d,0x34,0xef,0xd9,0xb8,0x0,0x0,0x4,0xd1,0x49,0x44,
0x41,0x54,0x78,0xda,0x8d,0x95,0xdb,0x8b,0x5c,0x55,0x16,0xc6,0x7f,0x7b,0x9f,0xb3,
0x4f,0xd5,0xa9,0x5b,0x57,0xd2,0xdd,0x76,0xaa,0x33,0xa9,0x74,0x1b,0x9a,0x30,0x93,
0x8b,0xa1,0x4a,0x87,0x9,0x8,0x33,0xcc,0x20,0x43,0xbc,0x4,0xc6,0x11,0x11,0x5,
0x1f,0x6,0x2,0xe6,0x2d,0xf,0x3,0xfa,0x2c,0x42,0xf0,0xf,0x90,0x3c,0x14,0x8,
0x22,0x8c,0x2f,0x82,0xc2,0xc,0x44,0x50,0x9f,0x24,0xd1,0x71,0x92,0x8a,0x3d,0xe9,
0xc4,0x4c,0x20,0xb7,0x4e,0xc7,0x74,0x57,0x77,0x55,0xd7,0xfd,0x72,0x2e,0x7b,0xf9,
0xd0,0x49,0x4f,0x34,0x89,0xba,0x60,0xbf,0x7d,0xeb,0xc7,0xb7,0x59,0x1f,0x6b,0x29,
0x7e,0xa2,0x4a,0x47,0xe7,0xd,0xc8,0x24,0xd8,0x2,0x22,0x29,0x10,0x40,0x6,0x88,
0x5d,0x36,0xb6,0x5d,0xfb,0x77,0xe5,0xa9,0xe0,0x61,0xbd,0xea,0x27,0xa0,0x7,0x81,
0x17,0x41,0xe,0xa0,0x28,0xa2,0x4c,0x1a,0x0,0x3b,0xea,0x23,0xf1,0x4d,0x60,0x5e,
0xd9,0xe8,0xc3,0x92,0xbc,0x7b,0xaa,0x52,0xa9,0xc4,0x3f,0xb,0x2e,0x1d,0x9d,0xdf,
0x5,0xea,0x18,0x8e,0x79,0x39,0x93,0x4e,0xe5,0xb7,0x4d,0xe4,0xf4,0xd4,0x78,0x92,
0xdd,0x13,0x1d,0x7c,0x13,0x73,0xa5,0x91,0xe1,0x7a,0xcd,0xb2,0xb6,0xba,0x6a,0x1b,
0xad,0xc1,0xc0,0x46,0x83,0x53,0x46,0xba,0x6f,0xed,0x97,0xf,0xbe,0xac,0x54,0x2a,
0xd1,0x3,0xc1,0xa5,0xa3,0xf3,0x3b,0x41,0x9d,0xc0,0xcb,0x1d,0x3a,0xf0,0xa8,0xcf,
0xd3,0x4f,0x64,0xd9,0xb7,0x43,0x78,0x24,0x6f,0x70,0xf4,0x86,0x54,0x80,0xf5,0x4e,
0xc4,0xd5,0xe5,0x90,0x93,0xd5,0x21,0x5f,0x9c,0x5f,0x27,0x18,0xb4,0xbf,0x4d,0xd8,
0xc6,0xeb,0x7b,0xe5,0xc3,0x93,0x77,0xe1,0xce,0x8f,0x9c,0xbe,0x93,0xc9,0xe5,0xfe,
0x7c,0xf8,0xe0,0x98,0x7a,0xf5,0xf,0x3e,0x73,0x5,0x87,0x84,0x71,0xf8,0xf8,0x74,
0x83,0x85,0xeb,0x7d,0x16,0xae,0xf7,0x99,0x99,0x4a,0xe2,0x68,0xc5,0x44,0xce,0x65,
0xdf,0x4e,0xc3,0xd4,0x16,0xc3,0xb5,0x9a,0x4c,0xb4,0x87,0xea,0xf1,0xba,0xcc,0x56,
0xf,0x95,0xfd,0xa5,0x6a,0xb5,0x2a,0x9b,0xe0,0xc2,0x13,0xaf,0x1d,0xc7,0xcb,0xbe,
0xf4,0xcc,0x6f,0xf3,0xea,0xb9,0xb2,0xc1,0x33,0x9a,0x20,0x12,0x3e,0xab,0x36,0x79,
0xee,0x77,0x5b,0xf9,0xfd,0xfe,0x31,0xe6,0xa6,0x93,0x7c,0x74,0xaa,0xce,0xb6,0x2d,
0x86,0x51,0x24,0x88,0x8,0xd3,0x5b,0xd,0xd9,0x94,0x51,0x17,0x97,0xe2,0xf1,0x61,
0x20,0x66,0x9a,0x73,0x9f,0x96,0xcb,0xe5,0xd0,0xd9,0x70,0x7b,0xf6,0xa0,0x72,0x12,
0xc7,0x1f,0xdb,0x95,0x4b,0x1e,0x2a,0x19,0xb4,0x86,0x20,0xb4,0x7c,0xfd,0xbf,0xe,
0x4f,0x95,0xf3,0x14,0xc6,0x3d,0xb4,0x52,0x24,0x3c,0x4d,0x14,0xb,0xa3,0x50,0x8,
0x42,0xcb,0x30,0x14,0x82,0x48,0xd8,0x9a,0xd1,0xf4,0x2,0x97,0xc5,0xd5,0x70,0x66,
0x35,0xde,0x31,0x3f,0xc5,0xb7,0xd7,0xdc,0xd2,0x6b,0x67,0xc,0x22,0x2f,0x66,0xd2,
0xc9,0x5c,0x69,0x97,0x47,0x6c,0x2d,0xad,0x9e,0x70,0x63,0x65,0xc8,0x93,0x7b,0x73,
0xcc,0x4c,0x25,0x37,0x67,0x50,0x6b,0x86,0xb4,0x7a,0xf7,0x5,0x80,0xd8,0xa,0xbb,
0xb,0x31,0xff,0xbd,0x92,0xc8,0x36,0xea,0x99,0xe7,0x6b,0xe1,0xcc,0x57,0x2e,0x30,
0x9,0x1c,0xc8,0xe5,0xc6,0x74,0x3e,0x19,0xd1,0xee,0x69,0x9a,0xdd,0x88,0xd2,0x5c,
0x86,0xb9,0xed,0xfe,0xc6,0xc0,0x44,0xb8,0x55,0xf,0x38,0x7b,0xb9,0x4b,0x10,0xc9,
0xff,0x81,0xb1,0xb0,0xd4,0x88,0x39,0xbf,0x9c,0xa7,0x3d,0x48,0xd1,0x21,0xa3,0x2d,
0xcd,0x3d,0x6d,0x55,0x2c,0xba,0x40,0x1,0xa5,0x8b,0x13,0x59,0xc5,0x20,0xb0,0xc,
0x2,0xcb,0xde,0xd9,0x14,0xe5,0xb9,0xcc,0x3d,0x8e,0xe0,0xe4,0xd7,0xeb,0xf,0xcc,
0xfb,0x98,0xf,0x57,0xd6,0xee,0xfc,0xca,0x75,0x41,0x39,0x5,0x1c,0xaf,0xe8,0x2,
0x29,0x74,0x22,0x9d,0x32,0x21,0xcd,0x9e,0x65,0xff,0x6c,0x8a,0xc7,0xe7,0xb2,0x3f,
0x68,0x76,0x1d,0xc5,0x91,0xa7,0xb7,0x3d,0x10,0xdc,0x1d,0xa,0x4b,0x7d,0xf8,0xfc,
0x2,0x28,0xa5,0x40,0x27,0x7c,0x65,0xc9,0xba,0x77,0x5,0xed,0xa1,0x61,0xa5,0x25,
0xa4,0x92,0x6,0xe3,0x2a,0x7e,0x69,0x65,0x92,0x8a,0x9d,0x93,0xa0,0xd4,0x9d,0x90,
0x3,0xa,0xab,0x35,0xc8,0x0,0x3b,0xea,0xaf,0xf4,0x7c,0xae,0xb5,0x72,0xfc,0xeb,
0x1b,0x87,0x76,0x5f,0x7e,0x31,0x78,0xa5,0x5,0x5f,0x5c,0xda,0x0,0x2b,0x4,0xe2,
0xe1,0x50,0x49,0x34,0x72,0x11,0xbb,0xc,0xdc,0x6c,0xf5,0xed,0x6c,0xac,0x7c,0xce,
0x2e,0xc2,0xdf,0xff,0x21,0xbc,0xf9,0x2,0x6c,0xcb,0x6f,0x38,0x1f,0x4,0x70,0xec,
0x7d,0x58,0x5c,0xbb,0x1f,0x1c,0xb,0x84,0x31,0x18,0xd,0xdd,0xc1,0x8,0x24,0xae,
0x69,0xdb,0x5b,0xd6,0xc6,0xb6,0x6b,0xc0,0x3c,0xa3,0x86,0x35,0x8e,0xe0,0x39,0xc2,
0x52,0x5d,0x78,0xfb,0x9f,0x96,0xb5,0xce,0x86,0x73,0xdf,0x83,0x37,0xe,0xc3,0x23,
0x63,0xd0,0x1d,0x6d,0xbc,0x51,0x64,0xb1,0x36,0x46,0x49,0x4c,0xd2,0x8d,0xf1,0xdc,
0x18,0x15,0xd4,0xad,0xcb,0xf0,0x72,0x5e,0x6e,0xdc,0x76,0x6e,0x55,0xdf,0x8f,0xa7,
0x4b,0x7f,0xeb,0x9,0xf2,0x97,0xb1,0xb4,0xeb,0x8f,0x67,0x2c,0x19,0x13,0x32,0x1c,
0x86,0x5c,0x5a,0x8a,0x78,0x6c,0xd6,0xc5,0xf7,0x14,0x5b,0xd2,0xf0,0xa7,0xdf,0x58,
0xbe,0xbc,0xd8,0x65,0x4b,0x32,0x60,0x2c,0x19,0x90,0xf5,0x42,0xb2,0x5e,0x48,0xda,
0x84,0x4,0xc3,0x1e,0x9d,0xf5,0xd5,0xae,0x1f,0xde,0x38,0xb1,0xdd,0x59,0x98,0x77,
0x0,0x9e,0x2d,0xe9,0xa5,0xef,0xd8,0x3f,0xab,0x24,0x2a,0x17,0x27,0x5d,0x72,0x89,
0x88,0xb4,0x17,0x11,0x85,0x21,0x8b,0xb5,0x90,0xb9,0x69,0xf,0x3f,0xa1,0x49,0x18,
0xc5,0xe9,0x85,0x26,0x69,0x2f,0x24,0xe3,0x6d,0x68,0xd2,0x26,0xc2,0x55,0x21,0x37,
0x6f,0xd7,0x19,0xf5,0xd6,0x3f,0xd9,0xa7,0x3e,0x7e,0xf,0xa8,0x39,0x0,0xd5,0x6a,
0x55,0x7e,0x55,0x7a,0xe5,0xea,0x28,0xe4,0xd7,0xd6,0xc6,0x3b,0xb7,0x8f,0x3b,0x2a,
0x95,0x50,0x24,0x8c,0x30,0xc,0x62,0x16,0x6b,0x23,0x76,0x15,0x12,0x7c,0xfe,0x4d,
0x87,0x46,0x27,0x20,0xe9,0x9,0x9,0x23,0x24,0x5c,0x41,0x11,0x72,0x79,0xb1,0x6d,
0xeb,0x8d,0xd6,0x99,0xf1,0xf8,0xc2,0x89,0xbc,0xfa,0xee,0x2,0xd0,0xd9,0x5c,0x42,
0xcf,0x94,0x4c,0xbd,0x2e,0xc5,0x33,0xad,0x81,0xbb,0xa7,0xdd,0x8f,0x66,0xb2,0x29,
0xc3,0xd6,0xac,0xbb,0xb9,0x8c,0xce,0x5d,0x19,0x50,0x6f,0x47,0x78,0xae,0xc2,0x73,
0x15,0xc6,0x81,0xb5,0x56,0xc8,0xf9,0xab,0x2d,0x96,0x57,0xdb,0x67,0x26,0xa3,0x73,
0xc7,0x8b,0xba,0xfa,0x1f,0x60,0xad,0x52,0xa9,0xc4,0x9b,0xe0,0x6a,0xb5,0x2a,0x87,
0xca,0xa9,0x46,0x5d,0x66,0xce,0xb5,0x6,0x4e,0x6a,0xb5,0x15,0xce,0x74,0xfa,0x91,
0x97,0x74,0x23,0x95,0xf6,0x5d,0x5c,0xad,0xd1,0xa,0x44,0x62,0xea,0xeb,0x3d,0x16,
0xae,0xf7,0xed,0xa5,0xc5,0x4e,0xb7,0xd9,0x6c,0x7f,0x32,0x1e,0x5f,0x38,0x71,0x7,
0x5a,0xab,0x54,0x2a,0xe1,0x3,0x2f,0xc8,0x91,0x23,0x47,0x34,0x90,0x3e,0xcf,0x5f,
0xff,0x18,0xe9,0xcc,0xf3,0x16,0xb3,0x47,0x6b,0x55,0xc8,0xfa,0x8e,0xf,0xd0,0x19,
0xc4,0x43,0x1b,0xdb,0x9a,0xcb,0xf0,0x72,0x32,0x5e,0xf9,0x74,0xb7,0xfe,0xec,0x34,
0xb0,0x2,0x34,0x1f,0x7a,0x41,0xee,0x81,0x2b,0xc0,0xab,0xc5,0x33,0xf9,0xb6,0x2a,
0x16,0x71,0xbc,0xa2,0x82,0xac,0xc2,0x6a,0x25,0xd1,0x48,0xdb,0xde,0x72,0x5e,0x6e,
0xdc,0x1e,0x73,0xd6,0x1a,0x40,0x7,0x18,0x54,0x2a,0x15,0x7b,0x2f,0xe3,0x7b,0x68,
0xaf,0x52,0xf,0xed,0x68,0xc3,0x1e,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,
0x42,0x60,0x82,
};
static const unsigned char qt_resource_name[] = {
// Image
0x0,0x5,
0x0,0x50,0x37,0xd5,
0x0,0x49,
0x0,0x6d,0x0,0x61,0x0,0x67,0x0,0x65,
// next.png
0x0,0x8,
0xc,0xf7,0x59,0xc7,
0x0,0x6e,
0x0,0x65,0x0,0x78,0x0,0x74,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
// ajouter.png
0x0,0xb,
0xa,0x15,0x7a,0xc7,
0x0,0x61,
0x0,0x6a,0x0,0x6f,0x0,0x75,0x0,0x74,0x0,0x65,0x0,0x72,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
// supprimer.png
0x0,0xd,
0x6,0x4b,0xa7,0x27,
0x0,0x73,
0x0,0x75,0x0,0x70,0x0,0x70,0x0,0x72,0x0,0x69,0x0,0x6d,0x0,0x65,0x0,0x72,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
// previous.png
0x0,0xc,
0x8,0x37,0xcd,0x47,
0x0,0x70,
0x0,0x72,0x0,0x65,0x0,0x76,0x0,0x69,0x0,0x6f,0x0,0x75,0x0,0x73,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
};
static const unsigned char qt_resource_struct[] = {
// :
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
// :/Image
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x2,
// :/Image/supprimer.png
0x0,0x0,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x7,0x1d,
// :/Image/previous.png
0x0,0x0,0x0,0x62,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x8,0xe,
// :/Image/ajouter.png
0x0,0x0,0x0,0x26,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x5,0x23,
// :/Image/next.png
0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
};
QT_BEGIN_NAMESPACE
extern Q_CORE_EXPORT bool qRegisterResourceData
(int, const unsigned char *, const unsigned char *, const unsigned char *);
extern Q_CORE_EXPORT bool qUnregisterResourceData
(int, const unsigned char *, const unsigned char *, const unsigned char *);
QT_END_NAMESPACE
int QT_MANGLE_NAMESPACE(qInitResources_res)()
{
QT_PREPEND_NAMESPACE(qRegisterResourceData)
(0x01, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_res))
int QT_MANGLE_NAMESPACE(qCleanupResources_res)()
{
QT_PREPEND_NAMESPACE(qUnregisterResourceData)
(0x01, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
Q_DESTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qCleanupResources_res))
| [
"[email protected]@703ea0ba-0006-11df-9748-a16e6a44286a"
]
| [
[
[
1,
355
]
]
]
|
72fac2769df98c3223bf236500562eebc2735cde | f486530c25f94b5be53b5511b9ae2b30ac74f9ea | /common/calendar.h | 610732803a49bfaa69e4df464dcd7611ec09112b | []
| no_license | bjlovegithub/CLPIM | d69712cc7d9eabd285d3aa1ea80b7e906a396a3c | aca78fc0c155392618ded3b18bdf628e475db2a8 | refs/heads/master | 2021-01-01T20:05:33.381748 | 2011-02-13T15:28:05 | 2011-02-13T15:28:05 | 1,257,190 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 13,770 | h | /************************************************************
* calendar.h
* Last modified by billjeff, June/28/2008
* CL-PIM
* http://code.google.com/p/clpim/
* This file contains the definition of class Calendar, which
* provides time service to other plugins.
* Revision History:
* June/28/2008 - Finish the code of version 1.
* July/7/2008 - Add SetTimeZone function.
* July/10/2008 - Add TimeAdjust() function, add string Time()
* add string TimeWithoutTimeZone(),
************************************************************/
#ifndef _CALENDAR_H_
#define _CALENDAR_H_
#include <ctime>
#include <string>
#include <iostream>
#include <sstream>
using namespace std ;
namespace CLPIM
{
class Calendar
{
private:
int year, month, day ;
// 0: Sunday, 1: Monday, 2: Tuesday, ...
int week ;
string weekStr[7] ;
int hour, minute, second ;
// d: d = PreTimeZone-NewTimeZone.
int timeZone, d ;
//bool timeZoneChanged ;
protected:
bool IsLeapYear( int year )
{
if ( (year%4 == 0 && year%100 != 0) || (year%400 == 0))
return true ;
return false ;
}
// Adjust week variable according to w.
void AdjustWeek( int w )
{
week += w ;
if ( week < 0 ) week += 7 ;
if ( week >= 7 ) week %= 7 ;
return ;
}
void TimeAdjust()
{
// TimeZone is not changed.
if ( d == 0 ) return ;
bool leapYear = IsLeapYear(year) ;
hour += d ;
if ( hour >= 24 )
{
if ( month == 2 )
{
if ( (leapYear && day == 29) || (!leapYear && day == 28) )
{
day = 1 ;
month = 3 ;
}
else
day++ ;
hour -= 24 ;
}
else
{
if ( month <= 7 )
{
if ( month%2 == 1 ) // 31 days
{
if ( day == 31 )
{
day = 1 ;
++month ;
}
else
++day ;
}
else // 30 days
{
if ( day == 30 )
{
day = 1 ;
++month ;
}
else
++day ;
}
hour -= 24 ;
} // month <= 7
else // month > 7
{
if ( month%2 == 0 ) // 31 days
{
if ( day == 31 )
{
day = 1 ;
++month ;
}
else
++day ;
} // 31 days
else // 30 days
{
if ( day == 30 )
{
++month ;
day = 1 ;
}
else
++day ;
} // 30 days
hour -= 24 ;
if ( month == 13 )
{
++year ;
month = 1 ;
}
} // month > 7
}
++week ;
week %= 7 ;
}
else if ( hour < 0 )
{
hour += 24 ;
--day ;
if ( day == 0 )
{
--month ;
if ( month == 0 )
{
--year ;
month = 12 ;
if ( year <= 0 )
cout << "Ooooops, year is less than zero. Orz" << endl ;
}
if ( month == 2 )
{
if ( leapYear ) day = 29 ;
else day = 28 ;
} // month == 3
else if ( month <= 7 )
{
if ( month%2 == 1 ) day = 31 ;
else day = 30 ;
} // month <= 7
else
{
if ( month%2 == 1 ) day = 30 ;
else day = 31 ;
} // month > 7
} // day == 0
--week ;
week = (week < 0 ? week+7 : week) ;
} // hour < 0
d = 0 ;
}
public:
void UpdateTime()
{
time_t t ;
time(&t) ;
tm *p = gmtime(&t) ;
year = 1900+p->tm_year ;
month = 1+p->tm_mon ;
day = p->tm_mday ;
week = p->tm_wday ;
hour = p->tm_hour ;
if ( timeZone != 0 )
{
d = timeZone ;
TimeAdjust() ;
}
minute = p->tm_min ;
second = p->tm_sec ;
}
Calendar()
{
timeZone = 0 ;
d = 0 ;
//timeZoneChanged = false ;
UpdateTime() ;
weekStr[0] = "Sun" ;
weekStr[1] = "Mon" ;
weekStr[2] = "Tue" ;
weekStr[3] = "Wed" ;
weekStr[4] = "Thu" ;
weekStr[5] = "Fri" ;
weekStr[6] = "Sta" ;
}
void SetTimeZone( int z )
{
if ( z < -12 || z > 12 )
{
cerr << "Time Zone value error! Set its value to 0 instead." << endl ;
timeZone = 0 ;
return ;
}
//timeZoneChanged = true ;
d = z-timeZone ;
if ( d == 24 || d == -24 ) return ;
timeZone = z ;
TimeAdjust() ;
}
void SetYear( int y )
{
int s = min( y, year ), e = max( y, year ) ;
int sum = 0 ;
for ( int i = s ; i < e ; ++i ){
if ((month >= 2 && IsLeapYear(i+1))
|| (month < 2 && IsLeapYear(i)))
sum += 366 ;
else
sum += 365 ;
}
sum %= 7 ;
if ( y > year ){
week += sum ;
week %= 7 ;
}
else {
week -= sum ;
if ( week < 0 ) week += 7 ;
}
year = y ;
}
void SetMonth( int m )
{
if ( m <= 0 || m > 12 ){
cout << "Oooops, month cannot be: " << m
<< ". Set it to 1(Jan) instead." << endl ;
month = 1 ;
return ;
}
// update week.
{
int s = min( m, month ), e = max( m, month ) ;
int sum = 0 ;
for ( int i = s ; i < e ; ++i ){
if ( i == 2 ){ // febrary
if ( IsLeapYear(year) )
sum += 29 ;
else
sum += 28 ;
}
else if ( i <= 7 ){
if ( i%2 == 0 ) sum += 30 ;
else sum += 31 ;
}
else {
if ( i%2 == 0 ) sum += 31 ;
else sum += 30 ;
}
}
sum %= 7 ;
if ( m > month ) {
week += sum ;
week %= 7 ;
}
else {
week -= sum ;
if ( week < 0 ) week += 7 ;
}
}
month = m ;
}
void SetDay( int d )
{
int min, max ;
min = 0 ;
if ( month == 2 ){
if ( IsLeapYear(year) ) max = 29 ;
else max = 28 ;
}
else if ( month < 8 ){
if ( month % 2 == 1 ) max = 31 ;
else max = 30 ;
}
else {
if ( month % 2 == 0 ) max = 31 ;
else max = 30 ;
}
if ( d <= min || d > max ){
cout << "Oooops day cannot be: " << d
<< ". Set it to 1 instead." << endl ;
week = week-(day-d) ;
if ( week < 0 ) week += 7 ;
day = 1 ;
return ;
}
week += (d-day)%7 ;
if ( week < 0 ) week += 7 ;
day = d ;
}
void SetWeek( int w )
{
if ( w < 0 || w >= 7 ){
cout << "Oooops, week cannot be: " << w
<< ". Set it to 1(Monday) instead." << endl ;
week = 1 ;
cout << "Notes: 0 for Sunday, 1 for Monday, and so on." << endl ;
return ;
}
week = w ;
}
void SetHour( int h )
{
if ( h < 0 || h > 24 ){
cout << "Oooops hour cannot be: " << h
<< ". Set it to 0 instead." << endl ;
hour = 0 ;
return ;
}
hour = h ;
}
void SetMinute( int m )
{
if ( m < 0 || m > 60 ){
cout << "Oooops minute cannot be: " << m
<< ". Set it to 0 instead." << endl ;
minute = 0 ;
return ;
}
minute = m ;
}
void SetSecond( int s )
{
if ( s < 0 || s > 60 ){
cout << "Oooops second cannot be: " << s
<< ". Set it to 0 instead." << endl ;
second = 0 ;
return ;
}
second = s ;
}
// For the parameter of Get*** like functions, if it is true, then
// call UpdateTime() before return the value or print the reuslt.
int GetYear(bool f)
{
if ( f ) UpdateTime() ;
return year ;
}
int GetMonth(bool f)
{
if ( f ) UpdateTime() ;
return month ;
}
int GetDay(bool f)
{
if ( f ) UpdateTime() ;
return day ;
}
string GetWeek(bool f)
{
if ( f ) UpdateTime() ;
if ( week >= 0 && week < 7 )
return weekStr[week] ;
cerr << "Week error in Calendar! Please check the value of week! Return Mon "
<< "instead!" << endl ;
return weekStr[0] ;
}
int GetHour(bool f)
{
if ( f ) UpdateTime() ;
return hour ;
}
int GetMinute(bool f)
{
if ( f ) UpdateTime() ;
return minute ;
}
int GetSecond(bool f)
{
if ( f ) UpdateTime() ;
return second ;
}
// f: if f is true, then call updatetime() first.
void Print(bool f)
{
if ( f ) UpdateTime() ;
cout << year << "-" << day << "-" << month << ", " ;
cout << weekStr[week] << ", " << hour << ":" << minute << ":" << second ;
cout << ", GMT " << (timeZone >= 0 ? "+" : "") << timeZone ;
}
void PrintWithoutTimeZone(bool f)
{
if ( f ) UpdateTime() ;
cout << year << "-" << day << "-" << month << ", " ;
cout << hour << ":" << minute << ":" << second ;
}
// return time - string without timezone
string TimeWithoutTimeZone(bool f)
{
if ( f ) UpdateTime() ;
ostringstream oss ;
oss << year << "-" << day << "-" << month << " " ;
oss << hour << ":" << minute << ":" << second ;
return oss.str() ;
}
string Time(bool f)
{
if ( f ) UpdateTime() ;
ostringstream oss ;
oss << year << "-" << day << "-" << month << ", " ;
oss << weekStr[week] << ", " << hour << ":" << minute << ":" << second ;
oss << ", GMT " << (timeZone >= 0 ? "+" : "") << timeZone ;
return oss.str() ;
}
} ;
}
#endif // _CALENDAR_H_
| [
"[email protected]"
]
| [
[
[
1,
459
]
]
]
|
790e74336def25fc33be5e6c5771e1776cb4407f | 0b66a94448cb545504692eafa3a32f435cdf92fa | /tags/0.6/cbear.berlios.de/windows/message_box.hpp | e925b7eb997ee7802998dd479aeeb680308d8eb4 | [
"MIT"
]
| permissive | BackupTheBerlios/cbear-svn | e6629dfa5175776fbc41510e2f46ff4ff4280f08 | 0109296039b505d71dc215a0b256f73b1a60b3af | refs/heads/master | 2021-03-12T22:51:43.491728 | 2007-09-28T01:13:48 | 2007-09-28T01:13:48 | 40,608,034 | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 8,536 | hpp | /*
The MIT License
Copyright (c) 2005 C Bear (http://cbear.berlios.de)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef CBEAR_BERLIOS_DE_WINDOWS_MESSAGE_BOX_HPP_INCLUDED
#define CBEAR_BERLIOS_DE_WINDOWS_MESSAGE_BOX_HPP_INCLUDED
#include <cbear.berlios.de/windows/base.hpp>
#include <cbear.berlios.de/windows/lpstr.hpp>
#include <cbear.berlios.de/windows/hwnd.hpp>
#include <cbear.berlios.de/policy/main.hpp>
#pragma comment(lib, "user32.lib")
namespace cbear_berlios_de
{
namespace windows
{
class dialog_box_id: public base::initialized<int>
{
public:
typedef base::initialized<int> wrap_type;
enum enumeration_type
{
ok = IDOK,
cancel = IDCANCEL,
abort = IDABORT,
retry = IDRETRY,
ignore = IDIGNORE,
yes = IDYES,
no = IDNO,
close = IDCLOSE,
help = IDHELP,
#if(WINVER >= 0x0500)
tryagain = IDTRYAGAIN,
continue_ = IDCONTINUE,
#endif
};
dialog_box_id() {}
dialog_box_id(enumeration_type X): wrap_type(X) {}
explicit dialog_box_id(value_t X): wrap_type(X) {}
};
class message_box_style: public base::initialized<uint_t>
{
public:
typedef base::initialized<uint_t> wrap_type;
enum enumeration_type
{
// The message box contains three push buttons: Abort, Retry, and Ignore.
abort_retry_ignore = MB_ABORTRETRYIGNORE,
#if(WINVER >= 0x0500)
// Microsoft® Windows® 2000/XP: The message box contains three push buttons:
// Cancel, Try Again, Continue. Use this message box type instead of
// abortretryignore.
cancel_try_continue = MB_CANCELTRYCONTINUE,
#endif
// Windows 95/98/Me, Windows NT® 4.0 and later: Adds a Help button to the
// message box. When the user clicks the Help button or presses F1, the
// system sends a WM_HELP message to the owner.
help = MB_HELP,
// The message box contains one push button: OK. This is the default.
ok = MB_OK,
// The message box contains two push buttons: OK and Cancel.
ok_cancel = MB_OKCANCEL,
// The message box contains two push buttons: Retry and Cancel.
retry_cancel = MB_RETRYCANCEL,
// The message box contains two push buttons: Yes and No.
yes_no = MB_YESNO,
// The message box contains three push buttons: Yes, No, and Cancel.
yes_no_cancel = MB_YESNOCANCEL,
// An exclamation-point icon appears in the message box.
icon_exclamation = MB_ICONEXCLAMATION,
// An exclamation-point icon appears in the message box.
icon_warning = MB_ICONWARNING,
// An icon consisting of a lowercase letter i in a circle appears in the
// message box.
icon_information = MB_ICONINFORMATION,
// An icon consisting of a lowercase letter i in a circle appears in the
// message box.
icon_asterisk = MB_ICONASTERISK,
// A question-mark icon appears in the message box.
icon_question = MB_ICONQUESTION,
// A stop-sign icon appears in the message box.
icon_stop = MB_ICONSTOP,
// A stop-sign icon appears in the message box.
icon_error = MB_ICONERROR,
// A stop-sign icon appears in the message box.
icon_hand = MB_ICONHAND,
// The first button is the default button.
def_button1 = MB_DEFBUTTON1,
// The second button is the default button.
def_button2 = MB_DEFBUTTON2,
// The third button is the default button.
def_button3 = MB_DEFBUTTON3,
// The fourth button is the default button.
def_button4 = MB_DEFBUTTON4,
// The user must respond to the message box before continuing work in the
// window identified by the hWnd parameter. However, the user can move to
// the windows of other threads and work in those windows.
// Depending on the hierarchy of windows in the application, the user may
// be able to move to other windows within the thread. All child windows of
// the parent of the message box are automatically disabled, but popup
// windows are not.
app_modal = MB_APPLMODAL,
// Same as MB_APPLMODAL except that the message box has the WS_EX_TOPMOST
// style. Use system-modal message boxes to notify the user of serious,
// potentially damaging errors that require immediate attention (for
// example, running out of memory). This flag has no effect on the user's
// ability to interact with windows other than those associated with hWnd.
system_modal = MB_SYSTEMMODAL,
// Same as MB_APPLMODAL except that all the top-level windows belonging to
// the current thread are disabled if the hWnd parameter is NULL. Use this
// flag when the calling application or library does not have a window
// handle available but still needs to prevent input to other windows in the
// calling thread without suspending other threads.
task_modal = MB_TASKMODAL,
// - Windows NT/2000/XP: Same as 'service_notification' except that the
// system will display the message box only on the default desktop of the
// interactive window station. For more information, see Window Stations.
// - Windows NT 4.0 and earlier: If the current input desktop is not the
// default desktop, MessageBoxEx fails.
// - Windows 2000/XP: If the current input desktop is not the default desktop,
// 'message_box_ex' does not return until the user switches to the default
// desktop.
// - Windows 95/98/Me: This flag has no effect.
default_desktop_only = MB_DEFAULT_DESKTOP_ONLY,
// The text is right-justified.
right = MB_RIGHT,
// Displays message and caption text using right-to-left reading order on
// Hebrew and Arabic systems.
rtl_reading = MB_RTLREADING,
// The message box becomes the foreground window. Internally, the system
// calls the SetForegroundWindow function for the message box.
set_foreground = MB_SETFOREGROUND,
// The message box is created with the WS_EX_TOPMOST window style.
top_most = MB_TOPMOST,
#ifdef _WIN32_WINNT
// - Windows NT/2000/XP: The caller is a service notifying the user of an
// event. The function displays a message box on the current active desktop,
// even if there is no user logged on to the computer.
// - Terminal Services: If the calling thread has an impersonation token,
// the function directs the message box to the session specified in the
// impersonation token.
// If this flag is set, the hWnd parameter must be NULL. This is so the
// message box can appear on a desktop other than the desktop corresponding
// to the hWnd.
// _WIN32_WINNT
service_notification = MB_SERVICE_NOTIFICATION,
// Windows NT/2000/XP: This value corresponds to the value defined for
// 'service_notification' for Windows NT version 3.51.
// _WIN32_WINNT
service_notification_nt3x = MB_SERVICE_NOTIFICATION_NT3X,
#endif
};
message_box_style() {}
message_box_style(enumeration_type X): wrap_type(X) {}
explicit message_box_style(value_t X): wrap_type(X) {}
};
template<class Char>
dialog_box_id message_box(
const hwnd &Wnd,
const basic_lpstr<const Char> &Text,
const basic_lpstr<const Char> &Caption,
const message_box_style &Type)
{
exception::scope_last_error ScopeLastError;
return dialog_box_id(CBEAR_BERLIOS_DE_WINDOWS_FUNCTION(Char, MessageBoxEx)(
Wnd.get(),
Text.get(),
Caption.get(),
Type.get(),
0));
}
template<class Char>
dialog_box_id message_box(
const basic_lpstr<const Char> &Text,
const basic_lpstr<const Char> &Caption,
const message_box_style &Type)
{
return message_box(hwnd(), Text, Caption, Type);
}
}
}
#endif
| [
"sergey_shandar@e6e9985e-9100-0410-869a-e199dc1b6838"
]
| [
[
[
1,
237
]
]
]
|
6df2cc712a4b3430f8db9ffcf49416babaf6622e | 27d5670a7739a866c3ad97a71c0fc9334f6875f2 | /CPP/Targets/WayFinder/symbian-r6/TrialView.cpp | fb4f6d49217dfe92f39114ab5f9f68406ebdf9b3 | [
"BSD-3-Clause"
]
| permissive | ravustaja/Wayfinder-S60-Navigator | ef506c418b8c2e6498ece6dcae67e583fb8a4a95 | 14d1b729b2cea52f726874687e78f17492949585 | refs/heads/master | 2021-01-16T20:53:37.630909 | 2010-06-28T09:51:10 | 2010-06-28T09:51:10 | null | 0 | 0 | null | null | null | null | ISO-8859-10 | C++ | false | false | 15,191 | cpp | /*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the Vodafone Group Services Ltd nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// INCLUDE FILES
#include <avkon.hrh>
#include <eikmenup.h>
#include <aknviewappui.h>
#include <akntabgrp.h>
#include <aknnavide.h>
#include <aknwaitdialog.h>
#include <msvapi.h>
#include <arch.h>
#include "WayFinderConstants.h"
#include "RouteEnums.h"
#include "TimeOutNotify.h"
/* #include "GuiProt/GuiProtEnums.h" */
#include "WayFinderAppUi.h"
#include "Dialogs.h"
#include "RsgInclude.h"
#include "wficons.mbg"
#include "wayfinder.hrh"
#include "IAPSearchGui_old.h"
#include "GuiProt/ServerEnums.h"
#include "TrialView.h"
#include "TrialContainer.h"
#include "ProgressDlg.h"
/* #include "GuiProt/GuiProtMess.h" */
#include "nav2util.h"
#include "memlog.h"
#include "IniFile.h"
using namespace isab;
enum TTrialMode
{
EShowNothing,
EShowIAPProgressBar,
EShowTrialView,
};
// ================= MEMBER FUNCTIONS =======================
CTrialView::CTrialView(class isab::Log* aLog) :
iMode(EShowNothing),
iLog(aLog),
iAskForIAP(ETrue)
{
}
// ---------------------------------------------------------
// CTrialView::ConstructL(const TRect& aRect)
// EPOC two-phased constructor
// ---------------------------------------------------------
//
void
CTrialView::ConstructL(class CWayFinderAppUi* aWayFinderUI )
{
BaseConstructL( R_WAYFINDER_TRIAL_VIEW );
iWayfinderAppUi = aWayFinderUI;
}
class CTrialView*
CTrialView::NewLC(class CWayFinderAppUi* aUi, class isab::Log* aLog)
{
class CTrialView* self = new (ELeave) CTrialView(aLog);
CleanupStack::PushL(self);
self->ConstructL(aUi);
return self;
}
class CTrialView*
CTrialView::NewL(class CWayFinderAppUi* aUi, class isab::Log* aLog)
{
class CTrialView *self = CTrialView::NewLC(aUi, aLog);
CleanupStack::Pop(self);
return self;
}
// ---------------------------------------------------------
// CTrialView::~CTrialView()
// ?implementation_description
// ---------------------------------------------------------
//
CTrialView::~CTrialView()
{
if ( iContainer ){
AppUi()->RemoveFromViewStack( *this, iContainer );
}
LOGDEL(iContainer);
delete iContainer;
LOGDEL(iTrialMessage);
delete iTrialMessage;
}
void CTrialView::SetReRegisterIsUpgrade(TBool aReRegisterIsUpgrade)
{
iReRegisterIsUpgrade = aReRegisterIsUpgrade;
}
void
CTrialView::ReportProgress(TInt aVal, TInt aMax, HBufC* aName)
{
if (DoShowIAPProgress()) {
if (!iProgressDlg) {
iProgressDlg = CProgressDlg::NewL();
iProgressDlg->SetProgressDlgObserver(this);
iProgressDlg->StartProgressDlgL(R_PROGRESS_DIALOG,
R_WAYFINDER_IAP_SEARCH1_MSG);
}
iProgressDlg->ReportProgress(aVal, aMax, aName);
} else {
if (iProgressDlg) {
delete iProgressDlg;
iProgressDlg = NULL;
}
}
if ( iContainer ){
iContainer->ReportProgress(aVal, aMax);
}
}
void CTrialView::AskForIAP()
{
iAskForIAP = ETrue;
if ( iContainer ) {
iContainer->ReportProgress(0, 100);
}
}
TBool
CTrialView::SearchingForIAP()
{
return iSearchingForIAP;
}
void
CTrialView::SearchingForIAP(TBool aOn)
{
iSearchingForIAP = aOn;
}
void
CTrialView::AskForIAPDone()
{
iAskForIAP = EFalse;
iSearchingForIAP = EFalse;
iMode = EShowTrialView;
delete iProgressDlg;
iProgressDlg = NULL;
if (DoShowTrialView()) {
if (iContainer) {
Cba()->MakeCommandVisible(EAknSoftkeyOptions, ETrue);
Cba()->MakeCommandVisible(EAknSoftkeyExit, ETrue);
iContainer->AskForIAPDone();
}
} else {
StartTrial();
iMode = EShowNothing;
}
}
void
CTrialView::CheckGoToStart()
{
iMode = EShowTrialView;
iSearchingForIAP = EFalse;
iAskForIAP = EFalse;
if (!DoShowTrialView()) {
StartTrial();
}
}
TBool
CTrialView::ShowTrialEntryInTrialView()
{
return iWayfinderAppUi->ShowTrialEntryInTrialView();
}
void
CTrialView::CheckIAP()
{
if ((iWayfinderAppUi->GetIAP() < 0) && iContainer && iAskForIAP) {
/* Checking for working IAP. */
iAskForIAP = EFalse;
/* Show Wayfinder logo. */
if (!iWayfinderAppUi->ShowIAPMenu()) {
iSearchingForIAP = EFalse;
iMode = EShowTrialView;
}
} else if (iWayfinderAppUi->GetIAP() > -1 && iContainer) {
iSearchingForIAP = EFalse;
iAskForIAP = EFalse;
iMode = EShowTrialView;
}
}
TBool
CTrialView::DoShowTrialView()
{
if (iMode == EShowTrialView && iWayfinderAppUi->ShowTrialView()) {
return ETrue;
}
return EFalse;
}
TBool
CTrialView::DoShowIAPProgress()
{
if (iMode == EShowIAPProgressBar) {
return ETrue;
}
return EFalse;
}
void
CTrialView::ReRegisterComplete(isab::GuiProtEnums::WayfinderType type,
TBool verboseErrors)
{
iInProgress = EFalse;
if(type != GuiProtEnums::InvalidWayfinderType){
//all types except invalid will set the type in appui.
iWayfinderAppUi->iIniFile->setWayfinderType(type);
}
ShowReRegisterResult(type, verboseErrors); //show result
switch(type){
case GuiProtEnums::Trial:
break;
case GuiProtEnums::Silver:
/* Regard as already registered. */
iWayfinderAppUi->iIniFile->sendtSilverSms = 1;
iWayfinderAppUi->ForceGotoSplashView();
break;
case GuiProtEnums::Gold:
/* Regard as already registered. */
iWayfinderAppUi->iIniFile->sendtSilverSms = 1;
iWayfinderAppUi->ForceGotoSplashView();
break;
case GuiProtEnums::Iron:
iWayfinderAppUi->ForceGotoSplashView();
break;
case GuiProtEnums::InvalidWayfinderType: //error
break;
}
}
void
CTrialView::ReRegisterFailed()
{
iInProgress=EFalse;
//if(iWaitNote){
// iWaitNote->ProcessFinishedL();
//}
}
void
CTrialView::ShowReRegisterResult(enum GuiProtEnums::WayfinderType aType,
TBool verboseError)
{
TInt header = R_STARTMENU_TRIAL_HEADER;
TInt text = R_STARTMENU_TRIAL_TEXT;
switch(aType){
case GuiProtEnums::Trial:
//already correct
if(!verboseError){
//don't show dialog
header = text = 0;
}
break;
case GuiProtEnums::Silver:
header = R_STARTMENU_SILVER_HEADER;
text = R_STARTMENU_SILVER_TEXT;
break;
case GuiProtEnums::Gold:
header = R_STARTMENU_GOLD_HEADER;
text = R_STARTMENU_GOLD_TEXT;
break;
case GuiProtEnums::Iron:
header = R_STARTMENU_IRON_HEADER;
text = R_STARTMENU_IRON_TEXT;
break;
case GuiProtEnums::InvalidWayfinderType:
header = text = 0;
}
if(header != 0){
WFDialog::ShowScrollingDialogL(header, text, EFalse);
}
}
void
CTrialView::HandleExpireVectorL(const TInt32* data, TInt32 numEntries)
{
TInt formatResource = 0;
TInt32 num = 0;
if((GuiProtEnums::transactionsLeft < numEntries) &&
(data[GuiProtEnums::transactionsLeft] != MAX_INT32)){
formatResource = R_FORMAT_TRIAL_TRANSACTIONSLEFT;
num = data[GuiProtEnums::transactionsLeft];
} else if((GuiProtEnums::transactionDaysLeft < numEntries) &&
(data[GuiProtEnums::transactionDaysLeft] != MAX_INT32)){
formatResource = R_FORMAT_TRIAL_TRANSACTIONDAYSLEFT;
num = data[GuiProtEnums::transactionDaysLeft];
} else if((GuiProtEnums::expireDay < numEntries) &&
(data[GuiProtEnums::expireDay] != MAX_INT32)){
formatResource = R_FORMAT_TRIAL_DAYSLEFT;
num = data[GuiProtEnums::expireDay];
}
if(formatResource != 0){
HBufC* format = iCoeEnv->AllocReadResourceLC(formatResource);
if(!iTrialMessage){
iTrialMessage = HBufC::NewL(64);
}
iTrialMessage->Des().Format(*format, num);
CleanupStack::PopAndDestroy(format);
// TBuf<KBuf64Length> buf;
// iCoeEnv->ReadResource( buf, formatResource );
// iTrialMessage = new (ELeave) TBuf<KBuf64Length>(64);
// iTrialMessage->Format(TRefByValue<const TDesC16>(buf), num);
}
if(iTrialMessage && iContainer){
iContainer->SetTrialMessageL(*iTrialMessage);
}
}
void CTrialView::StartTrial()
{
if (!iSearchingForIAP) {
// #ifndef NAV2_CLIENT_SERIES60_V3
// iWayfinderAppUi->iIniFile->doOnce(0, &IniFile::sendtSilverSms,
// MemFunPtr<CWayFinderAppUi, TBool>(iWayfinderAppUi, &CWayFinderAppUi::CheckSilverSMSQueryL));
// #endif
iWayfinderAppUi->ForceGotoSplashView();
}
}
// ---------------------------------------------------------
// TUid CTrialView::Id()
// ?implementation_description
// ---------------------------------------------------------
//
TUid
CTrialView::Id() const
{
return KTrialViewId;
}
// ---------------------------------------------------------
// CTrialView::HandleCommandL(TInt aCommand)
// ?implementation_description
// ---------------------------------------------------------
//
void
CTrialView::HandleCommandL(TInt aCommand)
{
if(iReRegisterIsUpgrade && aCommand == EWayFinderCmdTrialReRegister){
aCommand = EWayFinderCmdTrialUpgrade;
}
switch ( aCommand ){
case EAknSoftkeyOk:
iEikonEnv->InfoMsg( _L("view1 ok") );
break;
case EAknSoftkeyExit:
if (!iSearchingForIAP) {
AppUi()->HandleCommandL(EAknSoftkeyExit);
}
break;
case EWayFinderCmdTrialOpen:
if (!iSearchingForIAP) {
iContainer->GoToSelection();
}
break;
case EWayFinderCmdTrialRegister:
if (!iSearchingForIAP) {
if (iInProgress) {
WFDialog::ShowScrollingErrorDialogL( R_CONNECT_DIALOG_BUSY );
return;
}
iWayfinderAppUi->ShowUpgradeInfoL( CWayFinderAppUi::EActivate );
}
break;
case EWayFinderCmdTrialReRegister:
if (!iSearchingForIAP) {
if (iInProgress) {
WFDialog::ShowScrollingErrorDialogL( R_CONNECT_DIALOG_BUSY );
return;
}
iWayfinderAppUi->SendSyncParameters();
//iWaitNote = new(ELeave)CAknWaitDialog(reinterpret_cast<CEikDialog**>(&iWaitNote));
//iWaitNote->SetTone(CAknNoteDialog::EConfirmationTone);
iInProgress=ETrue;
//CAknWaitNoteWrapper inherites privately from CBase, so
//it can't be pushed onto the cleanupstack. How do we
//insure that it's properly destroyed?
//iWaitNote->ExecuteLD(R_STARTMENU_WAITNOTE);
//iWaitNote = NULL;
}
break;
case EWayFinderCmdTrialUpgrade:
if(!iSearchingForIAP){
if (iInProgress) {
WFDialog::ShowScrollingErrorDialogL( R_CONNECT_DIALOG_BUSY );
return;
}
iWayfinderAppUi->ShowUpgradeInfoL( CWayFinderAppUi::EUpgrade );
}
break;
case EWayFinderCmdTrialTrial:
StartTrial();
break;
default:
AppUi()->HandleCommandL( aCommand );
break;
}
}
// ---------------------------------------------------------
// CTrialView::HandleClientRectChange()
// ---------------------------------------------------------
//
void
CTrialView::HandleClientRectChange()
{
if ( iContainer ){
iContainer->SetRect( ClientRect() );
}
}
// ---------------------------------------------------------
// CTrialView::DynInitMenuPaneL()
// ---------------------------------------------------------
//
void
CTrialView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
{
AppUi()->DynInitMenuPaneL( aResourceId, aMenuPane );
}
// ---------------------------------------------------------
// CTrialView::DoActivateL(...)
// ?implementation_description
// ---------------------------------------------------------
//
void
CTrialView::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
if( !iWayfinderAppUi->iUrgentShutdown ){
if (iWayfinderAppUi->GetIAP() < 0) {
/* We need to look for a working IAP. */
iMode = EShowIAPProgressBar;
} else {
/* Working IAP, show Trial menu as usual. */
iMode = EShowTrialView;
}
} else {
/* Urgent shutdown. */
iMode = EShowNothing;
}
if (!iContainer){
iContainer = new (ELeave) CTrialContainer(iLog);
LOGNEW(iContainer, CTrialContainer);
iContainer->SetMopParent(this);
iContainer->ConstructL( ClientRect(), this );
if(iTrialMessage){
iContainer->SetTrialMessageL(*iTrialMessage);
}
AppUi()->AddToStackL( *this, iContainer );
iContainer->StartTimer();
}
}
// ---------------------------------------------------------
// CTrialView::HandleCommandL(TInt aCommand)
// ?implementation_description
// ---------------------------------------------------------
//
void
CTrialView::DoDeactivate()
{
iInProgress=EFalse;
//if(iWaitNote){
// iWaitNote->ProcessFinishedL();
//}
if ( iContainer ){
AppUi()->RemoveFromViewStack( *this, iContainer );
}
LOGDEL(iContainer);
delete iContainer;
iContainer = NULL;
}
void CTrialView::ProgressDlgAborted()
{
// XXX could pop up a dialog here that tells
// the user that he canīt abort the search!
}
// End of File
| [
"[email protected]"
]
| [
[
[
1,
519
]
]
]
|
a5bef7d846a328d68d8fc41bb423a765841b5c9c | 96e96a73920734376fd5c90eb8979509a2da25c0 | /BulletPhysics/BulletSoftBody/btSoftBody.h | 3b232d0b99e87cf9343cfef6795cbaa4c7d9c958 | []
| no_license | lianlab/c3de | 9be416cfbf44f106e2393f60a32c1bcd22aa852d | a2a6625549552806562901a9fdc083c2cacc19de | refs/heads/master | 2020-04-29T18:07:16.973449 | 2009-11-15T10:49:36 | 2009-11-15T10:49:36 | 32,124,547 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 27,145 | h | /*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
///btSoftBody implementation by Nathanael Presson
#ifndef _BT_SOFT_BODY_H
#define _BT_SOFT_BODY_H
#include "LinearMath/btAlignedObjectArray.h"
#include "LinearMath/btTransform.h"
#include "LinearMath/btIDebugDraw.h"
#include "BulletDynamics/Dynamics/btRigidBody.h"
#include "BulletCollision/CollisionShapes/btConcaveShape.h"
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
#include "btSparseSDF.h"
#include "BulletCollision/BroadphaseCollision/btDbvt.h"
class btBroadphaseInterface;
class btDispatcher;
/* btSoftBodyWorldInfo */
struct btSoftBodyWorldInfo
{
btScalar air_density;
btScalar water_density;
btScalar water_offset;
btVector3 water_normal;
btBroadphaseInterface* m_broadphase;
btDispatcher* m_dispatcher;
btVector3 m_gravity;
btSparseSdf<3> m_sparsesdf;
};
///The btSoftBody is an class to simulate cloth and volumetric soft bodies.
///There is two-way interaction between btSoftBody and btRigidBody/btCollisionObject.
class btSoftBody : public btCollisionObject
{
public:
btAlignedObjectArray<class btCollisionObject*> m_collisionDisabledObjects;
//
// Enumerations
//
///eAeroModel
struct eAeroModel { enum _ {
V_Point, ///Vertex normals are oriented toward velocity
V_TwoSided, ///Vertex normals are fliped to match velocity
V_OneSided, ///Vertex normals are taken as it is
F_TwoSided, ///Face normals are fliped to match velocity
F_OneSided, ///Face normals are taken as it is
END
};};
///eVSolver : velocities solvers
struct eVSolver { enum _ {
Linear, ///Linear solver
END
};};
///ePSolver : positions solvers
struct ePSolver { enum _ {
Linear, ///Linear solver
Anchors, ///Anchor solver
RContacts, ///Rigid contacts solver
SContacts, ///Soft contacts solver
END
};};
///eSolverPresets
struct eSolverPresets { enum _ {
Positions,
Velocities,
Default = Positions,
END
};};
///eFeature
struct eFeature { enum _ {
None,
Node,
Link,
Face,
END
};};
typedef btAlignedObjectArray<eVSolver::_> tVSolverArray;
typedef btAlignedObjectArray<ePSolver::_> tPSolverArray;
//
// Flags
//
///fCollision
struct fCollision { enum _ {
RVSmask = 0x000f, ///Rigid versus soft mask
SDF_RS = 0x0001, ///SDF based rigid vs soft
CL_RS = 0x0002, ///Cluster vs convex rigid vs soft
SVSmask = 0x00f0, ///Rigid versus soft mask
VF_SS = 0x0010, ///Vertex vs face soft vs soft handling
CL_SS = 0x0020, ///Cluster vs cluster soft vs soft handling
/* presets */
Default = SDF_RS,
END
};};
///fMaterial
struct fMaterial { enum _ {
DebugDraw = 0x0001, /// Enable debug draw
/* presets */
Default = DebugDraw,
END
};};
//
// API Types
//
/* sRayCast */
struct sRayCast
{
btSoftBody* body; /// soft body
eFeature::_ feature; /// feature type
int index; /// feature index
btScalar fraction; /// time of impact fraction (rayorg+(rayto-rayfrom)*fraction)
};
/* ImplicitFn */
struct ImplicitFn
{
virtual btScalar Eval(const btVector3& x)=0;
};
//
// Internal types
//
typedef btAlignedObjectArray<btScalar> tScalarArray;
typedef btAlignedObjectArray<btVector3> tVector3Array;
/* sCti is Softbody contact info */
struct sCti
{
btCollisionObject* m_colObj; /* Rigid body */
btVector3 m_normal; /* Outward normal */
btScalar m_offset; /* Offset from origin */
};
/* sMedium */
struct sMedium
{
btVector3 m_velocity; /* Velocity */
btScalar m_pressure; /* Pressure */
btScalar m_density; /* Density */
};
/* Base type */
struct Element
{
void* m_tag; // User data
Element() : m_tag(0) {}
};
/* Material */
struct Material : Element
{
btScalar m_kLST; // Linear stiffness coefficient [0,1]
btScalar m_kAST; // Area/Angular stiffness coefficient [0,1]
btScalar m_kVST; // Volume stiffness coefficient [0,1]
int m_flags; // Flags
};
/* Feature */
struct Feature : Element
{
Material* m_material; // Material
};
/* Node */
struct Node : Feature
{
btVector3 m_x; // Position
btVector3 m_q; // Previous step position
btVector3 m_v; // Velocity
btVector3 m_f; // Force accumulator
btVector3 m_n; // Normal
btScalar m_im; // 1/mass
btScalar m_area; // Area
btDbvtNode* m_leaf; // Leaf data
int m_battach:1; // Attached
};
/* Link */
struct Link : Feature
{
Node* m_n[2]; // Node pointers
btScalar m_rl; // Rest length
int m_bbending:1; // Bending link
btScalar m_c0; // (ima+imb)*kLST
btScalar m_c1; // rl^2
btScalar m_c2; // |gradient|^2/c0
btVector3 m_c3; // gradient
};
/* Face */
struct Face : Feature
{
Node* m_n[3]; // Node pointers
btVector3 m_normal; // Normal
btScalar m_ra; // Rest area
btDbvtNode* m_leaf; // Leaf data
};
/* RContact */
struct RContact
{
sCti m_cti; // Contact infos
Node* m_node; // Owner node
btMatrix3x3 m_c0; // Impulse matrix
btVector3 m_c1; // Relative anchor
btScalar m_c2; // ima*dt
btScalar m_c3; // Friction
btScalar m_c4; // Hardness
};
/* SContact */
struct SContact
{
Node* m_node; // Node
Face* m_face; // Face
btVector3 m_weights; // Weigths
btVector3 m_normal; // Normal
btScalar m_margin; // Margin
btScalar m_friction; // Friction
btScalar m_cfm[2]; // Constraint force mixing
};
/* Anchor */
struct Anchor
{
Node* m_node; // Node pointer
btVector3 m_local; // Anchor position in body space
btRigidBody* m_body; // Body
btMatrix3x3 m_c0; // Impulse matrix
btVector3 m_c1; // Relative anchor
btScalar m_c2; // ima*dt
};
/* Note */
struct Note : Element
{
const char* m_text; // Text
btVector3 m_offset; // Offset
int m_rank; // Rank
Node* m_nodes[4]; // Nodes
btScalar m_coords[4]; // Coordinates
};
/* Pose */
struct Pose
{
bool m_bvolume; // Is valid
bool m_bframe; // Is frame
btScalar m_volume; // Rest volume
tVector3Array m_pos; // Reference positions
tScalarArray m_wgh; // Weights
btVector3 m_com; // COM
btMatrix3x3 m_rot; // Rotation
btMatrix3x3 m_scl; // Scale
btMatrix3x3 m_aqq; // Base scaling
};
/* Cluster */
struct Cluster
{
btAlignedObjectArray<Node*> m_nodes;
tScalarArray m_masses;
tVector3Array m_framerefs;
btTransform m_framexform;
btScalar m_idmass;
btScalar m_imass;
btMatrix3x3 m_locii;
btMatrix3x3 m_invwi;
btVector3 m_com;
btVector3 m_vimpulses[2];
btVector3 m_dimpulses[2];
int m_nvimpulses;
int m_ndimpulses;
btVector3 m_lv;
btVector3 m_av;
btDbvtNode* m_leaf;
btScalar m_ndamping; /* Node damping */
btScalar m_ldamping; /* Linear damping */
btScalar m_adamping; /* Angular damping */
btScalar m_matching;
bool m_collide;
int m_clusterIndex;
Cluster() : m_leaf(0),m_ndamping(0),m_ldamping(0),m_adamping(0),m_matching(0) {}
};
/* Impulse */
struct Impulse
{
btVector3 m_velocity;
btVector3 m_drift;
int m_asVelocity:1;
int m_asDrift:1;
Impulse() : m_velocity(0,0,0),m_drift(0,0,0),m_asVelocity(0),m_asDrift(0) {}
Impulse operator -() const
{
Impulse i=*this;
i.m_velocity=-i.m_velocity;
i.m_drift=-i.m_drift;
return(i);
}
Impulse operator*(btScalar x) const
{
Impulse i=*this;
i.m_velocity*=x;
i.m_drift*=x;
return(i);
}
};
/* Body */
struct Body
{
Cluster* m_soft;
btRigidBody* m_rigid;
btCollisionObject* m_collisionObject;
Body() : m_soft(0),m_rigid(0),m_collisionObject(0) {}
Body(Cluster* p) : m_soft(p),m_rigid(0),m_collisionObject(0) {}
Body(btCollisionObject* colObj) : m_soft(0),m_collisionObject(colObj)
{
m_rigid = btRigidBody::upcast(m_collisionObject);
}
void activate() const
{
if(m_rigid) m_rigid->activate();
}
const btMatrix3x3& invWorldInertia() const
{
static const btMatrix3x3 iwi(0,0,0,0,0,0,0,0,0);
if(m_rigid) return(m_rigid->getInvInertiaTensorWorld());
if(m_soft) return(m_soft->m_invwi);
return(iwi);
}
btScalar invMass() const
{
if(m_rigid) return(m_rigid->getInvMass());
if(m_soft) return(m_soft->m_imass);
return(0);
}
const btTransform& xform() const
{
static const btTransform identity=btTransform::getIdentity();
if(m_collisionObject) return(m_collisionObject->getInterpolationWorldTransform());
if(m_soft) return(m_soft->m_framexform);
return(identity);
}
btVector3 linearVelocity() const
{
if(m_rigid) return(m_rigid->getLinearVelocity());
if(m_soft) return(m_soft->m_lv);
return(btVector3(0,0,0));
}
btVector3 angularVelocity(const btVector3& rpos) const
{
if(m_rigid) return(btCross(m_rigid->getAngularVelocity(),rpos));
if(m_soft) return(btCross(m_soft->m_av,rpos));
return(btVector3(0,0,0));
}
btVector3 angularVelocity() const
{
if(m_rigid) return(m_rigid->getAngularVelocity());
if(m_soft) return(m_soft->m_av);
return(btVector3(0,0,0));
}
btVector3 velocity(const btVector3& rpos) const
{
return(linearVelocity()+angularVelocity(rpos));
}
void applyVImpulse(const btVector3& impulse,const btVector3& rpos) const
{
if(m_rigid) m_rigid->applyImpulse(impulse,rpos);
if(m_soft) btSoftBody::clusterVImpulse(m_soft,rpos,impulse);
}
void applyDImpulse(const btVector3& impulse,const btVector3& rpos) const
{
if(m_rigid) m_rigid->applyImpulse(impulse,rpos);
if(m_soft) btSoftBody::clusterDImpulse(m_soft,rpos,impulse);
}
void applyImpulse(const Impulse& impulse,const btVector3& rpos) const
{
if(impulse.m_asVelocity) applyVImpulse(impulse.m_velocity,rpos);
if(impulse.m_asDrift) applyDImpulse(impulse.m_drift,rpos);
}
void applyVAImpulse(const btVector3& impulse) const
{
if(m_rigid) m_rigid->applyTorqueImpulse(impulse);
if(m_soft) btSoftBody::clusterVAImpulse(m_soft,impulse);
}
void applyDAImpulse(const btVector3& impulse) const
{
if(m_rigid) m_rigid->applyTorqueImpulse(impulse);
if(m_soft) btSoftBody::clusterDAImpulse(m_soft,impulse);
}
void applyAImpulse(const Impulse& impulse) const
{
if(impulse.m_asVelocity) applyVAImpulse(impulse.m_velocity);
if(impulse.m_asDrift) applyDAImpulse(impulse.m_drift);
}
void applyDCImpulse(const btVector3& impulse) const
{
if(m_rigid) m_rigid->applyCentralImpulse(impulse);
if(m_soft) btSoftBody::clusterDCImpulse(m_soft,impulse);
}
};
/* Joint */
struct Joint
{
struct eType { enum _ {
Linear,
Angular,
Contact
};};
struct Specs
{
Specs() : erp(1),cfm(1),split(1) {}
btScalar erp;
btScalar cfm;
btScalar split;
};
Body m_bodies[2];
btVector3 m_refs[2];
btScalar m_cfm;
btScalar m_erp;
btScalar m_split;
btVector3 m_drift;
btVector3 m_sdrift;
btMatrix3x3 m_massmatrix;
bool m_delete;
virtual ~Joint() {}
Joint() : m_delete(false) {}
virtual void Prepare(btScalar dt,int iterations);
virtual void Solve(btScalar dt,btScalar sor)=0;
virtual void Terminate(btScalar dt)=0;
virtual eType::_ Type() const=0;
};
/* LJoint */
struct LJoint : Joint
{
struct Specs : Joint::Specs
{
btVector3 position;
};
btVector3 m_rpos[2];
void Prepare(btScalar dt,int iterations);
void Solve(btScalar dt,btScalar sor);
void Terminate(btScalar dt);
eType::_ Type() const { return(eType::Linear); }
};
/* AJoint */
struct AJoint : Joint
{
struct IControl
{
virtual void Prepare(AJoint*) {}
virtual btScalar Speed(AJoint*,btScalar current) { return(current); }
static IControl* Default() { static IControl def;return(&def); }
};
struct Specs : Joint::Specs
{
Specs() : icontrol(IControl::Default()) {}
btVector3 axis;
IControl* icontrol;
};
btVector3 m_axis[2];
IControl* m_icontrol;
void Prepare(btScalar dt,int iterations);
void Solve(btScalar dt,btScalar sor);
void Terminate(btScalar dt);
eType::_ Type() const { return(eType::Angular); }
};
/* CJoint */
struct CJoint : Joint
{
int m_life;
int m_maxlife;
btVector3 m_rpos[2];
btVector3 m_normal;
btScalar m_friction;
void Prepare(btScalar dt,int iterations);
void Solve(btScalar dt,btScalar sor);
void Terminate(btScalar dt);
eType::_ Type() const { return(eType::Contact); }
};
/* Config */
struct Config
{
eAeroModel::_ aeromodel; // Aerodynamic model (default: V_Point)
btScalar kVCF; // Velocities correction factor (Baumgarte)
btScalar kDP; // Damping coefficient [0,1]
btScalar kDG; // Drag coefficient [0,+inf]
btScalar kLF; // Lift coefficient [0,+inf]
btScalar kPR; // Pressure coefficient [-inf,+inf]
btScalar kVC; // Volume conversation coefficient [0,+inf]
btScalar kDF; // Dynamic friction coefficient [0,1]
btScalar kMT; // Pose matching coefficient [0,1]
btScalar kCHR; // Rigid contacts hardness [0,1]
btScalar kKHR; // Kinetic contacts hardness [0,1]
btScalar kSHR; // Soft contacts hardness [0,1]
btScalar kAHR; // Anchors hardness [0,1]
btScalar kSRHR_CL; // Soft vs rigid hardness [0,1] (cluster only)
btScalar kSKHR_CL; // Soft vs kinetic hardness [0,1] (cluster only)
btScalar kSSHR_CL; // Soft vs soft hardness [0,1] (cluster only)
btScalar kSR_SPLT_CL; // Soft vs rigid impulse split [0,1] (cluster only)
btScalar kSK_SPLT_CL; // Soft vs rigid impulse split [0,1] (cluster only)
btScalar kSS_SPLT_CL; // Soft vs rigid impulse split [0,1] (cluster only)
btScalar maxvolume; // Maximum volume ratio for pose
btScalar timescale; // Time scale
int viterations; // Velocities solver iterations
int piterations; // Positions solver iterations
int diterations; // Drift solver iterations
int citerations; // Cluster solver iterations
int collisions; // Collisions flags
tVSolverArray m_vsequence; // Velocity solvers sequence
tPSolverArray m_psequence; // Position solvers sequence
tPSolverArray m_dsequence; // Drift solvers sequence
};
/* SolverState */
struct SolverState
{
btScalar sdt; // dt*timescale
btScalar isdt; // 1/sdt
btScalar velmrg; // velocity margin
btScalar radmrg; // radial margin
btScalar updmrg; // Update margin
};
/// RayFromToCaster takes a ray from, ray to (instead of direction!)
struct RayFromToCaster : btDbvt::ICollide
{
btVector3 m_rayFrom;
btVector3 m_rayTo;
btVector3 m_rayNormalizedDirection;
btScalar m_mint;
Face* m_face;
int m_tests;
RayFromToCaster(const btVector3& rayFrom,const btVector3& rayTo,btScalar mxt);
void Process(const btDbvtNode* leaf);
static inline btScalar rayFromToTriangle(const btVector3& rayFrom,
const btVector3& rayTo,
const btVector3& rayNormalizedDirection,
const btVector3& a,
const btVector3& b,
const btVector3& c,
btScalar maxt=SIMD_INFINITY);
};
//
// Typedef's
//
typedef void (*psolver_t)(btSoftBody*,btScalar,btScalar);
typedef void (*vsolver_t)(btSoftBody*,btScalar);
typedef btAlignedObjectArray<Cluster*> tClusterArray;
typedef btAlignedObjectArray<Note> tNoteArray;
typedef btAlignedObjectArray<Node> tNodeArray;
typedef btAlignedObjectArray<btDbvtNode*> tLeafArray;
typedef btAlignedObjectArray<Link> tLinkArray;
typedef btAlignedObjectArray<Face> tFaceArray;
typedef btAlignedObjectArray<Anchor> tAnchorArray;
typedef btAlignedObjectArray<RContact> tRContactArray;
typedef btAlignedObjectArray<SContact> tSContactArray;
typedef btAlignedObjectArray<Material*> tMaterialArray;
typedef btAlignedObjectArray<Joint*> tJointArray;
typedef btAlignedObjectArray<btSoftBody*> tSoftBodyArray;
//
// Fields
//
Config m_cfg; // Configuration
SolverState m_sst; // Solver state
Pose m_pose; // Pose
void* m_tag; // User data
btSoftBodyWorldInfo* m_worldInfo; // World info
tNoteArray m_notes; // Notes
tNodeArray m_nodes; // Nodes
tLinkArray m_links; // Links
tFaceArray m_faces; // Faces
tAnchorArray m_anchors; // Anchors
tRContactArray m_rcontacts; // Rigid contacts
tSContactArray m_scontacts; // Soft contacts
tJointArray m_joints; // Joints
tMaterialArray m_materials; // Materials
btScalar m_timeacc; // Time accumulator
btVector3 m_bounds[2]; // Spatial bounds
bool m_bUpdateRtCst; // Update runtime constants
btDbvt m_ndbvt; // Nodes tree
btDbvt m_fdbvt; // Faces tree
btDbvt m_cdbvt; // Clusters tree
tClusterArray m_clusters; // Clusters
btAlignedObjectArray<bool>m_clusterConnectivity;//cluster connectivity, for self-collision
btTransform m_initialWorldTransform;
//
// Api
//
/* ctor */
btSoftBody( btSoftBodyWorldInfo* worldInfo,int node_count,
const btVector3* x,
const btScalar* m);
/* dtor */
virtual ~btSoftBody();
/* Check for existing link */
btAlignedObjectArray<int> m_userIndexMapping;
btSoftBodyWorldInfo* getWorldInfo()
{
return m_worldInfo;
}
///@todo: avoid internal softbody shape hack and move collision code to collision library
virtual void setCollisionShape(btCollisionShape* collisionShape)
{
}
bool checkLink( int node0,
int node1) const;
bool checkLink( const Node* node0,
const Node* node1) const;
/* Check for existring face */
bool checkFace( int node0,
int node1,
int node2) const;
/* Append material */
Material* appendMaterial();
/* Append note */
void appendNote( const char* text,
const btVector3& o,
const btVector4& c=btVector4(1,0,0,0),
Node* n0=0,
Node* n1=0,
Node* n2=0,
Node* n3=0);
void appendNote( const char* text,
const btVector3& o,
Node* feature);
void appendNote( const char* text,
const btVector3& o,
Link* feature);
void appendNote( const char* text,
const btVector3& o,
Face* feature);
/* Append node */
void appendNode( const btVector3& x,btScalar m);
/* Append link */
void appendLink(int model=-1,Material* mat=0);
void appendLink( int node0,
int node1,
Material* mat=0,
bool bcheckexist=false);
void appendLink( Node* node0,
Node* node1,
Material* mat=0,
bool bcheckexist=false);
/* Append face */
void appendFace(int model=-1,Material* mat=0);
void appendFace( int node0,
int node1,
int node2,
Material* mat=0);
/* Append anchor */
void appendAnchor( int node,
btRigidBody* body, bool disableCollisionBetweenLinkedBodies=false);
/* Append linear joint */
void appendLinearJoint(const LJoint::Specs& specs,Cluster* body0,Body body1);
void appendLinearJoint(const LJoint::Specs& specs,Body body=Body());
void appendLinearJoint(const LJoint::Specs& specs,btSoftBody* body);
/* Append linear joint */
void appendAngularJoint(const AJoint::Specs& specs,Cluster* body0,Body body1);
void appendAngularJoint(const AJoint::Specs& specs,Body body=Body());
void appendAngularJoint(const AJoint::Specs& specs,btSoftBody* body);
/* Add force (or gravity) to the entire body */
void addForce( const btVector3& force);
/* Add force (or gravity) to a node of the body */
void addForce( const btVector3& force,
int node);
/* Add velocity to the entire body */
void addVelocity( const btVector3& velocity);
/* Set velocity for the entire body */
void setVelocity( const btVector3& velocity);
/* Add velocity to a node of the body */
void addVelocity( const btVector3& velocity,
int node);
/* Set mass */
void setMass( int node,
btScalar mass);
/* Get mass */
btScalar getMass( int node) const;
/* Get total mass */
btScalar getTotalMass() const;
/* Set total mass (weighted by previous masses) */
void setTotalMass( btScalar mass,
bool fromfaces=false);
/* Set total density */
void setTotalDensity(btScalar density);
/* Transform */
void transform( const btTransform& trs);
/* Translate */
void translate( const btVector3& trs);
/* Rotate */
void rotate( const btQuaternion& rot);
/* Scale */
void scale( const btVector3& scl);
/* Set current state as pose */
void setPose( bool bvolume,
bool bframe);
/* Return the volume */
btScalar getVolume() const;
/* Cluster count */
int clusterCount() const;
/* Cluster center of mass */
static btVector3 clusterCom(const Cluster* cluster);
btVector3 clusterCom(int cluster) const;
/* Cluster velocity at rpos */
static btVector3 clusterVelocity(const Cluster* cluster,const btVector3& rpos);
/* Cluster impulse */
static void clusterVImpulse(Cluster* cluster,const btVector3& rpos,const btVector3& impulse);
static void clusterDImpulse(Cluster* cluster,const btVector3& rpos,const btVector3& impulse);
static void clusterImpulse(Cluster* cluster,const btVector3& rpos,const Impulse& impulse);
static void clusterVAImpulse(Cluster* cluster,const btVector3& impulse);
static void clusterDAImpulse(Cluster* cluster,const btVector3& impulse);
static void clusterAImpulse(Cluster* cluster,const Impulse& impulse);
static void clusterDCImpulse(Cluster* cluster,const btVector3& impulse);
/* Generate bending constraints based on distance in the adjency graph */
int generateBendingConstraints( int distance,
Material* mat=0);
/* Randomize constraints to reduce solver bias */
void randomizeConstraints();
/* Release clusters */
void releaseCluster(int index);
void releaseClusters();
/* Generate clusters (K-mean) */
int generateClusters(int k,int maxiterations=8192);
/* Refine */
void refine(ImplicitFn* ifn,btScalar accurary,bool cut);
/* CutLink */
bool cutLink(int node0,int node1,btScalar position);
bool cutLink(const Node* node0,const Node* node1,btScalar position);
///Ray casting using rayFrom and rayTo in worldspace, (not direction!)
bool rayTest(const btVector3& rayFrom,
const btVector3& rayTo,
sRayCast& results);
/* Solver presets */
void setSolver(eSolverPresets::_ preset);
/* predictMotion */
void predictMotion(btScalar dt);
/* solveConstraints */
void solveConstraints();
/* staticSolve */
void staticSolve(int iterations);
/* solveCommonConstraints */
static void solveCommonConstraints(btSoftBody** bodies,int count,int iterations);
/* solveClusters */
static void solveClusters(const btAlignedObjectArray<btSoftBody*>& bodies);
/* integrateMotion */
void integrateMotion();
/* defaultCollisionHandlers */
void defaultCollisionHandler(btCollisionObject* pco);
void defaultCollisionHandler(btSoftBody* psb);
//
// Cast
//
static const btSoftBody* upcast(const btCollisionObject* colObj)
{
if (colObj->getInternalType()==CO_SOFT_BODY)
return (const btSoftBody*)colObj;
return 0;
}
static btSoftBody* upcast(btCollisionObject* colObj)
{
if (colObj->getInternalType()==CO_SOFT_BODY)
return (btSoftBody*)colObj;
return 0;
}
//
// ::btCollisionObject
//
virtual void getAabb(btVector3& aabbMin,btVector3& aabbMax) const
{
aabbMin = m_bounds[0];
aabbMax = m_bounds[1];
}
//
// Private
//
void pointersToIndices();
void indicesToPointers(const int* map=0);
int rayTest(const btVector3& rayFrom,const btVector3& rayTo,
btScalar& mint,eFeature::_& feature,int& index,bool bcountonly) const;
void initializeFaceTree();
btVector3 evaluateCom() const;
bool checkContact(btCollisionObject* colObj,const btVector3& x,btScalar margin,btSoftBody::sCti& cti) const;
void updateNormals();
void updateBounds();
void updatePose();
void updateConstants();
void initializeClusters();
void updateClusters();
void cleanupClusters();
void prepareClusters(int iterations);
void solveClusters(btScalar sor);
void applyClusters(bool drift);
void dampClusters();
void applyForces();
static void PSolve_Anchors(btSoftBody* psb,btScalar kst,btScalar ti);
static void PSolve_RContacts(btSoftBody* psb,btScalar kst,btScalar ti);
static void PSolve_SContacts(btSoftBody* psb,btScalar,btScalar ti);
static void PSolve_Links(btSoftBody* psb,btScalar kst,btScalar ti);
static void VSolve_Links(btSoftBody* psb,btScalar kst);
static psolver_t getSolver(ePSolver::_ solver);
static vsolver_t getSolver(eVSolver::_ solver);
};
#endif //_BT_SOFT_BODY_H
| [
"caiocsabino@7e2be596-0d54-0410-9f9d-cf4183935158"
]
| [
[
[
1,
848
]
]
]
|
0249a4978982e449d2d352000ac73e2c238b98be | 60365cfb5278ec1dfcc07a5b3e07f3c9d680fa2a | /xlview/CachedImage.cpp | 7ab9369a23f16bd0c8636ab8fee93d9cfe9530f4 | []
| no_license | cyberscorpio/xlview | 6c01e96dbf225cfbc2be1cc15a8b70c61976eb46 | a4b5088ce049695de2ed7ed191162e6034326381 | refs/heads/master | 2021-01-01T16:34:47.787022 | 2011-04-28T13:34:25 | 2011-04-28T13:34:25 | 38,444,399 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,716 | cpp | #include <assert.h>
#include "libxl/include/fs.h"
#include "libxl/include/utilities.h"
#include "ImageConfig.h"
#include "CachedImage.h"
#include "ImageManager.h"
CCachedImage::CCachedImage (const xl::tstring &fileName)
: m_fileName(fileName)
, m_szImage(-1, -1)
{
assert(xl::file_exists(m_fileName));
}
CCachedImage::~CCachedImage () {
}
bool CCachedImage::loadSuitable (CSize szView, xl::ILongTimeRunCallback *pCallback) {
assert(szView.cx >= MIN_ZOOM_WIDTH);
assert(szView.cy >= MIN_ZOOM_HEIGHT);
xl::CScopeLock lock(this);
if (m_suitableImage != NULL) {
return true;
}
CImagePtr thumbnailImage = m_thumbnailImage;
lock.unlock();
// below is lock free
CSize szImage;
CImageLoader *pLoader = CImageLoader::getInstance();
CImagePtr image = pLoader->loadSuitable(m_fileName, &szImage, szView, pCallback);
if (!image) {
return false;
}
if (thumbnailImage == NULL) {
CSize szThumbnail(THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT);
szThumbnail = CImage::getSuitableSize(szThumbnail, szImage, false);
thumbnailImage = image->resize(szThumbnail.cx, szThumbnail.cy, true, pCallback);
}
// lock again
lock.lock(this);
m_szImage = szImage;
m_suitableImage = image;
m_thumbnailImage = thumbnailImage;
image.reset();
thumbnailImage.reset();
lock.unlock();
return true;
}
bool CCachedImage::loadThumbnail (bool fastOnly, xl::ILongTimeRunCallback *pCancel) {
xl::CScopeLock lock(this);
if (m_thumbnailImage != NULL) {
return true;
}
xl::tstring fileName = m_fileName;
lock.unlock();
// below is lock free
assert(xl::file_exists(fileName)); // TODO
CImageLoader *pLoader = CImageLoader::getInstance();
CSize szImageRS;
CImagePtr image = pLoader->loadThumbnail(fileName, szImageRS, CSize(THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT), fastOnly, pCancel);
if (image == NULL) {
return false;
}
lock.lock(this);
m_thumbnailImage = image;
m_szImage = szImageRS;
image.reset();
lock.unlock();
return true;
}
void CCachedImage::setSuitableImage (CImagePtr image, CSize realSize) {
assert(image != NULL);
xl::CScopeLock lock(this);
if (m_suitableImage == NULL || m_suitableImage->getImageSize() != image->getImageSize()) {
if (m_szImage != CSize(-1, -1)) {
assert(m_szImage == realSize);
}
CImagePtr thumbnail = m_thumbnailImage;
lock.unlock();
if (thumbnail == NULL) {
CSize szThumbnail(THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT);
szThumbnail = CImage::getSuitableSize(szThumbnail, realSize, false);
thumbnail = image->resize(szThumbnail.cx, szThumbnail.cy, true);
}
lock.lock(this);
m_szImage = realSize;
m_suitableImage = image;
if (m_thumbnailImage == NULL) {
m_thumbnailImage = thumbnail;
}
lock.unlock();
}
}
void CCachedImage::clear (bool clearThumbnail) {
lock();
m_suitableImage.reset();
if (clearThumbnail) {
m_thumbnailImage.reset();
m_szImage.cx = -1;
m_szImage.cy = -1;
}
unlock();
}
xl::tstring CCachedImage::getFileName () const {
lock();
xl::tstring fileName = m_fileName;
unlock();
return fileName;
}
CSize CCachedImage::getImageSize () const {
lock();
CSize sz = m_szImage;
unlock();
return sz;
}
CImagePtr CCachedImage::getCachedImage () const {
lock();
CImagePtr image = m_suitableImage;
if (image == NULL) {
image = m_thumbnailImage;
}
unlock();
return image;
}
CImagePtr CCachedImage::getSuitableImage () const {
lock();
CImagePtr image = m_suitableImage;
unlock();
return image;
}
CImagePtr CCachedImage::getThumbnailImage () const {
lock();
CImagePtr image = m_thumbnailImage;
unlock();
return image;
}
| [
"[email protected]"
]
| [
[
[
1,
157
]
]
]
|
fb6e35e15996b52b10f060395e21aa68bbe6ed96 | 21da454a8f032d6ad63ca9460656c1e04440310e | /src/wcpp/wscom/main/wscClassRecord.h | 5c6b79b648af5faa229c5bfd14dd96a8d677e1a4 | []
| no_license | merezhang/wcpp | d9879ffb103513a6b58560102ec565b9dc5855dd | e22eb48ea2dd9eda5cd437960dd95074774b70b0 | refs/heads/master | 2021-01-10T06:29:42.908096 | 2009-08-31T09:20:31 | 2009-08-31T09:20:31 | 46,339,619 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,362 | h | #pragma once
#include "wsiClassRecord.h"
#include <wcpp/lang/wscObject.h>
#define WS_ClassName_OF_wscClassRecord "wcpp.wscom.main.wscClassRecord"
class wscClassRecord : public wscObject , public wsiClassRecord
{
WS_IMPL_QUERY_INTERFACE_BEGIN( wscClassRecord )
WS_IMPL_QUERY_INTERFACE_BODY( wsiClassRecord )
WS_IMPL_QUERY_INTERFACE_END()
public:
static const ws_char * const s_class_name;
private:
const ws_cid m_cid;
ws_safe_ptr<wsiString> m_className;
ws_safe_ptr<wsiString> m_contractId;
ws_safe_ptr<wsiFactory> m_factory;
ws_safe_ptr<wsiFile> m_file;
protected:
wscClassRecord( const ws_cid & cid );
~wscClassRecord(void);
protected:
WS_METHOD( ws_result , GetClassID )(ws_cid & ret);
WS_METHOD( ws_result , GetContractID )(wsiString ** ret);
WS_METHOD( ws_result , GetBinFile )(wsiFile ** ret);
WS_METHOD( ws_result , GetFactory )(wsiFactory ** ret);
WS_METHOD( ws_result , GetClassName )(wsiString ** ret);
WS_METHOD( ws_result , SetBinFile )(wsiFile * aBinFile );
WS_METHOD( ws_result , SetClassName )(wsiString * aClassName );
WS_METHOD( ws_result , SetContractID )(wsiString * aContractID );
WS_METHOD( ws_result , SetFactory )(wsiFactory * aFactory );
};
| [
"xukun0217@98f29a9a-77f1-11de-91f8-ab615253d9e8"
]
| [
[
[
1,
40
]
]
]
|
3ca56c0150b37b69f0a43ff84c74dac51d99a906 | fcdddf0f27e52ece3f594c14fd47d1123f4ac863 | /terralib/src/terralib/kernel/TeProxMatrixConstructionStrategy.h | 7d597191b380e14a4621fb6a4cec412d5d8ff370 | []
| no_license | radtek/terra-printer | 32a2568b1e92cb5a0495c651d7048db6b2bbc8e5 | 959241e52562128d196ccb806b51fda17d7342ae | refs/heads/master | 2020-06-11T01:49:15.043478 | 2011-12-12T13:31:19 | 2011-12-12T13:31:19 | null | 0 | 0 | null | null | null | null | IBM852 | C++ | false | false | 19,799 | h | /************************************************************************************
TerraLib - a library for developing GIS applications.
Copyright 2001-2007 INPE and Tecgraf/PUC-Rio.
This code is part of the TerraLib library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
You should have received a copy of the GNU Lesser General Public
License along with this library.
The authors reassure the license terms regarding the warranties.
They specifically disclaim any warranties, including, but not limited to,
the implied warranties of merchantability and fitness for a particular purpose.
The library provided hereunder is on an "as is" basis, and the authors have no
obligation to provide maintenance, support, updates, enhancements, or modifications.
In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
indirect, special, incidental, or consequential damages arising out of the use
of this library and its documentation.
*************************************************************************************/
/*! \file TeProxMatrixConstructionStrategy.h
\brief This file contains structures and definitions about construction strategies of proximity matrix
*/
#ifndef TeProxMatrixConstructionStrategy_H
#define TeProxMatrixConstructionStrategy_H
#include "TeProxMatrixImplementation.h"
#include "TeSTElementSet.h"
#include "TeNetwork.h"
#include "TeDatabase.h"
#include "TeMultiGeometry.h"
class TeSTEventSet;
TL_DLL bool TeFindObjectCentroid (TeMultiGeometry& mGeom, TeGeomRep rep, TeCoord2D& p);
struct TL_DLL TeProxMatrixConstructionParams
{
public:
//construction parameters
int theme_id1_;
TeGeomRep geom_rep1_;
int theme_id2_;
TeGeomRep geom_rep2_;
TeGPMConstructionStrategy strategy_;
double max_distance_;
int num_neighbours_;
double max_net_distance_;
double max_connection_distance_;
bool calculate_distance_;
//! Empty contructor
TeProxMatrixConstructionParams():
theme_id1_(-1),
geom_rep1_(TeGEOMETRYNONE),
theme_id2_(-1),
geom_rep2_(TeGEOMETRYNONE),
strategy_(TeAdjacencyStrategy),
max_distance_(0.),
num_neighbours_(0),
max_net_distance_(0.),
max_connection_distance_(0.),
calculate_distance_(false)
{ }
//! Constructor
TeProxMatrixConstructionParams(const int& theme1, const TeGeomRep& geomRep1, const TeGPMConstructionStrategy& strType):
theme_id1_(theme1),
geom_rep1_(geomRep1),
theme_id2_(-1),
geom_rep2_(TeGEOMETRYNONE),
strategy_(strType),
max_distance_(0.),
num_neighbours_(0),
max_net_distance_(0.),
max_connection_distance_(0.),
calculate_distance_(false)
{ }
//! Operator ==
bool operator==(const TeProxMatrixConstructionParams& other) const
{
return( (theme_id1_==other.theme_id1_) && (geom_rep1_==other.geom_rep1_) &&
(theme_id2_==other.theme_id2_) && (geom_rep2_==other.geom_rep2_) &&
(strategy_==other.strategy_) && (max_distance_==other.max_distance_) &&
(num_neighbours_==other.num_neighbours_) && (max_net_distance_==other.max_net_distance_) &&
(max_connection_distance_==other.max_connection_distance_) &&
(calculate_distance_==other.calculate_distance_));
}
};
//! A templated class to representate construction strategies of proximity matrix
template<typename T>
class TeProxMatrixConstructionStrategy
{
protected:
//! Set of objetcs used to construct the matrix
T* objects_;
//! Construction paramas
TeProxMatrixConstructionParams params_;
//! Construct
TeProxMatrixConstructionStrategy();
//! Construct
TeProxMatrixConstructionStrategy(T* objects, TeGeomRep geomRep, const TeGPMConstructionStrategy& type=TeAdjacencyStrategy);
//! Copy construct
TeProxMatrixConstructionStrategy(const TeProxMatrixConstructionStrategy& st);
public:
//! Construct the proximity matrix
virtual bool Construct(TeProxMatrixImplementation*)=0;
//! Destructor
virtual ~TeProxMatrixConstructionStrategy()
{}
//! Set the set of objects and its geometry representation
void setSTObjects (T* objects, TeGeomRep geomRep);
//! Get the objects used to construct the matrix
T* objects() { return objects_; }
//! Returns the construction params
TeProxMatrixConstructionParams& constructionParams() { return params_; }
//! Verify if the type of the strategy, the object set and its geometry representation are equal
virtual bool IsEqual (const TeProxMatrixConstructionStrategy<T>& other) const;
};
template<typename T>
TeProxMatrixConstructionStrategy<T>::TeProxMatrixConstructionStrategy() :
objects_(0),
params_(-1, TeGEOMETRYNONE, TeAdjacencyStrategy)
{ }
template<typename T>
TeProxMatrixConstructionStrategy<T>::TeProxMatrixConstructionStrategy(T* objects, TeGeomRep geomRep, const TeGPMConstructionStrategy& type) :
objects_(objects)
{
if(objects->theme())
params_.theme_id1_ = objects->theme()->id();
params_.geom_rep1_ = geomRep;
params_.strategy_ = type;
}
template<typename T>
TeProxMatrixConstructionStrategy<T>::TeProxMatrixConstructionStrategy (const TeProxMatrixConstructionStrategy& st)
{
objects_ = st.objects_;
params_ = st.params_;
}
template<typename T> void
TeProxMatrixConstructionStrategy<T>::setSTObjects (T* objects, TeGeomRep geomRep)
{
objects_ = objects;
if(objects->theme())
params_.theme_id1_ = objects->theme()->id();
params_.geom_rep1_ = geomRep;
}
template<typename T> bool
TeProxMatrixConstructionStrategy<T>::IsEqual (const TeProxMatrixConstructionStrategy<T>& other) const
{
return ((params_==other.params_) &&
((&objects_)==(&other.objects_)));
}
//! A class to implement the local adjacency strategy of proximity matrix
class TL_DLL TeProxMatrixLocalAdjacencyStrategy : public TeProxMatrixConstructionStrategy<TeSTElementSet>
{
public:
//! Constructor
TeProxMatrixLocalAdjacencyStrategy ();
//! Constructor
TeProxMatrixLocalAdjacencyStrategy (TeSTElementSet* objects, TeGeomRep geomRep, bool calcDistance=false);
//! Copy constructor
TeProxMatrixLocalAdjacencyStrategy (TeProxMatrixLocalAdjacencyStrategy& st);
//! Destructor
virtual ~TeProxMatrixLocalAdjacencyStrategy() {}
//! Construct the proximity matrix through local adjacency strategy
virtual bool Construct (TeProxMatrixImplementation* imp);
//! Equal operator
bool operator== (const TeProxMatrixLocalAdjacencyStrategy& rhs) const;
//! Assignment operator
TeProxMatrixLocalAdjacencyStrategy& operator= (const TeProxMatrixLocalAdjacencyStrategy& rhs);
};
//! A class to implement the local distance strategy of proximity matrix
template<typename Set>
class TeProxMatrixLocalDistanceStrategy : public TeProxMatrixConstructionStrategy<Set>
{
public:
//! Constructor
TeProxMatrixLocalDistanceStrategy ();
//! Constructor
TeProxMatrixLocalDistanceStrategy (Set* objects, TeGeomRep geomRep, double max_distance);
//! Copy constructor
TeProxMatrixLocalDistanceStrategy (const TeProxMatrixLocalDistanceStrategy<Set>& st);
//! Destructor
virtual ~TeProxMatrixLocalDistanceStrategy(){}
//! Construct the proximity matrix through local distance strategy
virtual bool Construct (TeProxMatrixImplementation* imp);
//! Equal operator
bool operator== (const TeProxMatrixLocalDistanceStrategy<Set>& s) const;
//! Assignment operator
TeProxMatrixLocalDistanceStrategy<Set>& operator= (const TeProxMatrixLocalDistanceStrategy<Set>& rhs);
};
//! A class to implement the nearest neighbour strategy of proximity matrix
class TL_DLL TeProxMatrixNearestNeighbourStrategy : public TeProxMatrixConstructionStrategy<TeSTEventSet>
{
public:
//! Empty constructor
TeProxMatrixNearestNeighbourStrategy ();
//! Constructor
// The STEventSet must be created with geometries, using kdTree and ordered by object_id
TeProxMatrixNearestNeighbourStrategy (TeSTEventSet* objects, int num_neighbours);
//! Copy constructor
TeProxMatrixNearestNeighbourStrategy (const TeProxMatrixNearestNeighbourStrategy& st);
//! Destructor
virtual ~TeProxMatrixNearestNeighbourStrategy(){}
//! Construct the proximity matrix through local distance strategy
virtual bool Construct (TeProxMatrixImplementation* imp);
//! Equal operator
bool operator== (const TeProxMatrixNearestNeighbourStrategy& s) const;
//! Assignment operator
TeProxMatrixNearestNeighbourStrategy& operator= (const TeProxMatrixNearestNeighbourStrategy& rhs);
};
//! A class to implement the closed network strategy of proximity matrix
class TL_DLL TeProxMatrixClosedNetworkStrategy : public TeProxMatrixConstructionStrategy<TeSTElementSet>
{
private:
TeGraphNetwork* net_;
public:
//! Constructor
TeProxMatrixClosedNetworkStrategy ( TeSTElementSet* objects, TeGeomRep rep, double max_local_distance,
double max_net_distance, double max_connection_distance,
TeGraphNetwork* input_net);
//! Copy constructor
TeProxMatrixClosedNetworkStrategy (const TeProxMatrixClosedNetworkStrategy& rhs);
//! Destructor
virtual ~TeProxMatrixClosedNetworkStrategy()
{
if(net_)
delete (net_);
}
//! Construct the proximity matrix through closed network strategy
virtual bool Construct (TeProxMatrixImplementation* imp);
//! Verify if is equal
virtual bool IsEqual (const TeProxMatrixConstructionStrategy<TeSTElementSet>& other) const;
//! Assignment operator
TeProxMatrixClosedNetworkStrategy& operator= (const TeProxMatrixClosedNetworkStrategy& rhs);
//! Equal operator
bool operator== (const TeProxMatrixClosedNetworkStrategy& other) const;
//! Get the objects used to construct the matrix
TeSTElementSet* objects() { return objects_; }
};
//! A class to implement the open network strategy of proximity matrix (among a set of objetcs)
class TL_DLL TeProxMatrixOpenNetworkStrategy : public TeProxMatrixConstructionStrategy<TeSTElementSet>
{
private:
TeGraphNetwork* net_;
public:
//! Constructor
TeProxMatrixOpenNetworkStrategy ( TeSTElementSet* objects, TeGeomRep rep, double max_local_distance,
double max_net_distance, double max_connetion_distance,
TeGraphNetwork* input_net);
//! Copy constructor
TeProxMatrixOpenNetworkStrategy (const TeProxMatrixOpenNetworkStrategy& rhs);
//! Destructor
virtual ~TeProxMatrixOpenNetworkStrategy()
{
if(net_)
delete (net_);
}
//! Construct the proximity matrix through open network strategy
virtual bool Construct (TeProxMatrixImplementation* imp);
//! Verify if is equal
virtual bool IsEqual (const TeProxMatrixConstructionStrategy<TeSTElementSet>& other) const;
//! Equal operator
bool operator== (const TeProxMatrixOpenNetworkStrategy& other) const;
//! Assignment operator
TeProxMatrixOpenNetworkStrategy& operator= (const TeProxMatrixOpenNetworkStrategy& rhs);
};
//! A class to implement the open network strategy of proximity matrix (relationships among objetc of two differnt sets)
class TL_DLL TeProxMatrixOpenNetworkStrategy2 : public TeProxMatrixConstructionStrategy<TeSTElementSet>
{
private:
TeSTElementSet* objects2_;
TeGraphNetwork* net_;
public:
//! Constructor
TeProxMatrixOpenNetworkStrategy2 ( TeSTElementSet* objects1, TeGeomRep rep1,
TeSTElementSet* objects2, TeGeomRep rep2,
double max_local_distance,
double max_net_distance, double max_connetion_distance,
TeGraphNetwork* input_net);
//! Copy constructor
TeProxMatrixOpenNetworkStrategy2 (const TeProxMatrixOpenNetworkStrategy2& rhs);
//! Destructor
virtual ~TeProxMatrixOpenNetworkStrategy2 ()
{
if(net_)
delete (net_);
}
//! Construct the proximity matrix through open network strategy
virtual bool Construct (TeProxMatrixImplementation* imp);
//! Verify if is equal
virtual bool IsEqual (const TeProxMatrixConstructionStrategy<TeSTElementSet>& other) const;
//! Equal operator
bool operator== (const TeProxMatrixOpenNetworkStrategy2& other) const;
//! Assignment operator
TeProxMatrixOpenNetworkStrategy2& operator= (const TeProxMatrixOpenNetworkStrategy2& rhs);
};
//////////////////////////////////////////////////////////////////////
// TeProxMatrixLocalDistanceStrategy
//////////////////////////////////////////////////////////////////////
template<typename Set>
TeProxMatrixLocalDistanceStrategy<Set>::TeProxMatrixLocalDistanceStrategy ():
TeProxMatrixConstructionStrategy<Set> (0, TeGEOMETRYNONE, TeDistanceStrategy)
{}
template<typename Set>
TeProxMatrixLocalDistanceStrategy<Set>::TeProxMatrixLocalDistanceStrategy (Set* objects, TeGeomRep geomRep, double max_distance):
TeProxMatrixConstructionStrategy<Set>(objects, geomRep, TeDistanceStrategy)
{
TeProxMatrixConstructionStrategy<Set>::params_.max_distance_ = max_distance;
}
template<typename Set>
TeProxMatrixLocalDistanceStrategy<Set>::TeProxMatrixLocalDistanceStrategy (const TeProxMatrixLocalDistanceStrategy<Set>& st):
TeProxMatrixConstructionStrategy<Set>(st)
{}
template<typename Set> bool
TeProxMatrixLocalDistanceStrategy<Set>::Construct(TeProxMatrixImplementation* imp)
{
if (imp == 0)
return false;
// Iterate over all selected objects, selecting their neighbours
TeSTElementSet::iterator itobj1 = TeProxMatrixConstructionStrategy<Set>::objects_->begin();
// ----- progress bar
int step = 0;
if(TeProgress::instance())
TeProgress::instance()->setTotalSteps(TeProxMatrixConstructionStrategy<Set>::objects_->numSTInstance());
// -----
TeProjection* proj = 0;
if(TeProxMatrixConstructionStrategy<Set>::objects_->theme())
proj = TeProxMatrixConstructionStrategy<Set>::objects_->theme()->layer()->projection();
else if(TeProxMatrixConstructionStrategy<Set>::objects_->getLayer())
proj = TeProxMatrixConstructionStrategy<Set>::objects_->getLayer()->projection();
TePrecision::instance().setPrecision(TeGetPrecision(proj));
double max_d = TeProxMatrixConstructionStrategy<Set>::params_.max_distance_;
while ( itobj1 != TeProxMatrixConstructionStrategy<Set>::objects_->end())
{
// Gets the possible objects from RTree in the element set
vector<TeSTInstance*> result;
TeBox b = (*itobj1).getGeometries().getBox();
TeBox bAux(b.x1()-max_d, b.y1()-max_d, b.x2()+max_d, b.y2()+max_d);
TeProxMatrixConstructionStrategy<Set>::objects_->search(bAux, result);
string object_id1 = (*itobj1).getObjectId();
TeCoord2D coord1 = itobj1->getCentroid();
for(unsigned int index =0; index<result.size(); ++index)
{
string object_id2 = result[index]->getObjectId();
if(object_id1==object_id2)
continue;
TeCoord2D coord2 = result[index]->getCentroid();
double dist = TeDistance(coord1, coord2);
if(dist <= max_d)
{
if(!imp->isConnected (object_id1,object_id2))
{
TeProxMatrixAttributes attr;
attr.CentroidDistance (dist);
imp->connectObjects (object_id1, object_id2, attr);
imp->connectObjects (object_id2, object_id1, attr);
}
}
}
if(TeProgress::instance())
{
if (TeProgress::instance()->wasCancelled())
{
TeProgress::instance()->reset();
return false;
}
else
TeProgress::instance()->setProgress(step);
}
++step;
++itobj1;
}
if (TeProgress::instance())
TeProgress::instance()->reset();
return true;
}
template<typename Set> bool
TeProxMatrixLocalDistanceStrategy<Set>::operator== (const TeProxMatrixLocalDistanceStrategy<Set>& s) const
{
return ( TeProxMatrixConstructionStrategy<Set>::IsEqual(s));
}
template<typename Set> TeProxMatrixLocalDistanceStrategy<Set>&
TeProxMatrixLocalDistanceStrategy<Set>::operator= (const TeProxMatrixLocalDistanceStrategy<Set>& rhs)
{
if ( this != &rhs )
{
TeProxMatrixConstructionStrategy<Set>::objects_ = rhs.objects_;
TeProxMatrixConstructionStrategy<Set>::params_ = rhs.params_;
}
return *this;
}
/// SÚrgio Costa e Evaldinolia Moreira
//! A class to implement the local Topology strategy of proximity matrix
class TL_DLL TeProxMatrixLocalTopologyStrategy : public TeProxMatrixConstructionStrategy<TeSTElementSet>
{
private:
TeSTElementSet* objects2_;
TeGeomRep geomRep2_;
int toprel_;
public:
//! Constructor
TeProxMatrixLocalTopologyStrategy ();
//! Constructor
TeProxMatrixLocalTopologyStrategy (TeSTElementSet* objects, TeGeomRep geomRep, TeSTElementSet* objects2, TeGeomRep geomRep2, int toprel= TeINTERSECTS, bool calcDistance=false);
//! Copy constructor
TeProxMatrixLocalTopologyStrategy (TeProxMatrixLocalTopologyStrategy& st);
//! Destructor
virtual ~TeProxMatrixLocalTopologyStrategy() {}
//! Construct the proximity matrix through local adjacency strategy
virtual bool Construct (TeProxMatrixImplementation* imp);
//! Equal operator
bool operator== (const TeProxMatrixLocalTopologyStrategy& rhs) const;
//! Assignment operator
TeProxMatrixLocalTopologyStrategy& operator= (const TeProxMatrixLocalTopologyStrategy& rhs);
};
//! A class to implement the ChooseOne strategy of proximity matrix
class TL_DLL TeProxMatrixChooseOneTopologyStrategy : public TeProxMatrixConstructionStrategy<TeSTElementSet>
{
private:
TeSTElementSet* objects2_;
TeGeomRep geomRep2_;
int toprel_;
public:
//! Constructor
TeProxMatrixChooseOneTopologyStrategy ();
//! Constructor
TeProxMatrixChooseOneTopologyStrategy (TeSTElementSet* objects, TeGeomRep geomRep, TeSTElementSet* objects2, TeGeomRep geomRep2, int toprel= TeINTERSECTS, bool calcDistance=false);
//! Copy constructor
TeProxMatrixChooseOneTopologyStrategy (TeProxMatrixChooseOneTopologyStrategy& st);
//! Destructor
virtual ~TeProxMatrixChooseOneTopologyStrategy() {}
//! Construct the proximity matrix through local adjacency strategy
virtual bool Construct (TeProxMatrixImplementation* imp);
//! Equal operator
bool operator== (const TeProxMatrixChooseOneTopologyStrategy& rhs) const;
//! Assignment operator
TeProxMatrixChooseOneTopologyStrategy& operator= (const TeProxMatrixChooseOneTopologyStrategy& rhs);
};
//! A class to implement the KeepInBoth strategy of proximity matrix
class TL_DLL TeProxMatrixKeepInBothTopologyStrategy : public TeProxMatrixConstructionStrategy<TeSTElementSet>
{
private:
TeSTElementSet* objects2_;
TeGeomRep geomRep2_;
int toprel_;
public:
//! Constructor
TeProxMatrixKeepInBothTopologyStrategy ();
//! Constructor
TeProxMatrixKeepInBothTopologyStrategy (TeSTElementSet* objects, TeGeomRep geomRep, TeSTElementSet* objects2, TeGeomRep geomRep2, int toprel= TeINTERSECTS, bool calcDistance=false);
//! Copy constructor
TeProxMatrixKeepInBothTopologyStrategy (TeProxMatrixKeepInBothTopologyStrategy& st);
//! Destructor
virtual ~TeProxMatrixKeepInBothTopologyStrategy() {}
//! Construct the proximity matrix through local adjacency strategy
virtual bool Construct (TeProxMatrixImplementation* imp);
//! Equal operator
bool operator== (const TeProxMatrixKeepInBothTopologyStrategy& rhs) const;
//! Assignment operator
TeProxMatrixKeepInBothTopologyStrategy& operator= (const TeProxMatrixKeepInBothTopologyStrategy& rhs);
};
#endif
| [
"[email protected]@58180da6-ba8b-8960-36a5-00cc02a3ddec"
]
| [
[
[
1,
589
]
]
]
|
caf93e6ff716fe20c3cf326ccdf012e9272ff062 | 21da454a8f032d6ad63ca9460656c1e04440310e | /src/wcpp/wscom/main/wscMemory.h | 3eb8f24451a4b939ba583806dd582d22f61bdc3d | []
| no_license | merezhang/wcpp | d9879ffb103513a6b58560102ec565b9dc5855dd | e22eb48ea2dd9eda5cd437960dd95074774b70b0 | refs/heads/master | 2021-01-10T06:29:42.908096 | 2009-08-31T09:20:31 | 2009-08-31T09:20:31 | 46,339,619 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 999 | h | #pragma once
#include <wcpp/lang/wscObject.h>
#include <wcpp/wscom/wsiMemory.h>
#define WS_CID_OF_wscMemory \
{ 0x9b99e318, 0x1213, 0x42de, { 0xab, 0x86, 0xa, 0xb8, 0x74, 0x57, 0xe6, 0xa5 } }
// {9B99E318-1213-42de-AB86-0AB87457E6A5}
class wscMemory : public wsiMemory
{
WS_IMPL_QUERY_INTERFACE_BEGIN( wscMemory )
WS_IMPL_QUERY_INTERFACE_BODY( wsiMemory )
WS_IMPL_QUERY_INTERFACE_END()
public:
static const ws_char * const s_class_name;
public:
wscMemory(void);
~wscMemory(void);
protected:
WS_METHOD( void * , Alloc )(ws_int size);
WS_METHOD( void * , Realloc )(void * ptr, ws_int newSize);
WS_METHOD( void , Free )(void * ptr);
WS_METHOD( void , HeapMinimize )(ws_boolean immediate);
WS_METHOD( ws_boolean , IsLowMemory )(void);
void _StartMemoryManager(void);
void _StopMemoryManager(void);
private:
ws_boolean m_started;
ws_boolean m_stopped;
};
| [
"xukun0217@98f29a9a-77f1-11de-91f8-ab615253d9e8"
]
| [
[
[
1,
43
]
]
]
|
d54a7ecbe391d38811010beeeb0565f7f0bf1c75 | ec08c0140c4f315a53222c23911d0f6cb1220521 | /src/Graph.cpp | b01508b225d3bedbd226faadf00152a0f77ae8d7 | []
| no_license | nikolnikon/nonintersecting-segments | 5a39643f8d3a93ef8bf90a1f00910f7c71fe74d7 | 8a309a63c2d51f7f78ae94756dde262c3b32c243 | refs/heads/master | 2021-01-10T06:24:11.404832 | 2009-12-15T22:20:27 | 2009-12-15T22:20:27 | 43,052,489 | 0 | 0 | null | null | null | null | WINDOWS-1251 | C++ | false | false | 10,365 | cpp | #include "Graph.h"
#include <algorithm>
#include <QtGlobal>
//#include "Intersections.h"
//#include "SegmentContainer.h"
//void GraphSpace::BaseNode::addAdjacentNode(const BaseNode *cpAn)
//{
// lstAdjacentNodes.push_back(cpAn);
//}
bool GraphSpace::BaseNode::operator==(const BaseNode &rhs) const
{
if (this->iNumNode == rhs.iNumNode && this->lstAdjacentNodes == rhs.lstAdjacentNodes)
return true;
else
return false;
}
void GraphSpace::BaseNode::adjacentNodes(std::list<int> &rResult) const
{
for (std::list<int>::const_iterator cit = lstAdjacentNodes.begin(); cit != lstAdjacentNodes.end(); ++cit)
rResult.push_back(*cit);
}
//bool GraphSpace::operator<(const BaseEdge &lhs, const BaseEdge &rhs) const
//{
// return lhs.numNode() < rhs.numNode();
//}
void GraphSpace::Graph::addNode(BaseNode *pAn)
{
mapNodes.insert(std::make_pair(pAn->numNode(), pAn));
iNodeCount += 1;
}
void GraphSpace::Graph::addEdge(BaseNode *pAn_1, BaseNode *pAn_2)
{
if (*pAn_1 == *pAn_2)
return;
pAn_1->lstAdjacentNodes.push_back(pAn_2->numNode());
pAn_2->lstAdjacentNodes.push_back(pAn_1->numNode());
iEdgeCount += 1;
}
const GraphSpace::BaseNode* GraphSpace::Graph::node(int numNode) const
{
std::map<int, BaseNode*>::const_iterator cIt = mapNodes.find(numNode);
if (cIt != mapNodes.end())
return cIt->second;
else
return 0;
}
//GraphSpace::BaseNode* GraphSpace::Graph::node(int numNode) const
//{
// return const_cast<BaseNode*>(static_cast<const BaseNode*>(node(numNode));
//}
void GraphSpace::Graph::removeNode(BaseNode *pAn)
{
std::map<int, BaseNode*>::iterator it = mapNodes.find(pAn->numNode());
if (it != mapNodes.end()) {
delete it->second;
mapNodes.erase(it);
iNodeCount -= 1;
}
}
void GraphSpace::Graph::removeEdge(BaseNode *pBn_1, BaseNode *pBn_2)
{
if (*pBn_1 == *pBn_2)
return;
std::list<int>::iterator it = std::find(pBn_1->lstAdjacentNodes.begin(), pBn_1->lstAdjacentNodes.end(), pBn_2->numNode());
if (it == pBn_1->lstAdjacentNodes.end())
return;
else
pBn_1->lstAdjacentNodes.erase(it);
it = std::find(pBn_2->lstAdjacentNodes.begin(), pBn_2->lstAdjacentNodes.end(), pBn_1->numNode());
if (it == pBn_2->lstAdjacentNodes.end())
return;
else
pBn_2->lstAdjacentNodes.erase(it);
}
GraphSpace::Graph::~Graph()
{
for (std::map<int, BaseNode*>::iterator it = mapNodes.begin(); it != mapNodes.end(); ++it)
delete it->second;
}
//void GraphSpace::GraphContainer::addGraphs()
//{
// using SegmentSpace::segments;
// Intersections ints;
//
// ints.findIntersections();
// //std::multimap<const Segment*, const Segment*> mapInts = ints.intersections();
// Graph *pGr = new Graph;
// for (int i = 0; i < segments().segmentCount(); ++i)
// pGr->addNode(new BaseNode(i));
// for (std::multimap<const Segment*, const Segment*>::const_iterator cIt = ints.intersections().begin(); cIt != ints.intersections().end(); ++cIt)
// pGr->addEdge(pGr->node(cIt->first->numSegment()), pGr->node(cIt->second->numSegment()));
// mapGraphs.insert(std::make_pair(0, pGr));
//}
//
//GraphSpace::GraphContainer & GraphSpace::graphs()
//{
// static GraphContainer grContainer;
// return grContainer;
//}
//
//GraphSpace::GraphContainer::~GraphContainer()
//{
// for (std::map<int, Graph* >::iterator it = mapGraphs.begin(); it != mapGraphs.end(); ++it) {
// delete it->second;
// mapGraphs.erase(it);
// }
//}
//GraphSpace::BaseNode::~BaseNode()
//{
// for (std::list<BaseNode*>::iterator it = lstAdjacentNodes.begin(); it != lstAdjacentNodes.end(); ++it) {
// delete *it;
// lstAdjacentNodes.erase(it);
// }
//}
void GraphSpace::BaseNode::printAdjNodes() const
{
for (std::list<int>::const_iterator cIt = lstAdjacentNodes.begin(); cIt != lstAdjacentNodes.end(); ++cIt)
qDebug("%d ", (*cIt));
}
void GraphSpace::MaxIndependentSet::findMaxIndependentSet(const Graph &crGr, std::list<int> &result)
{
int k;
std::list<int> tmpCandidates;
std::list<int> tmpNotCandidates;
std::list<int> adjNodes;
int curNode;
// шаг 1 (Начальная установка)
k = 0;
vecNodeSet.push_back(new NodeSet);
for (int i = 0; i < crGr.nodeCount(); ++i)
vecNodeSet[0]->CandidateNodes.push_back(i);
bool step_5, state = true;
while (/*k >= 0 && ! vecNodeSet[k]->CandidateNodes.empty()*/state) {
// шаг 2 (Прямой шаг) // подумать над условием в большом цикле // подумать над количеством циклов и условиями в них
if ((k + 1) == vecNodeSet.size())
vecNodeSet.push_back(new NodeSet(vecNodeSet[k]->NotCandidateNodes, vecNodeSet[k]->CandidateNodes));
// выбираем вершину Xik из Qk+ и формируем Sk+1
//curNode = vecNodeSet[k]->CandidateNodes.front();
curNode = candidate(k, crGr, adjNodes); // не могу додуматься, но кажется, что candidate нет необходимости вызывать каждый раз на шаге 2
lstIndSet.push_back(curNode);
// получаем список вершин, смежных с вершиной curNode
adjNodes.clear();
crGr.node(curNode)->adjacentNodes(adjNodes);
// формируем множества Qk+1+ и Qk+1-
for (std::list<int>::const_iterator cit = adjNodes.begin(); cit != adjNodes.end(); ++cit) {
vecNodeSet[k + 1]->CandidateNodes.remove_if(std::bind1st(std::equal_to<int>(), *cit));
vecNodeSet[k + 1]->NotCandidateNodes.remove_if(std::bind1st(std::equal_to<int>(), *cit));
}
vecNodeSet[k + 1]->CandidateNodes.remove_if(std::bind1st(std::equal_to<int>(), curNode));
k += 1;
while (/*k != 0 || ! vecNodeSet[k]->CandidateNodes.empty()*/state) {
// шаг 3 (Проверка)
if (returnCondition(k, crGr, adjNodes) || step_5) {
// шаг 5 (Шаг возвращения)
delete vecNodeSet[k];
vecNodeSet.pop_back();
if (k == 0) {
state = false; // в алгоритме этого нет, но мне пришлось вставить, надо разобраться
break;
}
k -= 1;
curNode = lstIndSet.back();
lstIndSet.pop_back();
vecNodeSet[k]->CandidateNodes.remove_if(std::bind1st(std::equal_to<int>(), curNode));
vecNodeSet[k]->NotCandidateNodes.push_back(curNode);
vecNodeSet[k]->NotCandidateNodes.sort();
step_5 = false;
if (k == 0 && vecNodeSet[k]->CandidateNodes.empty())
state = false;
continue; // если не остановим алгоритм, то перейдем к шагу 3
}
else {
// шаг 4
if (vecNodeSet[k]->CandidateNodes.empty() && vecNodeSet[k]->NotCandidateNodes.empty()) {
std::list<int> *maxIndSet = new std::list<int>(lstIndSet);
vecMaxIndSets.push_back(maxIndSet);
if (maxIndSet->size() > vecMaxIndSets[iMaxMaxIndSet]->size()) {
iMaxMaxIndSet = vecMaxIndSets.size() - 1;
}
step_5 = true;
continue; // переходим к шагу 5, это гарантирует step_5 = true
}
if (vecNodeSet[k]->CandidateNodes.empty() && ! vecNodeSet[k]->NotCandidateNodes.empty()) {
step_5 = true;
continue; // переходим к шагу 5, это гарантирует step_5 = true
}
else
break; // переходим к шагу 2
}
}
}
result = *vecMaxIndSets[iMaxMaxIndSet];
}
bool GraphSpace::MaxIndependentSet::returnCondition(int k, const Graph &crGr, std::list<int> &adjNodes) const
{
if (vecNodeSet[k]->NotCandidateNodes.empty())
return false;
if (vecNodeSet[k]->CandidateNodes.empty())
return true;
for (std::list<int>::const_iterator cit_1 = vecNodeSet[k]->NotCandidateNodes.begin(); cit_1 != vecNodeSet[k]->NotCandidateNodes.end(); ++cit_1) {
adjNodes.clear();
crGr.node(*cit_1)->adjacentNodes(adjNodes);
for (std::list<int>::const_iterator cit_2 = adjNodes.begin(); cit_2 != adjNodes.end(); ++cit_2) {
for (std::list<int>::const_iterator cit_3 = vecNodeSet[k]->CandidateNodes.begin(); cit_3 != vecNodeSet[k]->CandidateNodes.end(); ++cit_3) {
if (*cit_3 == *cit_2)
return false;
}
}
}
return true;
}
int GraphSpace::MaxIndependentSet::candidate(int k, const Graph &crGr, std::list<int> &adjNodes) const
{
/*int x;
int count
int min_count;*/
std::list<int> intersec;
std::list<int> min;
for (std::list<int>::const_iterator cit_1 = vecNodeSet[k]->NotCandidateNodes.begin(); cit_1 != vecNodeSet[k]->NotCandidateNodes.end(); ++cit_1) {
adjNodes.clear();
crGr.node(*cit_1)->adjacentNodes(adjNodes);
adjNodes.sort();
intersec.clear();
std::set_intersection(adjNodes.begin(), adjNodes.end(), vecNodeSet[k]->CandidateNodes.begin(), vecNodeSet[k]->CandidateNodes.end(), std::inserter(intersec, intersec.end()));
if (intersec.size() < min.size())
min = intersec;
}
if (min.empty())
return vecNodeSet[k]->CandidateNodes.front();
else
return min.front();
//for (std::list<int>::const_iterator cit_1 = vecNodeSet[k]->NotCandidateNodes.begin(); cit_1 != vecNodeSet[k]->NotCandidateNodes.end(); ++cit_1) {
// adjNodes.clear();
// crGr.node(*cit_1)->adjacentNodes(adjNodes);
// count = adjNodes.size();
// for (std::list<int>::const_iterator cit_2 = adjNodes.begin(); cit_2 != adjNodes.end(); ++cit_2) {
// std::list<int>::const_iterator cit_3 = std::find(vecNodeSet[k]->CandidateNodes.begin(), vecNodeSet[k]->CandidateNodes.end(), *cit_2);
// if (cit_3 != vecNodeSet[k]->CandidateNodes.end()) {
// count += 1;
// }
// /*for (std::list<int>::const_iterator cit_3 = vecNodeSet[k]->CandidateNodes.begin(); cit_3 != vecNodeSet[k]->CandidateNodes.end(); ++cit_3) {
// if (*cit_3 == *cit_2)
// count += 1;
// }*/
// }
// if (count < min_count) {
// min_count = count;
// x = *cit_1;
// }
//}
//return x;
}
GraphSpace::MaxIndependentSet::~MaxIndependentSet()
{
for (std::vector<NodeSet*>::iterator it = vecNodeSet.begin(); it != vecNodeSet.end(); ++it)
delete *it;
for (std::vector<std::list<int>*>::iterator it = vecMaxIndSets.begin(); it != vecMaxIndSets.end(); ++it)
delete *it;
}
| [
"nikolnikon@localhost"
]
| [
[
[
1,
288
]
]
]
|
71ed961961072559f6e5f2a15fee13ab758bd592 | 93eac58e092f4e2a34034b8f14dcf847496d8a94 | /ncl30-cpp/ncl30-generator/src/TextAnchorGenerator.cpp | 63fdf51a82887a07628e23c49e2bd0b9353a2a60 | []
| no_license | lince/ginga-srpp | f8154049c7e287573f10c472944315c1c7e9f378 | 5dce1f7cded43ef8486d2d1a71ab7878c8f120b4 | refs/heads/master | 2020-05-27T07:54:24.324156 | 2011-10-17T13:59:11 | 2011-10-17T13:59:11 | 2,576,332 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,585 | cpp | /******************************************************************************
Este arquivo eh parte da implementacao do ambiente declarativo do middleware
Ginga (Ginga-NCL).
Copyright (C) 2009 UFSCar/Lince, Todos os Direitos Reservados.
Este programa eh software livre; voce pode redistribui-lo e/ou modificah-lo sob
os termos da Licenca Publica Geral GNU versao 2 conforme publicada pela Free
Software Foundation.
Este programa eh distribuido na expectativa de que seja util, porem, SEM
NENHUMA GARANTIA; nem mesmo a garantia implicita de COMERCIABILIDADE OU
ADEQUACAO A UMA FINALIDADE ESPECIFICA. Consulte a Licenca Publica Geral do
GNU versao 2 para mais detalhes.
Voce deve ter recebido uma copia da Licenca Publica Geral do GNU versao 2 junto
com este programa; se nao, escreva para a Free Software Foundation, Inc., no
endereco 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
Para maiores informacoes:
[email protected]
http://www.ncl.org.br
http://www.ginga.org.br
http://lince.dc.ufscar.br
******************************************************************************
This file is part of the declarative environment of middleware Ginga (Ginga-NCL)
Copyright (C) 2009 UFSCar/Lince, Todos os Direitos Reservados.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License version 2 for more
details.
You should have received a copy of the GNU General Public License version 2
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
For further information contact:
[email protected]
http://www.ncl.org.br
http://www.ginga.org.br
http://lince.dc.ufscar.br
*******************************************************************************/
/**
* @file TextAnchorGenerator.cpp
* @author Caio Viel
* @date 29-01-10
*/
#include "../include/generables/TextAnchorGenerator.h"
namespace br {
namespace ufscar {
namespace lince {
namespace ncl {
namespace generator {
string TextAnchorGenerator::generateCode() {
string ret = "<area id=\"" + this->getId() + "\" ";
ret = "text=\"" + this->getText() + "\" ";
ret = "position=\"" + itos(this->getPosition()) + "\" />\n";
return ret;
}
}
}
}
}
}
| [
"[email protected]"
]
| [
[
[
1,
75
]
]
]
|
e901f754f0c306515546468b4837473da05d9e97 | f55665c5faa3d79d0d6fe91fcfeb8daa5adf84d0 | /Depend/MyGUI/Wrappers/MyGUI.Managed/Generate/MyGUI.Managed_MultiListBox.h | a7c6606b31d14f099a1b302cce55e8b94843b34b | []
| no_license | lxinhcn/starworld | 79ed06ca49d4064307ae73156574932d6185dbab | 86eb0fb8bd268994454b0cfe6419ffef3fc0fc80 | refs/heads/master | 2021-01-10T07:43:51.858394 | 2010-09-15T02:38:48 | 2010-09-15T02:38:48 | 47,859,019 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 14,469 | h | /*!
@file
@author Generate utility by Albert Semenov
@date 01/2009
@module
*/
#pragma once
#include "MyGUI.Managed_Widget.h"
namespace MyGUI
{
namespace Managed
{
public ref class MultiListBox : public Widget
{
private:
typedef MyGUI::MultiList ThisType;
public:
MultiListBox() : Widget() { }
internal:
MultiListBox( MyGUI::MultiList* _native ) : Widget(_native) { }
MultiListBox( BaseWidget^ _parent, MyGUI::WidgetStyle _style, const std::string& _skin, const MyGUI::IntCoord& _coord, MyGUI::Align _align, const std::string& _layer, const std::string& _name )
{
CreateWidget(_parent, _style, _skin, _coord, _align, _layer, _name);
}
virtual const std::string& getClassTypeName() override { return ThisType::getClassTypeName(); }
static BaseWidget^ WidgetCreator(BaseWidget^ _parent, MyGUI::WidgetStyle _style, const std::string& _skin, const MyGUI::IntCoord& _coord, MyGUI::Align _align, const std::string& _layer, const std::string& _name)
{
return gcnew MultiListBox(_parent, _style, _skin, _coord, _align, _layer, _name);
}
//InsertPoint
public:
delegate void HandleListChangePosition(
Convert<MyGUI::MultiList *>::Type _sender ,
Convert<size_t>::Type _index );
event HandleListChangePosition^ EventListChangePosition
{
void add(HandleListChangePosition^ _value)
{
mDelegateListChangePosition += _value;
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->eventListChangePosition =
static_cast< MyGUI::delegates::IDelegate2<
MyGUI::MultiList * ,
size_t > *>(
new Delegate2< HandleListChangePosition^ ,
MyGUI::MultiList * ,
size_t >(mDelegateListChangePosition) );
}
void remove(HandleListChangePosition^ _value)
{
mDelegateListChangePosition -= _value;
MMYGUI_CHECK_NATIVE(mNative);
if (mDelegateListChangePosition == nullptr)
static_cast<ThisType*>(mNative)->eventListChangePosition = nullptr;
else
static_cast<ThisType*>(mNative)->eventListChangePosition =
static_cast< MyGUI::delegates::IDelegate2<
MyGUI::MultiList * ,
size_t > *>(
new Delegate2< HandleListChangePosition^ ,
MyGUI::MultiList * ,
size_t >(mDelegateListChangePosition) );
}
}
private:
HandleListChangePosition^ mDelegateListChangePosition;
public:
delegate void HandleListSelectAccept(
Convert<MyGUI::MultiList *>::Type _sender ,
Convert<size_t>::Type _index );
event HandleListSelectAccept^ EventListSelectAccept
{
void add(HandleListSelectAccept^ _value)
{
mDelegateListSelectAccept += _value;
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->eventListSelectAccept =
static_cast< MyGUI::delegates::IDelegate2<
MyGUI::MultiList * ,
size_t > *>(
new Delegate2< HandleListSelectAccept^ ,
MyGUI::MultiList * ,
size_t >(mDelegateListSelectAccept) );
}
void remove(HandleListSelectAccept^ _value)
{
mDelegateListSelectAccept -= _value;
MMYGUI_CHECK_NATIVE(mNative);
if (mDelegateListSelectAccept == nullptr)
static_cast<ThisType*>(mNative)->eventListSelectAccept = nullptr;
else
static_cast<ThisType*>(mNative)->eventListSelectAccept =
static_cast< MyGUI::delegates::IDelegate2<
MyGUI::MultiList * ,
size_t > *>(
new Delegate2< HandleListSelectAccept^ ,
MyGUI::MultiList * ,
size_t >(mDelegateListSelectAccept) );
}
}
private:
HandleListSelectAccept^ mDelegateListSelectAccept;
public:
Convert<MyGUI::Any>::Type GetSubItemDataAt(
Convert<size_t>::Type _column ,
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
ObjectHolder* data = static_cast<ThisType*>(mNative)->getSubItemDataAt< ObjectHolder >(
Convert<size_t>::From(_column) ,
Convert<size_t>::From(_index) , false );
return data ? data->toObject() : nullptr;
}
public:
void ClearSubItemDataAt(
Convert<size_t>::Type _column ,
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->clearSubItemDataAt(
Convert<size_t>::From(_column) ,
Convert<size_t>::From(_index) );
}
public:
void SetSubItemDataAt(
Convert<size_t>::Type _column ,
Convert<size_t>::Type _index ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setSubItemDataAt(
Convert<size_t>::From(_column) ,
Convert<size_t>::From(_index) ,
Convert<MyGUI::Any>::From(_data) );
}
public:
Convert<size_t>::Type FindSubItemWith(
Convert<size_t>::Type _column ,
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To(
static_cast<ThisType*>(mNative)->findSubItemWith(
Convert<size_t>::From(_column) ,
Convert<const MyGUI::UString &>::From(_name) ) );
}
public:
Convert<const MyGUI::UString &>::Type GetSubItemNameAt(
Convert<size_t>::Type _column ,
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<const MyGUI::UString &>::To(
static_cast<ThisType*>(mNative)->getSubItemNameAt(
Convert<size_t>::From(_column) ,
Convert<size_t>::From(_index) ) );
}
public:
void SetSubItemNameAt(
Convert<size_t>::Type _column ,
Convert<size_t>::Type _index ,
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setSubItemNameAt(
Convert<size_t>::From(_column) ,
Convert<size_t>::From(_index) ,
Convert<const MyGUI::UString &>::From(_name) );
}
public:
Convert<MyGUI::Any>::Type GetItemDataAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
ObjectHolder* data = static_cast<ThisType*>(mNative)->getItemDataAt< ObjectHolder >(
Convert<size_t>::From(_index) , false );
return data ? data->toObject() : nullptr;
}
public:
void ClearItemDataAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->clearItemDataAt(
Convert<size_t>::From(_index) );
}
public:
void SetItemDataAt(
Convert<size_t>::Type _index ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setItemDataAt(
Convert<size_t>::From(_index) ,
Convert<MyGUI::Any>::From(_data) );
}
public:
void ClearIndexSelected( )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->clearIndexSelected( );
}
public:
property Convert<size_t>::Type IndexSelected
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getIndexSelected() );
}
void set(Convert<size_t>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setIndexSelected( Convert<size_t>::From(_value) );
}
}
public:
Convert<const MyGUI::UString &>::Type GetItemNameAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<const MyGUI::UString &>::To(
static_cast<ThisType*>(mNative)->getItemNameAt(
Convert<size_t>::From(_index) ) );
}
public:
void SetItemNameAt(
Convert<size_t>::Type _index ,
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setItemNameAt(
Convert<size_t>::From(_index) ,
Convert<const MyGUI::UString &>::From(_name) );
}
public:
void SwapItemsAt(
Convert<size_t>::Type _index1 ,
Convert<size_t>::Type _index2 )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->swapItemsAt(
Convert<size_t>::From(_index1) ,
Convert<size_t>::From(_index2) );
}
public:
void RemoveAllItems( )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->removeAllItems( );
}
public:
void RemoveItemAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->removeItemAt(
Convert<size_t>::From(_index) );
}
public:
void AddItem(
Convert<const MyGUI::UString &>::Type _name ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->addItem(
Convert<const MyGUI::UString &>::From(_name) ,
Convert<MyGUI::Any>::From(_data) );
}
void AddItem(
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->addItem(
Convert<const MyGUI::UString &>::From(_name) );
}
public:
void InsertItemAt(
Convert<size_t>::Type _index ,
Convert<const MyGUI::UString &>::Type _name ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->insertItemAt(
Convert<size_t>::From(_index) ,
Convert<const MyGUI::UString &>::From(_name) ,
Convert<MyGUI::Any>::From(_data) );
}
void InsertItemAt(
Convert<size_t>::Type _index ,
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->insertItemAt(
Convert<size_t>::From(_index) ,
Convert<const MyGUI::UString &>::From(_name) );
}
public:
property Convert<size_t>::Type ItemCount
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getItemCount() );
}
}
public:
Convert<MyGUI::Any>::Type GetColumnDataAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
ObjectHolder* data = static_cast<ThisType*>(mNative)->getColumnDataAt< ObjectHolder >(
Convert<size_t>::From(_index) , false );
return data ? data->toObject() : nullptr;
}
public:
void ClearColumnDataAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->clearColumnDataAt(
Convert<size_t>::From(_index) );
}
public:
void SetColumnDataAt(
Convert<size_t>::Type _index ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setColumnDataAt(
Convert<size_t>::From(_index) ,
Convert<MyGUI::Any>::From(_data) );
}
public:
void SortByColumn(
Convert<size_t>::Type _column ,
Convert<bool>::Type _backward )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->sortByColumn(
Convert<size_t>::From(_column) ,
Convert<bool>::From(_backward) );
}
public:
Convert<int>::Type GetColumnWidthAt(
Convert<size_t>::Type _column )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<int>::To(
static_cast<ThisType*>(mNative)->getColumnWidthAt(
Convert<size_t>::From(_column) ) );
}
public:
Convert<const MyGUI::UString &>::Type GetColumnNameAt(
Convert<size_t>::Type _column )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<const MyGUI::UString &>::To(
static_cast<ThisType*>(mNative)->getColumnNameAt(
Convert<size_t>::From(_column) ) );
}
public:
void SetColumnWidthAt(
Convert<size_t>::Type _column ,
Convert<int>::Type _width )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setColumnWidthAt(
Convert<size_t>::From(_column) ,
Convert<int>::From(_width) );
}
public:
void SetColumnNameAt(
Convert<size_t>::Type _column ,
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setColumnNameAt(
Convert<size_t>::From(_column) ,
Convert<const MyGUI::UString &>::From(_name) );
}
public:
void RemoveAllColumns( )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->removeAllColumns( );
}
public:
void RemoveColumnAt(
Convert<size_t>::Type _column )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->removeColumnAt(
Convert<size_t>::From(_column) );
}
public:
void AddColumn(
Convert<const MyGUI::UString &>::Type _name ,
Convert<int>::Type _width ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->addColumn(
Convert<const MyGUI::UString &>::From(_name) ,
Convert<int>::From(_width) ,
Convert<MyGUI::Any>::From(_data) );
}
void AddColumn(
Convert<const MyGUI::UString &>::Type _name ,
Convert<int>::Type _width )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->addColumn(
Convert<const MyGUI::UString &>::From(_name) ,
Convert<int>::From(_width) );
}
public:
void InsertColumnAt(
Convert<size_t>::Type _column ,
Convert<const MyGUI::UString &>::Type _name ,
Convert<int>::Type _width ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->insertColumnAt(
Convert<size_t>::From(_column) ,
Convert<const MyGUI::UString &>::From(_name) ,
Convert<int>::From(_width) ,
Convert<MyGUI::Any>::From(_data) );
}
void InsertColumnAt(
Convert<size_t>::Type _column ,
Convert<const MyGUI::UString &>::Type _name ,
Convert<int>::Type _width )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->insertColumnAt(
Convert<size_t>::From(_column) ,
Convert<const MyGUI::UString &>::From(_name) ,
Convert<int>::From(_width) );
}
public:
property Convert<size_t>::Type ColumnCount
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getColumnCount() );
}
}
};
} // namespace Managed
} // namespace MyGUI
| [
"albertclass@a94d7126-06ea-11de-b17c-0f1ef23b492c"
]
| [
[
[
1,
582
]
]
]
|
f7b42f210ed87c5e4e858668ea419aa1e52367d3 | 2112057af069a78e75adfd244a3f5b224fbab321 | /branches/refactor/src_root/src/ireon_rs/main.cpp | 9875272b00689d6b4fde0d072d7104e074d5a77f | []
| no_license | blockspacer/ireon | 120bde79e39fb107c961697985a1fe4cb309bd81 | a89fa30b369a0b21661c992da2c4ec1087aac312 | refs/heads/master | 2023-04-15T00:22:02.905112 | 2010-01-07T20:31:07 | 2010-01-07T20:31:07 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,217 | cpp | /**
* @file ireon_rs/main.cpp
* Main project .cpp file
*/
/* Copyright (C) 2005 ireon.org developers council
* $Id: main.cpp 433 2005-12-20 20:19:15Z zak $
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#include "ireon_client/version.h"
#include "stdafx.h"
#include "root_app.h"
#define APPLICATION_CLASS CRootApp
#include "common/os_signal_handlers.h"
#undef APPLICATION_CLASS
int main(int argc, char* argv[])
{
CRootApp app;
app.init();
SET_OS_SIGNAL_HANDLERS;
app.go();
return 0;
}
| [
"[email protected]"
]
| [
[
[
1,
42
]
]
]
|
33bdf5ce3fadb70c35451b652849f0f2e99eb15f | f065febc4f2b6104ef8e844b4fae53add2760d71 | /Pow32/link32/MakeTest.cpp | f32a79823bdd6e28b42c87af1df90d86d53462f1 | []
| no_license | Spirit-of-Oberon/POW | 370bcceb2c93ffef941fd8bcb2f1ed5da4926846 | eaf5d9b1817ba4f51e2b3de4adbfe8d726ea3e9f | refs/heads/master | 2021-01-25T07:40:30.160481 | 2011-12-19T13:52:46 | 2011-12-19T13:52:46 | 3,012,201 | 7 | 6 | null | null | null | null | ISO-8859-1 | C++ | false | false | 167,448 | cpp | #include <afx.h>
/**************************************************************************************************/
/*** W I N 3 2 T e s t ***/
/**************************************************************************************************/
int LinkProgram(LPSTR[], LPSTR[], LPSTR, LPSTR, LPSTR, LPSTR[], WORD, BOOL, BOOL, DWORD, FARPROC, DWORD, DWORD);
int ChooseTestProgram(int sel, FARPROC msg)
{
DWORD basAdr= 0;
char *pObjFilNam[50];
char *pLibFilNam[50];
char *pResFilNam;
char *pszExeFilNam;
char *expFncNam[50];
char *startUpCRTSym;
WORD subSystem= 0x00;
BOOL buildExeFile;
BOOL buildWinNtFile;
BOOL incDebugInf;
BOOL lnkPrg= TRUE;
if (sel > 0)
{
switch (sel)
{
/***************************************************************************/
/***************************************************************************/
/***************** O W N T E S T P R O G R A M S *****************/
/***************************************************************************/
/***************************************************************************/
case 1:
/****************************************************************/
/******************* H A L L O 3 2 . E X E ********************/
/****************************************************************/
pObjFilNam[0]= "f:\\linker32\\test\\ownprog\\hallo32d\\hallo32.obj";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "d:\\msdev\\lib\\libcd.lib";
pLibFilNam[1]= "d:\\msdev\\lib\\kernel32.lib";
pLibFilNam[2]= NULL;
pResFilNam= NULL;
pszExeFilNam= "f:\\linker32\\test\\ownprog\\my_exe\\Hallod32.exe";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000001;
break;
case 2:
/****************************************************************/
/****************** H A L L O 3 2 2 . E X E *******************/
/****************************************************************/
pObjFilNam[0]= "f:\\linker32\\test\\ownprog\\hallo323\\debug\\Hallo32PrintDigit.obj";
pObjFilNam[1]= "f:\\linker32\\test\\ownprog\\hallo323\\debug\\Hallo32PrintText.obj";
pObjFilNam[2]= "f:\\linker32\\test\\ownprog\\hallo323\\debug\\Hallo32Main.obj";
pObjFilNam[3]= NULL;
pLibFilNam[0]= "d:\\msdev\\lib\\libcd.lib";
pLibFilNam[1]= "d:\\msdev\\lib\\kernel32.lib";
pLibFilNam[2]= NULL;
pResFilNam= NULL;
pszExeFilNam= "f:\\linker32\\test\\ownprog\\my_exe\\Hallo323.exe";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000001;
break;
case 3:
/****************************************************************/
/******************* S I M P L E 3 2 . E X E *******************/
/****************************************************************/
pObjFilNam[0]= "f:\\linker32\\simple32\\debug\\simple32.obj";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "d:\\msdev\\lib\\libcd.lib";
pLibFilNam[1]= "d:\\msdev\\lib\\kernel32.lib";
pLibFilNam[2]= NULL;
pResFilNam= NULL;
pszExeFilNam= "f:\\linker32\\test\\ownprog\\my_exe\\Simple32.exe";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000001;
break;
case 4:
/****************************************************************/
/****************** H A L L O 3 2 2 . E X E *******************/
/****************************************************************/
pObjFilNam[0]= "f:\\linker32\\test\\ownprog\\hallo322\\debug\\hallo322.obj";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "d:\\msdev\\lib\\libcd.lib";
pLibFilNam[1]= "d:\\msdev\\lib\\kernel32.lib";
pLibFilNam[2]= NULL;
pResFilNam= NULL;
pszExeFilNam= "f:\\linker32\\test\\ownprog\\my_exe\\Hallo322.exe";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000001;
break;
/***************************************************************************/
/***************************************************************************/
/***************** W I N 3 2 T E S T P R O G R A M S *****************/
/***************************************************************************/
/***************************************************************************/
case 101:
/**************************************************************/
/******************* C D T E S T . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\CDTEST\\CDTEST.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\CDTEST\\COLORS.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\CDTEST\\FIND.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\CDTEST\\FONT.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\CDTEST\\OPEN.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\CDTEST\\PRINT.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\CDTEST\\REPLACE.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\CDTEST\\SAVE.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WIN32\\CDTEST\\TITLE.OBJ";
pObjFilNam[9]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\CDTEST\\CDTEST.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\CDTEST.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 102:
/**************************************************************/
/********************* C O M M . E X E **********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\COMM\\TTY.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\COMM\\TTY.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\TTY.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 103:
/**************************************************************/
/******************* C O N G U I . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\CONGUI\\CONSOLE.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\CONGUI\\GUI.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\CONGUI\\CONGUI.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\CONGUI.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 104:
/**************************************************************/
/****************** C O N S O L E . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\ALOCFREE.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\CODEPAGE.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\CONINFO.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\CONMODE.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\CONSOLE.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\CONTITLE.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\CREATE.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\CURSOR.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\FILLATT.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\FILLCHAR.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\FLUSH.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\GETLRGST.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\GETNUMEV.OBJ";
pObjFilNam[13]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\HANDLER.OBJ";
pObjFilNam[14]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\NUMBUT.OBJ";
pObjFilNam[15]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\READCHAR.OBJ";
pObjFilNam[16]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\READOUT.OBJ";
pObjFilNam[17]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\SCROLL.OBJ";
pObjFilNam[18]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\SIZE.OBJ";
pObjFilNam[19]= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\WRITEIN.OBJ";
pObjFilNam[20]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\CONSOLE\\CONSOLE.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\CONSOLE.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 105:
/**************************************************************/
/******************* C L I E N T . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\CLIENT\\CLINIT.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\CLIENT\\DDE.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\CLIENT\\DDEMLCL.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\CLIENT\\DIALOG.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\CLIENT\\HUGE.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\CLIENT\\INFOCTRL.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\CLIENT\\MEM.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\CLIENT\\TRACK.OBJ";
pObjFilNam[8]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\CLIENT.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 106:
/**************************************************************/
/******************** C L O C K . E X E *********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\CLOCK\\CLOCK.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\CLOCK\\CLOCKRES.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\CLOCK.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 107:
/**************************************************************/
/****************** D D E I N S T . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\DDEINST\\DDEADD.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\DDEINST\\DDEDLG.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\DDEINST\\DDEINST.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\DDEINST\\DDEMAIN.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\DDEINST\\DDEPROCS.OBJ";
pObjFilNam[5]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\DDEINST\\INSTALL.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\DDEINST.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 108:
/**************************************************************/
/******************** D D E M O . E X E *********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\DDEMO\\DDEMO.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\DDEMO.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 109:
/**************************************************************/
/****************** D D E P R O G . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\DDEPROG\\PHTEST.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\DDEPROG\\PROGHELP.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\DDEPROG\\PHTEST.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\PHTEST.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 110:
/**************************************************************/
/******************* S E R V E R . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\SERVER\\DDE.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\SERVER\\DDEMLSV.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\SERVER\\DIALOG.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\SERVER\\HUGE.OBJ";
pObjFilNam[4]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\SERVER.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 111:
/**************************************************************/
/************************* D E B ***************************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\DEB\\DEBDEBUG.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\DEB\\DEBMAIN.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\DEB\\DEBMISC.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\DEB\\LINKLIST.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\DEB\\TOOLBAR.OBJ";
pObjFilNam[5]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\DEB\\DEB.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\DEB.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 112:
/**************************************************************/
/******************* D Y N D L G . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\DYNDLG\\DYNDLG.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\DYNDLG\\DYNDLG.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\DYNDLG.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 113:
/**************************************************************/
/***************** F O N T V I E W . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\FONTVIEW\\FONTVIEW.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\FONTVIEW\\DIALOGS.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\FONTVIEW\\DISPLAY.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\FONTVIEW\\STATUS.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\FONTVIEW\\TOOLS.OBJ";
pObjFilNam[5]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\FONTVIEW\\FONTVIEW.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\FONTVIEW.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 114:
/**************************************************************/
/****************** G E N E R I C . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\GENERIC\\GENERIC.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\VERSION.LIB";
pLibFilNam[12]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\GENERIC\\GENERIC.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\GENERIC.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 115:
/**************************************************************/
/******************* G L O B C L . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\GLOBCL\\ABOUT.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\GLOBCL\\CONNECT.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\GLOBCL\\DISPATCH.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\GLOBCL\\GLOBCL.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\GLOBCL\\INIT.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\GLOBCL\\MISC.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\GLOBCL\\SELECT.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\GLOBCL\\WINMAIN.OBJ";
pObjFilNam[8]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\VERSION.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[13]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\GLOBCL\\GLOBCL.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\GLOBCL.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 116:
/**************************************************************/
/***************** G L O B C H A T . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\GLOBSR\\ABOUT.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\GLOBSR\\DISPATCH.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\GLOBSR\\GLOBCHAT.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\GLOBSR\\INIT.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\GLOBSR\\MISC.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\GLOBSR\\WINMAIN.OBJ";
pObjFilNam[6]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\VERSION.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[13]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\GLOBSR\\GLOBCHAT.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\GLOBCHAT.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 117:
/**************************************************************/
/******************** H O O K S . E X E *********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\HOOKS\\HOOKTEST.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\HOOKS\\HOOKTEST.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\HOOKTEST.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 118:
/**************************************************************/
/****************** I P X C H A T . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\IPXCHAT\\DISPATCH.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\IPXCHAT\\CONNECT.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\IPXCHAT\\ABOUT.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\IPXCHAT\\IPXCHAT.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\IPXCHAT\\INIT.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\IPXCHAT\\LISTEN.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\IPXCHAT\\MISC.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\IPXCHAT\\WINMAIN.OBJ";
pObjFilNam[8]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\VERSION.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[13]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\IPXCHAT\\IPXCHAT.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\IPXCHAT.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 119:
/**************************************************************/
/******************* M A N D E L . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\MANDEL\\JULIA.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\MANDEL\\LOADBMP.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\MANDEL\\SAVEBMP.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\MANDEL\\DIBMP.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\MANDEL\\BNDSCAN.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\MANDEL\\PRINTER.OBJ";
pObjFilNam[6]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\lib\\libc.lib";
pLibFilNam[1]= "D:\\MSDEV\\lib\\kernel32.lib";
pLibFilNam[2]= "D:\\MSDEV\\lib\\user32.lib";
pLibFilNam[3]= "D:\\MSDEV\\lib\\gdi32.lib";
pLibFilNam[4]= "D:\\MSDEV\\lib\\winspool.lib";
pLibFilNam[5]= "D:\\MSDEV\\lib\\comdlg32.lib";
pLibFilNam[6]= "D:\\MSDEV\\lib\\advapi32.lib";
pLibFilNam[7]= "D:\\MSDEV\\lib\\shell32.lib";
pLibFilNam[8]= "D:\\MSDEV\\lib\\ole32.lib";
pLibFilNam[9]= "D:\\MSDEV\\lib\\oleaut32.lib";
pLibFilNam[10]= "D:\\MSDEV\\lib\\uuid.lib";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\MANDEL\\JULIA.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\JULIA.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 120:
/**************************************************************/
/********************* M A P I . E X E **********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\MAPI\\MAPIAPP.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\MAPI\\MAPINIT.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\MAPI\\MAPIAPP.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\MAPIAPP.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 121:
/**************************************************************/
/***************** M A Z E L O R D . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\BITMAP.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\DRAW.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\DRONES.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\INITMAZE.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\MAZE.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\MAZEDLG.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\MAZEWND.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\NETWORK.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\READSGRD.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\SCOREWND.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\TEXTWND.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\TOPWND.OBJ";
pObjFilNam[12]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\WINMM.LIB";
pLibFilNam[12]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\MAZELORD\\MAZE.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\MAZE.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 122:
/**************************************************************/
/******************* M E M O R Y . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\MEMORY\\MEMORY.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\MEMORY\\NMMEMCLI.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\MEMORY\\NMMEMSRV.OBJ";
pObjFilNam[3]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\MEMORY\\MEMORY.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\MEMORY.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 123:
/**************************************************************/
/******************* M F E D I T . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\MFEDIT\\MFEDIT.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\MFEDIT\\MFEDIT.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\MFEDIT.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 124:
/**************************************************************/
/***************** M L T I T H R D . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\MLTITHRD\\MLTITHRD.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\MLTITHRD\\MLTITHRD.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\MLTITHRD.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 125:
/**************************************************************/
/******************** M Y P A L . E X E *********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\MYPAL\\MYPAL.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\MYPAL\\MYPAL.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\MYPAL.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 126:
/**************************************************************/
/****************** N M P I P E . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\NMPIPE\\NMPIPE.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\MSVCRTD.LIB";
pLibFilNam[12]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\NMPIPE.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 127:
/**************************************************************/
/**************** N P C L I E N T . E X E *****************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\NPCLIENT\\CLIENT32.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\NPCLIENT\\CLIENT32.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\CLIENT32.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 128:
/**************************************************************/
/***************** N P S E R V E R . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\NPSERVER\\SERVER32.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\NPSERVER\\SERVER32.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\SERVER32.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 129:
/**************************************************************/
/****************** C O N N E C T . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\CONNECT\\CONNECT.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[12]= "F:\\LINKER32\\TEST\\WIN32\\CONNECT\\TESTLIB.LIB";
pLibFilNam[13]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\CONNECT.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 130:
/**************************************************************/
/******************* D G R E C V . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\DGRECV\\DGRECV.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[12]= "F:\\LINKER32\\TEST\\WIN32\\CONNECT\\TESTLIB.LIB";
pLibFilNam[13]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\DGRECV.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 131:
/**************************************************************/
/******************** B L O C K . E X E *********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\BLOCK\\LISTEN.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[12]= "F:\\LINKER32\\TEST\\WIN32\\CONNECT\\TESTLIB.LIB";
pLibFilNam[13]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\LISTEN.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 132:
/**************************************************************/
/***************** N O N B L O C K . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\NONBLOCK\\LISTEN.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[12]= "F:\\LINKER32\\TEST\\WIN32\\CONNECT\\TESTLIB.LIB";
pLibFilNam[13]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\LISTEN2.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 133:
/**************************************************************/
/********************* P I N G . E X E **********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\PING\\PING.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[12]= "F:\\LINKER32\\TEST\\WIN32\\CONNECT\\TESTLIB.LIB";
pLibFilNam[13]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\PING.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 134:
/**************************************************************/
/****************** T E S T L I B . L I B *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\TESTLIB\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\TESTLIB\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\TESTLIB\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\TESTLIB\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\TESTLIB\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\TESTLIB\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\TESTLIB\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\TESTLIB\\.OBJ";
pObjFilNam[8]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[12]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\TESTLIB.LIB";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 135:
/**************************************************************/
/********************** P D C . E X E ***********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\PDC\\PDC.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\PDC.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 136:
/**************************************************************/
/****************** P R I N T E R . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\PRINTER\\ENUMPRT.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\PRINTER\\GETCAPS.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\PRINTER\\GETPDRIV.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\PRINTER\\PAINT.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\PRINTER\\PRINTER.OBJ";
pObjFilNam[5]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\PRINTER\\PRINTER.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\PRINTER.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 137:
/**************************************************************/
/***************** R A S B E R R Y . E X E *****************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\ABOUT.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\AUTHDLG.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\DIALDLG.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\DISPATCH.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\INIT.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\MISC.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\PHBKDLG.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\RASBERRY.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\RASUTIL.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\STATDLG.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\WINMAIN.OBJ";
pObjFilNam[11]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBCMT.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\COMCTL32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\MFC\\LIB\\NAFXCW.LIB";
pLibFilNam[10]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\RASBERRY\\RASBERRY.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\RASBERRY.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 138:
/**************************************************************/
/******************* M O N K E Y . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\REGISTRY\\MONKEY.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\REGISTRY\\MONKEY.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\MONKEY.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 139:
/**************************************************************/
/******************* S E L E C T . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\SELECT\\DEMO.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\SELECT\\SELECT.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\SELECT\\DEMO.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\DEMO.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 140:
/**************************************************************/
/******************* S I M P L E . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\SIMPLE\\SIMPLE.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\SIMPLE.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 141:
/**************************************************************/
/***************** S P I N C U B E . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 142:
/**************************************************************/
/******************* T E X T F X . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\TEXTFX\\FX.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\TEXTFX\\GUIDE.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\TEXTFX\\TEXTFX.OBJ";
pObjFilNam[3]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\TEXTFX\\TEXTFX.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\TEXTFX.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 143:
/**************************************************************/
/****************** T T F O N T S . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\TTFONTS\\ALLFONT.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\TTFONTS\\DIALOGS.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\TTFONTS\\DISPLAY.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\TTFONTS\\TOOLBAR.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\TTFONTS\\TTFONTS.OBJ";
pObjFilNam[5]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\TTFONTS\\TTFONTS.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\TTFONTS.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 144:
/**************************************************************/
/***************** W D B G E X T S . D L L ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 145:
/**************************************************************/
/***************** W I N C A P 3 2 . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WIN32\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 146:
/**************************************************************/
/******************** W S O C K . E X E *********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN32\\WSOCK\\DIALOGS.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN32\\WSOCK\\WSOCK.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBCMT.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[12]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN32\\WSOCK\\WSOCK.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN32\\MY_EXE\\WSOCK.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
/***************************************************************************/
/***************************************************************************/
/***************** W I N 9 5 T E S T P R O G R A M S *****************/
/***************************************************************************/
/***************************************************************************/
case 201:
/**************************************************************/
/***************** C O M D L G 3 2 . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\COMDLG32\\COMDLG32.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\COMDLG32\\COMDLG32.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\COMDLG32.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 202:
/**************************************************************/
/***************** F I L E V I E W . D L L ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\FILEVIEW\\CSTATHLP.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN95\\FILEVIEW\\CSTRTABL.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN95\\FILEVIEW\\FILEVIEW.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN95\\FILEVIEW\\FVINIT.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN95\\FILEVIEW\\FVPROC.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN95\\FILEVIEW\\FVTEXT.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN95\\FILEVIEW\\IFILEVW.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN95\\FILEVIEW\\IPERFILE.OBJ";
pObjFilNam[8]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\FILEVIEW\\FILEVIEW.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\FILEVIEW.DLL";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 203:
/**************************************************************/
/****************** F P A R S E R . D L L *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\FPARSER\\VS_ASC.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN95\\FPARSER\\VSD_ASC.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\VS_ASC.DLL";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 204:
/**************************************************************/
/******************** H F O R M . E X E *********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\HFORM\\HFORM.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\PENWIN32.LIB";
pLibFilNam[12]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\HFORM\\HFORM.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\HFORM.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 205:
/**************************************************************/
/****************** I C M T E S T . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\ICMTEST\\ICMTEST.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN95\\ICMTEST\\PRINT.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN95\\ICMTEST\\DIB.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN95\\ICMTEST\\DIALOGS.OBJ";
pObjFilNam[4]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\ICMTEST\\ICMTEST.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\ICMTEST.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 206:
/**************************************************************/
/****************** F U L L I M E . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\FULLIME\\CANDUI.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN95\\FULLIME\\GLOBAL.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN95\\FULLIME\\IMEUI.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN95\\FULLIME\\MAIN.OBJ";
pObjFilNam[4]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\IMM32.LIB";
pLibFilNam[12]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\FULLIME\\FULLIME.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\FULLIME.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 207:
/**************************************************************/
/****************** H A L F I M E . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\HALFIME\\MAIN.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\IMM32.LIB";
pLibFilNam[12]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\HALFIME\\HALFIME.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\HALFIME.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 208:
/**************************************************************/
/****************** I M E A P P S . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\IMEAPPS\\COMP.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN95\\IMEAPPS\\DATA.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN95\\IMEAPPS\\IMEAPPS.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN95\\IMEAPPS\\MODE.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN95\\IMEAPPS\\PAINT.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN95\\IMEAPPS\\SETCOMP.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WIN95\\IMEAPPS\\STATUS.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WIN95\\IMEAPPS\\SUBS.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WIN95\\IMEAPPS\\TOOLBAR.OBJ";
pObjFilNam[9]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\IMM32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\COMCTL32.LIB";
pLibFilNam[13]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\IMEAPPS\\IMEAPPS.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\IMEAPPS.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 209:
/**************************************************************/
/******************* I N K P U T . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\INKPUT\\IP.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\PENWIN32.LIB";
pLibFilNam[12]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\INKPUT\\IP.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\IP.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 210:
/**************************************************************/
/***************** S H E L L E X T . D L L ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\SHELLEXT\\COPYHOOK.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WIN95\\SHELLEXT\\CTXMENU.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WIN95\\SHELLEXT\\ICONHDLR.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WIN95\\SHELLEXT\\PROPSHET.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WIN95\\SHELLEXT\\SHELLEXT.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WIN95\\SHELLEXT\\SHEXINTI.OBJ";
pObjFilNam[6]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\SHELLEXT\\SHELLEXT.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\SHELLEXT.DLL";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 211:
/**************************************************************/
/****************** T R A Y N O T . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\TRAYNOT\\APP32.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\TRAYNOT\\APP32.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\APP32.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 212:
/**************************************************************/
/******************* W I Z A R D . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WIN95\\WIZARD\\WIZARD.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\COMCTL32.LIB";
pLibFilNam[12]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WIN95\\WIZARD\\WIZARD.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WIN95\\MY_EXE\\WIZARD.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
/***************************************************************************/
/***************************************************************************/
/***************** W I N N T T E S T P R O G R A M S *****************/
/***************************************************************************/
/***************************************************************************/
case 301:
/**************************************************************/
/******************* C L I E N T . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\CLIENT\\SOCKCLI.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[12]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\CLIENT.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 302:
/**************************************************************/
/******************** F I L E R . E X E *********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\FILER\\FILER.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\FILER\\ENUMDRV.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\FILER\\DRVPROC.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\FILER\\EXPDIR.OBJ";
pObjFilNam[4]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\VERSION.LIB";
pLibFilNam[12]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\FILER\\FILER.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\FILER.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 303:
/**************************************************************/
/******************* F L O P P Y . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\FLOPPY\\MFMT.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\MFMT.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 304:
/**************************************************************/
/******************* N E T A P I . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\NETAPI\\NETSMPLE.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\NETAPI32.LIB";
pLibFilNam[12]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\NETSMPLE.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 305:
/**************************************************************/
/******************* P L G B L T . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\PLGBLT\\PLGBLT.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\PLGBLT\\TRACK.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\PLGBLT\\BITMAP.OBJ";
pObjFilNam[3]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\PLGBLT\\PLGBLT.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\PLGBLT.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 306:
/**************************************************************/
/********************* P O P 3 . E X E **********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\POP3\\POP3SRV.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\POP3\\POP3.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\POP3\\POPFILE.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\POP3\\SERVICE.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WINNT\\POP3\\EVENTS.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WINNT\\POP3\\DEBUG.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WINNT\\POP3\\PARAM.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WINNT\\POP3\\THREADS.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WINNT\\POP3\\SOCKET.OBJ";
pObjFilNam[9]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\RPCRT4.LIB";
pLibFilNam[13]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\POP3\\POP3EVNT.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\POP3SRV.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 307:
/**************************************************************/
/******************* P R P E R F . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\PRPERF\\PRPERF.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\WSOCK32.LIB";
pLibFilNam[11]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\PRPERF.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 308:
/**************************************************************/
/****************** R E G M P A D . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\REGMPAD\\MULTIPAD.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\REGMPAD\\MPINIT.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\REGMPAD\\MPFILE.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\REGMPAD\\MPFIND.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WINNT\\REGMPAD\\MPPRINT.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WINNT\\REGMPAD\\MPOPEN.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WINNT\\REGMPAD\\REGDB.OBJ";
pObjFilNam[7]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\REGMPAD\\MULTIPAD.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\REGMPAD.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 309:
/**************************************************************/
/********************** R N R . E X E ***********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 310:
/**************************************************************/
/****************** S E R V I C E . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 311:
/**************************************************************/
/******************* S I D C L N . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 312:
/**************************************************************/
/****************** S I M P L E X . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 313:
/**************************************************************/
/****************** S O C K E T S . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 314:
/**************************************************************/
/****************** T A L E O W N . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 315:
/**************************************************************/
/****************** U N B U F C P Y . E X E *****************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
case 316:
/**************************************************************/
/******************* W X F O R M . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\WINNT\\\\.OBJ";
pObjFilNam[13]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\WINNT\\\\.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\WINNT\\MY_EXE\\.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= TRUE;
incDebugInf= 0x00000000;
break;
/***************************************************************************/
/***************************************************************************/
/*************** C R O S S D E V T E S T P R O G R A M S **************/
/***************************************************************************/
/***************************************************************************/
case 401:
/**************************************************************/
/***************** A D M N D E M O . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\HEADERS.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\MENU.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\ERRCHECK.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\ADMNDEMO.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\INI.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\STANDARD.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\INFO.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\EXECUTE.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\DIALOGS.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\RESULTS.OBJ";
pObjFilNam[10]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\ADMNDEMO\\ADMNDEMO.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\ADMNDEMO.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 402:
/**************************************************************/
/****************** C P P D E M O . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\CPPDEMO\\CPPDEMO.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\CPPDEMO\\CODBC.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\CROSSDEV\\CPPDEMO\\HEADERS.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\CROSSDEV\\CPPDEMO\\DIALOGS.OBJ";
pObjFilNam[4]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\CPPDEMO\\CPPDEMO.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\CPPDEMO.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 403:
/**************************************************************/
/***************** C R S R D E M O . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\CRSRDEMO\\HEADERS.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\CRSRDEMO\\DIALOGS.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\CROSSDEV\\CRSRDEMO\\CHILD.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\CROSSDEV\\CRSRDEMO\\FRAME.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\CROSSDEV\\CRSRDEMO\\CRSRDEMO.OBJ";
pObjFilNam[5]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\CRSRDEMO\\CRSRDEMO.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\CRSRDEMO.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 404:
/**************************************************************/
/****************** G D I D E M O . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\BOUNCE.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\DIALOG.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\DRAW.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\GDIDEMO.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\INIT.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\MAZE.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\POLY.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\STDWIN.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\WININFO.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\XFORM.OBJ";
pObjFilNam[10]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\GDIDEMO\\GDIDEMO.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\GDIDEMO.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 405:
/**************************************************************/
/****************** G E N E R I C . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\GENERIC\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\GENERIC\\GENERIC.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= "D:\\MSDEV\\LIB\\VERSION.LIB";
pLibFilNam[15]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\GENERIC\\GENERIC.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\GENERIC.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 406:
/**************************************************************/
/******************* G E T D E V . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\GETDEV\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\GETDEV\\GETDEV.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\GETDEV\\GETDEV.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\GETDEV.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 407:
/**************************************************************/
/******************* G E T S Y S . E X E ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\GETSYS\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\GETSYS\\GETSYS.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\GETSYS\\GETSYS.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\GETSYS.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 408:
/**************************************************************/
/***************** G R I D F O N T . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\GRIDFONT\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\GRIDFONT\\VIEW.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\CROSSDEV\\GRIDFONT\\BOX.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\CROSSDEV\\GRIDFONT\\CSET.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\CROSSDEV\\GRIDFONT\\FONT.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\CROSSDEV\\GRIDFONT\\GRID.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\CROSSDEV\\GRIDFONT\\APP.OBJ";
pObjFilNam[7]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\GRIDFONT\\GRIDFONT.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\GRIDFONT.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 409:
/**************************************************************/
/***************** H O O K T E S T . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\HOOKTEST\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\HOOKTEST\\HOOKTEST.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\HOOKTEST\\HOOKTEST.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\HOOKTEST.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 410:
/**************************************************************/
/********************* M D I _ . E X E **********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\MDI_\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\MDI_\\MDI.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MDI_\\MDI.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\MDI.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 411:
/**************************************************************/
/********************* M E N U . E X E **********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\MENU\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\MENU\\MENU.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MENU\\MENU.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\MENU.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 412:
/**************************************************************/
/***************** M U L T I P A D . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\MULTIPAD\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\MULTIPAD\\MPINIT.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\CROSSDEV\\MULTIPAD\\MULTIPAD.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\CROSSDEV\\MULTIPAD\\MPOPEN.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\CROSSDEV\\MULTIPAD\\MPFIND.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\CROSSDEV\\MULTIPAD\\MPFILE.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\CROSSDEV\\MULTIPAD\\MPPRINT.OBJ";
pObjFilNam[7]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[13]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MULTIPAD\\MULTIPAD.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\MULTIPAD.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 413:
/**************************************************************/
/***************** O W N C O M B O . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\OWNCOMBO\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\OWNCOMBO\\OWNCOMBO.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\OWNCOMBO\\OWNCOMBO.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\OWNCOMBO.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 414:
/**************************************************************/
/***************** Q U R Y D E M O . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\QURYDEMO\\HEADERS.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\QURYDEMO\\MAIN.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\CROSSDEV\\QURYDEMO\\QUERY.OBJ";
pObjFilNam[3]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\QURYDEMO\\QURYDEMO.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\QURYDEMO.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 415:
/**************************************************************/
/****************** S H O W D I B . E X E *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\SHOWDIB\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\SHOWDIB\\DRAWDIB.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\CROSSDEV\\SHOWDIB\\SHOWDIB.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\CROSSDEV\\SHOWDIB\\DLGOPEN.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\CROSSDEV\\SHOWDIB\\DIB.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\CROSSDEV\\SHOWDIB\\PRINT.OBJ";
pObjFilNam[6]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\SHOWDIB\\SHOWDIB.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\SHOWDIB.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 416:
/**************************************************************/
/***************** S U B C L A S S . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\CROSSDEV\\SUBCLASS\\STDWIN.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\CROSSDEV\\SUBCLASS\\SUBCLASS.OBJ";
pObjFilNam[2]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBC.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\OLE32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\LIB\\OLEAUT32.LIB";
pLibFilNam[10]= "D:\\MSDEV\\LIB\\UUID.LIB";
pLibFilNam[11]= "D:\\MSDEV\\LIB\\CTL3D32.LIB";
pLibFilNam[12]= "D:\\MSDEV\\LIB\\ODBC32.LIB";
pLibFilNam[13]= "D:\\MSDEV\\LIB\\ODBCCP32.LIB";
pLibFilNam[14]= NULL;
pResFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\SUBCLASS\\SUBCLASS.RES";
pszExeFilNam= "F:\\LINKER32\\TEST\\CROSSDEV\\MY_EXE\\SUBCLASS.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_WinMainCRTStartup";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
/***************************************************************************/
/***************************************************************************/
/***************** O W N T E S T P R O G R A M S *****************/
/***************************************************************************/
/***************************************************************************/
case 501:
/**************************************************************/
/******************** T E S T 1 . E X E *********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\OBERON\\TEST1\\TEST1.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\OBERON\\TEST1\\RTSOBERO.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\OBERON\\TEST1\\WIN32.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\OBERON\\TEST1\\STRING.OBJ";
pObjFilNam[4]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[1]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\OBERON\\MY_EXE\\TEST1.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_MainCRTStartup@0";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 502:
/**************************************************************/
/***************** F L O A T I N G . E X E ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\OWNPROG\\FLOAT\\DEBUG\\FLOAT.OBJ";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBCD.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\OWNPROG\\MY_EXE\\FLOAT.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000001;
break;
case 0x510:
/**************************************************************/
/***************** L I N K E R 3 2 . D L L ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\LINKER.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\OBJFILE.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\MYCMAPST.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\OBJ2EXE.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\EXEFILE.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\MYCPTRLS.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\MYCSTLST.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\DEBUG.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\MYCOBARR.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\MYCMAPTR.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\MYCBUFIL.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\MYCOBLST.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\LIBFILE.OBJ";
pObjFilNam[13]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\PUBLIBEN.OBJ";
pObjFilNam[14]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\MYCMEMF.OBJ";
pObjFilNam[15]= "F:\\LINKER32\\TEST\\OWNPROG\\LINKER32\\SECTION.OBJ";
pObjFilNam[16]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBCMT.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\COMCTL32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\MFC\\LIB\\NAFXCW.LIB";
pLibFilNam[10]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\OWNPROG\\MY_EXE\\LINK32.DLL";
expFncNam[0]= "?LinkProgram@@YAHQAPAD0PAD110GHHHP6GHXZ@Z";
expFncNam[1]= NULL;
startUpCRTSym= "__DllMainCRTStartup@12";
subSystem= 0x03;
buildExeFile= FALSE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 0x511:
/**************************************************************/
/***************** L I N K E R 3 2 . D L L ******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\LINKER.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\OBJFILE.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\MYCMAPST.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\OBJ2EXE.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\EXEFILE.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\MYCPTRLS.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\MYCSTLST.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\DEBUG.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\MYCOBARR.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\MYCMAPTR.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\MYCBUFIL.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\MYCOBLST.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\LIBFILE.OBJ";
pObjFilNam[13]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\PUBLIBEN.OBJ";
pObjFilNam[14]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\MYCMEMF.OBJ";
pObjFilNam[15]= "F:\\LINKER32\\TEST\\OWNPROG\\LINK32D\\SECTION.OBJ";
pObjFilNam[16]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBCMTD.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\COMCTL32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\MFC\\LIB\\NAFXCWD.LIB";
pLibFilNam[10]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\OWNPROG\\MY_EXE\\LINK32D.DLL";
expFncNam[0]= "?LinkProgram@@YAHQAPAD0PAD110GHHHP6GHXZ@Z";
expFncNam[1]= NULL;
startUpCRTSym= "__DllMainCRTStartup@12";
subSystem= 0x03;
buildExeFile= FALSE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 0x512:
/**************************************************************/
/******************* LINKEXE.EXE - RELEASE *******************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\LINKEXE\\RELEASE\\LINKER.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\LINKEXE\\RELEASE\\OBJFILE.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\LINKEXE\\RELEASE\\MYCMAPST.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\LINKEXE\\RELEASE\\OBJ2EXE.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\LINKEXE\\RELEASE\\EXEFILE.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\LINKEXE\\RELEASE\\MYCPTRLS.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\LINKEXE\\RELEASE\\MYCSTLST.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\LINKEXE\\RELEASE\\DEBUG.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\LINKEXE\\RELEASE\\MYCOBARR.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\LINKEXE\\RELEASE\\MYCMAPTR.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\LINKEXE\\RELEASE\\MYCBUFIL.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\LINKEXE\\RELEASE\\MYCOBLST.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\LINKEXE\\RELEASE\\LIBFILE.OBJ";
pObjFilNam[13]= "F:\\LINKER32\\LINKEXE\\RELEASE\\PUBLIBEN.OBJ";
pObjFilNam[14]= "F:\\LINKER32\\LINKEXE\\RELEASE\\MYCMEMF.OBJ";
pObjFilNam[15]= "F:\\LINKER32\\LINKEXE\\RELEASE\\SECTION.OBJ";
pObjFilNam[16]= "F:\\LINKER32\\LINKEXE\\RELEASE\\MAKETEST.OBJ";
pObjFilNam[17]= "F:\\LINKER32\\LINKEXE\\RELEASE\\LNKTEST.OBJ";
pObjFilNam[18]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBCMT.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\COMCTL32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\MFC\\LIB\\NAFXCW.LIB";
pLibFilNam[10]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\OWNPROG\\MY_EXE\\LinkExeR.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
case 0x513:
/**************************************************************/
/******************** LINKEXE.EXE - DEBUG ********************/
/**************************************************************/
pObjFilNam[0]= "F:\\LINKER32\\LINKEXE\\DEBUG\\LINKER.OBJ";
pObjFilNam[1]= "F:\\LINKER32\\LINKEXE\\DEBUG\\OBJFILE.OBJ";
pObjFilNam[2]= "F:\\LINKER32\\LINKEXE\\DEBUG\\MYCMAPST.OBJ";
pObjFilNam[3]= "F:\\LINKER32\\LINKEXE\\DEBUG\\OBJ2EXE.OBJ";
pObjFilNam[4]= "F:\\LINKER32\\LINKEXE\\DEBUG\\EXEFILE.OBJ";
pObjFilNam[5]= "F:\\LINKER32\\LINKEXE\\DEBUG\\MYCPTRLS.OBJ";
pObjFilNam[6]= "F:\\LINKER32\\LINKEXE\\DEBUG\\MYCSTLST.OBJ";
pObjFilNam[7]= "F:\\LINKER32\\LINKEXE\\DEBUG\\DEBUG.OBJ";
pObjFilNam[8]= "F:\\LINKER32\\LINKEXE\\DEBUG\\MYCOBARR.OBJ";
pObjFilNam[9]= "F:\\LINKER32\\LINKEXE\\DEBUG\\MYCMAPTR.OBJ";
pObjFilNam[10]= "F:\\LINKER32\\LINKEXE\\DEBUG\\MYCBUFIL.OBJ";
pObjFilNam[11]= "F:\\LINKER32\\LINKEXE\\DEBUG\\MYCOBLST.OBJ";
pObjFilNam[12]= "F:\\LINKER32\\LINKEXE\\DEBUG\\LIBFILE.OBJ";
pObjFilNam[13]= "F:\\LINKER32\\LINKEXE\\DEBUG\\PUBLIBEN.OBJ";
pObjFilNam[14]= "F:\\LINKER32\\LINKEXE\\DEBUG\\MYCMEMF.OBJ";
pObjFilNam[15]= "F:\\LINKER32\\LINKEXE\\DEBUG\\SECTION.OBJ";
pObjFilNam[16]= "F:\\LINKER32\\LINKEXE\\DEBUG\\MAKETEST.OBJ";
pObjFilNam[17]= "F:\\LINKER32\\LINKEXE\\DEBUG\\LNKTEST.OBJ";
pObjFilNam[18]= NULL;
pLibFilNam[0]= "D:\\MSDEV\\LIB\\LIBCMTD.LIB";
pLibFilNam[1]= "D:\\MSDEV\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\MSDEV\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\MSDEV\\LIB\\GDI32.LIB";
pLibFilNam[4]= "D:\\MSDEV\\LIB\\WINSPOOL.LIB";
pLibFilNam[5]= "D:\\MSDEV\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= "D:\\MSDEV\\LIB\\ADVAPI32.LIB";
pLibFilNam[7]= "D:\\MSDEV\\LIB\\SHELL32.LIB";
pLibFilNam[8]= "D:\\MSDEV\\LIB\\COMCTL32.LIB";
pLibFilNam[9]= "D:\\MSDEV\\MFC\\LIB\\NAFXCWD.LIB";
pLibFilNam[10]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\OWNPROG\\MY_EXE\\LinkExeD.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_mainCRTStartup";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
/****************************************************************/
/******************* OBERON DLL I ********************/
/****************************************************************/
case 0x1001:
pObjFilNam[0]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL\\dlltest.obj";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL\\rtsobero.obj";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL\\winconso.obj";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL\\winbase.obj";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL\\string.obj";
pObjFilNam[5]= NULL;
pLibFilNam[0]= "d:\\msdev\\lib\\kernel32.lib";
pLibFilNam[1]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\OBERON\\MY_EXE\\TestDll.dll";
expFncNam[0]= "_Test@4";
expFncNam[1]= "DLLTest_$Init";
expFncNam[2]= "DLLTest_$Data";
expFncNam[3]= "DLLTest_$Const";
expFncNam[4]= "DLLTest_$Code";
expFncNam[5]= NULL;
startUpCRTSym= "_DllEntryPoint@12";
subSystem= 0x03;
buildExeFile= FALSE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
/****************************************************************/
/******************* OBERON DLL II ********************/
/****************************************************************/
case 0x1002:
pObjFilNam[0]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL2\\dlltest.obj";
pObjFilNam[1]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL2\\rtsobero.obj";
pObjFilNam[2]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL2\\winconso.obj";
pObjFilNam[3]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL2\\winbase.obj";
pObjFilNam[4]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL2\\string.obj";
pObjFilNam[5]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL2\\winbase.obj";
pObjFilNam[6]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL2\\winbase2.obj";
pObjFilNam[7]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL2\\wincon.obj";
pObjFilNam[8]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL2\\winnt.obj";
pObjFilNam[9]= NULL;
pLibFilNam[0]= "d:\\msdev\\lib\\kernel32.lib";
pLibFilNam[1]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\OBERON\\MY_EXE\\TestDll2.dll";
expFncNam[0]= "_Test@4";
expFncNam[1]= "DLLTest_$Init";
expFncNam[2]= "DLLTest_$Data";
expFncNam[3]= "DLLTest_$Const";
expFncNam[4]= "DLLTest_$Code";
expFncNam[5]= NULL;
startUpCRTSym= "_DllEntryPoint@12";
subSystem= 0x03;
buildExeFile= FALSE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
/***************************************************************/
/***************** OBERON CONSOLE DEBUG ********************/
/***************************************************************/
case 0x1010:
pObjFilNam[0]= "D:\\POW\\EXAMPLES\\CONSOLE\\CONSOLE.OBJ";
pObjFilNam[1]= "D:\\POW\\LIB\\MAIN.OBJ";
pObjFilNam[2]= "D:\\POW\\LIB\\OBCON.OBJ";
pObjFilNam[3]= NULL;
pLibFilNam[0]= "D:\\POW\\LIB\\KERNEL32.LIB";
pLibFilNam[1]= "D:\\POW\\LIB\\RTS32S.LIB";
pLibFilNam[2]= "D:\\POW\\LIB\\USER32.LIB";
pLibFilNam[3]= "D:\\POW\\WINAPI\\WIN32.LIB";
pLibFilNam[4]= NULL;
pResFilNam= NULL;
pszExeFilNam= "D:\\POW\\EXAMPLES\\CONSOLE\\CONSOLE.EXE";
expFncNam[0]= NULL;
startUpCRTSym= "_ExeEntryPoint@0";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000001;
break;
/****************************************************************/
/******************** OBERON MAKEDLL ************************/
/****************************************************************/
case 0x1011:
pObjFilNam[0]= "F:\\LINKER32\\TEST\\OBERON\\MAKEDLL\\IsDll.obj";
pObjFilNam[1]= NULL;
pLibFilNam[0]= "F:\\LINKER32\\POW\\FILES\\WINAPI\\WIN32.LIB";
pLibFilNam[1]= "F:\\LINKER32\\POW\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "F:\\LINKER32\\POW\\LIB\\GDI32.LIB";
pLibFilNam[3]= "F:\\LINKER32\\POW\\LIB\\USER32.LIB";
pLibFilNam[4]= "F:\\LINKER32\\POW\\LIB\\RTS32S.LIB";
pLibFilNam[5]= NULL;
pResFilNam= NULL;
//pszExeFilNam= "F:\\LINKER32\\TEST\\OBERON\\MY_EXE\\IsDll.dll";
pszExeFilNam= "F:\\LINKER32\\POW\\FILES\\CDLLTEST\\MyDll.dll";
expFncNam[0]= "Beep";
expFncNam[1]= NULL;
startUpCRTSym= "_DllEntryPoint@12";
subSystem= 0x02;
buildExeFile= FALSE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000000;
break;
/****************************************************************/
/********************** OBERON TESTDLL ***********************/
/****************************************************************/
case 0x1012:
pObjFilNam[0]= "F:\\LINKER32\\TEST\\OBERON\\TESTDLL\\UseDll.obj";
pObjFilNam[1]= "F:\\LINKER32\\POW\\LIB\\main.obj";
pObjFilNam[2]= "F:\\LINKER32\\POW\\LIB\\obcon.obj";
pObjFilNam[3]= NULL;
pLibFilNam[0]= "F:\\LINKER32\\POW\\FILES\\WINAPI\\WIN32.LIB";
pLibFilNam[1]= "F:\\LINKER32\\POW\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "F:\\LINKER32\\POW\\LIB\\GDI32.LIB";
pLibFilNam[3]= "F:\\LINKER32\\POW\\LIB\\USER32.LIB";
pLibFilNam[4]= "F:\\LINKER32\\POW\\LIB\\RTS32S.LIB";
pLibFilNam[5]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\OBERON\\MY_EXE\\UseDll.exe";
expFncNam[0]= NULL;
startUpCRTSym= "_ExeEntryPoint@0";
subSystem= 0x02;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000001;
break;
/****************************************************************/
/********************** OBERON OED32 ***********************/
/****************************************************************/
case 0x1013:
pObjFilNam[0]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\begelem.obj";
pObjFilNam[1]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\clipboar.obj";
pObjFilNam[2]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\compint.obj";
pObjFilNam[3]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\crelem.obj";
pObjFilNam[4]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\dllelem.obj";
pObjFilNam[5]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\draw.obj";
pObjFilNam[6]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\editelem.obj";
pObjFilNam[7]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\editwnd.obj";
pObjFilNam[8]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\event.obj";
pObjFilNam[9]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\file.obj";
pObjFilNam[10]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\files.obj";
pObjFilNam[11]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\find.obj";
pObjFilNam[12]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\foldelem.obj";
pObjFilNam[13]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\global.obj";
pObjFilNam[14]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\help.obj";
pObjFilNam[15]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\hugemem.obj";
pObjFilNam[16]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\keys.obj";
pObjFilNam[17]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\lcolelem.obj";
pObjFilNam[18]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\line.obj";
pObjFilNam[19]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\list.obj";
pObjFilNam[20]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\macro.obj";
pObjFilNam[21]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\marker.obj";
pObjFilNam[22]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\menu.obj";
pObjFilNam[23]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\object.obj";
pObjFilNam[24]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\oed.obj";
pObjFilNam[25]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\options.obj";
pObjFilNam[26]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\pane.obj";
pObjFilNam[27]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\panemsgs.obj";
pObjFilNam[28]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\print.obj";
pObjFilNam[29]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\random.obj";
pObjFilNam[30]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\regelems.obj";
pObjFilNam[31]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\special.obj";
pObjFilNam[32]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\stack.obj";
pObjFilNam[33]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\strings.obj";
pObjFilNam[34]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\tabelem.obj";
pObjFilNam[35]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\text.obj";
pObjFilNam[36]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\timer.obj";
pObjFilNam[37]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\undo.obj";
pObjFilNam[38]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\undocmd.obj";
pObjFilNam[39]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\utils.obj";
pObjFilNam[40]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\volume.obj";
pObjFilNam[41]= "D:\\POW\\OBERON-2\\EXAMPLES\\OED32\\winutils.obj";
pObjFilNam[42]= NULL;
pLibFilNam[0]= "D:\\POW\\OBERON-2\\WINAPI\\WIN32.LIB";
pLibFilNam[1]= "D:\\POW\\OBERON-2\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\POW\\OBERON-2\\LIB\\GDI32.LIB";
pLibFilNam[3]= "D:\\POW\\OBERON-2\\LIB\\USER32.LIB";
pLibFilNam[4]= "D:\\POW\\OBERON-2\\LIB\\RTS32S.LIB";
pLibFilNam[5]= "D:\\POW\\OBERON-2\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= NULL;
pResFilNam= NULL;
pszExeFilNam= "F:\\LINKER32\\TEST\\OBERON\\MY_EXE\\OED32.dll";
expFncNam[0]= "AddText";
expFncNam[1]= "CanUndo";
expFncNam[2]= "Clear";
expFncNam[3]= "CloseEditWindow";
expFncNam[4]= "Comments";
expFncNam[5]= "Copy";
expFncNam[6]= "Cut";
expFncNam[7]= "EditOptions";
expFncNam[8]= "GeneratesAscii";
expFncNam[9]= "GetCursorpos";
expFncNam[10]= "GetFirstBuffer";
expFncNam[11]= "GetLine";
expFncNam[12]= "GetNextBuffer";
expFncNam[13]= "GetText";
expFncNam[14]= "GotoPos";
expFncNam[15]= "HasChanged";
expFncNam[16]= "HasSelection";
expFncNam[17]= "InsertText";
expFncNam[18]= "InterfaceVersion";
expFncNam[19]= "Keywords";
expFncNam[20]= "LoadClose";
expFncNam[21]= "LoadFile";
expFncNam[22]= "LoadOpen";
expFncNam[23]= "LoadRead";
expFncNam[24]= "NewEditWindow";
expFncNam[25]= "Paste";
expFncNam[26]= "PrintWindow";
expFncNam[27]= "Redo";
expFncNam[28]= "Replace";
expFncNam[29]= "ResetContent";
expFncNam[30]= "ResizeWindow";
expFncNam[31]= "SaveFile";
expFncNam[32]= "Search";
expFncNam[33]= "SetCommandProcedure";
expFncNam[34]= "SetHelpFile";
expFncNam[35]= "ShowHelp";
expFncNam[36]= "Undo";
expFncNam[37]= "UnloadEditor";
expFncNam[38]= "EditWnd_InsertElement";
expFncNam[39]= "EditWndProc";
expFncNam[40]= "Global_LogWrite";
expFncNam[41]= "Global_LogWrite1";
expFncNam[42]= "Global_LogWrite1S";
expFncNam[43]= "Global_LogWrite4";
expFncNam[44]= "Object_Register";
expFncNam[45]= "OedOptionsDlgProc";
expFncNam[46]= "PrintAbortProc";
expFncNam[47]= "PrintDlgProc";
expFncNam[48]= "RegElems_Register";
expFncNam[49]= "ScrollTimerProc";
expFncNam[50]= NULL;
startUpCRTSym= "_DllEntryPoint@12";
subSystem= 0x03;
buildExeFile= FALSE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000002;
break;
/********************************************************/
/***************** OBERON PUZZLE ********************/
/********************************************************/
case 0x1014:
pObjFilNam[0]= "D:\\POW\\OBERON-2\\EXAMPLES\\PUZZLE\\puzzle.obj";
pObjFilNam[1]= "D:\\POW\\OBERON-2\\EXAMPLES\\PUZZLE\\random.obj";
pObjFilNam[2]= "D:\\POW\\OBERON-2\\EXAMPLES\\PUZZLE\\strings.obj";
pObjFilNam[3]= "D:\\POW\\OBERON-2\\EXAMPLES\\PUZZLE\\utils.obj";
pObjFilNam[4]= "D:\\POW\\OBERON-2\\LIB\\obgui.obj";
pObjFilNam[5]= "D:\\POW\\OBERON-2\\LIB\\obguiint.obj";
pObjFilNam[6]= NULL;
pLibFilNam[0]= "D:\\POW\\OBERON-2\\WINAPI\\WIN32.LIB";
pLibFilNam[1]= "D:\\POW\\OBERON-2\\LIB\\KERNEL32.LIB";
pLibFilNam[2]= "D:\\POW\\OBERON-2\\LIB\\GDI32.LIB";
pLibFilNam[3]= "D:\\POW\\OBERON-2\\LIB\\USER32.LIB";
pLibFilNam[4]= "D:\\POW\\OBERON-2\\LIB\\RTS32S.LIB";
pLibFilNam[5]= "D:\\POW\\OBERON-2\\LIB\\COMDLG32.LIB";
pLibFilNam[6]= NULL;
pResFilNam= NULL;
pszExeFilNam= "D:\\POW\\OBERON-2\\EXAMPLES\\PUZZLE\\puzzle.exe";
expFncNam[0]= NULL;
startUpCRTSym= "_ExeEntryPoint@0";
subSystem= 0x03;
buildExeFile= TRUE;
buildWinNtFile= FALSE;
incDebugInf= 0x00000002;
break;
default:
printf("\nAngegebenes Testprojekt steht nicht zur Verfügung!");
lnkPrg= FALSE;
}
if (lnkPrg)
return LinkProgram(pObjFilNam, pLibFilNam, pResFilNam, pszExeFilNam, startUpCRTSym,
expFncNam, subSystem, buildExeFile, buildWinNtFile, incDebugInf,
msg, basAdr, 0x100000);
else
return FALSE;
}
return FALSE;
}
| [
"[email protected]"
]
| [
[
[
1,
4660
]
]
]
|
28156090e4a4eddf1d79019a84436ac4b2c2d432 | b84a38aad619acf34c22ed6e6caa0f7b00ebfa0a | /Code/TootleCore/PC/PCTime.cpp | 1818acb2a256b7773d018bfa985a1d6f0d45ae78 | []
| no_license | SoylentGraham/Tootle | 4ae4e8352f3e778e3743e9167e9b59664d83b9cb | 17002da0936a7af1f9b8d1699d6f3e41bab05137 | refs/heads/master | 2021-01-24T22:44:04.484538 | 2010-11-03T22:53:17 | 2010-11-03T22:53:17 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,903 | cpp | #include "PCTime.h"
#include "../TString.h"
#include "../TCoreManager.h"
#include <mmsystem.h>
#include <ctime>
#pragma comment(lib,"winmm.lib")
namespace TLTime
{
namespace Platform
{
u32 g_BootupDate = 0; // base date so we don't need to fetch time() every time we want to get the current timestamp
u32 g_BootupMilliSeconds = 0; // timeGetTime() at bootup
float g_MicroSecondsPerClock = 0; // when using performance counter this is how many Micro seconds each counter is worth. if 0 high performance not supported
LARGE_INTEGER g_BootupClockCount; // bootup result from performance counter
Bool IsMicroClockSupported() { return (g_MicroSecondsPerClock != 0); }
void Debug_PrintTimestamp(const TTimestamp& Timestamp,s32 Micro);
void GetTimestampFromClockCount(TTimestampMicro& Timestamp,const LARGE_INTEGER& ClockCount);
Bool GetSecsFromClockCount(const LARGE_INTEGER& ClockCount,u32& Secs,u16& MilliSecs,u16& MicroSecs);
}
}
SyncBool TLTime::Platform::Init()
{
TLTime::TTimestampMicro StartTime;
// see if performance counter is supported
LARGE_INTEGER Frequency;
if ( QueryPerformanceFrequency( &Frequency ) )
{
if ( Frequency.HighPart > 0 )
{
TLDebug_Break("unhandled values from high performance counter");
}
else
{
g_MicroSecondsPerClock = (float)SecsToMicroSecs(1) / (float)Frequency.QuadPart;
}
// get initial counter
if ( !QueryPerformanceCounter( &g_BootupClockCount ) )
g_MicroSecondsPerClock = 0;
}
else
{
// unsupported
g_MicroSecondsPerClock = 0;
}
// get initial times to base all our other timestamps again
g_BootupDate = (u32)time(0);
g_BootupMilliSeconds = timeGetTime();
QueryPerformanceCounter( &g_BootupClockCount );
// init bootup timestamp
if ( IsMicroClockSupported() )
{
GetTimestampFromTickCount( StartTime, g_BootupMilliSeconds );
}
else
{
GetTimestampFromClockCount( StartTime, g_BootupClockCount );
}
// the bootup timestamp deducts bootup millisecs, which is right, but we still want those remaining millisecs in
// our bootup timestamp
if ( IsMicroClockSupported() )
{
u32 Secs;
u16 MilliSecs,MicroSecs;
GetSecsFromClockCount( g_BootupClockCount, Secs, MilliSecs, MicroSecs );
StartTime.SetMilliSeconds( MilliSecs );
StartTime.SetMicroSeconds( MilliSecs );
}
else
{
StartTime.SetMilliSeconds( g_BootupMilliSeconds %1000 );
StartTime.SetMicroSeconds( 0 );
}
TLDebug_Print("Startup timestamp:");
Debug_PrintTimestamp( StartTime );
TLCore::g_pCoreManager->StoreTimestamp("TSStartTime", StartTime);
return SyncTrue;
}
//-----------------------------------------------------------------------
// get the current time
// get the difference in milliseconds of now against when we booted the app
// add that onto the bootup date to get the current date (to the nearest second)
// + additional milliseconds
//-----------------------------------------------------------------------
void TLTime::Platform::GetTimeNow(TTimestamp& Timestamp)
{
u32 NowMilliSeconds = timeGetTime();
GetTimestampFromTickCount( Timestamp, NowMilliSeconds );
}
//-----------------------------------------------------------------------
// get the current time
// get the difference in milliseconds of now against when we booted the app
// add that onto the bootup date to get the current date (to the nearest second)
// + additional milliseconds
//-----------------------------------------------------------------------
void TLTime::Platform::GetMicroTimeNow(TTimestampMicro& Timestamp)
{
if ( !IsMicroClockSupported() )
{
GetTimeNow( Timestamp );
Timestamp.SetMicroSeconds(0);
return;
}
// get current counter
LARGE_INTEGER CounterNow;
if ( !QueryPerformanceCounter( &CounterNow ) )
{
TLDebug_Break("Query performance counter no longer working?");
GetTimeNow( Timestamp );
Timestamp.SetMicroSeconds(0);
return;
}
GetTimestampFromClockCount( Timestamp, CounterNow );
return;
}
//-----------------------------------------------------------------------
// convert system time to timestamp
//-----------------------------------------------------------------------
void TLTime::Platform::GetTimestamp(TTimestamp& Timestamp,const SYSTEMTIME& SystemTime)
{
// convert to filetime, then convert to timestamp
FILETIME FileTime;
if ( !SystemTimeToFileTime( &SystemTime, &FileTime ) )
{
TLDebug_Break("Failed to convert win32 timestamp");
Timestamp.SetInvalid();
return;
}
// now convert to timestamp
GetTimestamp( Timestamp, FileTime );
}
//-----------------------------------------------------------------------
// convert file time to timestamp
//-----------------------------------------------------------------------
void TLTime::Platform::GetTimestamp(TTimestamp& Timestamp,const FILETIME& FileTime)
{
// calculate the epoch time from a system time
SYSTEMTIME EpochSysTime = { 1970, 1, 0, 1, 0, 0, 0, 0 };
FILETIME EpochFileTime;
if ( !SystemTimeToFileTime( &EpochSysTime, &EpochFileTime ) )
{
TLDebug_Break("Failed to convert win32 timestamp");
Timestamp.SetInvalid();
return;
}
ULARGE_INTEGER LargeInt;
// deduct epoch time
LargeInt.QuadPart = ((ULARGE_INTEGER *)&FileTime)->QuadPart;
LargeInt.QuadPart -= ((ULARGE_INTEGER *)&EpochFileTime)->QuadPart;
// turn from 100millisecs to secs(i think, something like that)
u64 clunks_per_second = 10000000L;
LargeInt.QuadPart /= clunks_per_second;
// set timestamp
Timestamp.SetEpochSeconds( LargeInt.LowPart );
Timestamp.SetMilliSeconds( 0 );
}
//-----------------------------------------------------------------------
// convert win32 tick count to timestamp
//-----------------------------------------------------------------------
void TLTime::Platform::GetTimestampFromTickCount(TTimestamp& Timestamp,u32 TickCount)
{
// bootup date cannot possibly be zero (unless its 1970) means time lib hasn't been initialised
if ( g_BootupDate == 0 )
{
if ( !TLDebug_Break("Time lib hasn't been initialised") )
return;
}
// get difference since bootup
TickCount -= g_BootupMilliSeconds;
// adjust date
u32 NowDate = g_BootupDate + (TickCount/1000);
// set timestamp
Timestamp.SetEpochSeconds( NowDate );
Timestamp.SetMilliSeconds( TickCount % 1000 );
}
//-----------------------------------------------------------------------
// convert clock count to timestamp
//-----------------------------------------------------------------------
void TLTime::Platform::GetTimestampFromClockCount(TTimestampMicro& Timestamp,const LARGE_INTEGER& ClockCount)
{
// bootup date cannot possibly be zero (unless its 1970) means time lib hasn't been initialised
if ( g_BootupDate == 0 )
{
if ( !TLDebug_Break("Time lib hasn't been initialised") )
return;
}
// get difference since bootup
LARGE_INTEGER ClocksSinceBootup;
ClocksSinceBootup.QuadPart = ClockCount.QuadPart - g_BootupClockCount.QuadPart;
//
u32 Secs;
u16 MilliSecs,MicroSecs;
GetSecsFromClockCount( ClocksSinceBootup, Secs, MilliSecs, MicroSecs );
// set timestamp
Timestamp.SetEpochSeconds( g_BootupDate + Secs );
Timestamp.SetMilliSeconds( MilliSecs );
Timestamp.SetMicroSeconds( MicroSecs );
}
Bool TLTime::Platform::GetSecsFromClockCount(const LARGE_INTEGER& ClockCount,u32& Secs,u16& MilliSecs,u16& MicroSecs)
{
// high performance not supported
if ( g_MicroSecondsPerClock == 0 )
return FALSE;
// convert to micro secs
u64 TotalMicroSecs = (u64)( (float)( ClockCount.QuadPart * g_MicroSecondsPerClock ) );
MicroSecs = (u16)( TotalMicroSecs % 1000 );
u64 TotalMilliSecs = (TotalMicroSecs - MicroSecs)/1000;
MilliSecs = (u16)( TotalMilliSecs % 1000 );
Secs = (u32)((TotalMilliSecs - MilliSecs ) / 1000);
return TRUE;
}
void TLTime::Platform::Debug_PrintTimestamp(const TTimestamp& Timestamp,s32 Micro)
{
time_t t = Timestamp.GetEpochSeconds();
FILETIME ft;
// Note that LONGLONG is a 64-bit value
LONGLONG ll;
ll = Int32x32To64(t, 10000000) + 116444736000000000;
ft.dwLowDateTime = (DWORD)ll;
ft.dwHighDateTime = ll >> 32;
SYSTEMTIME st;
FileTimeToSystemTime(&ft, &st);
TTempString TimeString;
if ( Micro > -1 )
TimeString.Appendf("%d::%d::%d %d ms %d us", st.wHour, st.wMinute, st.wSecond, Timestamp.GetMilliSeconds(), Micro );
else
TimeString.Appendf("%d::%d::%d (%d ms)", st.wHour, st.wMinute, st.wSecond, Timestamp.GetMilliSeconds() );
TTempString DateString;
DateString.Appendf("%dth %d, %d", st.wDay, st.wMonth, st.wYear );
TTempString DebugString("Timestamp: ");
DebugString.Append( DateString );
DebugString.Append(" ");
DebugString.Append( TimeString );
TLDebug_Print( DebugString );
}
| [
"[email protected]",
"[email protected]"
]
| [
[
[
1,
1
],
[
4,
6
],
[
10,
142
],
[
144,
296
]
],
[
[
2,
3
],
[
7,
9
],
[
143,
143
]
]
]
|
5d32149ff54026984f4203fdeed60a9539e8c7e0 | 85d9531c984cd9ffc0c9fe8058eb1210855a2d01 | /QxOrm/include/QxTraits/is_qx_collection.h | 23e0123402052910ff9311853df382dddf76f01c | []
| no_license | padenot/PlanningMaker | ac6ece1f60345f857eaee359a11ee6230bf62226 | d8aaca0d8cdfb97266091a3ac78f104f8d13374b | refs/heads/master | 2020-06-04T12:23:15.762584 | 2011-02-23T21:36:57 | 2011-02-23T21:36:57 | 1,125,341 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,810 | h | /****************************************************************************
**
** http://www.qxorm.com/
** http://sourceforge.net/projects/qxorm/
** Original file by Lionel Marty
**
** This file is part of the QxOrm library
**
** This software is provided 'as-is', without any express or implied
** warranty. In no event will the authors be held liable for any
** damages arising from the use of this software.
**
** GNU Lesser General Public License Usage
** This file must be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file 'license.lgpl.txt' included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact :
** [email protected]
**
****************************************************************************/
#ifndef _QX_IS_QX_COLLECTION_H_
#define _QX_IS_QX_COLLECTION_H_
#ifdef _MSC_VER
#pragma once
#endif
#include <boost/mpl/if.hpp>
#include <boost/mpl/logical.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <QxCollection/IxCollection.h>
namespace qx {
namespace trait {
template <typename T>
class is_qx_collection
{
public:
enum { value = boost::is_base_of<qx::IxCollection, T>::value };
typedef typename boost::mpl::if_c<qx::trait::is_qx_collection<T>::value,
boost::mpl::true_,
boost::mpl::false_>::type type;
};
} // namespace trait
} // namespace qx
#endif // _QX_IS_QX_COLLECTION_H_
| [
"[email protected]"
]
| [
[
[
1,
59
]
]
]
|
c47891db52039d8abd1bda8762bf74edc212234b | e9cf655cc9a369d2da39914eedd757738180bddf | /src/main.cpp | cc0822f7a525f3ceb41d644dfe9811c21c9c2015 | []
| no_license | Johri/raytracer | 77368e4cfd13bdcdfc31503a1ee3e015829f3410 | 9ebe4248dd0740d0404e0923c3b41c15b5e68eff | refs/heads/master | 2020-04-06T03:40:16.735274 | 2011-10-05T00:58:03 | 2011-10-05T00:58:03 | 2,348,762 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,457 | cpp | #include <glutwindow.hpp>
#include <ppmwriter.hpp>
#include <pixel.hpp>
//#include <unittest++/UnitTest++.h>
#include <iostream>
#include <cmath>
#include <boost/thread/thread.hpp>
#include <boost/bind.hpp>
//#include <vector.hpp>
#include <matrix.hpp>
#include "material.hpp"
#include "triangle.hpp"
#include "box.hpp"
#include "sphere.hpp"
#include "scene.hpp"
#include "tube.hpp"
#include "cone.hpp"
#include "color.hpp"
#include "renderer.hpp"
#include "circle.hpp"
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
/*for (std::size_t y = 0; y < window.height(); ++y)
{
for (std::size_t x = 0; x < window.width(); ++x)
{
// create pixel at x,y
pixel p(x, y);
example_math3d();
// compute color for pixel
if ( ((x/checkersize)%2) != ((y/checkersize)%2)) {
p.rgb = color(0.0, 1.0, float(x)/window.height());
} else {
p.rgb = color(1.0, 0.0, float(y)/window.width());
}
// write pixel to output window
window.write(p);
// write pixel to image writer
image.write(p);
}
}
// save final image
image.save();
}*/
/*SUITE(ambient)
{
TEST(get_reflectivity)
{
material mat;
CHECK_EQUAL(1, mat.get_reflectivity());
}
}*/
// this is a dummy raytrace application
class application
{
public :
// raytracing is initiated from here
void start()
{
// the following code might also be executed in any method
// just start your raytracing algorithm from here
scene_.load_sdf("scene.sdf");
renderer_.set_scene(scene_);
//std::cout << "read sdf file" << std::endl;
// get glutwindow instance
glutwindow& window = glutwindow::instance();
// create a ppmwriter
ppmwriter image (window.width(), window.height(), "./checkerboard.ppm");
// for all pixels of window
for (std::size_t y = 0; y < window.height(); ++y)
{
for (std::size_t x = 0; x < window.width(); ++x)
{
// create pixel at x,y
pixel p(x, y);
ray r = scene_.main_camera().calc_eye_ray(x,y);
color c = renderer_.raytrace(r);
// size of a tile in checkerboard
p.rgb = c;
// write pixel to output window
window.write(p);
// write pixel to image writer
image.write(p);
}
}
// save final image
image.save();
}
// this method shows how to use the supplied classes for matrix, point and vector
/*void example_math3d()
{
// create some geometric objects
math3d::point origin;
math3d::point p0 ( 1.0, 5.0, -3.0 );
math3d::vector v0 ( 2.0, 2.0, 1.0 );
// some methods
v0.normalize();
// operator's
math3d::vector v1 = origin - p0; // difference between points is a vector
double z_component = v0[2]; // random access into components of point/vector
// you can create transformation matrices
math3d::matrix rotate = math3d::make_rotation_x ( M_PI / 4.0 ); // rotation matrix: 45 deg about x axis
math3d::matrix scale = math3d::make_scale ( 1.0, 2.0, 1.0 ); // scale y axis
math3d::matrix invrot = math3d::inverse(rotate);
// concatenate transformations and transform points or vectors
math3d::vector tv0 = rotate * scale * v0;
math3d::point tp0 = rotate * scale * p0;
}*/
private : // attributes
// you may add your scene description here
scene scene_;
renderer renderer_;
};
int main(int argc, char* argv[])
{ /*
point3d a(0,0,-20);
point3d b(0,6,-20);
point3d c(6,0,-20);
material m;
point3d origin (0,0,0);
point3d direction (-0.2,-0.1,-1);
circle circ ("name",m,a,b,c);
ray r (origin, direction);
double t=circ.intersect(r);
std::cout<<"Abstand sollte 20,4939 sein."<<t<<std::endl;
point3d p1 (4,4,-20);
point3d p2 (0,0,-24);
material mat;
box bo("box",mat,p1,p2);
point3d origin2 (3,2,0);
point3d dir2 (3,2,-1);
ray l(origin2, dir2);
double d=bo.intersect(l);
std::cout<<"Abstand sollte 20 sein."<<d<<std::endl;
material mat;
std::cout<<mat<<std::endl;
shape* dbox = new box ("die box", mat, point3d(1,1,1), point3d(2,2,2));
std::cout<<*dbox<<std::endl;
triangle tr;
std::cout<<tr<<std::endl;
box box;
std::cout<<box<<std::endl;
sphere kugel;
std::cout<<kugel<<std::endl;
point3d punkt (3,3,3);
color grau (0.8,0.8,0.5);
material betong ("Betong",(grau),(grau),(grau),0.1);
sphere ball ("Ball", betong, 2.0, (punkt));
std::cout<<ball<<std::endl;
tube conan;
std::cout<<conan<<std::endl;
cone tuba;
std::cout<<tuba<<std::endl;
ray r;
kugel.intersect(r);*/
// set resolution and checkersize
const std::size_t width = 500;
const std::size_t height = 500;
// create output window
glutwindow::init(width, height, 1350, 510, "CheckerBoard", argc, argv);
// create a ray tracing application
application app;
// start computation in thread
boost::thread thr(boost::bind(&application::start, &app));
// start output on glutwindow
glutwindow::instance().run();
// wait on thread
thr.join();
return 0;//UnitTest::RunAllTests();
}
| [
"[email protected]",
"[email protected]"
]
| [
[
[
1,
95
],
[
97,
103
],
[
105,
246
]
],
[
[
96,
96
],
[
104,
104
]
]
]
|
ffd2980619d213be031365ba3850c244dbe760cb | f13f46fbe8535a7573d0f399449c230a35cd2014 | /JelloMan/Color.cpp | 45650d950c4cbbd454cee871fafc455522a94a82 | []
| no_license | fangsunjian/jello-man | 354f1c86edc2af55045d8d2bcb58d9cf9b26c68a | 148170a4834a77a9e1549ad3bb746cb03470df8f | refs/heads/master | 2020-12-24T16:42:11.511756 | 2011-06-14T10:16:51 | 2011-06-14T10:16:51 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,201 | cpp | #include "StdAfx.h"
#include "Color.h"
#include "MathHelper.h"
//-------------------Constructors-&-Destructor-------------------->
Color::Color(): R(0.f), G(0.f), B(0.f), A(0.f)
{
}
Color::Color(float r, float g, float b, float a): R(r), G(g), B(b), A(a)
{
}
Color::Color(BYTE r, BYTE g, BYTE b, BYTE a): R(r / 255.0f), G(g / 255.0f), B(b / 255.0f), A(a / 255.0f)
{
}
Color::Color(const Vector3& rgb, float a): R(rgb.X), G(rgb.Y), B(rgb.Z), A(a)
{
}
Color::Color(const D3DXCOLOR& color): R(color.r), G(color.g), B(color.b), A(color.a)
{
}
//Copy en assignment
Color::Color(const Color& rgba): R(rgba.R), G(rgba.G), B(rgba.B), A(rgba.A)
{
}
Color& Color::operator=(const Color& v)
{
R = v.R;
G = v.G;
B = v.B;
A = v.A;
return *this;
}
//<-----------------------------------------------------------------
//----------Getters----------------------->
D3DXCOLOR Color::ToD3DColor() const
{
return D3DXCOLOR(R, G, B, A);
}
//<-----------------------------------------
//----------Operators--------------------->
Color Color::operator-() const
{
return *this * -1.0f;
}
Color Color::operator*(float a) const
{
return Color(R * a, G * a, B * a, A * a);
}
Color Color::operator/(float a) const
{
return Color(R / a, G / a, B / a, A / a);
}
Color Color::operator+(const Color& v) const
{
return Color(R + v.R, G + v.G, B + v.B, A + v.A);
}
Color Color::operator-(const Color& v) const
{
return Color(R - v.R, G - v.G, B - v.B, A - v.A);
}
Color& Color::operator+=(const Color& v)
{
R += v.R;
G += v.G;
B += v.B;
A += v.A;
return *this;
}
Color& Color::operator-=(const Color& v)
{
R -= v.R;
G -= v.G;
B -= v.B;
A -= v.A;
return *this;
}
Color& Color::operator*=(float a)
{
R *= a;
G *= a;
B *= a;
A *= a;
return *this;
}
Color& Color::operator/=(float a)
{
R /= a;
G /= a;
B /= a;
A /= a;
return *this;
}
bool Color::operator==(const Color& v) const
{
return R == v.R && G == v.G && B == v.B && A == v.A;
}
bool Color::operator!=(const Color& v) const
{
return !operator==(v);
}
//<-------------------------------------------------- | [
"bastian.damman@0fb7bab5-1bf9-c5f3-09d9-7611b49293d6"
]
| [
[
[
1,
111
]
]
]
|
9a94bf48b8aeae7aa5a2a096eb5eea02f81d0429 | c94135316a6706e7a1131e810222c12910cb8495 | /MarbleMadness/Ambiente.h | 9aa6f4685ba560481fc0c79089d7d52e1013a676 | []
| no_license | lcianelli/compgraf-marble-madness | 05d2e8f23adf034723dd3d1267e7cdf6350cf5e7 | f3e79763b43a31095ffeff49f440c24614db045b | refs/heads/master | 2016-09-06T14:20:10.951974 | 2011-05-28T21:10:48 | 2011-05-28T21:10:48 | 32,283,765 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 376 | h | #pragma once
class Ambiente
{
public:
/*
Vector representando la gravedad, con su respectivo modulo asociado a sus componentes
*/
static float *gravedad;
static bool aplicarG;
/*
Modulo de dicha fuerza
*/
static float modFuerzaExterna;
static void init();
static void aplicarGravedad(bool aplicar);
Ambiente(void);
~Ambiente(void);
};
| [
"lucia.cianelli@1aa7beb8-f67a-c4d8-682d-4e0fe4e45017"
]
| [
[
[
1,
22
]
]
]
|
37e321524bebf8dd8c9bd2c784c5d0643d0d3a01 | 9ba08620ddc3579995435d6e0e9cabc436e1c88d | /src/EventHandler.cpp | 43396390e81216933b7ac8496b15b49663886432 | [
"MIT"
]
| permissive | foxostro/CheeseTesseract | f5d6d7a280cbdddc94a5d57f32a50caf1f15e198 | 737ebbd19cee8f5a196bf39a11ca793c561e56cb | refs/heads/master | 2021-01-01T17:31:27.189613 | 2009-08-02T13:27:20 | 2009-08-02T13:27:33 | 267,008 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 471 | cpp | #include "stdafx.h"
#include "EventHandler.h"
MessageHandler::~MessageHandler() {
Handlers::iterator it = handlers.begin();
while (it != handlers.end()) {
delete it->second;
++it;
}
handlers.clear();
}
void MessageHandler::recvMessage(const Message *message) {
ASSERT(message, "Null parameter: message");
Handlers::iterator it = handlers.find(TypeInfo(typeid(*message)));
if (it != handlers.end()) {
(it->second)->exec(message);
}
}
| [
"arfox@arfox-desktop"
]
| [
[
[
1,
20
]
]
]
|
9a0ddfc55630f5c5aef0ba72e87d59a795695426 | deb8ef49795452ff607023c6bce8c3e8ed4c8360 | /Projects/UAlbertaBot/Source/base/WorkerManager.cpp | 80d5e54079c0661a4f406b522e1d667f9db95d2c | []
| no_license | timburr1/ou-skynet | f36ed7996c21f788a69e3ae643b629da7d917144 | 299a95fae4419429be1d04286ea754459a9be2d6 | refs/heads/master | 2020-04-19T22:58:46.259980 | 2011-12-06T20:10:34 | 2011-12-06T20:10:34 | 34,360,542 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 16,038 | cpp | #include "Common.h"
#include "WorkerManager.h"
WorkerManager::WorkerManager() : workersPerRefinery(3) {}
void WorkerManager::update()
{
// worker bookkeeping
updateWorkerStatus();
// set the gas workers
handleGasWorkers();
// handle idle workers
handleIdleWorkers();
// handle move workers
handleMoveWorkers();
// handle combat workers
handleCombatWorkers();
drawResourceDebugInfo();
//drawWorkerInformation(450,20);
//workerData.drawDepotDebugInfo();
}
void WorkerManager::updateWorkerStatus()
{
// for each of our Workers
BOOST_FOREACH (BWAPI::Unit * worker, workerData.getWorkers())
{
if (!worker->isCompleted())
{
continue;
}
// if it's idle
if (worker->isIdle() &&
(workerData.getWorkerJob(worker) != WorkerData::Build) &&
(workerData.getWorkerJob(worker) != WorkerData::Move) &&
(workerData.getWorkerJob(worker) != WorkerData::Scout))
{
//printf("Worker %d set to idle", worker->getID());
// set its job to idle
workerData.setWorkerJob(worker, WorkerData::Idle, NULL);
}
// if its job is gas
if (workerData.getWorkerJob(worker) == WorkerData::Gas)
{
BWAPI::Unit * refinery = workerData.getWorkerResource(worker);
// if the refinery doesn't exist anymore
if (!refinery || !refinery->exists() || refinery->getHitPoints() <= 0)
{
setMineralWorker(worker);
}
}
}
}
void WorkerManager::handleGasWorkers()
{
// for each unit we have
BOOST_FOREACH (BWAPI::Unit * unit, BWAPI::Broodwar->self()->getUnits())
{
// if that unit is a refinery
if (unit->getType().isRefinery() && unit->isCompleted())
{
// get the number of workers currently assigned to it
int numAssigned = workerData.getNumAssignedWorkers(unit);
// if it's less than we want it to be, fill 'er up
for (int i=0; i<(workersPerRefinery-numAssigned); ++i)
{
BWAPI::Unit * gasWorker = getGasWorker(unit);
if (gasWorker)
{
workerData.setWorkerJob(gasWorker, WorkerData::Gas, unit);
}
}
}
}
}
void WorkerManager::handleIdleWorkers()
{
// for each of our workers
BOOST_FOREACH (BWAPI::Unit * worker, workerData.getWorkers())
{
// if it is idle
if (workerData.getWorkerJob(worker) == WorkerData::Idle)
{
// send it to the nearest mineral patch
setMineralWorker(worker);
}
}
}
// bad micro for combat workers
void WorkerManager::handleCombatWorkers()
{
BOOST_FOREACH (BWAPI::Unit * worker, workerData.getWorkers())
{
if (workerData.getWorkerJob(worker) == WorkerData::Combat)
{
BWAPI::Broodwar->drawCircleMap(worker->getPosition().x(), worker->getPosition().y(), 4, BWAPI::Colors::Yellow, true);
BWAPI::Unit * target = getClosestEnemyUnit(worker);
if (target)
{
smartAttackUnit(worker, target);
}
}
}
}
BWAPI::Unit * WorkerManager::getClosestEnemyUnit(BWAPI::Unit * worker)
{
BWAPI::Unit * closestUnit = NULL;
double closestDist = 10000;
BOOST_FOREACH (BWAPI::Unit * unit, BWAPI::Broodwar->enemy()->getUnits())
{
double dist = unit->getDistance(worker);
if ((dist < 400) && (!closestUnit || (dist < closestDist)))
{
closestUnit = unit;
closestDist = dist;
}
}
return closestUnit;
}
void WorkerManager::finishedWithCombatWorkers()
{
BOOST_FOREACH (BWAPI::Unit * worker, workerData.getWorkers())
{
if (workerData.getWorkerJob(worker) == WorkerData::Combat)
{
setMineralWorker(worker);
}
}
}
void WorkerManager::handleMoveWorkers()
{
// for each of our workers
BOOST_FOREACH (BWAPI::Unit * worker, workerData.getWorkers())
{
// if it is a move worker
if (workerData.getWorkerJob(worker) == WorkerData::Move)
{
WorkerMoveData data = workerData.getWorkerMoveData(worker);
worker->move(data.position);
}
}
}
// set a worker to mine minerals
void WorkerManager::setMineralWorker(BWAPI::Unit * unit)
{
// check if there is a mineral available to send the worker to
BWAPI::Unit * depot = getClosestDepot(unit);
// if there is a valid mineral
if (depot)
{
// update workerData with the new job
workerData.setWorkerJob(unit, WorkerData::Minerals, depot);
}
else
{
// BWAPI::Broodwar->printf("No valid depot for mineral worker");
}
}
BWAPI::Unit * WorkerManager::getClosestDepot(BWAPI::Unit * worker)
{
BWAPI::Unit * closestDepot = NULL;
double closestDistance = 0;
BOOST_FOREACH (BWAPI::Unit * unit, BWAPI::Broodwar->self()->getUnits())
{
if (unit->getType().isResourceDepot() && unit->isCompleted() && !workerData.depotIsFull(unit))
{
double distance = unit->getDistance(worker);
if (!closestDepot || distance < closestDistance)
{
closestDepot = unit;
closestDistance = distance;
}
}
}
return closestDepot;
}
// other managers that need workers call this when they're done with a unit
void WorkerManager::finishedWithWorker(BWAPI::Unit * unit)
{
//BWAPI::Broodwar->printf("BuildingManager finished with worker %d", unit->getID());
if (workerData.getWorkerJob(unit) != WorkerData::Scout)
{
workerData.setWorkerJob(unit, WorkerData::Idle, NULL);
}
}
BWAPI::Unit * WorkerManager::getGasWorker(BWAPI::Unit * refinery)
{
BWAPI::Unit * closestWorker = NULL;
double closestDistance = 0;
BOOST_FOREACH (BWAPI::Unit * unit, workerData.getWorkers())
{
if (workerData.getWorkerJob(unit) == WorkerData::Minerals)
{
double distance = unit->getDistance(refinery);
if (!closestWorker || distance < closestDistance)
{
closestWorker = unit;
closestDistance = distance;
}
}
}
return closestWorker;
}
// gets a builder for BuildingManager to use
// if setJobAsBuilder is true (default), it will be flagged as a builder unit
// set 'setJobAsBuilder' to false if we just want to see which worker will build a building
BWAPI::Unit * WorkerManager::getBuilder(Building & b, bool setJobAsBuilder)
{
// variables to hold the closest worker of each type to the building
BWAPI::Unit * closestMovingWorker = NULL;
BWAPI::Unit * closestMiningWorker = NULL;
double closestMovingWorkerDistance = 0;
double closestMiningWorkerDistance = 0;
// look through each worker that had moved there first
BOOST_FOREACH (BWAPI::Unit * unit, workerData.getWorkers())
{
// mining worker check
if (unit->isCompleted() && (workerData.getWorkerJob(unit) == WorkerData::Minerals))
{
// if it is a new closest distance, set the pointer
double distance = unit->getDistance(BWAPI::Position(b.finalPosition));
if (!closestMiningWorker || distance < closestMiningWorkerDistance)
{
closestMiningWorker = unit;
closestMiningWorkerDistance = distance;
}
}
// moving worker check
if (unit->isCompleted() && (workerData.getWorkerJob(unit) == WorkerData::Move))
{
// if it is a new closest distance, set the pointer
double distance = unit->getDistance(BWAPI::Position(b.finalPosition));
if (!closestMovingWorker || distance < closestMovingWorkerDistance)
{
closestMovingWorker = unit;
closestMovingWorkerDistance = distance;
}
}
}
// if we found a moving worker, use it, otherwise using a mining worker
BWAPI::Unit * chosenWorker = closestMovingWorker ? closestMovingWorker : closestMiningWorker;
// if the worker exists (one may not have been found in rare cases)
if (chosenWorker && setJobAsBuilder)
{
workerData.setWorkerJob(chosenWorker, WorkerData::Build, b.type);
}
// return the worker
return chosenWorker;
}
// sets a worker as a scout
void WorkerManager::setScoutWorker(BWAPI::Unit * worker)
{
workerData.setWorkerJob(worker, WorkerData::Scout, NULL);
}
// gets a worker which will move to a current location
BWAPI::Unit * WorkerManager::getMoveWorker(BWAPI::Position p)
{
// set up the pointer
BWAPI::Unit * closestWorker = NULL;
double closestDistance = 0;
// for each worker we currently have
BOOST_FOREACH (BWAPI::Unit * unit, workerData.getWorkers())
{
// only consider it if it's a mineral worker
if (unit->isCompleted() && workerData.getWorkerJob(unit) == WorkerData::Minerals)
{
// if it is a new closest distance, set the pointer
double distance = unit->getDistance(p);
if (!closestWorker || distance < closestDistance)
{
closestWorker = unit;
closestDistance = distance;
}
}
}
// return the worker
return closestWorker;
}
// sets a worker to move to a given location
void WorkerManager::setMoveWorker(int mineralsNeeded, int gasNeeded, BWAPI::Position p)
{
// set up the pointer
BWAPI::Unit * closestWorker = NULL;
double closestDistance = 0;
// for each worker we currently have
BOOST_FOREACH (BWAPI::Unit * unit, workerData.getWorkers())
{
// only consider it if it's a mineral worker
if (unit->isCompleted() && workerData.getWorkerJob(unit) == WorkerData::Minerals)
{
// if it is a new closest distance, set the pointer
double distance = unit->getDistance(p);
if (!closestWorker || distance < closestDistance)
{
closestWorker = unit;
closestDistance = distance;
}
}
}
if (closestWorker)
{
//BWAPI::Broodwar->printf("Setting worker job Move for worker %d", closestWorker->getID());
workerData.setWorkerJob(closestWorker, WorkerData::Move, WorkerMoveData(mineralsNeeded, gasNeeded, p));
}
else
{
//BWAPI::Broodwar->printf("Error, no worker found");
}
}
// will we have the required resources by the time a worker can travel a certain distance
bool WorkerManager::willHaveResources(int mineralsRequired, int gasRequired, double distance)
{
// if we don't require anything, we will have it
if (mineralsRequired <= 0 && gasRequired <= 0)
{
return true;
}
// the speed of the worker unit
double speed = BWAPI::Broodwar->self()->getRace().getWorker().topSpeed();
// how many frames it will take us to move to the building location
// add a second to account for worker getting stuck. better early than late
double framesToMove = (distance / speed) + 50;
// magic numbers to predict income rates
double mineralRate = getNumMineralWorkers() * 0.045;
double gasRate = getNumGasWorkers() * 0.07;
// calculate if we will have enough by the time the worker gets there
if (mineralRate * framesToMove >= mineralsRequired &&
gasRate * framesToMove >= gasRequired)
{
return true;
}
else
{
return false;
}
}
void WorkerManager::setCombatWorker(BWAPI::Unit * worker)
{
workerData.setWorkerJob(worker, WorkerData::Combat, NULL);
}
void WorkerManager::onUnitMorph(BWAPI::Unit * unit)
{
// if something morphs into a worker, add it
if (unit->getType().isWorker() && unit->getPlayer() == BWAPI::Broodwar->self() && unit->getHitPoints() >= 0)
{
workerData.addWorker(unit);
}
// if something morphs into a building, it was a worker?
if (unit->getType().isBuilding() && unit->getPlayer() == BWAPI::Broodwar->self() && unit->getPlayer()->getRace() == BWAPI::Races::Zerg)
{
//BWAPI::Broodwar->printf("A Drone started building");
workerData.workerDestroyed(unit);
}
}
void WorkerManager::onUnitShow(BWAPI::Unit * unit)
{
// add the depot if it exists
if (unit->getType().isResourceDepot() && unit->getPlayer() == BWAPI::Broodwar->self())
{
workerData.addDepot(unit);
}
// if something morphs into a worker, add it
if (unit->getType().isWorker() && unit->getPlayer() == BWAPI::Broodwar->self() && unit->getHitPoints() >= 0)
{
//BWAPI::Broodwar->printf("A worker was shown %d", unit->getID());
workerData.addWorker(unit);
}
}
void WorkerManager::rebalanceWorkers()
{
// for each worker
BOOST_FOREACH (BWAPI::Unit * worker, workerData.getWorkers())
{
// we only care to rebalance mineral workers
if (!workerData.getWorkerJob(worker) == WorkerData::Minerals)
{
continue;
}
// get the depot this worker works for
BWAPI::Unit * depot = workerData.getWorkerDepot(worker);
// if there is a depot and it's full
if (depot && workerData.depotIsFull(depot))
{
// set the worker to idle
workerData.setWorkerJob(worker, WorkerData::Idle, NULL);
}
// if there's no depot
else if (!depot)
{
// set the worker to idle
workerData.setWorkerJob(worker, WorkerData::Idle, NULL);
}
}
}
void WorkerManager::onUnitDestroy(BWAPI::Unit * unit)
{
// remove the depot if it exists
if (unit->getType().isResourceDepot() && unit->getPlayer() == BWAPI::Broodwar->self())
{
workerData.removeDepot(unit);
}
// if the unit that was destroyed is a worker
if (unit->getType().isWorker() && unit->getPlayer() == BWAPI::Broodwar->self())
{
// tell the worker data it was destroyed
workerData.workerDestroyed(unit);
}
if (unit->getType() == BWAPI::UnitTypes::Resource_Mineral_Field)
{
//BWAPI::Broodwar->printf("A mineral died, rebalancing workers");
rebalanceWorkers();
}
}
void WorkerManager::smartAttackUnit(BWAPI::Unit * attacker, BWAPI::Unit * target)
{
// if we have issued a command to this unit already this frame, ignore this one
if (attacker->getLastCommandFrame() >= BWAPI::Broodwar->getFrameCount() || attacker->isAttackFrame())
{
return;
}
// get the unit's current command
BWAPI::UnitCommand currentCommand(attacker->getLastCommand());
// if we've already told this unit to attack this target, ignore this command
if (currentCommand.getType() == BWAPI::UnitCommandTypes::Attack_Unit && currentCommand.getTarget() == target)
{
return;
}
// if nothing prevents it, attack the target
attacker->attack(target);
}
void WorkerManager::drawResourceDebugInfo() {
BOOST_FOREACH (BWAPI::Unit * worker, workerData.getWorkers()) {
char job = workerData.getJobCode(worker);
BWAPI::Position pos = worker->getTargetPosition();
if (DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawTextMap(worker->getPosition().x(), worker->getPosition().y() - 5, "\x07%c", job);
if (DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawLineMap(worker->getPosition().x(), worker->getPosition().y(), pos.x(), pos.y(), BWAPI::Colors::Cyan);
BWAPI::Unit * depot = workerData.getWorkerDepot(worker);
if (depot)
{
if (DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawLineMap(worker->getPosition().x(), worker->getPosition().y(), depot->getPosition().x(), depot->getPosition().y(), BWAPI::Colors::Orange);
}
}
}
void WorkerManager::drawWorkerInformation(int x, int y) {
if (DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawTextScreen(x, y, "\x04 Workers %d", workerData.getNumMineralWorkers());
if (DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawTextScreen(x, y+20, "\x04 UnitID");
if (DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawTextScreen(x+50, y+20, "\x04 State");
int yspace = 0;
BOOST_FOREACH (BWAPI::Unit * unit, workerData.getWorkers())
{
if (DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawTextScreen(x, y+40+((yspace)*10), "\x03 %d", unit->getID());
if (DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawTextScreen(x+50, y+40+((yspace++)*10), "\x03 %c", workerData.getJobCode(unit));
}
}
bool WorkerManager::isWorkerScout(BWAPI::Unit * worker)
{
return (workerData.getWorkerJob(worker) == WorkerData::Scout);
}
bool WorkerManager::isBuilder(BWAPI::Unit * worker)
{
return (workerData.getWorkerJob(worker) == WorkerData::Build);
}
int WorkerManager::getNumMineralWorkers()
{
return workerData.getNumMineralWorkers();
}
int WorkerManager::getNumIdleWorkers()
{
return workerData.getNumIdleWorkers();
}
int WorkerManager::getNumGasWorkers()
{
return workerData.getNumGasWorkers();
}
WorkerManager * WorkerManager::instance = NULL;
WorkerManager * WorkerManager::getInstance() {
if (!WorkerManager::instance)
{
WorkerManager::instance = new WorkerManager();
}
return WorkerManager::instance;
} | [
"[email protected]@ce23f72d-95c0-fd94-fabd-fc6dce850bd1"
]
| [
[
[
1,
571
]
]
]
|
bc9b794aa5519e40ee4caa2aaea6383dd3a80cd0 | b4d726a0321649f907923cc57323942a1e45915b | /CODE/UI/SLIDER2.CPP | f314ffed13074e6e5ed8282230013eb8e5dc44c7 | []
| no_license | chief1983/Imperial-Alliance | f1aa664d91f32c9e244867aaac43fffdf42199dc | 6db0102a8897deac845a8bd2a7aa2e1b25086448 | refs/heads/master | 2016-09-06T02:40:39.069630 | 2010-10-06T22:06:24 | 2010-10-06T22:06:24 | 967,775 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,774 | cpp | /*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
/*
* $Logfile: /Freespace2/code/Ui/SLIDER2.cpp $
* $Revision: 1.1.1.1 $
* $Date: 2004/08/13 22:47:43 $
* $Author: Spearhawk $
*
* Implements UI_SLIDER2 control
*
* $Log: SLIDER2.CPP,v $
* Revision 1.1.1.1 2004/08/13 22:47:43 Spearhawk
* no message
*
* Revision 1.1.1.1 2004/08/13 21:01:40 Darkhill
* no message
*
* Revision 2.1 2002/08/01 01:41:10 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:29 penguin
* Warpcore CVS sync
*
* Revision 1.1 2002/05/02 18:03:13 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 9 8/16/99 4:06p Dave
* Big honking checkin.
*
* 8 8/11/99 12:18p Jefff
* added option to slider2 class to not force slider reset on
* set_numberItems
*
* 7 8/10/99 6:54p Dave
* Mad optimizations. Added paging to the nebula effect.
*
* 6 5/04/99 5:20p Dave
* Fixed up multiplayer join screen and host options screen. Should both
* be at 100% now.
*
* 5 5/03/99 11:04p Dave
* Most of the way done with the multi join screen.
*
* 4 4/29/99 2:15p Neilk
* fixed slider so there is an extra callback for mouse locks
*
* 3 4/26/99 5:05p Neilk
* removed some excess debug output
*
* 2 4/16/99 5:22p Neilk
* First implementation of UI_SLIDER2
*
* $NoKeywords: $
*/
#include "ui/uidefs.h"
#include "ui/ui.h"
#include "freespace2/freespace.h"
#include "bmpman/bmpman.h"
#include "io/timer.h"
// captureCallback is called when an item is "selected" by mouse release. That is, the user has clicked, dragged and _released_.
// the callback is called when the scrollbar has been released
void UI_SLIDER2::create(UI_WINDOW *wnd, int _x, int _y, int _w, int _h, int _numberItems, char *_bitmapSliderControl, void (* _upCallback)(), void (*_downCallback)(),
void (* _captureCallback)()) {
int buttonHeight, buttonWidth;
base_create( wnd, UI_KIND_SLIDER2, _x, _y, _w, _h );
Assert(_upCallback != NULL);
Assert(_downCallback != NULL);
upCallback = _upCallback;
downCallback = _downCallback;
captureCallback = _captureCallback;
Assert(_bitmapSliderControl > 0);
last_scrolled = 0;
// set bitmap
set_bmaps(_bitmapSliderControl, 3, 0);
// determine possible positions
bm_get_info(bmap_ids[S2_NORMAL],&buttonWidth, &buttonHeight, NULL, NULL, NULL);
slider_w = buttonWidth;
slider_h = buttonHeight;
Assert(buttonHeight > 5);
slider_half_h = (int)(buttonHeight / 2);
numberPositions = _h - buttonHeight;
Assert(numberPositions >= 0);
currentItem = 0;
currentPosition = 0;
numberItems = _numberItems;
if (numberItems <= 0) {
disabled_flag = 1;
}
slider_mode = S2M_DEFAULT;
}
void UI_SLIDER2::draw() {
Assert((currentPosition >= 0) && (currentPosition <= numberPositions));
if (uses_bmaps & !disabled_flag) {
gr_reset_clip();
switch (slider_mode) {
case S2M_ON_ME:
gr_set_bitmap(bmap_ids[S2_HIGHLIGHT]); // draw slider level
break;
case S2M_MOVING:
gr_set_bitmap(bmap_ids[S2_PRESSED]);
break;
case S2M_DEFAULT:
default:
gr_set_bitmap(bmap_ids[S2_NORMAL]); // draw slider level
break;
}
gr_bitmap(x, y+currentPosition);
}
}
void UI_SLIDER2::process(int focus)
{
int OnMe, keyfocus, mouse_lock_move;
if (disabled_flag) {
return;
}
keyfocus = 0;
if (my_wnd->selected_gadget == this){
keyfocus = 1;
}
OnMe = is_mouse_on();
if ( OnMe ) {
// are we on the button?
if ( (ui_mouse.y >= (y+currentPosition)) && (ui_mouse.y <= (y+currentPosition+slider_h)) ) {
slider_mode = S2M_ON_ME;
if ( B1_PRESSED ) {
mouse_locked = 1;
}
}
} else
slider_mode = S2M_DEFAULT;
if ( !B1_PRESSED) {
if (mouse_locked == 1)
if (captureCallback != NULL) {
captureCallback();
mprintf(("Called captureCallback()!\n"));
}
mouse_locked = 0;
}
if (!OnMe && !mouse_locked)
return;
// could we possibly be moving up?
if ((OnMe && B1_PRESSED && ui_mouse.y < (currentPosition+y+slider_half_h-1)) || (mouse_locked && (ui_mouse.y < (currentPosition+y+slider_half_h-1))) ) {
// make sure we wait at least 50 ms between events unless mouse locked
if ( (timer_get_milliseconds() > last_scrolled+50) || B1_JUST_PRESSED || mouse_locked ) {
last_scrolled = timer_get_milliseconds();
if (!mouse_locked) {
if (currentItem > 0) {
currentItem--;
if (upCallback != NULL) {
upCallback();
if (captureCallback != NULL)
captureCallback();
}
}
currentPosition = fl2i((((float)currentItem/(float)numberItems) * (float)numberPositions)-.49);
} else {
mouse_lock_move = fl2i( ((((float)ui_mouse.y - (float)y - (float)slider_half_h)/(float)numberPositions) * (float)numberItems) -.49);
mouse_lock_move = currentItem - mouse_lock_move;
if (mouse_lock_move > 0) {
while (mouse_lock_move > 0) {
if (currentItem > 0) {
currentItem--;
if (upCallback != NULL)
upCallback();
}
mouse_lock_move--;
}
}
// currentPosition = ui_mouse.y - y - slider_half_h;
currentPosition = fl2i((((float)currentItem/(float)numberItems) * (float)numberPositions)-.49);
}
if (currentPosition < 0)
currentPosition = 0;
if (currentPosition > numberPositions)
currentPosition = numberPositions;
slider_mode = S2M_MOVING;
}
}
if ( ( OnMe && B1_PRESSED && ui_mouse.y > (currentPosition+y+slider_half_h+1)) || (mouse_locked && (ui_mouse.y > (currentPosition+y+slider_half_h+1))) ) {
// make sure we wait at least 50 ms between events unless mouse locked
if ( (timer_get_milliseconds() > last_scrolled+50) || B1_JUST_PRESSED || mouse_locked ) {
last_scrolled = timer_get_milliseconds();
if (!mouse_locked) {
if (currentItem < numberItems) {
currentItem++;
if (downCallback != NULL) {
downCallback();
if (captureCallback != NULL)
captureCallback();
}
}
currentPosition = fl2i((((float)currentItem/(float)numberItems) * (float)numberPositions)-.49);
} else {
mouse_lock_move = fl2i( ((((float)ui_mouse.y - (float)y - (float)slider_half_h)/(float)numberPositions) * (float)numberItems) -.49);
mouse_lock_move -= currentItem;
if (mouse_lock_move > 0) {
while (mouse_lock_move > 0) {
if (currentItem < numberItems) {
currentItem++;
if (downCallback != NULL)
downCallback();
}
mouse_lock_move--;
}
}
// currentPosition = ui_mouse.y - y - slider_half_h;
currentPosition = fl2i((((float)currentItem/(float)numberItems) * (float)numberPositions)-.49);
}
if (currentPosition < 0){
currentPosition = 0;
}
if (currentPosition > numberPositions){
currentPosition = numberPositions;
}
slider_mode = S2M_MOVING;
}
}
// if we are centerd on the bitmap and still in mouse lock mode, we need to make sure the MOVING bitmap is still shown
// or if mouse is on us and we are pressing the mouse button
if (mouse_locked || (OnMe && B1_PRESSED)){
slider_mode = S2M_MOVING;
}
}
void UI_SLIDER2::hide()
{
hidden = 1;
}
void UI_SLIDER2::unhide()
{
hidden = 0;
}
int UI_SLIDER2::get_hidden()
{
return hidden;
}
// return number of itmes
int UI_SLIDER2::get_numberItems() {
return numberItems;
}
// return current position
int UI_SLIDER2::get_currentPosition() {
return currentPosition;
}
// return current item
int UI_SLIDER2::get_currentItem() {
return currentItem;
}
// change range. reset back to position 0
void UI_SLIDER2::set_numberItems(int _numberItems, int reset) {
numberItems = _numberItems;
if (reset) {
currentItem = 0;
currentPosition = 0;
} else {
// recalcluate current position
currentPosition = fl2i((((float)currentItem/(float)numberItems) * (float)numberPositions)-.49);
if (currentPosition < 0){
currentPosition = 0;
}
if (currentPosition > numberPositions){
currentPosition = numberPositions;
}
}
if (numberItems <= 0){
disabled_flag = 1;
} else {
disabled_flag = 0;
}
}
// force slider to new position manually
void UI_SLIDER2::set_currentItem(int _currentItem) {
if (_currentItem > numberItems)
return;
if (_currentItem == currentItem)
return;
if (_currentItem < 0)
return;
if (_currentItem > currentItem) {
while (currentItem != _currentItem) {
currentItem++;
if (downCallback != NULL)
downCallback();
}
} else if (_currentItem < currentItem) {
while (currentItem != _currentItem) {
currentItem--;
if (upCallback != NULL)
upCallback();
}
}
currentPosition = fl2i(((float)currentItem/(float)numberItems) * (float)numberPositions);
}
void UI_SLIDER2::force_currentItem(int _currentItem) {
currentItem = _currentItem;
if(currentItem < 0){
currentItem = 0;
};
currentPosition = fl2i(((float)currentItem/(float)numberItems) * (float)numberPositions);
}
void UI_SLIDER2::forceDown() {
if (currentItem < numberItems) {
currentItem++;
currentPosition = fl2i(((float)currentItem/(float)numberItems) * (float)numberPositions);
}
}
void UI_SLIDER2::forceUp() {
if (currentItem > 0) {
currentItem--;
currentPosition = fl2i(((float)currentItem/(float)numberItems) * (float)numberPositions);
}
}
| [
"[email protected]"
]
| [
[
[
1,
360
]
]
]
|
c8f21cdd06c7ebe740b18065d3d8d6823135d3f6 | c1a2953285f2a6ac7d903059b7ea6480a7e2228e | /deitel/ch13/Fig13_13_23/SalariedEmployee.h | 2b83ef2c9a406364182a8e0ccc73e2d574c36a49 | []
| no_license | tecmilenio/computacion2 | 728ac47299c1a4066b6140cebc9668bf1121053a | a1387e0f7f11c767574fcba608d94e5d61b7f36c | refs/heads/master | 2016-09-06T19:17:29.842053 | 2008-09-28T04:27:56 | 2008-09-28T04:27:56 | 50,540 | 4 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 1,818 | h | // Fig. 13.15: SalariedEmployee.h
// SalariedEmployee class derived from Employee.
#ifndef SALARIED_H
#define SALARIED_H
#include "Employee.h" // Employee class definition
class SalariedEmployee : public Employee
{
public:
SalariedEmployee( const string &, const string &,
const string &, double = 0.0 );
void setWeeklySalary( double ); // set weekly salary
double getWeeklySalary() const; // return weekly salary
// keyword virtual signals intent to override
virtual double earnings() const; // calculate earnings
virtual void print() const; // print SalariedEmployee object
private:
double weeklySalary; // salary per week
}; // end class SalariedEmployee
#endif // SALARIED_H
/**************************************************************************
* (C) Copyright 1992-2008 by Deitel & Associates, Inc. and *
* Pearson Education, Inc. All Rights Reserved. *
* *
* DISCLAIMER: The authors and publisher of this book have used their *
* best efforts in preparing the book. These efforts include the *
* development, research, and testing of the theories and programs *
* to determine their effectiveness. The authors and publisher make *
* no warranty of any kind, expressed or implied, with regard to these *
* programs or to the documentation contained in these books. The authors *
* and publisher shall not be liable in any event for incidental or *
* consequential damages in connection with, or arising out of, the *
* furnishing, performance, or use of these programs. *
**************************************************************************/
| [
"[email protected]"
]
| [
[
[
1,
39
]
]
]
|
9f1fabbd6593224a7c53611d6c15b87c2d359453 | 25fd79ea3a1f2c552388420c5a02433d9cdf855d | /Pool/AudioSystem/PoolAudio.cpp | bc9530e1aaea86f0533a204668a236edc03287b6 | []
| no_license | k-l-lambda/klspool | 084cbe99a1dc3b9703233fccea3f2f6570df9d63 | b57703169828f9d406e7d0a6cd326063832b12c6 | refs/heads/master | 2021-01-23T07:03:59.086914 | 2009-09-06T09:14:51 | 2009-09-06T09:14:51 | 32,123,777 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 951 | cpp | /*
** This source file is part of Pool.
**
** Copyright (c) 2009 K.L.<[email protected]>, Lazy<[email protected]>
** This program is free software without any warranty.
*/
#include "PoolAudio.h"
#include <al.h>
#include <alc.h>
#include <alut.h>
PoolAudio::PoolAudio()
{
}
PoolAudio::~PoolAudio()
{
}
PoolAudio& PoolAudio::instance()
{
static PoolAudio s_Instance;
return s_Instance;
}
bool PoolAudio::init(int numSounds, int numSources)
{
return m_OALSystem.init(numSounds, numSources);
}
bool PoolAudio::loadWavFile(const std::string& fileName)
{
return m_OALSystem.loadWavFile(fileName);
}
void PoolAudio::playSound(int soundNum, const float source[3], float gain)
{
m_OALSystem.playSound(soundNum, source, m_ListenerPos, gain);
}
void PoolAudio::setListenerPosition(const float pos[3])
{
m_ListenerPos[0] = pos[0];
m_ListenerPos[1] = pos[1];
m_ListenerPos[2] = pos[2];
}
| [
"xxxK.L.xxx@64c72148-2b1e-11de-874f-bb9810f3bc79",
"[email protected]@64c72148-2b1e-11de-874f-bb9810f3bc79"
]
| [
[
[
1,
6
],
[
10,
21
],
[
25,
27
],
[
35,
35
],
[
45,
45
],
[
47,
50
]
],
[
[
7,
9
],
[
22,
24
],
[
28,
34
],
[
36,
44
],
[
46,
46
]
]
]
|
ffdbe9b3646ea644a25975ad411600f1182d45ef | b4d726a0321649f907923cc57323942a1e45915b | /CODE/ImpED/ReinforcementEditorDlg.cpp | 6e7d732c7d41405b476ab6b01d917fa8aaabd28e | []
| no_license | chief1983/Imperial-Alliance | f1aa664d91f32c9e244867aaac43fffdf42199dc | 6db0102a8897deac845a8bd2a7aa2e1b25086448 | refs/heads/master | 2016-09-06T02:40:39.069630 | 2010-10-06T22:06:24 | 2010-10-06T22:06:24 | 967,775 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 13,337 | cpp | /*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
/*
* $Logfile: /Freespace2/code/fred2/ReinforcementEditorDlg.cpp $
* $Revision: 1.2 $
* $Date: 2002/08/15 01:06:34 $
* $Author: penguin $
*
* Reinforcements editor dialog handling code
*
* $Log: ReinforcementEditorDlg.cpp,v $
* Revision 1.2 2002/08/15 01:06:34 penguin
* Include filename reorg (to coordinate w/ fs2_open)
*
* Revision 1.1.1.1 2002/07/15 03:11:01 inquisitor
* Initial FRED2 Checking
*
*
* 3 3/30/99 5:40p Dave
* Fixed reinforcements for TvT in multiplayer.
*
* 2 10/07/98 6:28p Dave
* Initial checkin. Renamed all relevant stuff to be Fred2 instead of
* Fred. Globalized mission and campaign file extensions. Removed Silent
* Threat specific code.
*
* 1 10/07/98 3:01p Dave
*
* 1 10/07/98 3:00p Dave
*
* 17 5/23/98 3:33p Hoffoss
* Removed unused code in reinforcements editor and make ships.tbl button
* in ship editor disappear in release build.
*
* 16 1/02/98 12:45p Allender
* remove bogus assert
*
* 15 7/17/97 10:17a Allender
* more reinforcement messaging stuff -- now working within Freespace.
* Fixed a couple of Fred bugs relating to not setting reinforcement flag
* properly
*
* 14 7/16/97 11:02p Allender
* added messaging for reinforcements. One (or one of several) can now
* play if reinforcement are not yet available, or when they are arriving
*
* 13 7/08/97 10:15a Allender
* making ships/wings reinforcements now do not set the arrival cue to
* false. A reinforcement may only be available after it's arrival cue is
* true
*
* 12 5/20/97 2:29p Hoffoss
* Added message box queries for close window operation on all modal
* dialog boxes.
*
* 11 5/14/97 4:08p Lawrance
* removing my_index from game arrays
*
* 10 4/29/97 3:02p Hoffoss
* Reinforcement type is now automatically handled by Fred.
*
* 9 4/17/97 2:01p Hoffoss
* All dialog box window states are saved between sessions now.
*
* 8 3/20/97 3:55p Hoffoss
* Major changes to how dialog boxes initialize (load) and update (save)
* their internal data. This should simplify things and create less
* problems.
*
* 7 2/27/97 3:09p Allender
* major wing structure enhancement. simplified wing code. All around
* better wing support
*
* 6 2/21/97 5:34p Hoffoss
* Added extensive modification detection and fixed a bug in initial
* orders editor.
*
* 5 2/20/97 4:03p Hoffoss
* Several ToDo items: new reinforcement clears arrival cue, reinforcement
* control from ship and wing dialogs, show grid toggle.
*
* 4 2/17/97 5:28p Hoffoss
* Checked RCS headers, added them were missing, changing description to
* something better, etc where needed.
*
* 3 2/04/97 3:10p Hoffoss
* Reinforcements editor fully implemented.
*
* 2 2/03/97 1:32p Hoffoss
* Reinforcement editor functional, but still missing a few options.
* Checking in good code now prior to experimenting, so I can revert if
* needed.
*
* $NoKeywords: $
*/
#include "stdafx.h"
#include "FRED.h"
#include "ReinforcementEditorDlg.h"
#include "mission/missionparse.h"
#include "globalincs/linklist.h"
#include "ship/ship.h"
#include "FREDDoc.h"
#include "Management.h"
#include "mission/missionmessage.h"
#define ID_WING_DATA 9000
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// reinforcement_editor_dlg dialog
reinforcement_editor_dlg::reinforcement_editor_dlg(CWnd* pParent /*=NULL*/)
: CDialog(reinforcement_editor_dlg::IDD, pParent)
{
//{{AFX_DATA_INIT(reinforcement_editor_dlg)
m_uses = 0;
m_delay = 0;
//}}AFX_DATA_INIT
cur = -1;
}
void reinforcement_editor_dlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(reinforcement_editor_dlg)
DDX_Control(pDX, IDC_DELAY_SPIN, m_delay_spin);
DDX_Control(pDX, IDC_USES_SPIN, m_uses_spin);
DDX_Text(pDX, IDC_USES, m_uses);
DDX_Text(pDX, IDC_DELAY, m_delay);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(reinforcement_editor_dlg, CDialog)
//{{AFX_MSG_MAP(reinforcement_editor_dlg)
ON_LBN_SELCHANGE(IDC_LIST, OnSelchangeList)
ON_BN_CLICKED(IDC_ADD, OnAdd)
ON_BN_CLICKED(IDC_DELETE, OnDelete)
ON_WM_CLOSE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// reinforcement_editor_dlg message handlers
BOOL reinforcement_editor_dlg::OnInitDialog()
{
int i;
CListBox *box;
CDialog::OnInitDialog();
theApp.init_window(&Reinforcement_wnd_data, this);
box = (CListBox *) GetDlgItem(IDC_LIST);
for (i=0; i<Num_reinforcements; i++) {
m_reinforcements[i] = Reinforcements[i];
box->AddString(Reinforcements[i].name);
}
m_num_reinforcements = Num_reinforcements;
m_uses_spin.SetRange(1, 99);
m_delay_spin.SetRange(0, 1000);
update_data();
if (Num_reinforcements == MAX_REINFORCEMENTS)
GetDlgItem(IDC_ADD) -> EnableWindow(FALSE);
return TRUE;
}
void reinforcement_editor_dlg::update_data()
{
object *objp;
int enable = TRUE;
if (cur < 0) {
m_uses = 0;
m_delay = 0;
enable = FALSE;
} else {
m_uses = m_reinforcements[cur].uses;
m_delay = m_reinforcements[cur].arrival_delay;
}
UpdateData(FALSE);
GetDlgItem(IDC_USES)->EnableWindow(enable);
GetDlgItem(IDC_USES_SPIN)->EnableWindow(enable);
GetDlgItem(IDC_DELAY)->EnableWindow(enable);
GetDlgItem(IDC_DELAY_SPIN)->EnableWindow(enable);
if (cur < 0)
return;
// disable the uses entries if the reinforcement is a ship
objp = GET_FIRST(&obj_used_list);
while (objp != END_OF_LIST(&obj_used_list)) {
if (objp->type == OBJ_SHIP) {
if ( !stricmp( Ships[objp->instance].ship_name, m_reinforcements[cur].name) ) {
GetDlgItem(IDC_USES)->EnableWindow(FALSE);
GetDlgItem(IDC_USES_SPIN)->EnableWindow(FALSE);
break;
}
}
objp = GET_NEXT(objp);
}
}
void reinforcement_editor_dlg::OnSelchangeList()
{
save_data();
cur = ((CListBox *) GetDlgItem(IDC_LIST))->GetCurSel();
GetDlgItem(IDC_DELETE) -> EnableWindow(cur != -1);
update_data();
}
void reinforcement_editor_dlg::save_data()
{
UpdateData(TRUE);
UpdateData(TRUE);
if (cur >= 0) {
Assert(cur < m_num_reinforcements);
m_reinforcements[cur].uses = m_uses;
m_reinforcements[cur].arrival_delay = m_delay;
// save the message information to the reinforcement structure. First clear out the string
// entires in the Reinforcement structure
memset( m_reinforcements[cur].no_messages, 0, MAX_REINFORCEMENT_MESSAGES * NAME_LENGTH );
memset( m_reinforcements[cur].yes_messages, 0, MAX_REINFORCEMENT_MESSAGES * NAME_LENGTH );
}
}
int reinforcement_editor_dlg::query_modified()
{
int i, j;
save_data();
if (Num_reinforcements != m_num_reinforcements)
return 1;
for (i=0; i<Num_reinforcements; i++) {
if (stricmp(m_reinforcements[i].name, Reinforcements[i].name))
return 1;
if (m_reinforcements[i].uses != Reinforcements[i].uses)
return 1;
if ( m_reinforcements[i].arrival_delay != Reinforcements[i].arrival_delay )
return 1;
// determine if the message content has changed
for ( j = 0; j < MAX_REINFORCEMENT_MESSAGES; j++ ) {
if ( stricmp(m_reinforcements[i].no_messages[j], Reinforcements[i].no_messages[j]) )
return 1;
}
for ( j = 0; j < MAX_REINFORCEMENT_MESSAGES; j++ ) {
if ( stricmp(m_reinforcements[i].yes_messages[j], Reinforcements[i].yes_messages[j]) )
return 1;
}
}
return 0;
}
void reinforcement_editor_dlg::OnOK()
{
int i, j;
save_data();
// clear arrival cues for any new reinforcements to the list
for (i=0; i<m_num_reinforcements; i++) {
for (j=0; j<Num_reinforcements; j++)
if (!stricmp(m_reinforcements[i].name, Reinforcements[j].name))
break;
if (j == Num_reinforcements) {
for (j=0; j<MAX_SHIPS; j++)
if ((Ships[j].objnum != -1) && !stricmp(m_reinforcements[i].name, Ships[j].ship_name)) {
//free_sexp2(Ships[j].arrival_cue);
//Ships[j].arrival_cue = Locked_sexp_false;
break;
}
if (j == MAX_SHIPS) {
for (j=0; j<MAX_WINGS; j++)
if (Wings[j].wave_count && !stricmp(m_reinforcements[i].name, Wings[j].name)) {
//free_sexp2(Wings[j].arrival_cue);
//Wings[j].arrival_cue = Locked_sexp_false;
break;
}
Assert(j < MAX_WINGS);
}
}
}
if (Num_reinforcements != m_num_reinforcements)
set_modified();
Num_reinforcements = m_num_reinforcements;
for (i=0; i<m_num_reinforcements; i++) {
if (memcmp((void *) &Reinforcements[i], (void *) &m_reinforcements[i], sizeof(reinforcements)))
set_modified();
Reinforcements[i] = m_reinforcements[i];
set_reinforcement( Reinforcements[i].name, 1 ); // this call should
}
Update_ship = Update_wing = 1;
theApp.record_window_data(&Reinforcement_wnd_data, this);
CDialog::OnOK();
}
void reinforcement_editor_dlg::OnCancel()
{
theApp.record_window_data(&Reinforcement_wnd_data, this);
CDialog::OnCancel();
}
/////////////////////////////////////////////////////////////////////////////
// reinforcement_select dialog
reinforcement_select::reinforcement_select(CWnd* pParent /*=NULL*/)
: CDialog(reinforcement_select::IDD, pParent)
{
//{{AFX_DATA_INIT(reinforcement_select)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
cur = -1;
}
void reinforcement_select::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(reinforcement_select)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(reinforcement_select, CDialog)
//{{AFX_MSG_MAP(reinforcement_select)
ON_LBN_SELCHANGE(IDC_LIST, OnSelchangeList)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// reinforcement_select message handlers
BOOL reinforcement_select::OnInitDialog()
{
int i, z;
CListBox *box;
object *ptr;
CDialog::OnInitDialog();
box = (CListBox *) GetDlgItem(IDC_LIST);
ptr = GET_FIRST(&obj_used_list);
while (ptr != END_OF_LIST(&obj_used_list)) {
if (ptr->type == OBJ_SHIP) {
z = box->AddString(Ships[ptr->instance].ship_name);
box->SetItemData(z, OBJ_INDEX(ptr));
}
ptr = GET_NEXT(ptr);
}
for (i=0; i<num_wings; i++) {
z = box->AddString(Wings[i].name);
box->SetItemData(z, ID_WING_DATA + i);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void reinforcement_select::OnSelchangeList()
{
cur = ((CListBox *) GetDlgItem(IDC_LIST))->GetCurSel();
GetDlgItem(IDOK)->EnableWindow(cur != -1);
}
void reinforcement_select::OnOK()
{
cur = ((CListBox *) GetDlgItem(IDC_LIST))->GetCurSel();
Assert(cur != -1);
((CListBox *) GetDlgItem(IDC_LIST)) -> GetText(cur, name);
CDialog::OnOK();
}
void reinforcement_select::OnCancel()
{
cur = -1;
CDialog::OnCancel();
}
void reinforcement_editor_dlg::OnAdd()
{
int i, wing_index;
reinforcement_select dlg;
CString name_check;
dlg.DoModal();
if (dlg.cur != -1) {
// if we've run out of reinforcement slots
if (m_num_reinforcements == MAX_REINFORCEMENTS) {
MessageBox("Reached limit on reinforcements. Can't add more!");
return;
}
// if this is a wing, make sure its a valid wing (no mixed ship teams)
wing_index = wing_lookup((char*)dlg.name);
if(wing_index >= 0){
if(wing_has_conflicting_teams(wing_index)){
MessageBox("Cannot have a reinforcement wing with mixed teams, sucka!");
return;
}
}
i = m_num_reinforcements++;
strcpy(m_reinforcements[i].name, dlg.name);
((CListBox *) GetDlgItem(IDC_LIST)) -> AddString(dlg.name);
m_reinforcements[i].type = 0;
m_reinforcements[i].uses = 1;
m_reinforcements[i].arrival_delay = 0;
memset( m_reinforcements[i].no_messages, 0, MAX_REINFORCEMENT_MESSAGES * NAME_LENGTH );
memset( m_reinforcements[i].yes_messages, 0, MAX_REINFORCEMENT_MESSAGES * NAME_LENGTH );
if (m_num_reinforcements == MAX_REINFORCEMENTS){
GetDlgItem(IDC_ADD) -> EnableWindow(FALSE);
}
}
}
void reinforcement_editor_dlg::OnDelete()
{
int i;
if (cur != -1) {
((CListBox *) GetDlgItem(IDC_LIST)) -> DeleteString(cur);
for (i=cur; i<m_num_reinforcements-1; i++)
m_reinforcements[i] = m_reinforcements[i + 1];
}
m_num_reinforcements--;
cur = -1;
if (!m_reinforcements)
GetDlgItem(IDC_DELETE) -> EnableWindow(FALSE);
}
void reinforcement_editor_dlg::OnClose()
{
int z;
if (query_modified()) {
z = MessageBox("Do you want to keep your changes?", "Close", MB_ICONQUESTION | MB_YESNOCANCEL);
if (z == IDCANCEL)
return;
if (z == IDYES) {
OnOK();
return;
}
}
CDialog::OnClose();
}
| [
"[email protected]"
]
| [
[
[
1,
474
]
]
]
|
430a8bef78ee5c59fdc19d1b4e4dd71110c94e14 | 3970f1a70df104f46443480d1ba86e246d8f3b22 | /imebra/src/base/include/baseStream.h | e6fd497fc925b1422e91e99da6f1ad4a7d4dca5e | []
| no_license | zhan2016/vimrid | 9f8ea8a6eb98153300e6f8c1264b2c042c23ee22 | 28ae31d57b77df883be3b869f6b64695df441edb | refs/heads/master | 2021-01-20T16:24:36.247136 | 2009-07-28T18:32:31 | 2009-07-28T18:32:31 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,077 | h | /*
0.0.46
Imebra: a C++ dicom library.
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 by Paolo Brandoli
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE Version 3
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU AFFERO GENERAL PUBLIC LICENSE Version 3 for more details.
You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE Version 3
along with this program; If not, see http://www.gnu.org/licenses/
-------------------
If you want to use Imebra commercially then you have to buy the commercial
license available at http://puntoexe.com
After you buy the commercial license then you can use Imebra according
to the terms described in the Imebra Commercial License Version 1.
A copy of the Imebra Commercial License Version 1 is available in the
documentation pages.
Imebra is available at http://puntoexe.com
The author can be contacted by email at [email protected] or by mail at
the following address:
Paolo Brandoli
Preglov trg 6
1000 Ljubljana
Slovenia
*/
/*! \file baseStream.h
\brief Declaration of the the base class for the streams (memory, file, ...)
used by the puntoexe library.
*/
#if !defined(imebraBaseStream_3146DA5A_5276_4804_B9AB_A3D54C6B123A__INCLUDED_)
#define imebraBaseStream_3146DA5A_5276_4804_B9AB_A3D54C6B123A__INCLUDED_
#include "baseObject.h"
#include "../include/exception.h"
#include <vector>
#include <map>
#include <stdexcept>
///////////////////////////////////////////////////////////
//
// Everything is in the namespace puntoexe
//
///////////////////////////////////////////////////////////
namespace puntoexe
{
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
/// \brief This class represents a stream.
///
/// Specialized classes derived from this class can
/// read/write from/to files stored on the computer's
/// disks, on the network or in memory.
///
/// The application can read or write into the stream
/// by using the streamReader or the streamWriter.
///
/// While this class can be used across several threads,
/// the streamReader and the streamWriter can be used in
/// one thread only. This is not a big deal, since one
/// stream can be connected to several streamReaders and
/// streamWriters.
///
/// The library supplies two specialized streams derived
/// from this class:
/// - puntoexe::stream (used to read or write into physical
/// files)
/// - puntoexe::memoryStream (used to read or write into
/// puntoexe::memory objects)
///
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
class baseStream : public baseObject
{
public:
/// \brief Writes raw data into the stream.
///
/// The function is multithreading-safe and is called by
/// the streamWriter class when its buffer has to be
/// flushed.
///
/// @param startPosition the position in the file where
/// the data has to be written
/// @param pBuffer pointer to the data that has to
/// be written
/// @param bufferLength number of bytes in the data
/// buffer that has to be written
///
///////////////////////////////////////////////////////////
virtual void write(imbxUint32 startPosition, imbxUint8* pBuffer, imbxUint32 bufferLength) = 0;
/// \brief Read raw data from the stream.
///
/// The function is multithreading-safe and is called by
/// the streamReader class when its buffer has to be
/// refilled.
///
/// @param startPosition the position in the file from
/// which the data has to be read
/// @param pBuffer a pointer to the memory where the
/// read data has to be placed
/// @param bufferLength the number of bytes to read from
/// the file
/// @return the number of bytes read from the file. When
/// it is 0 then the end of the file has been
/// reached
///
///////////////////////////////////////////////////////////
virtual imbxUint32 read(imbxUint32 startPosition, imbxUint8* pBuffer, imbxUint32 bufferLength) = 0;
};
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
/// \brief The base exception for all the exceptions
/// thrown by the function in baseStream.
///
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
class streamException: public std::runtime_error
{
public:
streamException(std::string message): std::runtime_error(message){}
};
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
/// \brief Exception thrown when the stream cannot be
/// open.
///
///////////////////////////////////////////////////////////
class streamExceptionOpen : public streamException
{
public:
streamExceptionOpen(std::string message): streamException(message){}
};
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
/// \brief Exception thrown when there is an error during
/// the read phase.
///
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
class streamExceptionRead : public streamException
{
public:
streamExceptionRead(std::string message): streamException(message){}
};
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
/// \brief Exception thrown when there is an error during
/// the write phase.
///
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
class streamExceptionWrite : public streamException
{
public:
streamExceptionWrite(std::string message): streamException(message){}
};
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
/// \brief Exception thrown when there are problems during
/// the closure of the stream.
///
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
class streamExceptionClose : public streamException
{
public:
streamExceptionClose(std::string message): streamException(message){}
};
} // namespace puntoexe
#endif // !defined(imebraBaseStream_3146DA5A_5276_4804_B9AB_A3D54C6B123A__INCLUDED_)
| [
"[email protected]"
]
| [
[
[
1,
203
]
]
]
|
9b088c63af5f34730d072644f2b88ef6e894be81 | 867f5533667cce30d0743d5bea6b0c083c073386 | /jingxian-network/src/jingxian/string/case_functions.h | 269c50bc704e817994c2b00c3a98b6443c3f7fc5 | []
| no_license | mei-rune/jingxian-project | 32804e0fa82f3f9a38f79e9a99c4645b9256e889 | 47bc7a2cb51fa0d85279f46207f6d7bea57f9e19 | refs/heads/master | 2022-08-12T18:43:37.139637 | 2009-12-11T09:30:04 | 2009-12-11T09:30:04 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,422 | h |
#ifndef _CASE_FUNCTIONS_HPP_
#define _CASE_FUNCTIONS_HPP_
#include "jingxian/config.h"
#if !defined (JINGXIAN_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* JINGXIAN_LACKS_PRAGMA_ONCE */
// Include files
# include <algorithm>
# include "jingxian/string/ctype_traits.h"
_jingxian_begin
template < typename S
, typename F
>
inline S &transform_impl(S &s, F f)
{
std::transform(s.begin(), s.end(), s.begin(), f);
return s;
}
template <typename S>
inline S &transform_upper(S &s)
{
typedef ctype_traits< typename S::value_type > ctype_traits_t;
return transform_impl(s, &ctype_traits_t::to_upper);
}
template <typename S>
inline S &transform_lower(S &s)
{
typedef ctype_traits<typename S::value_type> ctype_traits_t;
return transform_impl(s, &ctype_traits_t::to_lower);
}
template <typename S>
inline S to_upper(S const &s)
{
S r(s);
transform_upper(r);
return r;
}
template <typename S>
inline S to_lower(S const &s)
{
S r(s);
transform_lower(r);
return r;
}
template <typename S>
inline S to_upper(const typename S::value_type* s)
{
S r(s);
transform_upper(r);
return r;
}
template <typename S>
inline S to_lower(const typename S::value_type* s)
{
S r(s);
transform_lower(r);
return r;
}
_jingxian_end
#endif /* _CASE_FUNCTIONS_HPP_ */
| [
"runner.mei@0dd8077a-353d-11de-b438-597f59cd7555"
]
| [
[
[
1,
82
]
]
]
|
6cb932c40fc1315c811de2c1c7917a47bcf75d49 | 611fc0940b78862ca89de79a8bbeab991f5f471a | /src/ParticleEmitter/Particle.h | dacdc88be7f2a6d54f70294281b8d4e30f9d2ab9 | []
| no_license | LakeIshikawa/splstage2 | df1d8f59319a4e8d9375b9d3379c3548bc520f44 | b4bf7caadf940773a977edd0de8edc610cd2f736 | refs/heads/master | 2021-01-10T21:16:45.430981 | 2010-01-29T08:57:34 | 2010-01-29T08:57:34 | 37,068,575 | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 1,350 | h | #pragma once
#include <d3dx9.h>
#define PARTICLE_Z 0.0f
//! パーティクル
/****************************************************************//**
* \see ParticleEmitter
* \nosubgrouping
********************************************************************/
class Particle
{
public:
Particle () : mCurPos(D3DXVECTOR3(0,0,0)), mCurVel(D3DXVECTOR3(0,0,0)), isAlive(false){}
virtual ~Particle (void){}
//! アクセス
virtual D3DXVECTOR3* GetPos() { return &mCurPos; }
//! アクセス
virtual D3DCOLOR* GetColor() { return &mColor; }
//! アクセス
virtual D3DXVECTOR3* GetSpd() { return &mCurVel; }
//! アクセス
virtual bool IsAlive() { return isAlive; }
//! アクセス
virtual void SetAlive(bool rAlive) { isAlive = rAlive; }
//! アクセス
virtual void SetPos(int rX, int rY) { mCurPos.x = rX; mCurPos.y = rY; mCurPos.z = PARTICLE_Z; }
//! アクセス
virtual void SetSpd(float rX, float rY) { mCurVel.x = rX; mCurVel.y = rY; mCurVel.z = 0.0f; }
//! アクセス
virtual void SetColor(D3DCOLOR rColor) { mColor = rColor; }
//! 位置に速度を足しこむ
virtual void UpdatePos() { mCurPos += mCurVel; }
protected:
//! 位置
D3DXVECTOR3 mCurPos;
//! 速度
D3DXVECTOR3 mCurVel;
//! 色
D3DCOLOR mColor;
//! 生きているか
bool isAlive;
};
| [
"lakeishikawa@c9935178-01ba-11df-8f7b-bfe16de6f99b"
]
| [
[
[
1,
48
]
]
]
|
75a9844b6f0c071b956821e9a13b7f33e796db83 | c1996db5399aecee24d81cd9975937d3c960fa6c | /src/mainviewcontroller.cpp | 77c718b50e9deb51aa440444b3ec705fdbf67346 | []
| no_license | Ejik/Life-organizer | 7069a51a4a0dc1112b018f162c00f0292c718334 | 1954cecab75ffd4ce3e7ff87606eb11975ab872d | refs/heads/master | 2020-12-24T16:50:25.616728 | 2009-10-28T06:30:18 | 2009-10-28T06:30:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 282 | cpp | #include "mainviewcontroller.h"
#include "globalcontext.h"
#include "ui_mainwindow.h"
MainViewController::MainViewController()
{
}
void MainViewController::setWindowTitle(const QString value)
{
ui->centralWidget->setWindowTitle("Life organizer - " + value);
}
| [
"[email protected]"
]
| [
[
[
1,
14
]
]
]
|
0740eead74fb148a7f6da9712c05ad11a673b551 | 7eb81dd252c71766e047eaf6c0a78549b3eeee20 | /branches/problem-branch/trunk/src/egmg/Stencil/Helmholtz2D2.cpp | 15e8f3526bee0f05442ba935773edd8e8446c63a | []
| no_license | BackupTheBerlios/egmg-svn | 1325afce712567c99bd7601e24c6cac44a032905 | 71d770fc123611de8a62d2cabf4134e783dbae49 | refs/heads/master | 2021-01-01T15:18:37.469550 | 2007-04-30T11:31:27 | 2007-04-30T11:31:27 | 40,614,587 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,428 | cpp | /** \file Helmholtz2D2.h
* \author Andre Oeckerath
* \brief Contains the implementation of the class Helmholtz2D2
*/
#include "Helmholtz2D2.h"
namespace mg
{
PositionArray Helmholtz2D2::initJx_() const
{
const int t[]={0,-1,0,1,0};
return PositionArray(t,5);
}
PositionArray Helmholtz2D2::initJy_() const
{
const int t[]={0,0,1,0,-1};
return PositionArray(t,5);
}
Helmholtz2D2::Helmholtz2D2(
Precision ax,
Precision ay,
Precision c )
: jx_( initJx_() ), jy_( initJy_() ),
ax_( ax ), ay_( ay ), c_( c )
{}
Helmholtz2D2::~Helmholtz2D2() {}
NumericArray Helmholtz2D2::getL(
const Position,
const Index,
const Index,
const Index nx,
const Index ny,
const Precision hx,
const Precision hy,
const Point origin) const
{
NumericArray result( 0.0, 5 );
result[0]=(2.0*ax_)/(hx*hx)+(2.0*ay_)/(hy*hy)+c_;
result[1]=result[3]=(-1.0*ax_)/(hx*hx);
result[2]=result[4]=(-1.0*ay_)/(hy*hy);
return result;
}
PositionArray Helmholtz2D2::getJx(
const Position,
const Index,
const Index ) const
{
return jx_;
}
PositionArray Helmholtz2D2::getJy(
const Position,
const Index,
const Index ) const
{
return jy_;
}
Index Helmholtz2D2::size() const
{
return 1;
}
bool Helmholtz2D2::isConstant() const
{
return true;
}
}
| [
"jirikraus@c8ad9165-030d-0410-b95e-c1df97c73749"
]
| [
[
[
1,
76
]
]
]
|
5765a3e565351b823f85ef61be12e7dc46334f9e | df96cbce59e3597f2aecc99ae123311abe7fce94 | /watools/common/dns_resolver.h | 16ea163a2cc4dd9ce4d93f933a1a2da315952a25 | []
| no_license | abhishekbhalani/webapptools | f08b9f62437c81e0682497923d444020d7b319a2 | 93b6034e0a9e314716e072eb6d3379d92014f25a | refs/heads/master | 2021-01-22T17:58:00.860044 | 2011-12-14T10:54:11 | 2011-12-14T10:54:11 | 40,562,019 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 539 | h | #ifndef DNS_RESOLVER__H__
#define DNS_RESOLVER__H__
#include <vector>
#include <string>
namespace dns_resolver {
/**
* Get ips and alias from dns server
* @param [in] const std::string & hostname - hostname (ex. "www.google.com")
* @param [out] std::vector<std::string> & ip - list of ips
* @param [out] std::vector<std::string> & alias - list of alias
* @return int - error code. zero is success
*/
int resolve(const std::string &hostname, std::vector<std::string> &ip, std::vector<std::string> &alias);
}
#endif | [
"stinger911@79c36d58-6562-11de-a3c1-4985b5740c72",
"[email protected]"
]
| [
[
[
1,
17
]
],
[
[
18,
18
]
]
]
|
51eb9be3e0e9a0bc3520b14d511467153ee757bb | 90aa2eebb1ab60a2ac2be93215a988e3c51321d7 | /castor/branches/boost/libs/castor/test/test_postfix_unary_ops.cpp | 702af75cd4fc2667acacc68eb2d51384a9b46afc | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
]
| permissive | roshannaik/castor | b9f4ea138a041fe8bccf2d8fc0dceeb13bcca5a6 | e86e2bf893719bf3164f9da9590217c107cbd913 | refs/heads/master | 2021-04-18T19:24:38.612073 | 2010-08-18T05:10:39 | 2010-08-18T05:10:39 | 126,150,539 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 970 | cpp | #include <boost/castor.h>
#include <boost/test/minimal.hpp>
#include "test_ile.h"
using namespace castor;
int test_main(int, char * [])
{
{ // Simple Postfix increment/decrement
lref<int> li = 1;
BOOST_CHECK((li++)() == 1);
BOOST_CHECK(*li == 2);
BOOST_CHECK((li--)() == 2);
BOOST_CHECK(*li == 1);
}
{ // Compound Postfix increment expression
lref<int> li = 2;
BOOST_CHECK(((li++) * 2 + 5)() == 9);
BOOST_CHECK(*li == 3);
}
{ // Compound Postfix decrement expression
lref<int> li = 5;
BOOST_CHECK(((li--) * 2)() == 10);
BOOST_CHECK(*li == 4);
}
{ // Mix of Postfix and Prefix inc/decrement expressions
lref<int> li = 2;
((--li) * (li++))(); // result of this evaluation is an undefined value
BOOST_CHECK(*li == 2); // li's value is however defined
}
return 0;
}
| [
"[email protected]"
]
| [
[
[
1,
45
]
]
]
|
ab4cee8ce2bbb30f5d61419521f0854259779ed8 | 3761dcce2ce81abcbe6d421d8729af568d158209 | /src/cybergarage/upnp/IconList.cpp | b9e0c6f27c9133a93930f524be48c475aefa9a8d | [
"BSD-3-Clause"
]
| permissive | claymeng/CyberLink4CC | af424e7ca8529b62e049db71733be91df94bf4e7 | a1a830b7f4caaeafd5c2db44ad78fbb5b9f304b2 | refs/heads/master | 2021-01-17T07:51:48.231737 | 2011-04-08T15:10:49 | 2011-04-08T15:10:49 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 826 | cpp | /******************************************************************
*
* CyberLink for C++
*
* Copyright (C) Satoshi Konno 2002-2003
*
* File: IconList.cpp
*
* Revision;
*
* 08/15/03
* - first revision
*
******************************************************************/
#include <cybergarage/upnp/Icon.h>
#include <cybergarage/upnp/IconList.h>
using namespace CyberLink;
////////////////////////////////////////////////
// Constants
////////////////////////////////////////////////
const char *IconList::ELEM_NAME = "iconList";
////////////////////////////////////////////////
// Methods
////////////////////////////////////////////////
void IconList::clear()
{
int nIcon = size();
for (int n=0; n<nIcon; n++) {
Icon *ico = getIcon(n);
delete ico;
}
Vector::clear();
}
| [
"skonno@b944b01c-6696-4570-ab44-a0e08c11cb0e"
]
| [
[
[
1,
39
]
]
]
|
61c85460691d1c393384e149b8de28280dd85f7f | 8e884f5b3617ff81a593273fb23286b4d789f548 | /MakeDef/Library/PCL_Set.hxx | 961d905168a6a56f463c72bc115cae373919a3bf | []
| no_license | mau4x/PCL-1 | 76716e6af3f1e616ca99ac790ef6c5e8c36a8d46 | b440c2ce3f3016c0c6f2ecdea9643f1a9bae19cc | refs/heads/master | 2020-04-06T21:48:35.864329 | 2011-08-12T21:38:54 | 2011-08-12T21:38:54 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 448 | hxx | #ifndef __PCL_NUMERIC_H__
#define __PCL_NUMERIC_H__
#ifndef __PCL_H__
# error Do not include this file directly. Include "PCL.h" instead
#endif
PCL_CLASS(Set):
LSet(uint InitialLength = 0, bool InitialValue = false);
LSet(const LSet &Set);
virtual ~LSet();
virtual const VSet& operator =(const LSet &Set);
#include "PCL_VSet.hxx"
private:
LMemory m_set;
uint m_length;
uchar m_tailMask;
};
#endif // __PCL_NUMERIC_H__
| [
"[email protected]"
]
| [
[
[
1,
20
]
]
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.